I’m encountering an issue where I’m unable to make calls from user 300 to user 200, but I can successfully call from user 200 to user 300. This setup involves using Zoiper and MicroSIP softphones, and everything is configured to run locally on my machine.
[global]
type=global
user_agent=My Asterisk Server
[udp]
type=transport
protocol=udp
bind=0.0.0.0
tos=af42
cos=3
[ws]
type=transport
protocol=wss ; Use 'wss' for WebSocket Secure
bind=0.0.0.0 ; Replace with your Asterisk server's IP and secure port
[tcp]
type=transport
protocol=tcp
bind=0.0.0.0
[endpoint-basic](!)
type=endpoint
transport=ws
context=default ; Replace with the context you use in your dialplan
disallow=all
allow=opus,ulaw,alaw
auth=auth_user
aors=sip_user
webrtc=yes
dtls_auto_generate_cert=yes
direct_media=no
; Authentication for the User
[auth_user](!)
type=auth
auth_type=userpass
; AOR for the User
[sip_user](!)
type=aor
max_contacts=5 ; Adjust as needed
remove_existing=yes
; Specific User Configuration
[100](endpoint-basic)
auth=auth100
aors=100
[auth100](auth_user)
username=100 ; Replace with your username
password=1234 ; Replace with a strong password
[100](sip_user)
[200](endpoint-basic)
auth=auth200
aors=200
[auth200](auth_user)
username=200 ; Replace with your username
password=1234 ; Replace with a strong password
[200](sip_user)
[300]
type=endpoint
transport=udp
context=default ; Replace with the context you use in your dialplan
disallow=all
allow=opus,ulaw,alaw
auth=300
aors=300
[300]
type=aor
max_contacts=5 ; Adjust as needed
remove_existing=yes
[300]
type=auth
auth_type=userpass
username=300
password=1234
[default]
exten => _XXX,1,NoOp(Calling: ${EXTEN}))
same => n,Dial(PJSIP/${EXTEN},30)
same => n,Hangup()
Logs when calling from user 300 to user 200:
<--- Received SIP request (1299 bytes) from UDP:172.22.160.1:50520 --->
INVITE sip:200@172.22.175.6;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.22.160.1:50520;branch=z9hG4bK-524287-1---a146da0c3e1685ac;rport
Max-Forwards: 70
Contact: <sip:300@172.22.160.1:50520;transport=UDP>
To: <sip:200@172.22.175.6>
From: <sip:300@172.22.175.6;transport=UDP>;tag=aa1a801f
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.6.1 v2.10.19.9
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 629
v=0
o=Z 0 19320051 IN IP4 172.22.160.1
s=Z
c=IN IP4 172.22.160.1
t=0 0
m=audio 64337 RTP/AVPF 106 9 0 8 3 111 97 110 112 98 96 100 99 102
a=rtpmap:106 opus/48000/2
a=fmtp:106 minptime=20; useinbandfec=1
a=rtpmap:111 speex/16000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:110 speex/8000
a=rtpmap:112 speex/32000
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=rtpmap:100 telephone-event/16000
a=fmtp:100 0-16
a=rtpmap:99 telephone-event/32000
a=fmtp:99 0-16
a=rtpmap:102 G726-32/8000
a=sendrecv
a=rtcp-mux
a=rtcp-fb:* nack pli
a=rtcp-fb:* ccm fir
<--- Transmitting SIP response (498 bytes) to UDP:172.22.160.1:50520 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.22.160.1:50520;rport=50520;received=172.22.160.1;branch=z9hG4bK-524287-1---a146da0c3e1685ac
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
From: <sip:300@172.22.175.6>;tag=aa1a801f
To: <sip:200@172.22.175.6>;tag=z9hG4bK-524287-1---a146da0c3e1685ac
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1706288276/f2e7c6b7ac8a6a3a5299de722c9d0509",opaque="2a17209b31a8b500",algorithm=MD5,qop="auth"
Server: My Asterisk Server
Content-Length: 0
<--- Received SIP request (346 bytes) from UDP:172.22.160.1:50520 --->
ACK sip:200@172.22.175.6;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.22.160.1:50520;branch=z9hG4bK-524287-1---a146da0c3e1685ac;rport
Max-Forwards: 70
To: <sip:200@172.22.175.6>;tag=z9hG4bK-524287-1---a146da0c3e1685ac
From: <sip:300@172.22.175.6;transport=UDP>;tag=aa1a801f
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
CSeq: 1 ACK
Content-Length: 0
<--- Received SIP request (1594 bytes) from UDP:172.22.160.1:50520 --->
INVITE sip:200@172.22.175.6;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.22.160.1:50520;branch=z9hG4bK-524287-1---586a8e20673f88d1;rport
Max-Forwards: 70
Contact: <sip:300@172.22.160.1:50520;transport=UDP>
To: <sip:200@172.22.175.6>
From: <sip:300@172.22.175.6;transport=UDP>;tag=aa1a801f
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.6.1 v2.10.19.9
Authorization: Digest username="300",realm="asterisk",nonce="1706288276/f2e7c6b7ac8a6a3a5299de722c9d0509",uri="sip:200@172.22.175.6;transport=UDP",response="529dccb9e34fbdbe0903bdab52318ac5",cnonce="ac47f84a911f6abc1d81d6c29d27aed2",nc=00000001,qop=auth,algorithm=MD5,opaque="2a17209b31a8b500"
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 629
v=0
o=Z 0 19320051 IN IP4 172.22.160.1
s=Z
c=IN IP4 172.22.160.1
t=0 0
m=audio 64337 RTP/AVPF 106 9 0 8 3 111 97 110 112 98 96 100 99 102
a=rtpmap:106 opus/48000/2
a=fmtp:106 minptime=20; useinbandfec=1
a=rtpmap:111 speex/16000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:110 speex/8000
a=rtpmap:112 speex/32000
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=rtpmap:100 telephone-event/16000
a=fmtp:100 0-16
a=rtpmap:99 telephone-event/32000
a=fmtp:99 0-16
a=rtpmap:102 G726-32/8000
a=sendrecv
a=rtcp-mux
a=rtcp-fb:* nack pli
a=rtcp-fb:* ccm fir
<--- Transmitting SIP response (306 bytes) to UDP:172.22.160.1:50520 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.22.160.1:50520;rport=50520;received=172.22.160.1;branch=z9hG4bK-524287-1---586a8e20673f88d1
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
From: <sip:300@172.22.175.6>;tag=aa1a801f
To: <sip:200@172.22.175.6>
CSeq: 2 INVITE
Server: My Asterisk Server
Content-Length: 0
[Jan 26 22:27:56] ERROR[25778]: res_pjsip_session.c:937 handle_incoming_sdp: 300: Couldn't negotiate stream 0:audio-0:audio:sendrecv (nothing)
<--- Transmitting SIP response (360 bytes) to UDP:172.22.160.1:50520 --->
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/UDP 172.22.160.1:50520;rport=50520;received=172.22.160.1;branch=z9hG4bK-524287-1---586a8e20673f88d1
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
From: <sip:300@172.22.175.6>;tag=aa1a801f
To: <sip:200@172.22.175.6>;tag=8cbf404b-b4a7-496c-8b5b-126682dc2b76
CSeq: 2 INVITE
Server: My Asterisk Server
Content-Length: 0
<--- Received SIP request (347 bytes) from UDP:172.22.160.1:50520 --->
ACK sip:200@172.22.175.6;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.22.160.1:50520;branch=z9hG4bK-524287-1---586a8e20673f88d1;rport
Max-Forwards: 70
To: <sip:200@172.22.175.6>;tag=8cbf404b-b4a7-496c-8b5b-126682dc2b76
From: <sip:300@172.22.175.6;transport=UDP>;tag=aa1a801f
Call-ID: 3xVtqG5bnCTx5uXW5NYkgg..
CSeq: 2 ACK
Content-Length: 0