Summary: | ASTERISK-12756: Trouble with Temporarily Moved | ||
Reporter: | mattdarnell (mattdarnell) | Labels: | |
Date Opened: | 2008-09-19 17:50:21 | Date Closed: | 2008-09-23 10:27:17 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 13523.patch ( 1) 13523v2.patch | |
Description: | Iam testing the SIP TCP and am having trouble with the Moved Temporarily SIP Message. I am using 1.6 RC6 Once Asterisk receives the message I get this in the console: Unable to create local channel for call forward to 'SIP/::::TCP@3451@10.10.20.31:5067' (cause = 20) Below is the SIP trace. ********************* <--- SIP read from TCP://10.10.20.31:5060 ---> SIP/2.0 100 Trying FROM: "1000"<sip:1000@wikitelcom.com>;tag=as74ab814b TO: <sip:3451@10.10.20.31> CSEQ: 102 INVITE CALL-ID: 1989d15163e8597e31577007407992e8@wikitelcom.com VIA: SIP/2.0/TCP 10.10.20.50:5060;branch=z9hG4bK5f356ae5;rport CONTENT-LENGTH: 0 <-------------> --- (7 headers 0 lines) --- <--- SIP read from TCP://10.10.20.31:5060 ---> SIP/2.0 302 Moved Temporarily FROM: "1000"<sip:1000@wikitelcom.com>;tag=as74ab814b TO: <sip:3451@10.10.20.31>;tag=97bcfff0e7 CSEQ: 102 INVITE CALL-ID: 1989d15163e8597e31577007407992e8@wikitelcom.com VIA: SIP/2.0/TCP 10.10.20.50:5060;branch=z9hG4bK5f356ae5;rport CONTACT: <sip:3451@10.10.20.31:5067;transport=TCP> CONTENT-LENGTH: 0 SERVER: RTCC/3.0.0.0 <-------------> --- (9 headers 0 lines) --- -- Got SIP response 302 "Moved Temporarily" back from 10.10.20.31 Transmitting (no NAT) to 10.10.20.31:5060: ACK sip:3451@10.10.20.31 SIP/2.0 Via: SIP/2.0/TCP 10.10.20.50:5060;branch=z9hG4bK5f356ae5;rport Max-Forwards: 70 From: "1000" <sip:1000@wikitelcom.com>;tag=as74ab814b To: <sip:3451@10.10.20.31>;tag=97bcfff0e7 Contact: <sip:1000@10.10.20.50:5060;transport=TCP> Call-ID: 1989d15163e8597e31577007407992e8@wikitelcom.com CSeq: 102 ACK User-Agent: Makai Content-Length: 0 --- -- Now forwarding SIP/1000-09648728 to 'SIP/::::TCP@3451@10.10.20.31:5067' (thanks to SIP/exch-0964c710) == Using SIP RTP CoS mark 5 [Sep 19 11:42:27] WARNING[29048]: chan_sip.c:4181 create_addr: No such host: 3451@10.10.20.31 Really destroying SIP dialog '768961345131b4ac174866b0686596c2@10.10.20.50' Method: INVITE [Sep 19 11:42:27] NOTICE[29048]: app_dial.c:505 do_forward: Unable to create local channel for call forward to 'SIP/::::TCP@3451@10.10.20.31:5067' (cause = 20) == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/1000-09648728' status is 'CHANUNAVAIL' <--- Reliably Transmitting (NAT) to 67.53.192.111:54240 ---> SIP/2.0 503 Service Unavailable Via: SIP/2.0/TCP 67.53.191.111:38088;branch=z9hG4bK-d8754z-3b7d097a947cd95e-1---d8754z-;received=67.53.192.138;rport=54240 From: "1000"<sip:1000@64.75.211.160>;tag=c177381d To: "1000"<sip:1000@64.75.211.160>;tag=as1f99c9d9 Call-ID: MDY2NDQ3YTczNWVlZDFmYzJlNDFkMGNiZDgyMjM2ODY. CSeq: 2 INVITE User-Agent: Makai Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces, timer Contact: <sip:1000@64.75.211.111:5060;transport=TCP> Content-Length: 0 <------------> <--- SIP read from TCP://67.53.192.111:54240 ---> ACK sip:1000@64.75.211.111 SIP/2.0 Via: SIP/2.0/TCP 67.53.191.111:38088;branch=z9hG4bK-d8754z-3b7d097a947cd95e-1---d8754z-;rport To: "1000"<sip:1000@64.75.211.111>;tag=as1f99c9d9 From: "1000"<sip:1000@64.75.211.111>;tag=c177381d Call-ID: MDY2NDQ3YTczNWVlZDFmYzJlNDFkMGNiZDgyMjM2ODY. CSeq: 2 ACK Content-Length: 0 | ||
Comments: | By: Mark Michelson (mmichelson) 2008-09-22 11:45:09 Ouch, this is way off: "-- Now forwarding SIP/1000-09648728 to 'SIP/::::TCP@3451@10.10.20.31:5067' (thanks to SIP/exch-0964c710)" It needs to be "SIP/3451::::TCP@10.10.20.31:5067" There's obviously a parsing problem at some point along the line here that needs to be fixed. By: Mark Michelson (mmichelson) 2008-09-22 16:15:55 I've made a patch which should correct the parsing error that was occurring before. I am operating under the assumption that you have promiscredir set to yes in your sip.conf file. If that assumption is wrong, please let me know. Please test 13523.patch and report if it has fixed the problem. Thanks! By: mattdarnell (mattdarnell) 2008-09-22 16:36:41 Applied the patch, get a different result now. <-------------> --- (9 headers 0 lines) --- -- Got SIP response 302 "Moved Temporarily" back from 10.10.20.31 Transmitting (no NAT) to 10.10.20.31:5060: ACK sip:3451@10.10.20.31 SIP/2.0 Via: SIP/2.0/TCP 10.10.20.50:5060;branch=z9hG4bK4b37ecf8;rport Max-Forwards: 70 From: "1000" <sip:1000@wikitelcom.com>;tag=as4a82213e To: <sip:3451@10.10.20.31>;tag=abf1c2940 Contact: <sip:1000@10.10.20.50:5060;transport=TCP> Call-ID: 13110815188fc491038731155fa3d451@wikitelcom.com CSeq: 102 ACK User-Agent: Makai Content-Length: 0 --- -- Now forwarding SIP/1000-084df768 to 'SIP/::::TCP@3451' (thanks to SIP/exch-b7d541c8) == Using SIP RTP CoS mark 5 [Sep 22 11:44:43] WARNING[7486]: chan_sip.c:4181 create_addr: No such host: 3451 [Sep 22 11:44:43] WARNING[7486]: chan_sip.c:4181 create_addr: No such host: 3451 Really destroying SIP dialog '40cac70511394c8235cdd8711bfb8354@10.10.20.50' Method: INVITE [Sep 22 11:44:43] NOTICE[7486]: app_dial.c:505 do_forward: Unable to create local channel for call forward to 'SIP/::::TCP@3451' (cause = 20) [Sep 22 11:44:43] NOTICE[7486]: app_dial.c:505 do_forward: Unable to create local channel for call forward to 'SIP/::::TCP@3451' (cause = 20) == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/1000-084df768' status is 'CHANUNAVAIL' By: mattdarnell (mattdarnell) 2008-09-22 16:47:29 I think I applied the patch wrong. I am going to untar RC6, apply the patch, make clean & make & make install. Will report back. By: mattdarnell (mattdarnell) 2008-09-22 16:57:12 I am still experiencing this issue after a rebuild of asterisk. -- Got SIP response 302 "Moved Temporarily" back from 10.10.20.31 -- Now forwarding SIP/1000-09a16958 to 'SIP/::::TCP@3451' (thanks to SIP/exch-09a1b2e0) == Using SIP RTP CoS mark 5 [Sep 22 12:06:08] WARNING[26085]: chan_sip.c:4181 create_addr: No such host: 3451 [Sep 22 12:06:08] WARNING[26085]: chan_sip.c:4181 create_addr: No such host: 3451 [Sep 22 12:06:08] NOTICE[26085]: app_dial.c:505 do_forward: Unable to create local channel for call forward to 'SIP/::::TCP@3451' (cause = 20) [Sep 22 12:06:08] NOTICE[26085]: app_dial.c:505 do_forward: Unable to create local channel for call forward to 'SIP/::::TCP@3451' (cause = 20) By: Mark Michelson (mmichelson) 2008-09-22 17:06:39 oh, I'm an idiot. I see what I did wrong. I'm missing an "else" case for an if statement in the patch. New patch forthcoming... By: Mark Michelson (mmichelson) 2008-09-22 17:08:50 I've added 13523v2.patch which adds the missing else case I mentioned in my previous note. Thanks for finding the flaw with the first patch. By: mattdarnell (mattdarnell) 2008-09-22 17:17:00 Looks like it works! Great job. I will keep playing with it and reopen the ticket if I encounter an issue. -- Got SIP response 302 "Moved Temporarily" back from 10.10.20.31 -- Now forwarding SIP/1000-09763558 to 'SIP/3451::::TCP@10.10.20.31:5067' (thanks to SIP/exch-09767540) == Using SIP RTP CoS mark 5 -- SIP/10.10.20.31:5067-0976b528 is ringing -- SIP/10.10.20.31:5067-0976b528 answered SIP/1000-09763558 -- Native bridging SIP/1000-09763558 and SIP/10.10.20.31:5067-0976b528 -Matt By: Digium Subversion (svnbot) 2008-09-23 10:27:15 Repository: asterisk Revision: 144025 U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r144025 | mmichelson | 2008-09-23 10:27:14 -0500 (Tue, 23 Sep 2008) | 16 lines When a promiscuous redirect contained both a user and host portion in the Contact URI and specifies a transport, the parsing done in parse_moved_contact resulted in a malformed URI. This commit fixes the parsing so that a proper Dial string may be formed when the forwarded call is placed. (closes issue ASTERISK-12756) Reported by: mattdarnell Patches: 13523v2.patch uploaded by putnopvut (license 60) Tested by: mattdarnell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=144025 |