Inbound calls with pjsip

Somewhat related to this, I am switching to pjsip for the asterisk (SBC ). I can make an outbound call from an endpoint to a PSTN but not the other way round.

My pjsip.conf

;=========== General settings ===========
[global]
type=global
user_agent=Asterisk PBX SBC

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:{{asterisk-port}}

;=========== Extension 1000 ===========
[1000]
type=endpoint
context=from-internal
disallow=all
allow=alaw,ulaw
auth=auth1000
aors=1000

[auth1000]
type=auth
auth_type=userpass
username=1000
password=password

[1000]
type=aor
max_contacts=1


;======================== Registration ============================


; register={{sip-user}}:{{sip-pass}}@{{sip-url}}/{{sip-user}} ; old from sip.conf
[my_provider]
type=registration
transport=transport-udp
outbound_auth=my_provider-auth
server_uri=sip:{{sip-url}}:{{port}}
client_uri=sip:{{sip-user}}@{{sip-url}}:{{port}}
retry_interval=60
contact_user={{sip-user}}

[my_provider-auth]
type=auth
auth_type=userpass
password={{sip-pass}}
username={{sip-user}}


[my_provider_aor]
type=aor
contact=sip:@{{sip-url}}:{{port}}
qualify_frequency=200
;max_contacts=1

[my_provider_endpoint]
type=endpoint
context=from-external
disallow=all
allow=ulaw
outbound_auth=my_provider-auth
aors=my_provider_aor

[my_provider_identify]
type=identify
endpoint=my_provider_endpoint
match={{sip-url}}


;======================= End Registration ===================================

extensions.conf
From the 1000 endpoint,I can dial 100 or my phone number from zoiper and it will ring.

[from-internal]
exten => 100,1,Answer()
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Hangup()

exten => _xxxxxxxxxx,1,Dial(PJSIP/${EXTEN}@my_provider_endpoint)

I expect dialing DID number provided by the sip provider to ring and reply with hello-world

[from-external]
exten => _.,1,Answer()
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Hangup()

exten => _XXXXXXXXXX,1,Answer()
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Hangup()

No firewall is on.
Asterisk 16.13.0
No NAT.

It cannot qualify the sip provider url:

[Oct 22 06:09:39] ERROR[33]: res_pjsip.c:3888 create_out_of_dialog_request: Unable to create outbound OPTIONS request to endpoint my_provider_endpoint as URI 'sip:@{{sip-url}}:{{port}} is not valid
[Oct 22 06:09:39] ERROR[33]: res_pjsip/pjsip_options.c:877 sip_options_qualify_contact: Unable to create request to qualify contact sip:@{{sip-url}}:{{port}} on AOR my_provider_aor

I have:

core set verbose 4
core set debug 4
pjsip set logger on

but there’s nothing in the logs when I try to make a call from my mobile phone with the DID number.

Then after some time, these logs appear:

<--- Transmitting SIP response (479 bytes) to UDP:54.36.164.135:61785 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.137.1:51146;rport=61785;received=54.36.164.135;branch=z9hG4bK291620204
Call-ID: 1877624853-145661301-2018722593
From: <sip:101@{{asterisk-public-IP}}>;tag=131507514
To: <sip:000000917652305118@{{asterisk-public-IP}}>;tag=z9hG4bK291620204
CSeq: 6 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1603347275/c38def55e927e8ec3899fca582476224",opaque="1f859afb3362878d",algorithm=md5,qop="auth"
Server: Asterisk PBX
Content-Length:  0


