Summary: | ASTERISK-06284: Proxy Forking | ||
Reporter: | Antonio Abajo (zanzibar) | Labels: | |
Date Opened: | 2006-02-09 05:18:23.000-0600 | Date Closed: | 2006-02-14 18:15:09.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) capture_proxy_forking.txt | |
Description: | I have working like parallel proxy using an Application Server and I send two INVITEs (parallel proxy role, same CallId, different branch)to two extensions of the same Asterisk. When I receive 200ok of one branch, I send CANCEL message to second, but the response message "487 Request Terminated" to the INVITE to cancel is bad. I'm cancelling the first branch and Asterisk cancels the second. I supose that Asterisk is not prepared to work with proxy parallel in the same host. Attach the capture in Additional Information. Best Regards, ****** ADDITIONAL INFORMATION ****** ============================================================================== >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (BRANCH A) INVITE sip:58960@78.0.0.103 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bKc51bc88e9647c8b62a725dd8e7ba183d,SIP/2.0/UDP 78.0.0.101;branch=z9hG4bK2c5a.f18f5a35.0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK40CDE5D96B9C47F1B8E3DFCAEAB3D64A From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101> Contact: <sip:3400000123@192.168.1.240:5061;nat=yes> Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 INVITE Max-Forwards: 11 P-RTP-Proxy: YES Content-Type: application/sdp Record-Route: <sip:192.168.1.240:5060;lr=;transport=udp>,<sip:78.0.0.101;ftag=3203538322;lr=on> Content-Length: 317 =============================================================================== >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (BRANCH B) INVITE sip:58961@78.0.0.103 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bKa92aad32981c3cb1614e9f7931b0b888,SIP/2.0/UDP 78.0.0.101;branch=z9hG4bK2c5a.f18f5a35.0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK40CDE5D96B9C47F1B8E3DFCAEAB3D64A From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101> Contact: <sip:3400000123@192.168.1.240:5061;nat=yes> Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 INVITE Max-Forwards: 11 P-RTP-Proxy: YES Content-Type: application/sdp Record-Route: <sip:192.168.1.240:5060;lr=;transport=udp>,<sip:78.0.0.101;ftag=3203538322;lr=on> Content-Length: 317 ============================================================================== <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (BRANCH A) SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bKc51bc88e9647c8b62a725dd8e7ba183d,SIP/2.0/UDP 78.0.0.101;branch=z9hG4bK2c5a.f18f5a35.0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK40CDE5D96B9C47F1B8E3DFCAEAB3D64A;received=192 Record-Route: <sip:192.168.1.240:5060;lr=;transport=udp>,<sip:78.0.0.101;ftag=3203538322;lr=on> From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101>;tag=as3fe03cd3 Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Max-Forwards: 70 Contact: <sip:58960@78.0.0.103> Content-Type: application/sdp Content-Length: 236 ============================================================================== >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (BRANCH B) CANCEL sip:58961@78.0.0.103 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bKa92aad32981c3cb1614e9f7931b0b888,SIP/2.0/UDP 78.0.0.101;branch=z9hG4bK2c5a.f18f5a35.0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK40CDE5D96B9C47F1B8E3DFCAEAB3D64A From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101> Contact: <sip:3400000123@192.168.1.240:5061;nat=yes> Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 CANCEL Max-Forwards: 11 P-RTP-Proxy: YES Record-Route: <sip:192.168.1.240:5060;lr=;transport=udp>,<sip:78.0.0.101;ftag=3203538322;lr=on> Content-Length: 0 =============================================================================== <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (BRANCH A) BAD!!!! it is BRANCH B!!!! SIP/2.0 487 Request Terminated Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bKc51bc88e9647c8b62a725dd8e7ba183d,SIP/2.0/UDP 78.0.0.101;branch=z9hG4bK2c5a.f18f5a35.0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK40CDE5D96B9C47F1B8E3DFCAEAB3D64A;received=192 From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101>;tag=as3fe03cd3 Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Max-Forwards: 70 Contact: <sip:58960@78.0.0.103> Content-Length: 0 =============================================================================== <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (BRANCH B) SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bKa92aad32981c3cb1614e9f7931b0b888,SIP/2.0/UDP 78.0.0.101;branch=z9hG4bK2c5a.f18f5a35.0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK40CDE5D96B9C47F1B8E3DFCAEAB3D64A;received=192 Record-Route: <sip:192.168.1.240:5060;lr=;transport=udp>,<sip:78.0.0.101;ftag=3203538322;lr=on> From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101>;tag=as3fe03cd3 Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 CANCEL User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Max-Forwards: 70 Contact: <sip:58960@78.0.0.103> Content-Length: 0 ============================================================================= >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (BRANCH A) ACK sip:58960@78.0.0.103 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.240:5060;branch=z9hG4bK2b6ce71f856fb32960ba715d7e91f71a,SIP/2.0/UDP 78.0.0.101;branch=0,SIP/2.0/UDP 193.22.119.78:5061;received=192.168.1.240;rport=5061;branch=z9hG4bK5181B707E6A940E4A2F1C4F21BAC9F94 From: "3400000123" <sip:3400000123@78.0.0.101:5061>;tag=3203538322 To: <sip:3400000124@78.0.0.101>;tag=as3fe03cd3 Contact: <sip:3400000123@192.168.1.240:5061> Call-ID: 24E91F55-0B8A-4414-B7CD-42B358356DD7@192.168.1.240 CSeq: 59443 ACK Max-Forwards: 11 Content-Length: 0 | ||
Comments: | By: Olle Johansson (oej) 2006-02-09 07:46:40.000-0600 Did you have pedantic turned on in sip.conf ? By: Antonio Abajo (zanzibar) 2006-02-09 08:03:03.000-0600 yes, I have enable this option in sip.conf. By: Olle Johansson (oej) 2006-02-09 08:11:18.000-0600 then, according to the bug guidelines, I need a full SIP debug. Turn on debug to 4, verbose to 4 and then turn on SIP debug to capture the dialogs. Please attach as a file, not in the bug report. THank you. By: mikma (mikma) 2006-02-09 08:22:16.000-0600 It looks like chan_sip doesn't use the branch parameter of incoming requests and responses at all? Btw, one easy way to reproduce this problem is to register the same AOR twice with OpenSER. For example: register => 1003@server/1001 register => 1003@server/1002 By: Antonio Abajo (zanzibar) 2006-02-09 09:49:49.000-0600 Upload the capture file with the example in mode debug 4. If you needs anything else, tell me... Best regards By: Olle Johansson (oej) 2006-02-09 10:52:03.000-0600 I do agree with Mikael, this is something not supported in Asterisk chan_sip and not easy to fix. I have tried fixing this several times in the code, every patch more ugly and scary than the other one. For now, I think the best advice is to avoid this situation. We do need to fix this, but it is not very easy and is one of the reasons I believe we need to re-design the SIP channel.... By: Antonio Abajo (zanzibar) 2006-02-09 11:31:19.000-0600 Thank you very much by your attention, I will wait the redesign. I have other bug more important but it we will see tomorrow in other ticket. See you... By: Kevin P. Fleming (kpfleming) 2006-02-14 18:15:09.000-0600 As per oej's comments, fixing this will require substantial rework of the SIP channel driver. |