Summary: | ASTERISK-10180: Asterisk fails in Loop Back | ||
Reporter: | Iñaki Baz Castillo (ibc) | Labels: | |
Date Opened: | 2007-08-27 19:52:50 | Date Closed: | 2011-06-07 14:03:22 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I have an OpenSer in port 5060 and Asterisk in 5070. If Asterisk makes a call to an OpenSer extension and OpenSer rewrites URI to come back to Asterisk, Asterisk returns a "482 Loop Detected" and tries to establishe a internal call using chan_local **to the original URI** (even if the URI has been changed by OpenSer). This is a big issue because it doesn't allow a "forwarding" system where Asterisk receives a call from PSTN and makes a call to a SIP user of OpenSer, OpenSer rewrites the URI to call to PSTN via Asterisk -> so Asterisk fails. ****** STEPS TO REPRODUCE ****** LoopBack works just if the URI is not changed when coming back: - Asterisk calls to "sip:500@domain.org". - The call arrives to OpenSer. - OpenSer rewrites URI to "sip:500@domain.org:5070". - The INVITE comes back to Asterisk. - Asterisk responses with a "482 Loop Detected" but it generates a chan_local and establishes the call. LOG: *CLI> dial 500 -- Executing [500@default:1] Dial("OSS/dsp", "SIP/openser/500") in new stack -- Called openser/500 -- Got SIP response 482 "Loop Detected" back from 82.94.0.210 -- Now forwarding OSS/dsp to 'Local/500@entrantes-openser' (thanks to SIP/openser-081db060) -- Executing [500@entrantes-openser:1] Playback("Local/500@entrantes-openser-71d1,2", "demo-congrats") in new stack -- <Local/500@entrantes-openser-71d1,2> Playing 'demo-congrats' (language 'en') -- Local/500@entrantes-openser-71d1,1 answered OSS/dsp << Console call has been answered >> [Aug 28 02:45:14] WARNING[20710]: chan_oss.c:682 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory [Aug 28 02:45:15] WARNING[20710]: chan_oss.c:682 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory ... But if the URI is changed by OpenSer then Asterisk fails and tries to call to the **original** URI of the first INVITE that Asterisk created: - Asterisk calls to "sip:1500@domain.org". - The call arrives to OpenSer. - There is an alias, so URI "sip:1500@domain.org" becomes "sip:500@domain.org". - OpenSer rewrites URI to "sip:500@domain.org:5070". - The INVITE comes back to Asterisk. - Asterisk responses with a "482 Loop Detected" and tries to generate a chan_local but **to 1500** (the original URI) so it fails. LOG: *CLI> dial 1500 -- Executing [1500@default:1] Dial("OSS/dsp", "SIP/openser/1500") in new stack -- Called openser/1500 -- Got SIP response 482 "Loop Detected" back from 82.94.0.210 -- Now forwarding OSS/dsp to 'Local/1500@entrantes-openser' (thanks to SIP/openser-081db060) [Aug 28 02:48:53] NOTICE[20740]: chan_local.c:570 local_alloc: No such extension/context 1500@entrantes-openser creating local channel [Aug 28 02:48:53] NOTICE[20740]: app_dial.c:503 wait_for_answer: Unable to create local channel for call forward to 'Local/1500@entrantes-openser' (cause = 0) == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'OSS/dsp' status is 'CHANUNAVAIL' ****** ADDITIONAL INFORMATION ****** I don't know if Asterisk SIP stack doesn't try to implement this feature of allowing LoopBack, but since Asterisk is a B2BUA is really annoying it doesn't allow a forwarding system when using Asterisk with a real SIP proxy as OpenSer. | ||
Comments: | By: Iñaki Baz Castillo (ibc) 2007-08-27 20:03:06 Oh, just now I've found this bug completely related: http://bugs.digium.com/view.php?id=7403 in which there are patchs to allow spiral instead of causing a '482 Loop Detected' condition. I'll try it. By: Jason Parker (jparker) 2007-08-29 14:21:00 Can this be closed in favor of 7403 then? By: Iñaki Baz Castillo (ibc) 2007-08-29 14:25:52 Yes, it can be closed since I've realized this is not a bug but a not implemented feature discussed in report 7403. Thanks. By: Jason Parker (jparker) 2007-08-29 14:26:44 Closing. Not an issue, per reporters previous comment. |