<--- Received SIP request (886 bytes) from UDP:101.2.168.7:31243 --->
REGISTER sip:{{asterisk-public-IP}}:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 101.2.168.7:31243;branch=z9hG4bK-5210007-1---1a52f43dfb597750;rport
Max-Forwards: 70
Contact: <sip:1000@101.2.168.7:31243;rinstance=b656a02547b0e08f;transport=UDP>
To: <sip:1000@{{asterisk-public-IP}}:5060;transport=UDP>
From: <sip:1000@{{asterisk-public-IP}}:5060;transport=UDP>;tag=0db6ac0c
Call-ID: AnL-wvofLBPO64LKGGmAOA..
CSeq: 847 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="1000",realm="asterisk",nonce="1603347256/9caeac75b45de8879ed3798107e9d753",uri="sip:{{asterisk-public-IP}}:5060;transport=UDP",response="69dcafb668416c52d8a77929ee6beccd",cnonce="5e77297fbeaf3dd4292041028a141258",nc=00000002,qop=auth,algorithm=md5,opaque="625270b153987c40"
Allow-Events: presence, kpml, talk
Content-Length: 0


<--- Transmitting SIP response (505 bytes) to UDP:101.2.168.7:31243 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 101.2.168.7:31243;rport=31243;received=101.2.168.7;branch=z9hG4bK-5210007-1---1a52f43dfb597750
Call-ID: AnL-wvofLBPO64LKGGmAOA..
From: <sip:1000@{{asterisk-public-IP}}>;tag=0db6ac0c
To: <sip:1000@{{asterisk-public-IP}}>;tag=z9hG4bK-5210007-1---1a52f43dfb597750
CSeq: 847 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1603347309/fa716ab204e0401ac7916bd0cbc12ac0",opaque="6f68f5cd7719e153",stale=true,algorithm=md5,qop="auth"
Server: Asterisk PBX
Content-Length:  0


<--- Received SIP request (886 bytes) from UDP:101.2.168.7:31243 --->
REGISTER sip:{{asterisk-public-IP}}:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 101.2.168.7:31243;branch=z9hG4bK-5210007-1---09f615b42fce6816;rport
Max-Forwards: 70
Contact: <sip:1000@101.2.168.7:31243;rinstance=b656a02547b0e08f;transport=UDP>
To: <sip:1000@{{asterisk-public-IP}}:5060;transport=UDP>
From: <sip:1000@{{asterisk-public-IP}}:5060;transport=UDP>;tag=0db6ac0c
Call-ID: AnL-wvofLBPO64LKGGmAOA..
CSeq: 848 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="1000",realm="asterisk",nonce="1603347309/fa716ab204e0401ac7916bd0cbc12ac0",uri="sip:{{asterisk-public-IP}}:5060;transport=UDP",response="ebe7ef9ea10fa88d495d028392781ab4",cnonce="46414a2c54c5c19b3c1bca06e2be8b62",nc=00000001,qop=auth,algorithm=md5,opaque="6f68f5cd7719e153"
Allow-Events: presence, kpml, talk
Content-Length: 0


<--- Transmitting SIP response (478 bytes) to UDP:101.2.168.7:31243 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 101.2.168.7:31243;rport=31243;received=101.2.168.7;branch=z9hG4bK-5210007-1---09f615b42fce6816
Call-ID: AnL-wvofLBPO64LKGGmAOA..
From: <sip:1000@{{asterisk-public-IP}}>;tag=0db6ac0c
To: <sip:1000@{{asterisk-public-IP}}>;tag=z9hG4bK-5210007-1---09f615b42fce6816
CSeq: 848 REGISTER
Date: Thu, 22 Oct 2020 06:15:09 GMT
Contact: <sip:1000@101.2.168.7:31243;transport=UDP;rinstance=b656a02547b0e08f>;expires=59
Expires: 60
Server: Asterisk PBX
Content-Length:  0


<--- Received SIP request (386 bytes) from UDP:{{sip-ip}}:5060 --->
OPTIONS sip:25772350001@{{asterisk-public-IP}}:5060 SIP/2.0
Via: SIP/2.0/UDP {{sip-ip}};branch=z9hG4bK312a.680fdd94000000000000000000000000.0
To: <sip:25772350001@{{asterisk-public-IP}}:5060>
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-9a69
CSeq: 10 OPTIONS
Call-ID: 0d8c858a09aeddbe-10559@{{sip-ip}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks


<--- Transmitting SIP response (896 bytes) to UDP:{{sip-ip}}:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-ip}};rport=5060;received={{sip-ip}};branch=z9hG4bK312a.680fdd94000000000000000000000000.0
Call-ID: 0d8c858a09aeddbe-10559@{{sip-ip}}
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-9a69
To: <sip:25772350001@{{asterisk-public-IP}}>;tag=z9hG4bK312a.680fdd94000000000000000000000000.0
CSeq: 10 OPTIONS
Accept: application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX
Content-Length:  0

