[asterisk-bugs] [JIRA] (ASTERISK-23539) Crash when attempting to dial from a PJSIP endpoint

Rusty Newton (JIRA) noreply at issues.asterisk.org
Thu Apr 3 19:00:18 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-23539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton updated ASTERISK-23539:
------------------------------------

    Description: 
I am trying to make PJSIP work with my Cisco SPA504G phone.  I have no problems making it work with the chan_sip driver.

When I configure my phone, it indicates the contact was added
-- Added contact 'sip:7001 at 192.168.9.142:5063' to AOR '7001' with expiration of 3600 seconds

Phone shows green light for the line.

I then attempt to dial extension 1 and Asterisk crashes.  I’m not seeing anything in the messages log.

I’m sure I’m doing something wrong, just not sure where to look or how to track down the problem.
Can anyone offer some hints?

---------------------
pjsip.conf
---------------------

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[7001]
type=endpoint
transport=transport-udp
context=IS
disallow=all
allow=ulaw
auth=7001
aors=7001

[7001]
type=aor
max_contacts=1
contact=sip:7001 at 192.168.9.142:5063    ; Line 4 on my phone is setup for port 5063. 
                                                                   ; I have also tried without this setting and am seeing the exact same scenario

[7001]
type=auth
auth_type=userpass
password=1234
username=7001

---------------------
extensions.conf
---------------------
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no

[globals]
CONSOLE=Console/dsp                             ; Console interface for demo
IAXINFO=guest                                   ; IAXtel username/password
TRUNK=DAHDI/G2                                  ; Trunk interface
TRUNKMSD=1                   

[IS]
exten => 1,1,Verbose(1,Unrouted call handler)
exten => 1,n,Answer()
exten => 1,n,Wait(1)
exten => 1,n,Playback(tt-weasels)
exten => 1,n,Hangup()

[edit by Rusty - removed inline debug as per issue guidelines]


  was:
I am trying to make PJSIP work with my Cisco SPA504G phone.  I have no problems making it work with the chan_sip driver.

When I configure my phone, it indicates the contact was added
-- Added contact 'sip:7001 at 192.168.9.142:5063' to AOR '7001' with expiration of 3600 seconds

Phone shows green light for the line.

I then attempt to dial extension 1 and Asterisk crashes.  I’m not seeing anything in the messages log.

I’m sure I’m doing something wrong, just not sure where to look or how to track down the problem.
Can anyone offer some hints?

---------------------
pjsip.conf
---------------------

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[7001]
type=endpoint
transport=transport-udp
context=IS
disallow=all
allow=ulaw
auth=7001
aors=7001

[7001]
type=aor
max_contacts=1
contact=sip:7001 at 192.168.9.142:5063    ; Line 4 on my phone is setup for port 5063. 
                                                                   ; I have also tried without this setting and am seeing the exact same scenario

[7001]
type=auth
auth_type=userpass
password=1234
username=7001

---------------------
extensions.conf
---------------------
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no

[globals]
CONSOLE=Console/dsp                             ; Console interface for demo
IAXINFO=guest                                   ; IAXtel username/password
TRUNK=DAHDI/G2                                  ; Trunk interface
TRUNKMSD=1                   

[IS]
exten => 1,1,Verbose(1,Unrouted call handler)
exten => 1,n,Answer()
exten => 1,n,Wait(1)
exten => 1,n,Playback(tt-weasels)
exten => 1,n,Hangup()


*CLI> pjsip set logger on
PJSIP Logging enabled
*CLI> sip set debug on
SIP Debugging enabled
*CLI> logger set level DEBUG on
Logger status for 'DEBUG' has been set to 'on'.
*CLI> <--- Received SIP request (485 bytes) from UDP:192.168.9.142:5063 --->
REGISTER sip:192.168.9.234 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.142:5063;branch=z9hG4bK-6f6d1a0e
From: "7001" <sip:7001 at 192.168.9.234>;tag=495a05232460c742o3
To: "7001" <sip:7001 at 192.168.9.234>
Call-ID: a93c73c5-83c75033 at 192.168.9.142
CSeq: 27775 REGISTER
Max-Forwards: 70
Contact: "7001" <sip:7001 at 192.168.9.142:5063>;expires=3600
User-Agent: Cisco/SPA504G-7.4.8a
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces


