[sr-dev] 3.1 crashes in topoh on receiving 180 message

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 7 11:33:04 CEST 2010


  Hello,

it confuses some topoh processing, because the mask_ip should be 
different than local ip -- can you try with 127.0.0.1 or some private 
address (e.g., 10.10.10.10) in mask_ip?

It should not crash anyhow, so I will fix it - one option is to check 
that mask ip is not used as listen ip, I will think about and find a 
solution. It is not specific to 3.1, is also in previous version.

Thanks,
Daniel


On 10/7/10 11:09 AM, Andrew Pogrebennyk wrote:
> I'm trying to get Kamailio 3.1 running with topoh module. It crashes 
> in topoh trying to decode tha param. I can post the config file, but 
> there's nothing special to it. The only non-default topoh parameter is:
> modparam("topoh", "mask_ip", "93.153.XX.YY")
>
> SIP trace and backtrace below:
> ###
> U 92.249.89.223:6230 -> 93.153.XX.YY:5060
> INVITE sip:000100 at 93.153.XX.YY SIP/2.0.
> Via: SIP/2.0/UDP 
> 192.168.178.12:6230;branch=z9hG4bK-d87543-0930b618257c1d55-1--d87543-;rport.
> Max-Forwards: 70.
> Contact: <sip:000101 at 92.249.89.223:6230>.
> To: "000100"<sip:000100 at 93.153.XX.YY>.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 1 INVITE.
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, 
> SUBSCRIBE, INFO.
> Content-Type: application/sdp.
> User-Agent: eyeBeam release 1004p stamp 31962.
> Content-Length: 418.
> .
> v=0.
> o=- 6 2 IN IP4 192.168.178.12.
> s=CounterPath eyeBeam 1.5.
> c=IN IP4 192.168.178.12.
> t=0 0.
> m=audio 44918 RTP/AVP 100 106 0 105 8 18 3 101.
> a=alt:1 1 : QL7njyiY VHqTwP03 192.168.178.12 44918.
> a=fmtp:18 annexb=no.
> a=fmtp:101 0-15.
> a=rtpmap:100 SPEEX/16000.
> a=rtpmap:106 SPEEX-FEC/16000.
> a=rtpmap:105 SPEEX-FEC/8000.
> a=rtpmap:101 telephone-event/8000.
> a=sendrecv.
> a=x-rtp-session-id:76338B1C724D41F7A127A1B9B22289AD.
>
> #
> U 93.153.XX.YY:5060 -> 92.249.89.223:6230
> SIP/2.0 407 Proxy Authentication Required.
> Via: SIP/2.0/UDP 
> 192.168.178.12:6230;branch=z9hG4bK-d87543-0930b618257c1d55-1--d87543-;rport=6230;received=92.249.89.223.
> To: 
> "000100"<sip:000100 at 93.153.XX.YY>;tag=4d95499f1ae46b3876f6ef53ea0a0dda.de06.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 1 INVITE.
> Proxy-Authenticate: Digest realm="93.153.XX.YY", 
> nonce="TK27+0ytus+K89lx697qgg525SrCrkhJ".
> Server: kamailio (3.1.0 (i386/linux)).
> Content-Length: 0.
> .
>
> #
> U 92.249.89.223:6230 -> 93.153.XX.YY:5060
> ACK sip:000100 at 93.153.XX.YY SIP/2.0.
> Via: SIP/2.0/UDP 
> 192.168.178.12:6230;branch=z9hG4bK-d87543-0930b618257c1d55-1--d87543-;rport.
> To: 
> "000100"<sip:000100 at 93.153.XX.YY>;tag=4d95499f1ae46b3876f6ef53ea0a0dda.de06.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 1 ACK.
> Content-Length: 0.
> .
>
> #
> U 92.249.89.223:6230 -> 93.153.XX.YY:5060
> INVITE sip:000100 at 93.153.XX.YY SIP/2.0.
> Via: SIP/2.0/UDP 
> 192.168.178.12:6230;branch=z9hG4bK-d87543-17045a5007352948-1--d87543-;rport.
> Max-Forwards: 70.
> Contact: <sip:000101 at 92.249.89.223:6230>.
> To: "000100"<sip:000100 at 93.153.XX.YY>.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 2 INVITE.
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, 
> SUBSCRIBE, INFO.
> Content-Type: application/sdp.
> Proxy-Authorization: Digest 
> username="000101",realm="93.153.XX.YY",nonce="TK27+0ytus+K89lx697qgg525SrCrkhJ",uri="sip:000100 at 93.153.XX.YY",response="34168da59da06a2850f5910db9379101",algorithm=MD5.
> User-Agent: eyeBeam release 1004p stamp 31962.
> Content-Length: 418.
> .
> v=0.
> o=- 6 2 IN IP4 192.168.178.12.
> s=CounterPath eyeBeam 1.5.
> c=IN IP4 192.168.178.12.
> t=0 0.
> m=audio 44918 RTP/AVP 100 106 0 105 8 18 3 101.
> a=alt:1 1 : QL7njyiY VHqTwP03 192.168.178.12 44918.
> a=fmtp:18 annexb=no.
> a=fmtp:101 0-15.
> a=rtpmap:100 SPEEX/16000.
> a=rtpmap:106 SPEEX-FEC/16000.
> a=rtpmap:105 SPEEX-FEC/8000.
> a=rtpmap:101 telephone-event/8000.
> a=sendrecv.
> a=x-rtp-session-id:76338B1C724D41F7A127A1B9B22289AD.
>
> #
> U 93.153.XX.YY:5060 -> 92.249.89.223:6230
> SIP/2.0 100 trying -- your call is important to us.
> Via: SIP/2.0/UDP 
> 192.168.178.12:6230;branch=z9hG4bK-d87543-17045a5007352948-1--d87543-;rport=6230;received=92.249.89.223.
> To: "000100"<sip:000100 at 93.153.XX.YY>.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 2 INVITE.
> Server: kamailio (3.1.0 (i386/linux)).
> Content-Length: 0.
> .
>
> #
> U 93.153.XX.YY:5060 -> 92.249.89.223:35138
> INVITE sip:000100 at 192.168.178.12:35138;rinstance=a6126869b246d3ae 
> SIP/2.0.
> Record-Route: <sip:93.153.XX.YY;lr=on;ftag=b303951e>.
> Via: SIP/2.0/UDP 93.153.XX.YY;branch=z9hG4bK1d7a.07d27eb2.0.
> Via: SIP/2.0/UDP 
> 93.153.XX.YY;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.qLOBF6zGZfWlc7M.V-WBVlMx1LgRWIC9gIgx4sMJZLWxq7zxq7MBVlzuaVHRaYpB1JNEt736cQkBIvalaJmLuqzxNuWxM1M.NAWxKrW.yAWlMuMBq4zG4fOmuqzxNuWxM1zweAowe4H.3LMly*.
> Max-Forwards: 69.
> Contact: 
> <sip:93.153.XX.YY;line=sr-N6IAzByAMxFAMjysMJZLWxq7zxq7MBVlzB3LMly*>.
> To: "000100"<sip:000100 at 93.153.XX.YY>.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 2 INVITE.
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, 
> SUBSCRIBE, INFO.
> Content-Type: application/sdp.
> User-Agent: eyeBeam release 1004p stamp 31962.
> Content-Length: 418.
> .
> v=0.
> o=- 6 2 IN IP4 192.168.178.12.
> s=CounterPath eyeBeam 1.5.
> c=IN IP4 192.168.178.12.
> t=0 0.
> m=audio 44918 RTP/AVP 100 106 0 105 8 18 3 101.
> a=alt:1 1 : QL7njyiY VHqTwP03 192.168.178.12 44918.
> a=fmtp:18 annexb=no.
> a=fmtp:101 0-15.
> a=rtpmap:100 SPEEX/16000.
> a=rtpmap:106 SPEEX-FEC/16000.
> a=rtpmap:105 SPEEX-FEC/8000.
> a=rtpmap:101 telephone-event/8000.
> a=sendrecv.
> a=x-rtp-session-id:76338B1C724D41F7A127A1B9B22289AD.
>
> #
> U 92.249.89.223:35138 -> 93.153.XX.YY:5060
> SIP/2.0 180 Ringing.
> Via: SIP/2.0/UDP 93.153.XX.YY;branch=z9hG4bK1d7a.07d27eb2.0.
> Via: SIP/2.0/UDP 
> 93.153.XX.YY;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.qLOBF6zGZfWlc7M.V-WBVlMx1LgRWIC9gIgx4sMJZLWxq7zxq7MBVlzuaVHRaYpB1JNEt736cQkBIvalaJmLuqzxNuWxM1M.NAWxKrW.yAWlMuMBq4zG4fOmuqzxNuWxM1zweAowe4H.3LMly*.
> Record-Route: <sip:93.153.XX.YY;lr;ftag=b303951e>.
> Contact: <sip:000100 at 192.168.178.12:35138;rinstance=a6126869b246d3ae>.
> To: "000100"<sip:000100 at 93.153.XX.YY>;tag=f72a6127.
> From: <sip:000101 at 93.153.XX.YY>;tag=b303951e.
> Call-ID: MzM4MjZjZDM4OTQwMmMwNGZjYzFkNTI3MmU1NDVlZmM..
> CSeq: 2 INVITE.
> User-Agent: X-Lite release 1104o stamp 56125.
> Content-Length: 0.
> .
>
> (gdb) backtrace
> #0  0x00e1b990 in th_mask_decode (in=0x0, ilen=0, prefix=0xe262a8, 
> extra=0, olen=0xbfffdd94) at th_mask.c:141
> #1  0x00e21602 in th_flip_record_route (msg=0xbfffdde0, mode=0) at 
> th_msg.c:546
> #2  0x00e23c61 in th_msg_received (data=0xbfffe214) at topoh_mod.c:235
> #3  0x080dc90b in receive_msg (
>     buf=0x82a7760 "SIP/2.0 180 Ringing\r\nVia: SIP/2.0/UDP 
> 93.153.XX.YY;branch=z9hG4bKf6d6.a2e48be6.0\r\nVia: SIP/2.0/UDP 
> 93.153.XX.YY;branch=z9hG4bKsr-j4IPOlV7MGQKatycM.qLOBF6zGZfWlc7M.V-WBVlMx1LgRWIC9gIgx4sMJZLWxq7zxq"..., 
> len=663, rcv_info=0xbfffe2a8) at receive.c:117
> #4  0x0816eef7 in udp_rcv_loop () at udp_server.c:532
> #5  0x080ad9e1 in main_loop () at main.c:1554
> #6  0x080b1126 in main (argc=2, argv=0xbfffe584) at main.c:2398
>

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-dev mailing list