This:

contact=sip:@{{sip-url}}:{{port}}

Does not result in a valid SIP URI as the message states. You need to remove the @ otherwise there is supposed to be a user in front of it.

Good catch!

I have tried the following:

  1. remove @ from contact
  2. Add sip username before @

These configs still do not work.

sbc01*CLI> pjsip show registrations

 <Registration/ServerURI..............................>  <Auth..........>  <Status.......>
==========================================================================================

 my_provider/sip:{{sip-url}}  my_provider-auth  Registered      

Objects found: 1
sbc01*CLI> dialplan show
[ Context '__func_periodic_hook_context__' created by 'func_periodic_hook' ]
  'beep' (CID match '') =>  1. Answer()                                   [func_periodic_hook]
                    2. Playback(beep)                             [func_periodic_hook]
  'hook' (CID match '') =>  1. Set(EncodedChannel=${CUT(HOOK_CHANNEL,-,1-2)}) [func_periodic_hook]
                    2. Set(GROUP_NAME=${EncodedChannel}${HOOK_ID}) [func_periodic_hook]
                    3. Set(GROUP(periodic-hook)=${GROUP_NAME})    [func_periodic_hook]
                    4. ExecIf($[${GROUP_COUNT(${GROUP_NAME}@periodic-hook)} > 1]?Hangup()) [func_periodic_hook]
                    5. Set(ChannelToSpy=${URIDECODE(${EncodedChannel})}) [func_periodic_hook]
                    6. ChanSpy(${ChannelToSpy},qEB)               [func_periodic_hook]

[ Context 'from-external' created by 'pbx_config' ]
  '{{did-number}}' =>   1. Answer()                                   [extensions.conf:28]
                    2. Wait(1)                                    [extensions.conf:29]
                    3. Playback(hello-world)                      [extensions.conf:30]
                    4. Hangup()                                   [extensions.conf:31]
  '_.' =>           1. Answer()                                   [extensions.conf:23]
                    2. Wait(1)                                    [extensions.conf:24]
                    3. Playback(hello-world)                      [extensions.conf:25]
                    4. Hangup()                                   [extensions.conf:26]

[ Context 'from-internal' created by 'pbx_config' ]
  '100' =>          1. Answer()                                   [extensions.conf:2]
                    2. Wait(1)                                    [extensions.conf:3]
                    3. Playback(hello-world)                      [extensions.conf:4]
                    4. Hangup()                                   [extensions.conf:5]
  '_xxxxxxxxxx' =>  1. Dial(PJSIP/${EXTEN}@my_provider_endpoint)  [extensions.conf:7]

-= 6 extensions (21 priorities) in 3 contexts. =-

You’ll need to specify what doesn’t work and how with the corrected configuration.

I have tried two things,

  1. with the @ removed,
[my_provider_aor]
type=aor
contact=sip:{{sip-url}}:{{port}}
qualify_frequency=200
;max_contacts=1

and 2. with {{sip-user}} added before @

[my_provider_aor]
type=aor
contact=sip:{{sip-username}}@{{sip-url}}:5060
qualify_frequency=200
;max_contacts=1

Calling DID number from my mobile phone doesn’t result in a ringtone followed by a hello-world reply with these two different configurations.

An AOR is used for placing outbound calls, and a registration is used to tell a remote side where they should send calls to you. You likely need an “identify” section to match the incoming traffic. If you provide actual console output with “pjsip set logger on” it can be seen if the call is even attempting to reach you.