<--- Transmitting SIP response (469 bytes) to UDP:192.168.9.142:5063 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.9.142:5063;rport;received=192.168.9.142;branch=z9hG4bK-6f6d1a0e
Call-ID: a93c73c5-83c75033 at 192.168.9.142
From: "7001" <sip:7001 at 192.168.9.234>;tag=495a05232460c742o3
To: "7001" <sip:7001 at 192.168.9.234>;tag=z9hG4bK-6f6d1a0e
CSeq: 27775 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1395843228/0688d35483a14f2d09d036995a88b2a3",opaque="0e34a1f012da413c",algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (740 bytes) from UDP:192.168.9.142:5063 --->
REGISTER sip:192.168.9.234 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.142:5063;branch=z9hG4bK-50261aae
From: "7001" <sip:7001 at 192.168.9.234>;tag=495a05232460c742o3
To: "7001" <sip:7001 at 192.168.9.234>
Call-ID: a93c73c5-83c75033 at 192.168.9.142
CSeq: 27776 REGISTER
Max-Forwards: 70
Authorization: Digest username="7001",realm="asterisk",nonce="1395843228/0688d35483a14f2d09d036995a88b2a3",uri="sip:192.168.9.234",algorithm=MD5,response="2ac24f75fd79956299bd3e2bb7f409d8",opaque="0e34a1f012da413c",qop=auth,nc=00000001,cnonce="c3cd3f56"
Contact: "7001" <sip:7001 at 192.168.9.142:5063>;expires=3600
User-Agent: Cisco/SPA504G-7.4.8a
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces


    -- Added contact 'sip:7001 at 192.168.9.142:5063' to AOR '7001' with expiration of 3600 seconds
<--- Transmitting SIP response (442 bytes) to UDP:192.168.9.142:5063 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.9.142:5063;rport;received=192.168.9.142;branch=z9hG4bK-50261aae
Call-ID: a93c73c5-83c75033 at 192.168.9.142
From: "7001" <sip:7001 at 192.168.9.234>;tag=495a05232460c742o3
To: "7001" <sip:7001 at 192.168.9.234>;tag=z9hG4bK-50261aae
CSeq: 27776 REGISTER
Date: Wed, 26 Mar 2014 14:13:48 GMT
Contact: <sip:7001 at 192.168.9.142:5063>;expires=3599
Contact: <sip:7001 at 192.168.9.142:5063>
Content-Length:  0


<--- Received SIP request (900 bytes) from UDP:192.168.9.142:5063 --->
INVITE sip:1 at 192.168.9.234 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.142:5063;branch=z9hG4bK-3dc3edde
From: "7001" <sip:7001 at 192.168.9.234>;tag=bf73e9ea2ad3967fo3
To: <sip:1 at 192.168.9.234>
Call-ID: 31efa286-f45bd693 at 192.168.9.142
CSeq: 101 INVITE
Max-Forwards: 70
Contact: "7001" <sip:7001 at 192.168.9.142:5063>
Expires: 240
User-Agent: Cisco/SPA504G-7.4.8a
Content-Length: 395
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces
Content-Type: application/sdp

v=0
o=- 21730 21730 IN IP4 192.168.9.142
s=-
c=IN IP4 192.168.9.142
t=0 0
m=audio 16394 RTP/AVP 0 2 8 9 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

<--- Transmitting SIP response (455 bytes) to UDP:192.168.9.142:5063 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.9.142:5063;rport;received=192.168.9.142;branch=z9hG4bK-3dc3edde
Call-ID: 31efa286-f45bd693 at 192.168.9.142
From: "7001" <sip:7001 at 192.168.9.234>;tag=bf73e9ea2ad3967fo3
To: <sip:1 at 192.168.9.234>;tag=z9hG4bK-3dc3edde
CSeq: 101 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1395843406/8bcb262f8aca873f4c4be8edb2f19c46",opaque="33a814b90efd5a95",algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (381 bytes) from UDP:192.168.9.142:5063 --->
ACK sip:1 at 192.168.9.234 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.142:5063;branch=z9hG4bK-3dc3edde
From: "7001" <sip:7001 at 192.168.9.234>;tag=bf73e9ea2ad3967fo3
To: <sip:1 at 192.168.9.234>;tag=z9hG4bK-3dc3edde
Call-ID: 31efa286-f45bd693 at 192.168.9.142
CSeq: 101 ACK
Max-Forwards: 70
Contact: "7001" <sip:7001 at 192.168.9.142:5063>
User-Agent: Cisco/SPA504G-7.4.8a
Content-Length: 0


