Summary: | ASTERISK-08529: SIP message 420 Bad extension sent out malformed. | ||
Reporter: | Tomas Muehlhoff (tmuehlhoff) | Labels: | |
Date Opened: | 2007-01-09 09:34:55.000-0600 | Date Closed: | 2007-01-11 09:14:41.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Interoperability |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk_patched2_working.pcap ( 1) asterisk-sip-420-malformed.pcap | |
Description: | SIP message 420 Bad extension sent out malformed, in case of SIP option "100rel" is sent as required. Reply message contains header without body, should be tailed by double CR/LF instead of single CR/LF (0x0d0a) INVITE sender can't fallback to option not required, so call can't be established. | ||
Comments: | By: Serge Vecher (serge-v) 2007-01-09 09:40:28.000-0600 As per bug guidelines, you need to attach a SIP debug trace illustrating the problem. Also, please note the the latest Asterisk release in 1.2 branch is 1.2.14. Please do the following: 1) Prepare test environment (reduce the amount of unrelated traffic on the server); 2) Make sure your logger.conf has the following line: console => notice,warning,error,debug 3) restart Asterisk with the following command: 'asterisk -Tvvvvvdddddngc | tee /tmp/verbosedebug.txt' 4) Enable SIP transaction logging with the following CLI commands: set debug 4 set verbose 4 sip debug 5) Trim startup information and attach verbosedebug.txt to the issue. By: Tomas Muehlhoff (tmuehlhoff) 2007-01-09 10:40:51.000-0600 no relevant output from Asterisk, due to problem in external signaling. By: Serge Vecher (serge-v) 2007-01-09 11:52:21.000-0600 if you can make a determination on what output is relevant, why not fix the problem yourself? The instructions I have provided produce the output required by the development team to understand how Asterisk deals with the malformed packets. Please follow these instructions or we can't help you. By: Tomas Muehlhoff (tmuehlhoff) 2007-01-10 02:23:03.000-0600 Sorry, I thought this was a standard reply. I can do so. I thought you might be interested in a fault I found anyway, since I didn't find anything similar in the bug-db, I best-guessed that the fault is still valid in more recent versions. Come back later with detailed output /T. By: Tomas Muehlhoff (tmuehlhoff) 2007-01-10 03:34:42.000-0600 Can't reproduce the fault right now, because the machine that send the INVITE that causes the faulty message is not available. In the meantime: the message comes from chan_sip.c. I added one line to the code -even though I'm no C++ coder- as follows compiled it and am now waiting for the sending machine to try. [root@sipsrv2 asterisk-1.2.12.1]# diff -c channels/chan_sip.c.original channels/chan_sip.c *** channels/chan_sip.c.original 2007-01-09 15:59:02.000000000 +0100 --- channels/chan_sip.c 2007-01-09 17:00:17.000000000 +0100 *************** *** 4259,4264 **** --- 4259,4265 ---- respprep(&resp, p, msg, req); append_date(&resp); add_header(&resp, "Unsupported", unsupported); + add_header(&resp,"","\r\n"); return send_response(p, &resp, 0, 0); } [root@sipsrv2 asterisk-1.2.12.1]# By: Tomas Muehlhoff (tmuehlhoff) 2007-01-11 04:44:57.000-0600 This last comment of me obviously wouldn't work. I'm not a coder so I realized only after trying... This one works fine, even if I'm not sure, whether there're more than only this location where SIP messages without body get send. This empty add_line call adds the missing CRLF (\r\n) that was missing. I recompiled and Wireshark as well as the other machine are happy with the reply Do you still want me to try this with 1.2.14 or can you tranfuse this information yourself ? /To [root@sipsrv2 asterisk-1.2.12.1]# diff -c channels/chan_sip.c.original channels/chan_sip.c *** channels/chan_sip.c.original 2007-01-09 15:59:02.000000000 +0100 --- channels/chan_sip.c 2007-01-11 11:38:40.000000000 +0100 *************** *** 4259,4264 **** --- 4259,4265 ---- respprep(&resp, p, msg, req); append_date(&resp); add_header(&resp, "Unsupported", unsupported); + add_line(&resp,""); return send_response(p, &resp, 0, 0); } [root@sipsrv2 asterisk-1.2.12.1]# By: Tomas Muehlhoff (tmuehlhoff) 2007-01-11 06:11:54.000-0600 bug valid for 1.2.14 as well -> cloned to bug ID 0008793 By: Serge Vecher (serge-v) 2007-01-11 09:14:23.000-0600 ok, I'll close this report since the duplicate has the proper debugging information. In the future, please continue reporting within the same issue. Thanks. |