Hello,
I am building an asterisk based personal VoIP service for syncloud.org (open source app store for raspberrypi-like devices).
I am trying to migrate from sip to pjsip but am unable to setup test configuration and constantly getting 488 error when making a call from one user to another. In this scenario I am trying make a test call from one test user (test1/6001) to another (test2)
Could anyone help?
Here is the config:
[transport-udp]
type = transport
external_signaling_address = ${domain}
external_signaling_port = ${port}
protocol = udp
bind = 0.0.0.0:${port}
; NAT settings
;local_net = 10.0.0.0/8
local_net=192.168.0.0/255.255.0.0 ; RFC 1918 addresses
local_net=10.0.0.0/255.0.0.0 ; Also RFC1918
local_net=172.16.0.0/12 ; Another RFC1918 with CIDR notation
local_net=169.254.0.0/255.255.0.0 ; Zero conf local network
;================================ ENDPOINT TEMPLATES ==
endpoint_internal
type=endpoint
transport=transport-udp
context=from-internal
allow=all
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
use_avpf=yes
ice_support=yes
auth_userpass
type = auth
auth_type = userpass
aor_dynamic
type=aor
max_contacts=1
;Definitions for our phones, using the templates above
test
auth=test
aors=test
test
password=test ; put a strong, unique password here instead
username=test
test
test1
auth=test1
aors=test1
test1
password=test1 ; put a strong, unique password here instead
username=test1
test1
test2
auth=test2
aors=test2
test2
password=test2 ; put a strong, unique password here instead
username=test2
test2
webrtc
auth=webrtc
aors=webrtc
media_encryption = dtls
dtls_verify = no
dtls_cert_file = /opt/data/platform/syncloud.crt
dtls_private_key = /opt/data/platform/syncloud.key
dtls_setup = actpass
webrtc
password=webrtc ; put a strong, unique password here instead
username=webrtc
webrtc
Here us the log:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:40902;rport=40902;received=127.0.0.1;branch=z9hG4bKPj60c23304-5594-44b9-9186-e089f2bbb219
Call-ID: 454efec5-ebc5-4404-80b3-79fcfebf9e4d
From: sip:test2@localhost;tag=5c6b84e3-61ad-4333-a1f7-dcfb64bd4767
To: sip:test2@localhost;tag=z9hG4bKPj60c23304-5594-44b9-9186-e089f2bbb219
CSeq: 9053 REGISTER
Date: Tue, 19 Apr 2016 11:13:05 GMT
Contact: sip:test2@192.168.99.49:5070;ob;expires=299
Expires: 300
Server: Asterisk PBX 13.8.0
Content-Length: 0
[Apr 19 11:13:05] VERBOSE[679] res_pjsip_logger.c: <— Received SIP request (1076 bytes) from UDP:127.0.0.1:40902 —>
INVITE sip:6002@localhost:5070 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:40902;rport;branch=z9hG4bKPjd9710c5f-8f83-451c-b41a-f419f8116f8a
Max-Forwards: 70
From: sip:test1@localhost;tag=ae77eb11-37a7-4028-bac9-024b7512dfc3
To: sip:6002@localhost
Contact: sip:test1@127.0.0.1:40902;ob
Call-ID: 13994db0-7a4e-4e7c-845f-80823abcb95c
CSeq: 31865 INVITE
Route: sip:localhost:5070;lr
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: pjsip python
Content-Type: application/sdp
Content-Length: 428
v=0
o=- 3670053185 3670053185 IN IP4 192.168.99.49
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 3 0 8 9 96
c=IN IP4 192.168.99.49
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.99.49
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
[Apr 19 11:13:05] DEBUG[679] netsock2.c: Splitting ‘127.0.0.1:40902’ into…
[Apr 19 11:13:05] DEBUG[679] netsock2.c: …host ‘127.0.0.1’ and port ‘40902’.
[Apr 19 11:13:05] DEBUG[679] netsock2.c: Splitting ‘0.0.0.0:5070’ into…
[Apr 19 11:13:05] DEBUG[679] netsock2.c: …host ‘0.0.0.0’ and port ‘5070’.
[Apr 19 11:13:05] DEBUG[680] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Apr 19 11:13:05] DEBUG[680] res_pjsip_endpoint_identifier_user.c: Retrieved endpoint test1
[Apr 19 11:13:05] DEBUG[680] netsock2.c: Splitting ‘192.168.99.49’ into…
[Apr 19 11:13:05] DEBUG[680] netsock2.c: …host ‘192.168.99.49’ and port ‘’.
[Apr 19 11:13:05] DEBUG[680] netsock2.c: Splitting ‘127.0.0.1’ into…
[Apr 19 11:13:05] DEBUG[680] netsock2.c: …host ‘127.0.0.1’ and port ‘’.
[Apr 19 11:13:05] DEBUG[680] netsock2.c: Splitting ‘127.0.0.1’ into…
[Apr 19 11:13:05] DEBUG[680] netsock2.c: …host ‘127.0.0.1’ and port ‘’.
[Apr 19 11:13:05] DEBUG[680] netsock2.c: Splitting ‘0.0.0.0:5070’ into…
[Apr 19 11:13:05] DEBUG[680] netsock2.c: …host ‘0.0.0.0’ and port ‘5070’.
[Apr 19 11:13:05] DEBUG[680] netsock2.c: Splitting ‘127.0.0.1:40902’ into…
[Apr 19 11:13:05] DEBUG[680] netsock2.c: …host ‘127.0.0.1’ and port ‘40902’.
[Apr 19 11:13:05] VERBOSE[680] res_pjsip_logger.c: <— Transmitting SIP response (555 bytes) to UDP:127.0.0.1:40902 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 127.0.0.1:40902;rport=40902;received=127.0.0.1;branch=z9hG4bKPjd9710c5f-8f83-451c-b41a-f419f8116f8a
Call-ID: 13994db0-7a4e-4e7c-845f-80823abcb95c
From: sip:test1@localhost;tag=ae77eb11-37a7-4028-bac9-024b7512dfc3
To: sip:6002@localhost;tag=z9hG4bKPjd9710c5f-8f83-451c-b41a-f419f8116f8a
CSeq: 31865 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1461064385/2ac77bb418d2239c0bd4e520664c6a3a”,opaque=“07a5797b228bfb6f”,algorithm=md5,qop="auth"
Server: Asterisk PBX 13.8.0
Content-Length: 0
[Apr 19 11:13:05] VERBOSE[679] res_pjsip_logger.c: <— Received SIP request (410 bytes) from UDP:127.0.0.1:40902 —>
ACK sip:6002@localhost:5070 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:40902;rport;branch=z9hG4bKPjd9710c5f-8f83-451c-b41a-f419f8116f8a
Max-Forwards: 70
From: sip:test1@localhost;tag=ae77eb11-37a7-4028-bac9-024b7512dfc3
To: sip:6002@localhost;tag=z9hG4bKPjd9710c5f-8f83-451c-b41a-f419f8116f8a
Call-ID: 13994db0-7a4e-4e7c-845f-80823abcb95c
CSeq: 31865 ACK
Route: sip:localhost:5070;lr
Content-Length: 0
[Apr 19 11:13:05] DEBUG[679] netsock2.c: Splitting ‘127.0.0.1:40902’ into…
[Apr 19 11:13:05] DEBUG[679] netsock2.c: …host ‘127.0.0.1’ and port ‘40902’.
[Apr 19 11:13:05] DEBUG[679] netsock2.c: Splitting ‘0.0.0.0:5070’ into…
[Apr 19 11:13:05] DEBUG[679] netsock2.c: …host ‘0.0.0.0’ and port ‘5070’.
[Apr 19 11:13:05] VERBOSE[679] res_pjsip_logger.c: <— Received SIP request (1375 bytes) from UDP:127.0.0.1:40902 —>
INVITE sip:6002@localhost:5070 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:40902;rport;branch=z9hG4bKPj6609b94f-43e3-43ca-bc77-38dd39458c64
Max-Forwards: 70
From: sip:test1@localhost;tag=ae77eb11-37a7-4028-bac9-024b7512dfc3
To: sip:6002@localhost
Contact: sip:test1@127.0.0.1:40902;ob
Call-ID: 13994db0-7a4e-4e7c-845f-80823abcb95c
CSeq: 31866 INVITE
Route: sip:localhost:5070;lr
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: pjsip python
Authorization: Digest username=“test1”, realm=“asterisk”, nonce=“1461064385/2ac77bb418d2239c0bd4e520664c6a3a”, uri=“sip:6002@localhost:5070”, response=“059864488e9d1df913f9a0a03de0e4ba”, algorithm=md5, cnonce=“6b140718-7497-4daa-86a5-823eefef3852”, opaque=“07a5797b228bfb6f”, qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 428
v=0
o=- 3670053185 3670053185 IN IP4 192.168.99.49
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 3 0 8 9 96
c=IN IP4 192.168.99.49
b=TIAS:64000
a=rtcp:4001 IN IP4 192.168.99.49
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
[Apr 19 11:13:05] DEBUG[679] netsock2.c: Splitting ‘127.0.0.1:40902’ into…
[Apr 19 11:13:05] DEBUG[679] netsock2.c: …host ‘127.0.0.1’ and port ‘40902’.
[Apr 19 11:13:05] DEBUG[679] netsock2.c: Splitting ‘0.0.0.0:5070’ into…
[Apr 19 11:13:05] DEBUG[679] netsock2.c: …host ‘0.0.0.0’ and port ‘5070’.
[Apr 19 11:13:05] DEBUG[681] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Apr 19 11:13:05] DEBUG[681] res_pjsip_endpoint_identifier_user.c: Retrieved endpoint test1
[Apr 19 11:13:05] DEBUG[681] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Apr 19 11:13:05] DEBUG[681] res_pjsip_endpoint_identifier_user.c: Retrieved endpoint test1
[Apr 19 11:13:05] DEBUG[681] res_pjsip_authenticator_digest.c: Calculated nonce 1461064385/2ac77bb418d2239c0bd4e520664c6a3a. Actual nonce is 1461064385/2ac77bb418d2239c0bd4e520664c6a3a
[Apr 19 11:13:05] DEBUG[681] netsock2.c: Splitting ‘192.168.99.49’ into…
[Apr 19 11:13:05] DEBUG[681] netsock2.c: …host ‘192.168.99.49’ and port ‘’.
[Apr 19 11:13:05] DEBUG[681] netsock2.c: Splitting ‘127.0.0.1’ into…
[Apr 19 11:13:05] DEBUG[681] netsock2.c: …host ‘127.0.0.1’ and port ‘’.
[Apr 19 11:13:05] DEBUG[681] res_pjsip_session.c: Negotiating incoming SDP media stream ‘audio’ using audio SDP handler
[Apr 19 11:13:05] DEBUG[681] res_pjsip_session.c: Method is INVITE, Response is 488 Not Acceptable Here
[Apr 19 11:13:05] DEBUG[681] netsock2.c: Splitting ‘127.0.0.1’ into…
[Apr 19 11:13:05] DEBUG[681] netsock2.c: …host ‘127.0.0.1’ and port ‘’.
[Apr 19 11:13:05] DEBUG[681] netsock2.c: Splitting ‘0.0.0.0:5070’ into…
[Apr 19 11:13:05] DEBUG[681] netsock2.c: …host ‘0.0.0.0’ and port ‘5070’.
[Apr 19 11:13:05] DEBUG[681] netsock2.c: Splitting ‘127.0.0.1:40902’ into…
[Apr 19 11:13:05] DEBUG[681] netsock2.c: …host ‘127.0.0.1’ and port ‘40902’.
[Apr 19 11:13:05] VERBOSE[681] res_pjsip_logger.c: <— Transmitting SIP response (406 bytes) to UDP:127.0.0.1:40902 —>
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/UDP 127.0.0.1:40902;rport=40902;received=127.0.0.1;branch=z9hG4bKPj6609b94f-43e3-43ca-bc77-38dd39458c64
Call-ID: 13994db0-7a4e-4e7c-845f-80823abcb95c
From: sip:test1@localhost;tag=ae77eb11-37a7-4028-bac9-024b7512dfc3
To: sip:6002@localhost;tag=e069ee26-5fd2-4f94-abb8-0050f36e06ec
CSeq: 31866 INVITE
Server: Asterisk PBX 13.8.0
Content-Length: 0