Here are the logs. I do have an identify section as I have posted in the first post.

Connected to Asterisk 16.13.0 currently running on sbc01 (pid = 1)
Core debug is still 5.
[Oct 25 22:14:23] NOTICE[33]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '"209" <sip:209@{{asterisk-public-ip}}>' failed for '45.143.221.210:5070' (callid: ed09d013218f525e00ed36d0cb004082) - No matching endpoint found
[Oct 25 22:14:51] NOTICE[33]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'OPTIONS' from '"Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>' failed for '{{my-other-asterisk-server-internal-ip}}:{{port}}' (callid: 293eae6d2c71c03656445a0d736adde7@{{my-other-asterisk-server-internal-ip}}:{{port}}) - No matching endpoint found
sbc01*CLI> pjsip set logger on
PJSIP Logging enabled
<--- Received SIP request (525 bytes) from UDP:{{my-other-asterisk-server-internal-ip}}:{{port}} --->
OPTIONS sip:{{asterisk-server-internal-ip}} SIP/2.0
Via: SIP/2.0/UDP {{my-other-asterisk-server-internal-ip}}:{{port}};branch=z9hG4bK592dd538;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>;tag=as6e2ed135
To: <sip:{{asterisk-server-internal-ip}}>
Contact: <sip:Unknown@{{my-other-asterisk-server-internal-ip}}:{{port}}>
Call-ID: 5263f0aa2aad4442768ffc8d511af035@{{my-other-asterisk-server-internal-ip}}:{{port}}
CSeq: 102 OPTIONS
User-Agent: wave2-{{my-other-asterisk-server-internal-ip}}
Date: Sun, 25 Oct 2020 22:15:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[Oct 25 22:15:51] NOTICE[33]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'OPTIONS' from '"Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>' failed for '{{my-other-asterisk-server-internal-ip}}:{{port}}' (callid: 5263f0aa2aad4442768ffc8d511af035@{{my-other-asterisk-server-internal-ip}}:{{port}}) - No matching endpoint found
<--- Transmitting SIP response (490 bytes) to UDP:{{my-other-asterisk-server-internal-ip}}:{{port}} --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP {{my-other-asterisk-server-internal-ip}}:{{port}};rport={{port}};received={{my-other-asterisk-server-internal-ip}};branch=z9hG4bK592dd538
Call-ID: 5263f0aa2aad4442768ffc8d511af035@{{my-other-asterisk-server-internal-ip}}:{{port}}
From: "Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>;tag=as6e2ed135
To: <sip:{{asterisk-server-internal-ip}}>;tag=z9hG4bK592dd538
CSeq: 102 OPTIONS
WWW-Authenticate: Digest realm="asterisk",nonce="1603664151/058e53cb6653d0c3caef4605c4b2cf76",opaque="5b3853d74f835001",algorithm=md5,qop="auth"
Server: Asterisk PBX SBC
Content-Length:  0


<--- Received SIP request (386 bytes) from UDP:{{sip-ip}}:{{port}} --->
OPTIONS sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}} SIP/2.0
Via: SIP/2.0/UDP {{sip-ip}};branch=z9hG4bK75ed.65dda9b4000000000000000000000000.0
To: <sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}}>
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-2701
CSeq: 10 OPTIONS
Call-ID: 0d8c858a09b80cfd-10559@{{sip-ip}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks


<--- Transmitting SIP response (900 bytes) to UDP:{{sip-ip}}:{{port}} --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-ip}};rport={{port}};received={{sip-ip}};branch=z9hG4bK75ed.65dda9b4000000000000000000000000.0
Call-ID: 0d8c858a09b80cfd-10559@{{sip-ip}}
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-2701
To: <sip:{{sip-username}}@{{asterisk-public-ip}}>;tag=z9hG4bK75ed.65dda9b4000000000000000000000000.0
CSeq: 10 OPTIONS
Accept: application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX SBC
Content-Length:  0


