[asterisk-users] Asterisk 12.1.1 - Having trouble setting up PJSIP

Dan Cropp dan at amtelco.com
Tue Mar 25 16:33:04 CDT 2014


Additional information with "pjsip set logger on"

-------------------------
Register succeeds...
-------------------------

<--- 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-deea79e7
From: "7001" <sip:7001 at 192.168.9.234>;tag=ee56a5177681851fo3
To: "7001" <sip:7001 at 192.168.9.234>
Call-ID: a93c73c5-83c75033 at 192.168.9.142
CSeq: 25282 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-deea79e7
Call-ID: a93c73c5-83c75033 at 192.168.9.142
From: "7001" <sip:7001 at 192.168.9.234>;tag=ee56a5177681851fo3
To: "7001" <sip:7001 at 192.168.9.234>;tag=z9hG4bK-deea79e7
CSeq: 25282 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1395782973/f72250272122471132aabf25deed1c0b",opaque="110098de72b0d893",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-f5a029e3
From: "7001" <sip:7001 at 192.168.9.234>;tag=ee56a5177681851fo3
To: "7001" <sip:7001 at 192.168.9.234>
Call-ID: a93c73c5-83c75033 at 192.168.9.142
CSeq: 25283 REGISTER
Max-Forwards: 70
Authorization: Digest username="7001",realm="asterisk",nonce="1395782973/f72250272122471132aabf25deed1c0b",uri="sip:192.168.9.234",algorithm=MD5,response="e234a6e6abf82aec119d49a413e0a9b1",opaque="110098de72b0d893",qop=auth,nc=00000001,cnonce="9c4b3692"
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-f5a029e3
Call-ID: a93c73c5-83c75033 at 192.168.9.142
From: "7001" <sip:7001 at 192.168.9.234>;tag=ee56a5177681851fo3
To: "7001" <sip:7001 at 192.168.9.234>;tag=z9hG4bK-f5a029e3
CSeq: 25283 REGISTER
Date: Tue, 25 Mar 2014 21:29:33 GMT
Contact: <sip:7001 at 192.168.9.142:5063>;expires=3599
Contact: <sip:7001 at 192.168.9.142:5063>
Content-Length:  0

-------------------------
Dialing 1 from phone below.
-------------------------


*CLI> <--- Received SIP request (898 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-9b8d1e07
From: "7001" <sip:7001 at 192.168.9.234>;tag=9fa6d06bfc4546d4o3
To: <sip:1 at 192.168.9.234>
Call-ID: 6353f577-bd7d8538 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: 393
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces
Content-Type: application/sdp

v=0
o=- 8644 8644 IN IP4 192.168.9.142
s=-
c=IN IP4 192.168.9.142
t=0 0
m=audio 16462 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-9b8d1e07
Call-ID: 6353f577-bd7d8538 at 192.168.9.142
From: "7001" <sip:7001 at 192.168.9.234>;tag=9fa6d06bfc4546d4o3
To: <sip:1 at 192.168.9.234>;tag=z9hG4bK-9b8d1e07
CSeq: 101 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1395783027/7ae9aaf5d61fc322eac8dec60d9c8dbe",opaque="13d5988e59a920a6",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-9b8d1e07
From: "7001" <sip:7001 at 192.168.9.234>;tag=9fa6d06bfc4546d4o3
To: <sip:1 at 192.168.9.234>;tag=z9hG4bK-9b8d1e07
Call-ID: 6353f577-bd7d8538 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 (1155 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-d1aac763
From: "7001" <sip:7001 at 192.168.9.234>;tag=9fa6d06bfc4546d4o3
To: <sip:1 at 192.168.9.234>
Call-ID: 6353f577-bd7d8538 at 192.168.9.142
CSeq: 102 INVITE
Max-Forwards: 70
Authorization: Digest username="7001",realm="asterisk",nonce="1395783027/7ae9aaf5d61fc322eac8dec60d9c8dbe",uri="sip:1 at 192.168.9.234",algorithm=MD5,response="c0f7e47e6af69559a266c3ec22793ff0",opaque="13d5988e59a920a6",qop=auth,nc=00000001,cnonce="9adbf5ea"
Contact: "7001" <sip:7001 at 192.168.9.142:5063>
Expires: 240
User-Agent: Cisco/SPA504G-7.4.8a
Content-Length: 393
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces
Content-Type: application/sdp

v=0
o=- 8644 8644 IN IP4 192.168.9.142
s=-
c=IN IP4 192.168.9.142
t=0 0
m=audio 16462 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

-------------------------
Asterisk 12.1.1 Crashes at this point
-------------------------


From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dan Cropp
Sent: Tuesday, March 25, 2014 4:22 PM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Asterisk 12.1.1 - Having trouble setting up PJSIP

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()

Have a great day!
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140325/5bb63242/attachment.html>


More information about the asterisk-users mailing list