<--- Received SIP request (1157 bytes) from UDP:192.168.9.142:5063 --->
INVITE sip:1 at 192.168.9.234 SIP/2.0
Via: SIP/2.0/UDP 192.168.9.142:5063;branch=z9hG4bK-45d986d2
From: "7001" <sip:7001 at 192.168.9.234>;tag=bf73e9ea2ad3967fo3
To: <sip:1 at 192.168.9.234>
Call-ID: 31efa286-f45bd693 at 192.168.9.142
CSeq: 102 INVITE
Max-Forwards: 70
Authorization: Digest username="7001",realm="asterisk",nonce="1395843406/8bcb262f8aca873f4c4be8edb2f19c46",uri="sip:1 at 192.168.9.234",algorithm=MD5,response="c26bdaf9161ab844fea4ac128745e8b5",opaque="33a814b90efd5a95",qop=auth,nc=00000001,cnonce="c318431f"
Contact: "7001" <sip:7001 at 192.168.9.142:5063>
Expires: 240
User-Agent: Cisco/SPA504G-7.4.8a
Content-Length: 395
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces
Content-Type: application/sdp

v=0
o=- 21730 21730 IN IP4 192.168.9.142
s=-
c=IN IP4 192.168.9.142
t=0 0
m=audio 16394 RTP/AVP 0 2 8 9 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv





> Crash when attempting to dial from a PJSIP endpoint
> ---------------------------------------------------
>
>                 Key: ASTERISK-23539
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23539
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip
>    Affects Versions: 12.1.1
>         Environment: Debian GNU/Linux 7.4 (wheezy)
>            Reporter: Dan Cropp
>            Severity: Critical
>         Attachments: backtrace.txt, debug.txt
>
>
> I am trying to make PJSIP work with my Cisco SPA504G phone.  I have no problems making it work with the chan_sip driver.
> When I configure my phone, it indicates the contact was added
> -- Added contact 'sip:7001 at 192.168.9.142:5063' to AOR '7001' with expiration of 3600 seconds
> Phone shows green light for the line.
> I then attempt to dial extension 1 and Asterisk crashes.  I’m not seeing anything in the messages log.
> I’m sure I’m doing something wrong, just not sure where to look or how to track down the problem.
> Can anyone offer some hints?
> ---------------------
> pjsip.conf
> ---------------------
> [transport-udp]
> type=transport
> protocol=udp
> bind=0.0.0.0
> [7001]
> type=endpoint
> transport=transport-udp
> context=IS
> disallow=all
> allow=ulaw
> auth=7001
> aors=7001
> [7001]
> type=aor
> max_contacts=1
> contact=sip:7001 at 192.168.9.142:5063    ; Line 4 on my phone is setup for port 5063. 
>                                                                    ; I have also tried without this setting and am seeing the exact same scenario
> [7001]
> type=auth
> auth_type=userpass
> password=1234
> username=7001
> ---------------------
> extensions.conf
> ---------------------
> [general]
> static=yes
> writeprotect=no
> autofallthrough=yes
> clearglobalvars=no
> [globals]
> CONSOLE=Console/dsp                             ; Console interface for demo
> IAXINFO=guest                                   ; IAXtel username/password
> TRUNK=DAHDI/G2                                  ; Trunk interface
> TRUNKMSD=1                   
> [IS]
> exten => 1,1,Verbose(1,Unrouted call handler)
> exten => 1,n,Answer()
> exten => 1,n,Wait(1)
> exten => 1,n,Playback(tt-weasels)
> exten => 1,n,Hangup()
> [edit by Rusty - removed inline debug as per issue guidelines]



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list