Configure pjsip for extensions

Hi Guys,

I have been learning a lot from you guys in the lastyear and I really thank you for it.
I have a strange problem.

I created my pjsip.conf for three extensions.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Non mapped elements start
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[general]
allow_overlap = no
disable_tcp_switch => y
force_rport=yes
rewrite_contact=yes

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Non mapped elements end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:15060
external_media_address => [my public IP]
external_signaling_address => [my public IP]
local_net => [my local ip]/255.255.0.0

[transport-tcp]
type = transport
protocol = tcp
bind = 0.0.0.0:15060
external_media_address => [my public IP]
external_signaling_address => [my public IP]
local_net => [my local ip]/255.255.0.0

;===============ENDPOINT TEMPLATES
 
[endpoint-basic](!)
type=endpoint
context=extensions
transport=transport-udp
disallow=all
allow=all
 
[auth-userpass](!)
type=auth
auth_type=userpass
 
[aor-single-reg](!)
type=aor
max_contacts=10
 
;===============EXTENSION 1001
 
[1001](endpoint-basic)
auth=1001
aors=1001
 
[1001](auth-userpass)
password=1001
username=1001
 
[1001](aor-single-reg)
 
;===============EXTENSION 1002
 
[1002](endpoint-basic)
auth=1002
aors=1002
 
[1002](auth-userpass)
password=1002
username=1002
 
[1002](aor-single-reg)
 
;===============EXTENSION 1003
 
[1003](endpoint-basic)
auth=1003
aors=1003
 
[1003](auth-userpass)
password=1003
username=1003
 
[1003](aor-single-reg) 

With this, I can register the extension through multiple sip clients [tried on zoiper and grandwire].

== Endpoint 1001 is now Reachable

I have also created the extension to make active calls

[general]
static => yes
writeprotect => no
clearglobalvars => no

[extensions]
exten => _1XXX,1,Ringing
exten => _1XXX,n,Wait(2)
exten => _1XXX,n,Dial(PJSIP/${EXTEN},60,tT)
exten => _1XXX,n,Answer()
exten => _1XXX,n,Hangup

Here comes the strange part that I haven’t seen before.
When I make a call I see on the Asterisk Cli the following.

 == Setting global variable 'SIPDOMAIN' to '[public ip]'
    -- Executing [1001@extensions:1] Ringing("PJSIP/1003-00000000", "") in new stack
    -- Executing [1001@extensions:2] Wait("PJSIP/1003-00000000", "2") in new stack
    -- Executing [1001@extensions:3] Dial("PJSIP/1003-00000000", "PJSIP/1001,60,tT") in new stack
    -- Called PJSIP/1001
  == Spawn extension (extensions, 1001, 3) exited non-zero on 'PJSIP/1003-00000000'

The call is being made, but the endpoints never received the calls.
It’s just doesn’t ring at the other side.

I’m banging my head against the wall now as I don’t really understand what I’m doing wrong here.
I have been reading the asterisk documentation for days now.

Anybody that can send me in the right direction?
Your help is highly appreciated.

Wesley