<--- Transmitting SIP request (473 bytes) to UDP:{{sip-ip}}:{{port}} --->
OPTIONS sip:{{sip-address}}:{{port}} SIP/2.0
Via: SIP/2.0/UDP {{asterisk-public-ip}}:{{port}};rport;branch=z9hG4bKPj03d74a52-9fb8-40a4-afae-90a5b5cd0a35
From: <sip:{{sip-username}}@{{asterisk-public-ip}}>;tag=d7cc879d-c989-44b0-8506-73dde0756f3a
To: <sip:{{sip-address}}>
Contact: <sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}}>
Call-ID: cf1c2028-72dc-4470-8837-a6a5ad5c8883
CSeq: 21033 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX SBC
Content-Length:  0


<--- Received SIP response (421 bytes) from UDP:{{sip-ip}}:{{port}} --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{asterisk-public-ip}}:{{port}};rport={{port}};branch=z9hG4bKPj03d74a52-9fb8-40a4-afae-90a5b5cd0a35;received={{asterisk-public-ip}}
From: <sip:{{sip-username}}@{{asterisk-public-ip}}>;tag=d7cc879d-c989-44b0-8506-73dde0756f3a
To: <sip:{{sip-address}}>;tag=dc6cbcde051f1f52327d3ee3c1495fc6.a84c
Call-ID: cf1c2028-72dc-4470-8837-a6a5ad5c8883
CSeq: 21033 OPTIONS
Server: VoIP Networks
Content-Length: 0


<--- Received SIP request (525 bytes) from UDP:{{my-other-asterisk-server-internal-ip}}:{{port}} --->
OPTIONS sip:{{asterisk-server-internal-ip}} SIP/2.0
Via: SIP/2.0/UDP {{my-other-asterisk-server-internal-ip}}:{{port}};branch=z9hG4bK5402dac7;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>;tag=as065ad2f5
To: <sip:{{asterisk-server-internal-ip}}>
Contact: <sip:Unknown@{{my-other-asterisk-server-internal-ip}}:{{port}}>
Call-ID: 23d8a88f221604da520b664d1a93d5f2@{{my-other-asterisk-server-internal-ip}}:{{port}}
CSeq: 102 OPTIONS
User-Agent: wave2-{{my-other-asterisk-server-internal-ip}}
Date: Sun, 25 Oct 2020 22:16:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[Oct 25 22:16:51] NOTICE[33]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'OPTIONS' from '"Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>' failed for '{{my-other-asterisk-server-internal-ip}}:{{port}}' (callid: 23d8a88f221604da520b664d1a93d5f2@{{my-other-asterisk-server-internal-ip}}:{{port}}) - No matching endpoint found
<--- Transmitting SIP response (490 bytes) to UDP:{{my-other-asterisk-server-internal-ip}}:{{port}} --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP {{my-other-asterisk-server-internal-ip}}:{{port}};rport={{port}};received={{my-other-asterisk-server-internal-ip}};branch=z9hG4bK5402dac7
Call-ID: 23d8a88f221604da520b664d1a93d5f2@{{my-other-asterisk-server-internal-ip}}:{{port}}
From: "Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>;tag=as065ad2f5
To: <sip:{{asterisk-server-internal-ip}}>;tag=z9hG4bK5402dac7
CSeq: 102 OPTIONS
WWW-Authenticate: Digest realm="asterisk",nonce="1603664211/db95525219b4c14ae2bd022adde17459",opaque="3dce5f584da4bfc9",algorithm=md5,qop="auth"
Server: Asterisk PBX SBC
Content-Length:  0


