[Home]

Summary:ASTERISK-07647: [patch] dialling out to a cirpack gateway ends up in a crash
Reporter:Raphaël Jacquot (sxpert)Labels:
Date Opened:2006-08-31 17:58:53Date Closed:2006-09-01 11:19:10
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-crash.txt
( 1) make_parameter_number_really_optionnal.patch
( 2) make_parameter_number_really_optionnal-fixed.patch
Description:I get the following when dialing out (I also get what's described in bug 7261)


<-- SIP read from 212.27.52.5:5060:
INVITE sip:s@82.228.185.17:5060;transport=udp SIP/2.0
Allow: UPDATE,REFER
Call-ID: 01-01318-065e8a51-4d6e7cc32@freephonie.net
Contact: <sip:212.27.52.5:5060>
Content-Type: application/sdp
CSeq: 108377261 INVITE
From: "living1" <sip:0870380122@freephonie.net;user=phone>;tag=01-01318-065e8a52-565b6dc63
Max-Forwards: 24
To: <sip:0870380122@212.27.52.5;user=phone>
User-Agent: Cirpack/v4.40 (gw_sip)
Via: SIP/2.0/UDP 212.27.52.5:5060;branch=z9hG4bK-6646-2BF7BC
Content-Length: 173

v=0
o=cp10 115706411253 115706411254 IN IP4 172.25.20.109
s=SIP Call
c=IN IP4 212.27.52.129
t=0 0
m=audio 32998 RTP/AVP 8
b=AS:64
a=rtpmap:8 PCMA/8000/1
a=ptime:30

--- (12 headers 9 lines)---
Sending to 212.27.52.5 : 5060 (no NAT)
Using INVITE request as basis request - 01-01318-065e8a51-4d6e7cc32@freephonie.net
Found peer 'free_telecom'
Found RTP audio format 8
Peer audio RTP is at port 212.27.52.129:32998
Found description format PCMA for ID 8
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x8 (alaw)/video=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 212.27.52.129:32998
Looking for s in free_telecom_incoming (domain 82.228.185.17)
list_route: hop: <sip:212.27.52.5:5060>
Transmitting (no NAT) to 212.27.52.5:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 212.27.52.5:5060;branch=z9hG4bK-6646-2BF7BC;received=212.27.52.5
From: "living1" <sip:0870380122@freephonie.net;user=phone>;tag=01-01318-065e8a52-565b6dc63
To: <sip:0870380122@212.27.52.5;user=phone>
Call-ID: 01-01318-065e8a51-4d6e7cc32@freephonie.net
CSeq: 108377261 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s@82.228.185.17>
Content-Length: 0


---
Segmentation fault

****** ADDITIONAL INFORMATION ******

this whole thing is working perfectly in 1.2.11. so I consider this a regression
Comments:By: Joshua C. Colp (jcolp) 2006-08-31 20:33:08

We need a backtrace to see where it crashed, check the file backtrace.txt in the doc directory for help. Thanks.

By: Paul Cadach (pcadach) 2006-09-01 09:56:24

As pointed by backtrace, the reason of crash is omitting of number parameter which declared as optional but code isn't check for value of args.number.

By: Paul Cadach (pcadach) 2006-09-01 09:56:55

Bug is acknowledged.

By: Raphaël Jacquot (sxpert) 2006-09-01 10:15:42

with the help of PCadach on IRC I found the culprit.
turns out the second parameter of dialplan function SIP_HEADER that's supposed to be optionnal really wasn't

By: Joshua C. Colp (jcolp) 2006-09-01 11:19:10

Fixed in trunk as of revision 41689. Thanks!