Your logging is consistent with a successful call. You will probably need to provide protocol logging, and having time stamps (use the log files, not as screen scrape, would provide additional information.

Note that Asterisk doesn’t use the term “extension” for SIP endpoints.

@david551 Thank you for your fast reply.
I guess you mean like setting

pjsip set logger on

Shows and debug log for

<--- Received SIP request (963 bytes) from UDP:126.35.89.233:49683 --->
INVITE sip:1003@18.179.16.184:15060 SIP/2.0
Via: SIP/2.0/UDP 10.166.122.112:25782;branch=z9hG4bK537147194;rport
From: "100" <sip:1001@18.179.16.184:15060>;tag=976981978
To: <sip:1003@18.179.16.184:15060>
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 80 INVITE
Contact: "100" <sip:1001@10.166.122.112:25782>
Max-Forwards: 70
User-Agent: Grandstream Wave 1.2.14
Privacy: none
P-Preferred-Identity: "100" <sip:1001@18.179.16.184:15060>
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length:   276

v=0
o=1001 8000 8000 IN IP4 10.166.122.112
s=SIP Call
c=IN IP4 10.166.122.112
t=0 0
m=audio 11746 RTP/AVP 0 8 101
a=sendrecv
a=rtcp:11747 IN IP4 10.166.122.112
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Transmitting SIP response (485 bytes) to UDP:126.35.89.233:49683 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.166.122.112:25782;rport=49683;received=126.35.89.233;branch=z9hG4bK537147194
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=z9hG4bK537147194
CSeq: 80 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1600214512/2267dec6267873dfa7d7f755004f88f9",opaque="07d41e4677511aed",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.13.0
Content-Length:  0


<--- Received SIP request (292 bytes) from UDP:126.35.89.233:49683 --->
ACK sip:1003@18.179.16.184:15060 SIP/2.0
Via: SIP/2.0/UDP 10.166.122.112:25782;branch=z9hG4bK537147194;rport
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=z9hG4bK537147194
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 80 ACK
Content-Length: 0


<--- Received SIP request (1238 bytes) from UDP:126.35.89.233:49683 --->
INVITE sip:1003@18.179.16.184:15060 SIP/2.0
Via: SIP/2.0/UDP 10.166.122.112:25782;branch=z9hG4bK714570115;rport
From: "100" <sip:1001@18.179.16.184:15060>;tag=976981978
To: <sip:1003@18.179.16.184:15060>
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 81 INVITE
Contact: "100" <sip:1001@10.166.122.112:25782>
Authorization: Digest username="1001", realm="asterisk", nonce="1600214512/2267dec6267873dfa7d7f755004f88f9", uri="sip:1003@18.179.16.184:15060", response="3d217dba2147332fcb665c47c6c2f95f", algorithm=md5, cnonce="10329728", opaque="07d41e4677511aed", qop=auth, nc=0000000a
Max-Forwards: 70
User-Agent: Grandstream Wave 1.2.14
Privacy: none
P-Preferred-Identity: "100" <sip:1001@18.179.16.184:15060>
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length:   276

v=0
o=1001 8000 8000 IN IP4 10.166.122.112
s=SIP Call
c=IN IP4 10.166.122.112
t=0 0
m=audio 11746 RTP/AVP 0 8 101
a=sendrecv
a=rtcp:11747 IN IP4 10.166.122.112
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

  == Setting global variable 'SIPDOMAIN' to '18.179.16.184'
<--- Transmitting SIP response (312 bytes) to UDP:126.35.89.233:49683 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.166.122.112:25782;rport=49683;received=126.35.89.233;branch=z9hG4bK714570115
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>
CSeq: 81 INVITE
Server: Asterisk PBX 16.13.0
Content-Length:  0


    -- Executing [1003@extensions:1] Ringing("PJSIP/1001-0000000a", "") in new stack
    -- Executing [1003@extensions:2] Wait("PJSIP/1001-0000000a", "2") in new stack
<--- Transmitting SIP response (501 bytes) to UDP:126.35.89.233:49683 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.166.122.112:25782;rport=49683;received=126.35.89.233;branch=z9hG4bK714570115
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
CSeq: 81 INVITE
Server: Asterisk PBX 16.13.0
Contact: <sip:18.179.16.184:15060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length:  0


    -- Executing [1003@extensions:3] Dial("PJSIP/1001-0000000a", "PJSIP/1003,60,tT") in new stack
    -- Called PJSIP/1003
<--- Transmitting SIP request (719 bytes) to TCP:219.75.139.45:50775 --->
INVITE sip:1003@219.75.139.45:50775;transport=TCP;rinstance=21f04cf663f7e8ee SIP/2.0
Via: SIP/2.0/TCP 18.179.16.184:15060;rport;branch=z9hG4bKPj852729d4-a5ee-467b-8f87-6a4421c0f50c;alias
From: "100" <sip:1001@172.31.21.105>;tag=68f832ae-6039-4c37-b175-dbf3222d0201
To: <sip:1003@219.75.139.45;rinstance=21f04cf663f7e8ee>
Contact: <sip:asterisk@18.179.16.184:15060;transport=TCP>
Call-ID: 9b0a24d8-881d-4c7f-9e90-a8e34cd3fec3
CSeq: 21024 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [1003@extensions:4] Answer("PJSIP/1001-0000000a", "") in new stack
       > 0x7fc374086ba0 -- Strict RTP learning after remote address set to: 10.166.122.112:11746
<--- Transmitting SIP response (829 bytes) to UDP:126.35.89.233:49683 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.166.122.112:25782;rport=49683;received=126.35.89.233;branch=z9hG4bK714570115
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
CSeq: 81 INVITE
Server: Asterisk PBX 16.13.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Contact: <sip:18.179.16.184:15060>
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length:   251

v=0
o=- 8000 8002 IN IP4 18.179.16.184
s=Asterisk
c=IN IP4 18.179.16.184
t=0 0
m=audio 16404 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP request (535 bytes) from UDP:126.35.89.233:49683 --->
ACK sip:18.179.16.184:15060 SIP/2.0
Via: SIP/2.0/UDP 10.166.122.112:25782;branch=z9hG4bK1319845049;rport
From: <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 81 ACK
Contact: <sip:1001@10.166.122.112:25782>
Max-Forwards: 70
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


    -- Executing [1003@extensions:5] Hangup("PJSIP/1001-0000000a", "") in new stack
  == Spawn extension (extensions, 1003, 5) exited non-zero on 'PJSIP/1001-0000000a'
<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Received SIP request (539 bytes) from UDP:126.35.89.233:49683 --->
BYE sip:18.179.16.184:15060 SIP/2.0
Via: SIP/2.0/UDP 10.166.122.112:25782;branch=z9hG4bK12789934;rport
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 82 BYE
Contact: <sip:1001@10.166.122.112:25782>
Max-Forwards: 70
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (345 bytes) to UDP:126.35.89.233:49683 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.166.122.112:25782;rport=49683;received=126.35.89.233;branch=z9hG4bK12789934
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
From: "100" <sip:1001@18.179.16.184>;tag=976981978
To: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
CSeq: 82 BYE
Server: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0


<--- Transmitting SIP request (421 bytes) to UDP:10.166.122.112:25782 --->
BYE sip:1001@10.166.122.112:25782 SIP/2.0
Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPje12fd396-7b6c-438c-840d-27cd1f67b786
From: <sip:1003@18.179.16.184>;tag=c707b611-2ead-448d-8a01-85f7999de716
To: "100" <sip:1001@18.179.16.184>;tag=976981978
Call-ID: 252589232-25782-9@BA.BGG.BCC.BBC
CSeq: 22936 BYE
Reason: Q.850;cause=18
Max-Forwards: 70
User-Agent: Asterisk PBX 16.13.0
Content-Length:  0

It looks like the INVITE either didn’t reach the B side, or none of its responses reached Asterisk.

Again, there is no time information, but I suspect this is an, approximately 30 second timeout.

@david551

Indeed, I didn’t know there was a timestamp function.
Just found it in asterisk.conf

Now it shows the debug with timestamp

[Sep 16 00:15:43] <--- Received SIP request (968 bytes) from UDP:126.35.89.233:49465 --->
[Sep 16 00:15:43] INVITE sip:1003@18.179.16.184:15060 SIP/2.0
[Sep 16 00:15:43] Via: SIP/2.0/UDP 10.166.122.112:30059;branch=z9hG4bK1442004973;rport
[Sep 16 00:15:43] From: "1003" <sip:1001@18.179.16.184:15060>;tag=105348938
[Sep 16 00:15:43] To: <sip:1003@18.179.16.184:15060>
[Sep 16 00:15:43] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:15:43] CSeq: 20 INVITE
[Sep 16 00:15:43] Contact: "1003" <sip:1001@10.166.122.112:30059>
[Sep 16 00:15:43] Max-Forwards: 70
[Sep 16 00:15:43] User-Agent: Grandstream Wave 1.2.14
[Sep 16 00:15:43] Privacy: none
[Sep 16 00:15:43] P-Preferred-Identity: "1003" <sip:1001@18.179.16.184:15060>
[Sep 16 00:15:43] Supported: replaces, path, timer, eventlist
[Sep 16 00:15:43] Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
[Sep 16 00:15:43] Content-Type: application/sdp
[Sep 16 00:15:43] Accept: application/sdp, application/dtmf-relay
[Sep 16 00:15:43] Content-Length:   276
[Sep 16 00:15:43] 
[Sep 16 00:15:43] v=0
[Sep 16 00:15:43] o=1001 8000 8000 IN IP4 10.166.122.112
[Sep 16 00:15:43] s=SIP Call
[Sep 16 00:15:43] c=IN IP4 10.166.122.112
[Sep 16 00:15:43] t=0 0
[Sep 16 00:15:43] m=audio 19860 RTP/AVP 0 8 101
[Sep 16 00:15:43] a=sendrecv
[Sep 16 00:15:43] a=rtcp:19861 IN IP4 10.166.122.112
[Sep 16 00:15:43] a=rtpmap:0 PCMU/8000
[Sep 16 00:15:43] a=ptime:20
[Sep 16 00:15:43] a=rtpmap:8 PCMA/8000
[Sep 16 00:15:43] a=rtpmap:101 telephone-event/8000
[Sep 16 00:15:43] a=fmtp:101 0-15
[Sep 16 00:15:43] 
[Sep 16 00:15:43] <--- Transmitting SIP response (489 bytes) to UDP:126.35.89.233:49465 --->
[Sep 16 00:15:43] SIP/2.0 401 Unauthorized
[Sep 16 00:15:43] Via: SIP/2.0/UDP 10.166.122.112:30059;rport=49465;received=126.35.89.233;branch=z9hG4bK1442004973
[Sep 16 00:15:43] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:15:43] From: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:15:43] To: <sip:1003@18.179.16.184>;tag=z9hG4bK1442004973
[Sep 16 00:15:43] CSeq: 20 INVITE
[Sep 16 00:15:43] WWW-Authenticate: Digest realm="asterisk",nonce="1600215343/e313fd71fbbd9f257fea707370418dbc",opaque="1e18337b3bcff1e5",algorithm=md5,qop="auth"
[Sep 16 00:15:43] Server: Asterisk PBX 16.13.0
[Sep 16 00:15:43] Content-Length:  0
[Sep 16 00:15:43] 
[Sep 16 00:15:43] 
[Sep 16 00:15:43] <--- Received SIP request (296 bytes) from UDP:126.35.89.233:49465 --->
[Sep 16 00:15:43] ACK sip:1003@18.179.16.184:15060 SIP/2.0
[Sep 16 00:15:43] Via: SIP/2.0/UDP 10.166.122.112:30059;branch=z9hG4bK1442004973;rport
[Sep 16 00:15:43] From: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:15:43] To: <sip:1003@18.179.16.184>;tag=z9hG4bK1442004973
[Sep 16 00:15:43] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:15:43] CSeq: 20 ACK
[Sep 16 00:15:43] Content-Length: 0
[Sep 16 00:15:43] 
[Sep 16 00:15:43] 
[Sep 16 00:15:43] <--- Received SIP request (1243 bytes) from UDP:126.35.89.233:49465 --->
[Sep 16 00:15:43] INVITE sip:1003@18.179.16.184:15060 SIP/2.0
[Sep 16 00:15:43] Via: SIP/2.0/UDP 10.166.122.112:30059;branch=z9hG4bK1173269073;rport
[Sep 16 00:15:43] From: "1003" <sip:1001@18.179.16.184:15060>;tag=105348938
[Sep 16 00:15:43] To: <sip:1003@18.179.16.184:15060>
[Sep 16 00:15:43] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:15:43] CSeq: 21 INVITE
[Sep 16 00:15:43] Contact: "1003" <sip:1001@10.166.122.112:30059>
[Sep 16 00:15:43] Authorization: Digest username="1001", realm="asterisk", nonce="1600215343/e313fd71fbbd9f257fea707370418dbc", uri="sip:1003@18.179.16.184:15060", response="49920c679edbaa3cb35e0cf95c5c9cd1", algorithm=md5, cnonce="10539826", opaque="1e18337b3bcff1e5", qop=auth, nc=00000004
[Sep 16 00:15:43] Max-Forwards: 70
[Sep 16 00:15:43] User-Agent: Grandstream Wave 1.2.14
[Sep 16 00:15:43] Privacy: none
[Sep 16 00:15:43] P-Preferred-Identity: "1003" <sip:1001@18.179.16.184:15060>
[Sep 16 00:15:43] Supported: replaces, path, timer, eventlist
[Sep 16 00:15:43] Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
[Sep 16 00:15:43] Content-Type: application/sdp
[Sep 16 00:15:43] Accept: application/sdp, application/dtmf-relay
[Sep 16 00:15:43] Content-Length:   276
[Sep 16 00:15:43] 
[Sep 16 00:15:43] v=0
[Sep 16 00:15:43] o=1001 8000 8000 IN IP4 10.166.122.112
[Sep 16 00:15:43] s=SIP Call
[Sep 16 00:15:43] c=IN IP4 10.166.122.112
[Sep 16 00:15:43] t=0 0
[Sep 16 00:15:43] m=audio 19860 RTP/AVP 0 8 101
[Sep 16 00:15:43] a=sendrecv
[Sep 16 00:15:43] a=rtcp:19861 IN IP4 10.166.122.112
[Sep 16 00:15:43] a=rtpmap:0 PCMU/8000
[Sep 16 00:15:43] a=ptime:20
[Sep 16 00:15:43] a=rtpmap:8 PCMA/8000
[Sep 16 00:15:43] a=rtpmap:101 telephone-event/8000
[Sep 16 00:15:43] a=fmtp:101 0-15
[Sep 16 00:15:43] 
[Sep 16 00:15:43]   == Setting global variable 'SIPDOMAIN' to '18.179.16.184'
[Sep 16 00:15:43] <--- Transmitting SIP response (315 bytes) to UDP:126.35.89.233:49465 --->
[Sep 16 00:15:43] SIP/2.0 100 Trying
[Sep 16 00:15:43] Via: SIP/2.0/UDP 10.166.122.112:30059;rport=49465;received=126.35.89.233;branch=z9hG4bK1173269073
[Sep 16 00:15:43] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:15:43] From: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:15:43] To: <sip:1003@18.179.16.184>
[Sep 16 00:15:43] CSeq: 21 INVITE
[Sep 16 00:15:43] Server: Asterisk PBX 16.13.0
[Sep 16 00:15:43] Content-Length:  0
[Sep 16 00:15:43] 
[Sep 16 00:15:43] 
[Sep 16 00:15:43]     -- Executing [1003@extensions:1] Ringing("PJSIP/1001-00000002", "") in new stack
[Sep 16 00:15:43]     -- Executing [1003@extensions:2] Wait("PJSIP/1001-00000002", "2") in new stack
[Sep 16 00:15:43] <--- Transmitting SIP response (504 bytes) to UDP:126.35.89.233:49465 --->
[Sep 16 00:15:43] SIP/2.0 180 Ringing
[Sep 16 00:15:43] Via: SIP/2.0/UDP 10.166.122.112:30059;rport=49465;received=126.35.89.233;branch=z9hG4bK1173269073
[Sep 16 00:15:43] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:15:43] From: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:15:43] To: <sip:1003@18.179.16.184>;tag=c8ae2584-db9a-4a12-8ab8-9a79c0da8ab0
[Sep 16 00:15:43] CSeq: 21 INVITE
[Sep 16 00:15:43] Server: Asterisk PBX 16.13.0
[Sep 16 00:15:43] Contact: <sip:18.179.16.184:15060>
[Sep 16 00:15:43] Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
[Sep 16 00:15:43] Content-Length:  0
[Sep 16 00:15:43] 
[Sep 16 00:15:43] 
[Sep 16 00:15:45]     -- Executing [1003@extensions:3] Dial("PJSIP/1001-00000002", "PJSIP/1003,60,tT") in new stack
[Sep 16 00:15:45]     -- Called PJSIP/1003
[Sep 16 00:15:45] <--- Transmitting SIP request (720 bytes) to TCP:219.75.139.45:50775 --->
[Sep 16 00:15:45] INVITE sip:1003@219.75.139.45:50775;transport=TCP;rinstance=56123c3cef27fd47 SIP/2.0
[Sep 16 00:15:45] Via: SIP/2.0/TCP 18.179.16.184:15060;rport;branch=z9hG4bKPjea8ee9dc-5cdd-4f34-9b05-a737c17b4a24;alias
[Sep 16 00:15:45] From: "1003" <sip:1001@172.31.21.105>;tag=65963efb-516a-416d-9abe-66a8b4209a74
[Sep 16 00:15:45] To: <sip:1003@219.75.139.45;rinstance=56123c3cef27fd47>
[Sep 16 00:15:45] Contact: <sip:asterisk@18.179.16.184:15060;transport=TCP>
[Sep 16 00:15:45] Call-ID: 1df536df-e349-41ce-a3e7-ab51b47b1528
[Sep 16 00:15:45] CSeq: 12380 INVITE
[Sep 16 00:15:45] Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
[Sep 16 00:15:45] Supported: 100rel, timer, replaces, norefersub
[Sep 16 00:15:45] Session-Expires: 1800
[Sep 16 00:15:45] Min-SE: 90
[Sep 16 00:15:45] Max-Forwards: 70
[Sep 16 00:15:45] User-Agent: Asterisk PBX 16.13.0
[Sep 16 00:15:45] Content-Length:  0
[Sep 16 00:15:45] 
[Sep 16 00:15:45] 
[Sep 16 00:16:15]     -- Removed contact 'sip:1003@219.75.139.45:50775;transport=TCP;rinstance=21f04cf663f7e8ee' from AOR '1003' due to expiration
[Sep 16 00:16:15]   == Contact 1003/sip:1003@219.75.139.45:50775;transport=TCP;rinstance=21f04cf663f7e8ee has been deleted
[Sep 16 00:16:17]   == Everyone is busy/congested at this time (1:0/0/1)
[Sep 16 00:16:17]     -- Executing [1003@extensions:4] Answer("PJSIP/1001-00000002", "") in new stack
[Sep 16 00:16:17]        > 0x7fbcf00340a0 -- Strict RTP learning after remote address set to: 10.166.122.112:19860
[Sep 16 00:16:17] <--- Transmitting SIP response (832 bytes) to UDP:126.35.89.233:49465 --->
[Sep 16 00:16:17] SIP/2.0 200 OK
[Sep 16 00:16:17] Via: SIP/2.0/UDP 10.166.122.112:30059;rport=49465;received=126.35.89.233;branch=z9hG4bK1173269073
[Sep 16 00:16:17] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:16:17] From: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:16:17] To: <sip:1003@18.179.16.184>;tag=c8ae2584-db9a-4a12-8ab8-9a79c0da8ab0
[Sep 16 00:16:17] CSeq: 21 INVITE
[Sep 16 00:16:17] Server: Asterisk PBX 16.13.0
[Sep 16 00:16:17] Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
[Sep 16 00:16:17] Contact: <sip:18.179.16.184:15060>
[Sep 16 00:16:17] Supported: 100rel, timer, replaces, norefersub
[Sep 16 00:16:17] Content-Type: application/sdp
[Sep 16 00:16:17] Content-Length:   251
[Sep 16 00:16:17] 
[Sep 16 00:16:17] v=0
[Sep 16 00:16:17] o=- 8000 8002 IN IP4 18.179.16.184
[Sep 16 00:16:17] s=Asterisk
[Sep 16 00:16:17] c=IN IP4 18.179.16.184
[Sep 16 00:16:17] t=0 0
[Sep 16 00:16:17] m=audio 14072 RTP/AVP 0 8 101
[Sep 16 00:16:17] a=rtpmap:0 PCMU/8000
[Sep 16 00:16:17] a=rtpmap:8 PCMA/8000
[Sep 16 00:16:17] a=rtpmap:101 telephone-event/8000
[Sep 16 00:16:17] a=fmtp:101 0-16
[Sep 16 00:16:17] a=ptime:20
[Sep 16 00:16:17] a=maxptime:150
[Sep 16 00:16:17] a=sendrecv
[Sep 16 00:16:17] 
[Sep 16 00:16:18] <--- Transmitting SIP response (832 bytes) to UDP:126.35.89.233:49465 --->
[Sep 16 00:16:18] SIP/2.0 200 OK
[Sep 16 00:16:18] Via: SIP/2.0/UDP 10.166.122.112:30059;rport=49465;received=126.35.89.233;branch=z9hG4bK1173269073
[Sep 16 00:16:18] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:16:18] From: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:16:18] To: <sip:1003@18.179.16.184>;tag=c8ae2584-db9a-4a12-8ab8-9a79c0da8ab0
[Sep 16 00:16:18] CSeq: 21 INVITE
[Sep 16 00:16:18] Server: Asterisk PBX 16.13.0
[Sep 16 00:16:18] Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
[Sep 16 00:16:18] Contact: <sip:18.179.16.184:15060>
[Sep 16 00:16:18] Supported: 100rel, timer, replaces, norefersub
[Sep 16 00:16:18] Content-Type: application/sdp
[Sep 16 00:16:18] Content-Length:   251
[Sep 16 00:16:18] 
[Sep 16 00:16:18] v=0
[Sep 16 00:16:18] o=- 8000 8002 IN IP4 18.179.16.184
[Sep 16 00:16:18] s=Asterisk
[Sep 16 00:16:18] c=IN IP4 18.179.16.184
[Sep 16 00:16:18] t=0 0
[Sep 16 00:16:18] m=audio 14072 RTP/AVP 0 8 101
[Sep 16 00:16:18] a=rtpmap:0 PCMU/8000
[Sep 16 00:16:18] a=rtpmap:8 PCMA/8000
[Sep 16 00:16:18] a=rtpmap:101 telephone-event/8000
[Sep 16 00:16:18] a=fmtp:101 0-16
[Sep 16 00:16:18] a=ptime:20
[Sep 16 00:16:18] a=maxptime:150
[Sep 16 00:16:18] a=sendrecv
[Sep 16 00:16:18] 
[Sep 16 00:16:18]     -- Executing [1003@extensions:5] Hangup("PJSIP/1001-00000002", "") in new stack
[Sep 16 00:16:18]   == Spawn extension (extensions, 1003, 5) exited non-zero on 'PJSIP/1001-00000002'
[Sep 16 00:16:18] <--- Transmitting SIP request (423 bytes) to UDP:10.166.122.112:30059 --->
[Sep 16 00:16:18] BYE sip:1001@10.166.122.112:30059 SIP/2.0
[Sep 16 00:16:18] Via: SIP/2.0/UDP 18.179.16.184:15060;rport;branch=z9hG4bKPj9a2d5949-de0e-4fab-8802-ecd4b7ff7848
[Sep 16 00:16:18] From: <sip:1003@18.179.16.184>;tag=c8ae2584-db9a-4a12-8ab8-9a79c0da8ab0
[Sep 16 00:16:18] To: "1003" <sip:1001@18.179.16.184>;tag=105348938
[Sep 16 00:16:18] Call-ID: 1975112448-30059-3@BA.BGG.BCC.BBC
[Sep 16 00:16:18] CSeq: 29481 BYE
[Sep 16 00:16:18] Reason: Q.850;cause=18
[Sep 16 00:16:18] Max-Forwards: 70
[Sep 16 00:16:18] User-Agent: Asterisk PBX 16.13.0
[Sep 16 00:16:18] Content-Length:  0

What could be the problem of not reaching the B side?
Would this be that I have made a mistake with the settings

Again thank you for helping me search in the right direction.
It helps me learn a lot about the system.

Assuming the B side is local, a firewall or the wrong address or port number.

But it is not local, as the destination address is a public one, but the Via one is a private one, so add in failure to configure NAT public addresses, or other NAT misconfiguration.

Thank you!

I look into it.
Thank you for sending me in the right direction.

If I am not mistaken then your clients are behind NAT. Can you please enable ice and also rewrite_contact to your end points? Another thing are you only using Zoiper or some other soft phones.

I found the problem
Settings the sip clients to both use UDP made it work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.