<--- Received SIP request (386 bytes) from UDP:{{sip-ip}}:{{port}} --->
OPTIONS sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}} SIP/2.0
Via: SIP/2.0/UDP {{sip-ip}};branch=z9hG4bK1868.ed17dc26000000000000000000000000.0
To: <sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}}>
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-d6a0
CSeq: 10 OPTIONS
Call-ID: 0d8c858a09b80d5c-10559@{{sip-ip}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks


<--- Transmitting SIP response (900 bytes) to UDP:{{sip-ip}}:{{port}} --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-ip}};rport={{port}};received={{sip-ip}};branch=z9hG4bK1868.ed17dc26000000000000000000000000.0
Call-ID: 0d8c858a09b80d5c-10559@{{sip-ip}}
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-d6a0
To: <sip:{{sip-username}}@{{asterisk-public-ip}}>;tag=z9hG4bK1868.ed17dc26000000000000000000000000.0
CSeq: 10 OPTIONS
Accept: application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX SBC
Content-Length:  0


<--- Received SIP request (525 bytes) from UDP:{{my-other-asterisk-server-internal-ip}}:{{port}} --->
OPTIONS sip:{{asterisk-server-internal-ip}} SIP/2.0
Via: SIP/2.0/UDP {{my-other-asterisk-server-internal-ip}}:{{port}};branch=z9hG4bK6b447dd6;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>;tag=as044544f9
To: <sip:{{asterisk-server-internal-ip}}>
Contact: <sip:Unknown@{{my-other-asterisk-server-internal-ip}}:{{port}}>
Call-ID: 495e11370f881b09464e773b577b4b22@{{my-other-asterisk-server-internal-ip}}:{{port}}
CSeq: 102 OPTIONS
User-Agent: wave2-{{my-other-asterisk-server-internal-ip}}
Date: Sun, 25 Oct 2020 22:17:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


[Oct 25 22:17:51] NOTICE[33]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'OPTIONS' from '"Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>' failed for '{{my-other-asterisk-server-internal-ip}}:{{port}}' (callid: 495e11370f881b09464e773b577b4b22@{{my-other-asterisk-server-internal-ip}}:{{port}}) - No matching endpoint found
<--- Transmitting SIP response (490 bytes) to UDP:{{my-other-asterisk-server-internal-ip}}:{{port}} --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP {{my-other-asterisk-server-internal-ip}}:{{port}};rport={{port}};received={{my-other-asterisk-server-internal-ip}};branch=z9hG4bK6b447dd6
Call-ID: 495e11370f881b09464e773b577b4b22@{{my-other-asterisk-server-internal-ip}}:{{port}}
From: "Unknown" <sip:Unknown@{{my-other-asterisk-server-internal-ip}}>;tag=as044544f9
To: <sip:{{asterisk-server-internal-ip}}>;tag=z9hG4bK6b447dd6
CSeq: 102 OPTIONS
WWW-Authenticate: Digest realm="asterisk",nonce="1603664271/763e6975938b8d6d41d1d8cb0e2edbcf",opaque="040894b207ea2e67",algorithm=md5,qop="auth"
Server: Asterisk PBX SBC
Content-Length:  0


<--- Received SIP request (386 bytes) from UDP:{{sip-ip}}:{{port}} --->
OPTIONS sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}} SIP/2.0
Via: SIP/2.0/UDP {{sip-ip}};branch=z9hG4bK9e0c.1e426783000000000000000000000000.0
To: <sip:{{sip-username}}@{{asterisk-public-ip}}:{{port}}>
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-003b
CSeq: 10 OPTIONS
Call-ID: 0d8c858a09b80dbb-10559@{{sip-ip}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks


<--- Transmitting SIP response (900 bytes) to UDP:{{sip-ip}}:{{port}} --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-ip}};rport={{port}};received={{sip-ip}};branch=z9hG4bK9e0c.1e426783000000000000000000000000.0
Call-ID: 0d8c858a09b80dbb-10559@{{sip-ip}}
From: <sip:voipnow@{{sip-ip}}>;tag=47546faa90a5df61ca65b19e3b051eb0-003b
To: <sip:{{sip-username}}@{{asterisk-public-ip}}>;tag=z9hG4bK9e0c.1e426783000000000000000000000000.0
CSeq: 10 OPTIONS
Accept: application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX SBC
Content-Length:  0

No calls arrive in that section of log!

As I suspect, problem with sip provider then?

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