I’m using PJSIP. I can register to the PSTN and able to accept incoming calls but I cannot make outbound calls.
This is how my pisjip.conf looks like:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
[023545090]
type=registration
outbound_auth=023545090
server_uri=sip:sipapvpbx.totbb.net
client_uri=sip:023545090@sipapvpbx.totbb.net
retry_interval=60
[023545090]
type=auth
auth_type=userpass
password=xxxxxxxxx
username=023545090
[023545090]
type=aor
contact=sip:sipapvpbx.totbb.net
[023545090]
type=endpoint
context=incoming
disallow=all
allow=ulaw
outbound_auth=023545090
aors=023545090
from_user=023545090
from_domain=sipapvpbx.totbb.net
[023545090]
type=identify
endpoint=023545090
match=sipapvpbx.totbb.net
and here is the logs
<--- Received SIP request (1053 bytes) from UDP:10.0.5.252:51710 --->
INVITE sip:023545096@10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPj02U9Xe5x0Gv9HSbV419U97LfuO3VT8zS
Max-Forwards: 70
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: sip:023545096@10.0.4.10
Contact: "6001" <sip:6001@10.0.5.252:51710;ob>
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
CSeq: 28726 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, norefersub
User-Agent: Telephone 1.6
Content-Type: application/sdp
Content-Length: 471
v=0
o=- 3893628269 3893628269 IN IP4 10.0.5.252
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4016 RTP/AVP 96 9 8 0 101 102
c=IN IP4 10.0.5.252
b=TIAS:96000
a=rtcp:4017 IN IP4 10.0.5.252
a=sendrecv
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/48000
a=fmtp:101 0-16
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16
a=ssrc:1402785162 cname:4271c8193c080363
<--- Transmitting SIP response (552 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPj02U9Xe5x0Gv9HSbV419U97LfuO3VT8zS
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: <sip:023545096@10.0.4.10>;tag=z9hG4bKPj02U9Xe5x0Gv9HSbV419U97LfuO3VT8zS
CSeq: 28726 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1684639469/30e26c1c5daf1b22f66ee9cb59aefdb6",opaque="666010951ce5a0fd",algorithm=MD5,qop="auth"
Server: Asterisk PBX 18.17.1
Content-Length: 0
<--- Received SIP request (374 bytes) from UDP:10.0.5.252:51710 --->
ACK sip:023545096@10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPj02U9Xe5x0Gv9HSbV419U97LfuO3VT8zS
Max-Forwards: 70
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: sip:023545096@10.0.4.10;tag=z9hG4bKPj02U9Xe5x0Gv9HSbV419U97LfuO3VT8zS
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
CSeq: 28726 ACK
Content-Length: 0
<--- Received SIP request (1346 bytes) from UDP:10.0.5.252:51710 --->
INVITE sip:023545096@10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPjLUrsWoIYf0516.XHiRUBJBPxSpSRgyYE
Max-Forwards: 70
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: sip:023545096@10.0.4.10
Contact: "6001" <sip:6001@10.0.5.252:51710;ob>
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
CSeq: 28727 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, norefersub
User-Agent: Telephone 1.6
Authorization: Digest username="6001", realm="asterisk", nonce="1684639469/30e26c1c5daf1b22f66ee9cb59aefdb6", uri="sip:023545096@10.0.4.10", response="812462caa09524066bebb71d646c9b8a", algorithm=MD5, cnonce="Uk22SY0W0OqAywMR4TGq22vomZSOSJE", opaque="666010951ce5a0fd", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 471
v=0
o=- 3893628269 3893628269 IN IP4 10.0.5.252
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4016 RTP/AVP 96 9 8 0 101 102
c=IN IP4 10.0.5.252
b=TIAS:96000
a=rtcp:4017 IN IP4 10.0.5.252
a=sendrecv
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/48000
a=fmtp:101 0-16
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16
a=ssrc:1402785162 cname:4271c8193c080363
<--- Transmitting SIP response (354 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPjLUrsWoIYf0516.XHiRUBJBPxSpSRgyYE
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: <sip:023545096@10.0.4.10>
CSeq: 28727 INVITE
Server: Asterisk PBX 18.17.1
Content-Length: 0
-- Executing [023545096@outgoing:1] Set("PJSIP/6001-00000004", "CALLERID(num)=023545090") in new stack
-- Executing [023545096@outgoing:2] Dial("PJSIP/6001-00000004", "PJSIP/023545096@023545090") in new stack
-- Called PJSIP/023545096@023545090
<--- Transmitting SIP request (918 bytes) to UDP:182.53.221.118:5060 --->
INVITE sip:023545096@sipapvpbx.totbb.net SIP/2.0
Via: SIP/2.0/UDP 10.0.4.10:5060;rport;branch=z9hG4bKPj7285d9e6-48e5-4df1-a795-9adf06c3c175
From: <sip:023545090@sipapvpbx.totbb.net>;tag=3e188806-c4b4-4dcc-af1a-9ac9709f627b
To: <sip:023545096@sipapvpbx.totbb.net>
Contact: <sip:023545090@10.0.4.10:5060>
Call-ID: 61405753-493c-4e1e-81b1-24f614e95470
CSeq: 24678 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.1
Content-Type: application/sdp
Content-Length: 231
v=0
o=- 1442236409 1442236409 IN IP4 10.0.4.10
s=Asterisk
c=IN IP4 10.0.4.10
t=0 0
m=audio 12558 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<--- Received SIP response (399 bytes) from UDP:182.53.221.118:5060 --->
SIP/2.0 100 Trying
Call-ID: 61405753-493c-4e1e-81b1-24f614e95470
CSeq: 24678 INVITE
From: <sip:023545090@sipapvpbx.totbb.net>;tag=3e188806-c4b4-4dcc-af1a-9ac9709f627b
To: <sip:023545096@sipapvpbx.totbb.net>;tag=sip+3+ef4e0073+7873171e
Via: SIP/2.0/UDP 10.0.4.10:5060;received=182.52.129.135;rport=5060;branch=z9hG4bKPj7285d9e6-48e5-4df1-a795-9adf06c3c175
Server: SIP/2.0
Content-Length: 0
<--- Received SIP response (476 bytes) from UDP:182.53.221.118:5060 --->
SIP/2.0 403 Forbidden
Call-ID: 61405753-493c-4e1e-81b1-24f614e95470
CSeq: 24678 INVITE
From: <sip:023545090@sipapvpbx.totbb.net>;tag=3e188806-c4b4-4dcc-af1a-9ac9709f627b
To: <sip:023545096@sipapvpbx.totbb.net>;tag=sip+3+ef4e0073+7873171e
Via: SIP/2.0/UDP 10.0.4.10:5060;received=182.52.129.135;rport=5060;branch=z9hG4bKPj7285d9e6-48e5-4df1-a795-9adf06c3c175
Content-Length: 0
Contact: <sip:182.53.221.118:5060>
Server: DC-SIP/2.0
Organization: Metaswitch Networks
<--- Transmitting SIP request (430 bytes) to UDP:182.53.221.118:5060 --->
ACK sip:023545096@sipapvpbx.totbb.net SIP/2.0
Via: SIP/2.0/UDP 10.0.4.10:5060;rport;branch=z9hG4bKPj7285d9e6-48e5-4df1-a795-9adf06c3c175
From: <sip:023545090@sipapvpbx.totbb.net>;tag=3e188806-c4b4-4dcc-af1a-9ac9709f627b
To: <sip:023545096@sipapvpbx.totbb.net>;tag=sip+3+ef4e0073+7873171e
Call-ID: 61405753-493c-4e1e-81b1-24f614e95470
CSeq: 24678 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.17.1
Content-Length: 0
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'PJSIP/6001-00000004' status is 'CHANUNAVAIL'
<--- Transmitting SIP response (432 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPjLUrsWoIYf0516.XHiRUBJBPxSpSRgyYE
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: <sip:023545096@10.0.4.10>;tag=0a772575-63e9-448a-8f8d-4a8167e92f0f
CSeq: 28727 INVITE
Server: Asterisk PBX 18.17.1
Reason: Q.850;cause=34
Content-Length: 0
<--- Received SIP request (369 bytes) from UDP:10.0.5.252:51710 --->
ACK sip:023545096@10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPjLUrsWoIYf0516.XHiRUBJBPxSpSRgyYE
Max-Forwards: 70
From: "6001" <sip:6001@10.0.4.10>;tag=PGWly9u-dz0pvdr8DQIs-0N-6nLad.xd
To: sip:023545096@10.0.4.10;tag=0a772575-63e9-448a-8f8d-4a8167e92f0f
Call-ID: 5VbYRXghWHxCMzCFhU29ZN6kTfY6JqcI
CSeq: 28727 ACK
Content-Length: 0
<--- Received SIP request (518 bytes) from UDP:10.0.5.252:51710 --->
REGISTER sip:10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPjUYPIUjktUiIyeYV9QEGlxi6hdZpg3YDP
Max-Forwards: 70
From: "6001" <sip:6001@10.0.4.10>;tag=QUQNuEazZaoiFA8e7WquKdoezaIjLQJU
To: "6001" <sip:6001@10.0.4.10>
Call-ID: KhHCilROcuW3aa10PqhuER8BwfDL5fvR
CSeq: 5626 REGISTER
User-Agent: Telephone 1.6
Contact: "6001" <sip:6001@10.0.5.252:51710;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
<--- Transmitting SIP response (555 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPjUYPIUjktUiIyeYV9QEGlxi6hdZpg3YDP
Call-ID: KhHCilROcuW3aa10PqhuER8BwfDL5fvR
From: "6001" <sip:6001@10.0.4.10>;tag=QUQNuEazZaoiFA8e7WquKdoezaIjLQJU
To: "6001" <sip:6001@10.0.4.10>;tag=z9hG4bKPjUYPIUjktUiIyeYV9QEGlxi6hdZpg3YDP
CSeq: 5626 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1684639676/434e5e196167b052c4d08ccf9afd19e1",opaque="4b4ef3d133e7ca7e",algorithm=MD5,qop="auth"
Server: Asterisk PBX 18.17.1
Content-Length: 0
<--- Received SIP request (801 bytes) from UDP:10.0.5.252:51710 --->
REGISTER sip:10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPj5ffySjp9DWN6uvldGYBrs4jzhtnhJm2t
Max-Forwards: 70
From: "6001" <sip:6001@10.0.4.10>;tag=QUQNuEazZaoiFA8e7WquKdoezaIjLQJU
To: "6001" <sip:6001@10.0.4.10>
Call-ID: KhHCilROcuW3aa10PqhuER8BwfDL5fvR
CSeq: 5627 REGISTER
User-Agent: Telephone 1.6
Contact: "6001" <sip:6001@10.0.5.252:51710;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username="6001", realm="asterisk", nonce="1684639676/434e5e196167b052c4d08ccf9afd19e1", uri="sip:10.0.4.10", response="f022a74469c2b187b63d46b339dd31a0", algorithm=MD5, cnonce="WcA0YJeP2.hk.P1JYwxY.ytnqdP8eeQ", opaque="4b4ef3d133e7ca7e", qop=auth, nc=00000001
Content-Length: 0
<--- Transmitting SIP response (503 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPj5ffySjp9DWN6uvldGYBrs4jzhtnhJm2t
Call-ID: KhHCilROcuW3aa10PqhuER8BwfDL5fvR
From: "6001" <sip:6001@10.0.4.10>;tag=QUQNuEazZaoiFA8e7WquKdoezaIjLQJU
To: "6001" <sip:6001@10.0.4.10>;tag=z9hG4bKPj5ffySjp9DWN6uvldGYBrs4jzhtnhJm2t
CSeq: 5627 REGISTER
Date: Sun, 21 May 2023 03:27:56 GMT
Contact: <sip:6001@10.0.5.252:51710;ob>;expires=299
Expires: 300
Server: Asterisk PBX 18.17.1
Content-Length: 0
<--- Received SIP request (519 bytes) from UDP:10.0.5.252:51710 --->
REGISTER sip:10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPjwOph-qi-2BK5nVSwP-O3EhKU0Vtb0r8T
Max-Forwards: 70
From: "6002" <sip:6002@10.0.4.10>;tag=AwaB-o0vKVK9IQh99Yy6db-X2gswHwhK
To: "6002" <sip:6002@10.0.4.10>
Call-ID: UQBORVCY6NzB7pG8b85YzO44gqlasCQ2
CSeq: 59958 REGISTER
User-Agent: Telephone 1.6
Contact: "6002" <sip:6002@10.0.5.252:51710;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
<--- Transmitting SIP response (556 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPjwOph-qi-2BK5nVSwP-O3EhKU0Vtb0r8T
Call-ID: UQBORVCY6NzB7pG8b85YzO44gqlasCQ2
From: "6002" <sip:6002@10.0.4.10>;tag=AwaB-o0vKVK9IQh99Yy6db-X2gswHwhK
To: "6002" <sip:6002@10.0.4.10>;tag=z9hG4bKPjwOph-qi-2BK5nVSwP-O3EhKU0Vtb0r8T
CSeq: 59958 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1684639704/48cbd74a2a7b1136ecebac9810bec87f",opaque="7696b24628b1d859",algorithm=MD5,qop="auth"
Server: Asterisk PBX 18.17.1
Content-Length: 0
<--- Received SIP request (802 bytes) from UDP:10.0.5.252:51710 --->
REGISTER sip:10.0.4.10 SIP/2.0
Via: SIP/2.0/UDP 10.0.5.252:51710;rport;branch=z9hG4bKPjoaIl2.40ej1IH3xqA-Mg-RreN8zRWbxI
Max-Forwards: 70
From: "6002" <sip:6002@10.0.4.10>;tag=AwaB-o0vKVK9IQh99Yy6db-X2gswHwhK
To: "6002" <sip:6002@10.0.4.10>
Call-ID: UQBORVCY6NzB7pG8b85YzO44gqlasCQ2
CSeq: 59959 REGISTER
User-Agent: Telephone 1.6
Contact: "6002" <sip:6002@10.0.5.252:51710;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username="6002", realm="asterisk", nonce="1684639704/48cbd74a2a7b1136ecebac9810bec87f", uri="sip:10.0.4.10", response="579b55c4b0a84f276184301e05fbcc8d", algorithm=MD5, cnonce="DZVc3sz687m26fj5qhy0o1PMUL4EyHf", opaque="7696b24628b1d859", qop=auth, nc=00000001
Content-Length: 0
<--- Transmitting SIP response (504 bytes) to UDP:10.0.5.252:51710 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.5.252:51710;rport=51710;received=10.0.5.252;branch=z9hG4bKPjoaIl2.40ej1IH3xqA-Mg-RreN8zRWbxI
Call-ID: UQBORVCY6NzB7pG8b85YzO44gqlasCQ2
From: "6002" <sip:6002@10.0.4.10>;tag=AwaB-o0vKVK9IQh99Yy6db-X2gswHwhK
To: "6002" <sip:6002@10.0.4.10>;tag=z9hG4bKPjoaIl2.40ej1IH3xqA-Mg-RreN8zRWbxI
CSeq: 59959 REGISTER
Date: Sun, 21 May 2023 03:28:24 GMT
Contact: <sip:6002@10.0.5.252:51710;ob>;expires=299
Expires: 300
Server: Asterisk PBX 18.17.1
Content-Length: 0
it gives this error when I try to make a call
-- Executing [023545096@outgoing:1] Set("PJSIP/6001-00000008", "CALLERID(num)=023545090") in new stack
-- Executing [023545096@outgoing:2] Dial("PJSIP/6001-00000008", "PJSIP/023545096@023545090") in new stack
-- Called PJSIP/023545096@023545090
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'PJSIP/6001-00000008' status is 'CHANUNAVAIL'