PJSIP 407 error only with Asterisk

Hello,

I’m trying to setup an Asterisk 16 inside my router (OpenWrt) to work with my ISP trunk VoIP service (RED by SFR).

  • The router is doing IPv4 NAT and I’m using a Internal extension to make calls outside.
  • +33666666666 is the trunk phone number
  • 0777777777 is the phone where I call

The Asterisk is able to register and make calls between local extensions. But if I try to make a outgoing call I receive 407 Proxy Authentication Required from my trunk.

However, using exactly the same config in Zoiper I can make the call and the phone is ringing. This is the summary of the Asterisk flow:

turris*CLI> pjsip show history
No.   Timestamp  (Dir) Address                  SIP Message                        
===== ========== ============================== ===================================
00000 1629472725 * ==> 77.136.6.29:5062         REGISTER sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
00001 1629472725 * <== 77.136.6.29:5062         SIP/2.0 401 Unauthorized
00002 1629472725 * ==> 77.136.6.29:5062         REGISTER sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
00003 1629472726 * <== 77.136.6.29:5062         SIP/2.0 200 OK
00004 1629472735 * <== 192.168.66.151:61309     INVITE sip:0777777777@turris.lan;transport=UDP SIP/2.0
00005 1629472735 * ==> 192.168.66.151:61309     SIP/2.0 401 Unauthorized
00006 1629472735 * <== 192.168.66.151:61309     ACK sip:0777777777@turris.lan;transport=UDP SIP/2.0
00007 1629472735 * <== 192.168.66.151:61309     INVITE sip:0777777777@turris.lan;transport=UDP SIP/2.0
00008 1629472735 * ==> 192.168.66.151:61309     SIP/2.0 100 Trying
00009 1629472735 * ==> 77.136.6.85:5062         INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
00010 1629472735 * <== 77.136.6.85:5062         SIP/2.0 100 Trying
00011 1629472735 * <== 77.136.6.85:5062         SIP/2.0 407 Proxy Authentication Required
00012 1629472735 * ==> 77.136.6.85:5062         ACK sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
00013 1629472735 * ==> 192.168.66.151:61309     SIP/2.0 503 Service Unavailable
00014 1629472735 * <== 192.168.66.151:61309     ACK sip:0777777777@turris.lan;transport=UDP SIP/2.0

Asterisk FULL LOG

Asterisk full log
<--- History Entry 0 Sent to 77.136.6.29:5062 at 1629472725 --->
REGISTER sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPj4fc82350-86fb-4d2d-9a0e-2ec5f632f347
Route: <sip:residential.p-cscf.sfr.net;lr>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=a22e62cb-5b3f-4f5f-95e4-ee8255e2a8d0
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
Call-ID: 23dc936a-ecd9-4203-bd2d-9e442fe9bbaa
CSeq: 3558 REGISTER
Contact: <sip:s@78.78.78.78:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 16.3.0
Content-Length:  0


<--- History Entry 1 Received from 77.136.6.29:5062 at 1629472725 --->
SIP/2.0 401 Unauthorized
Call-ID: 23dc936a-ecd9-4203-bd2d-9e442fe9bbaa
Via: SIP/2.0/UDP 78.78.78.78:5060;rport=5060;received=78.78.78.78;branch=z9hG4bKPj4fc82350-86fb-4d2d-9a0e-2ec5f632f347
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=60da4d83-611fc7d53ac1f3a1
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=a22e62cb-5b3f-4f5f-95e4-ee8255e2a8d0
CSeq: 3558 REGISTER
Date: Fri, 20 Aug 2021 15:18:45 GMT
Server: Alcatel-Lucent-HPSS/3.0.3
WWW-Authenticate: Digest realm="sfr.fr",nonce="611fc7d4b7c9036dbf3054aea940e9703dc8f84c0008",opaque="ALU:QbkRBthOEgEQAkgFAQ0NWEYBBBpdGQIRQkVbHxoLVwknMG0qIDJ9fXlze3c1Yy42OG9q",algorithm=MD5,qop="auth"
Content-Length: 0
Content-Length:  0


<--- History Entry 2 Sent to 77.136.6.29:5062 at 1629472725 --->
REGISTER sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPjee3e4e73-1b20-4459-8df7-b8d9958ada81
Route: <sip:residential.p-cscf.sfr.net;lr>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=a22e62cb-5b3f-4f5f-95e4-ee8255e2a8d0
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
Call-ID: 23dc936a-ecd9-4203-bd2d-9e442fe9bbaa
CSeq: 3559 REGISTER
Contact: <sip:s@78.78.78.78:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 16.3.0
Authorization: Digest username="NDI0567891234.MPY.THD@sfr.fr", realm="sfr.fr", nonce="611fc7d4b7c9036dbf3054aea940e9703dc8f84c0008", uri="sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org", response="96969846d97a4009ff7e036a9e48d2c0", algorithm=MD5, cnonce="32b5a138-79c7-44e1-b3e1-1ac92d9d2be4", opaque="ALU:QbkRBthOEgEQAkgFAQ0NWEYBBBpdGQIRQkVbHxoLVwknMG0qIDJ9fXlze3c1Yy42OG9q", qop=auth, nc=00000001
Content-Length:  0


<--- History Entry 3 Received from 77.136.6.29:5062 at 1629472726 --->
SIP/2.0 200 OK
Call-ID: 23dc936a-ecd9-4203-bd2d-9e442fe9bbaa
Via: SIP/2.0/UDP 78.78.78.78:5060;rport=5060;received=78.78.78.78;branch=z9hG4bKPjee3e4e73-1b20-4459-8df7-b8d9958ada81
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=60da4d83-611fc7d6165cf9a
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=a22e62cb-5b3f-4f5f-95e4-ee8255e2a8d0
CSeq: 3559 REGISTER
Allow-Events: reg
Contact: <sip:s@78.78.78.78:5060;transport=udp>;expires=3175
Date: Fri, 20 Aug 2021 15:18:46 GMT
Path: <sip:pcgw-0006.imsgroup0-027.mit2isc12.ims.sfr.net:5062;lr;ottag=ue_term;bidx=49555192;access-type=ADSL>
P-Associated-URI: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Associated-URI: Alias <tel:+33666666666>
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0
Content-Length:  0


<--- History Entry 4 Received from 192.168.66.151:61309 at 1629472735 --->
INVITE sip:0777777777@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;received=192.168.66.151;branch=z9hG4bK-d8754z-a966271236384795-1---d8754z-
Max-Forwards: 70
Contact: <sip:6001@78.78.78.78:61309;transport=UDP>
To: <sip:0777777777@turris.lan>
From: <sip:6001@turris.lan>;tag=040dc143
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 198
Content-Type: application/sdp
Content-Length:   198

v=0
o=Z 0 0 IN IP4 78.78.78.78
s=Z
c=IN IP4 78.78.78.78
t=0 0
m=audio 8000 RTP/AVP 110 8 0 3 101
a=rtpmap:110 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- History Entry 5 Sent to 192.168.66.151:61309 at 1629472735 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 78.78.78.78:61309;rport=61309;received=192.168.66.151;branch=z9hG4bK-d8754z-a966271236384795-1---d8754z-
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
From: <sip:6001@turris.lan>;tag=040dc143
To: <sip:0777777777@turris.lan>;tag=z9hG4bK-d8754z-a966271236384795-1---d8754z-
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1629472735/bc0dc48d30b95512ad9c70f7ec32e6d7",opaque="1c7ceb3f33076342",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.3.0
Content-Length:  0


<--- History Entry 6 Received from 192.168.66.151:61309 at 1629472735 --->
ACK sip:0777777777@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;received=192.168.66.151;branch=z9hG4bK-d8754z-a966271236384795-1---d8754z-
Max-Forwards: 70
To: <sip:0777777777@turris.lan>;tag=z9hG4bK-d8754z-a966271236384795-1---d8754z-
From: <sip:6001@turris.lan>;tag=040dc143
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
CSeq: 1 ACK
Content-Length: 0
Content-Length:  0


<--- History Entry 7 Received from 192.168.66.151:61309 at 1629472735 --->
INVITE sip:0777777777@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;received=192.168.66.151;branch=z9hG4bK-d8754z-3acd286c0c0b0b8d-1---d8754z-
Max-Forwards: 70
Contact: <sip:6001@78.78.78.78:61309;transport=UDP>
To: <sip:0777777777@turris.lan>
From: <sip:6001@turris.lan>;tag=040dc143
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="6001", realm="asterisk", nonce="1629472735/bc0dc48d30b95512ad9c70f7ec32e6d7", uri="sip:0777777777@turris.lan;transport=UDP", response="cbbca69370261af9a39d47f33772626d", algorithm=md5, cnonce="4b69b6fe31677d7600a0f3a8a1bd2f84", opaque="1c7ceb3f33076342", qop=auth, nc=00000001
Allow-Events: presence, kpml
Content-Length: 198
Content-Type: application/sdp
Content-Length:   198

v=0
o=Z 0 0 IN IP4 78.78.78.78
s=Z
c=IN IP4 78.78.78.78
t=0 0
m=audio 8000 RTP/AVP 110 8 0 3 101
a=rtpmap:110 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- History Entry 8 Sent to 192.168.66.151:61309 at 1629472735 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 78.78.78.78:61309;rport=61309;received=192.168.66.151;branch=z9hG4bK-d8754z-3acd286c0c0b0b8d-1---d8754z-
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
From: <sip:6001@turris.lan>;tag=040dc143
To: <sip:0777777777@turris.lan>
CSeq: 2 INVITE
Server: Asterisk PBX 16.3.0
Content-Length:  0


<--- History Entry 9 Sent to 77.136.6.85:5062 at 1629472735 --->
INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPj0ce760b3-e56e-4f08-a9a0-fa5b5639b6d7
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=a4d06737-36e6-4885-af64-aec2ddfed286
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org>
Contact: <sip:+33666666666@78.78.78.78:5060>
Call-ID: 8ef16633-8350-4cb4-9cae-f7fff49da472
CSeq: 22215 INVITE
Route: <sip:residential.p-cscf.sfr.net;lr>
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.3.0
Content-Type: application/sdp
Content-Length:   371

v=0
o=- 1528245361 1528245361 IN IP4 78.78.78.78
s=Asterisk
c=IN IP4 78.78.78.78
t=0 0
m=audio 11694 RTP/AVP 110 8 0 107 9 3 101
a=rtpmap:110 speex/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:107 opus/48000/2
a=rtpmap:9 G722/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:60
a=sendrecv

<--- History Entry 10 Received from 77.136.6.85:5062 at 1629472735 --->
SIP/2.0 100 Trying
Call-ID: 8ef16633-8350-4cb4-9cae-f7fff49da472
Via: SIP/2.0/UDP 78.78.78.78:5060;rport=5060;received=78.78.78.78;branch=z9hG4bKPj0ce760b3-e56e-4f08-a9a0-fa5b5639b6d7
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>;tag=a4d06737-36e6-4885-af64-aec2ddfed286
CSeq: 22215 INVITE
Date: Fri, 20 Aug 2021 15:18:55 GMT
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0
Content-Length:  0


<--- History Entry 11 Received from 77.136.6.85:5062 at 1629472735 --->
SIP/2.0 407 Proxy Authentication Required
Call-ID: 8ef16633-8350-4cb4-9cae-f7fff49da472
Via: SIP/2.0/UDP 78.78.78.78:5060;rport=5060;received=78.78.78.78;branch=z9hG4bKPj0ce760b3-e56e-4f08-a9a0-fa5b5639b6d7
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;user=phone>;tag=611db1ce-611fc7df92d53a0
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>;tag=a4d06737-36e6-4885-af64-aec2ddfed286
CSeq: 22215 INVITE
Date: Fri, 20 Aug 2021 15:18:55 GMT
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0
Content-Length:  0


<--- History Entry 12 Sent to 77.136.6.85:5062 at 1629472735 --->
ACK sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPj0ce760b3-e56e-4f08-a9a0-fa5b5639b6d7
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=a4d06737-36e6-4885-af64-aec2ddfed286
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org>;tag=611db1ce-611fc7df92d53a0
Call-ID: 8ef16633-8350-4cb4-9cae-f7fff49da472
CSeq: 22215 ACK
Route: <sip:residential.p-cscf.sfr.net;lr>
Max-Forwards: 70
User-Agent: Asterisk PBX 16.3.0
Content-Length:  0


<--- History Entry 13 Sent to 192.168.66.151:61309 at 1629472735 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 78.78.78.78:61309;rport=61309;received=192.168.66.151;branch=z9hG4bK-d8754z-3acd286c0c0b0b8d-1---d8754z-
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
From: <sip:6001@turris.lan>;tag=040dc143
To: <sip:0777777777@turris.lan>;tag=ac7bb8b1-f171-4fee-824d-f2f600c66d9e
CSeq: 2 INVITE
Server: Asterisk PBX 16.3.0
Reason: Q.850;cause=34
Content-Length:  0


<--- History Entry 14 Received from 192.168.66.151:61309 at 1629472735 --->
ACK sip:0777777777@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;received=192.168.66.151;branch=z9hG4bK-d8754z-3acd286c0c0b0b8d-1---d8754z-
Max-Forwards: 70
To: <sip:0777777777@turris.lan>;tag=ac7bb8b1-f171-4fee-824d-f2f600c66d9e
From: <sip:6001@turris.lan>;tag=040dc143
Call-ID: NDRlYTc3NDk4ODE3Nzc1N2Y1Y2RkMDI0NzRjYTJmZjQ.
CSeq: 2 ACK
Content-Length: 0
Content-Length:  0

Doing exactly the same with Zoiper it works:

Zoiper summary

    1 0.000000000 192.168.66.151 → 192.168.66.1 SIP 684 Request: SUBSCRIBE sip:6001@turris.lan;transport=UDP, in-dialog | 
    2 3.908886647 192.168.66.151 → 77.136.6.29  SIP 802 Request: REGISTER sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP  (1 binding) | 
    3 3.954568282  77.136.6.29 → 192.168.66.151 SIP 764 Status: 401 Unauthorized | 
    4 3.957038920 192.168.66.151 → 77.136.6.29  SIP 1198 Request: REGISTER sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP  (1 binding) | 
    5 4.000536169 192.168.66.151 → 192.168.66.1 SIP 684 Request: SUBSCRIBE sip:6001@turris.lan;transport=UDP, in-dialog | 
    6 4.006867152  77.136.6.29 → 192.168.66.151 SIP 885 Status: 200 OK  (1 binding) | 
    7 4.109179022 192.168.66.151 → 77.136.6.29  SIP/XML 1137 Request: PUBLISH sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP | 
    8 4.109207276 192.168.66.151 → 77.136.6.29  SIP 849 Request: SUBSCRIBE sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP | 
    9 4.109219248 192.168.66.151 → 77.136.6.29  SIP 858 Request: SUBSCRIBE sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP | 
   10 4.166772531  77.136.6.29 → 192.168.66.151 SIP 1300 Request: SUBSCRIBE sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e | 
   11 4.168810217 192.168.66.151 → 77.136.6.29  SIP 553 Status: 489 Event Package Not Supported | 
   12 4.172376089  77.136.6.29 → 192.168.66.151 SIP/XML 1474 Request: PUBLISH sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e | 
   13 4.174100742 192.168.66.151 → 77.136.6.29  SIP 563 Status: 405 Method Not Allowed | 
   14 4.178223193  77.136.6.29 → 192.168.66.151 SIP 1291 Request: SUBSCRIBE sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e | 
   15 4.180252807 192.168.66.151 → 77.136.6.29  SIP 553 Status: 489 Event Package Not Supported | 
   16 4.191492274  77.136.6.29 → 192.168.66.151 SIP 534 Status: 489 Event Package Not Supported | 
   17 4.197361410  77.136.6.29 → 192.168.66.151 SIP 703 Status: 405 Method Not Allowed | 
   18 4.203337010  77.136.6.29 → 192.168.66.151 SIP 534 Status: 489 Event Package Not Supported | 
   19 8.000673765 192.168.66.151 → 192.168.66.1 SIP 684 Request: SUBSCRIBE sip:6001@turris.lan;transport=UDP, in-dialog | 
   20 12.008000224 192.168.66.151 → 192.168.66.1 SIP 684 Request: SUBSCRIBE sip:6001@turris.lan;transport=UDP, in-dialog | 
   21 19.444292775 192.168.66.151 → 77.136.6.29  SIP/XML 1143 Request: PUBLISH sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP | 
   22 19.444317297 192.168.66.151 → 77.136.6.29  SIP 849 Request: SUBSCRIBE sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP | 
   23 19.497281096  77.136.6.29 → 192.168.66.151 SIP/XML 1480 Request: PUBLISH sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e | 
   24 19.497866885 192.168.66.151 → 77.136.6.29  SIP/SDP 1041 Request: INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP | 
   25 19.497958369 192.168.66.151 → 77.136.6.29  SIP 563 Status: 405 Method Not Allowed | 
   26 19.513583134  77.136.6.29 → 192.168.66.151 SIP 521 Status: 100 Trying | 
   27 19.513583303  77.136.6.29 → 192.168.66.151 SIP 1291 Request: SUBSCRIBE sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e | 
   28 19.514337802 192.168.66.151 → 77.136.6.29  SIP 553 Status: 489 Event Package Not Supported | 
   29 19.523467562  77.136.6.29 → 192.168.66.151 SIP 703 Status: 405 Method Not Allowed | 
   30 19.582682555  77.136.6.29 → 192.168.66.151 SIP 534 Status: 489 Event Package Not Supported | 
   31 21.865574051  77.136.6.29 → 192.168.66.151 SIP/SDP 1112 Status: 183 Session Progress | 
   32 22.122766742  77.136.6.29 → 192.168.66.151 SIP/SDP 1103 Status: 180 Ringing | 

Zoiper FULL LOG

https://pastebin.com/JDnVXY04

My PJSIP conf:

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0

[reg_residential.p-cscf.sfr.net]
type = registration
outbound_auth = auth_reg_residential.p-cscf.sfr.net
client_uri = sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org
server_uri = sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org
outbound_proxy = sip:residential.p-cscf.sfr.net\;lr

[auth_reg_residential.p-cscf.sfr.net]
type = auth
password = TOP secret :)
username = NDI0567891234.MPY.THD@sfr.fr

[sfr-out]
type = aor
contact = sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org
outbound_proxy = sip:residential.p-cscf.sfr.net\;lr

[sfr-out]
type = identify
endpoint = sfr-out
match = residential.p-cscf.sfr.net

[sfr-out]
type = endpoint
context = from-sfr
outbound_auth = auth_reg_residential.p-cscf.sfr.net
from_domain = ims.mnc010.mcc208.3gppnetwork.org
from_user = +33666666666
allow=!all,opus,speex,g722,alaw,ulaw,gsm
outbound_proxy = sip:residential.p-cscf.sfr.net\;lr
aors = sfr-out



;===============EXTENSION 6001
 
[6001]
type=endpoint
context=internal
auth=auth6001
aors=6001
allow=!all,opus,speex,g722,alaw,ulaw
 
[auth6001]
type=auth
auth_type=userpass
password=6001
username=6001
 
[6001]
type=aor
max_contacts = 999

[6002]
type=endpoint
context=internal
auth=auth6002
aors=6002
allow=!all,opus,speex,g722,alaw,ulaw

[auth6002]
type=auth
auth_type=userpass
password=6002
username=6002

[6002]
type=aor
max_contacts = 999

Extension block:

CONSOLE=Console/dsp                             ; Console interface for demo
IAXINFO=guest                                   ; IAXtel username/password
TRUNK=DAHDI/G2                                  ; Trunk interface
TRUNKMSD=1                                      ; MSD digits to strip (usually 1 or 0)


[internal]
exten => _0XXXXXXXXX,1,Dial(PJSIP/${EXTEN}@sfr-out)

exten => 6000,1,Ringing()
exten => 6000,n,Wait(3)
exten => 6000,n,Answer()
exten => 6000,n,Playback(hello-world)
exten => 6000,n,Wait(1)
exten => 6000,n,SayDigits(${CALLERID(num)})
exten => 6000,n,Wait(1)
exten => 6000,n,Playback(channel)
exten => 6000,n,Wait(1)
exten => 6000,n,SayAlpha(${CHANNEL})
exten => 6000,n,Wait(1)
exten => 6000,n,Hangup()

exten => _6XXX,1,Dial(PJSIP/${EXTEN})

Any advice? The INVITE message seems the same for me, but I only get a 407 error from Asterisk

Thank you in advance :slight_smile:

BR,
Valentín

The Zoiper log can be found also here:

17:00:56.736515 IP 192.168.66.151.61309 > 192.168.66.1.sip: SIP: SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
E....a@.@.N...B...B..}......SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.66.151:61309;branch=z9hG4bK-d8754z-195336741c5b4fe1-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:192.168.66.151:61309>
To: <sip:6001@turris.lan;transport=UDP>;tag=d941626e
From: <sip:>;tag=4857624a
Call-ID: M2QzZDlhMWM4MDdlMWMxYmE2OWIzNDdiYjIwZWUyNmY.
CSeq: 1 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.645402 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 758
E.....@.@.0H..B.M....}....Y.REGISTER sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-7873043409d304e2-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;rinstance=f0a91254d6955f5e;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=c6cdd23f
Call-ID: NWE0MjhkYWQ0YjM3OTlmNjNmM2VhY2NhMzRiMzgwYjE.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.691083 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 720
E.....@.4...M.....B....}..AXSIP/2.0 401 Unauthorized
Call-ID: NWE0MjhkYWQ0YjM3OTlmNjNmM2VhY2NhMzRiMzgwYjE.
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-7873043409d304e2-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=60d2672d-611fc3aa2b573d88
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=c6cdd23f
CSeq: 1 REGISTER
Date: Fri, 20 Aug 2021 15:00:58 GMT
Server: Alcatel-Lucent-HPSS/3.0.3
WWW-Authenticate: Digest realm="sfr.fr",
   nonce="b7c9036dbf3054aea940e9703dc611fc3a98f84c2708",
   opaque="ALU:QbkRBthOEgEQAkgFAQ0NWEYPAhxeGQIRQkVbHxoLVwknMG0qIDJ9fXlze3c1Yy42OG9iZw__",
   algorithm=MD5,
   qop="auth"
Content-Length: 0


17:01:00.693554 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 1154
E.....@.@.....B.M....}....[.REGISTER sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-c69471992470ed53-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;rinstance=f0a91254d6955f5e;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=c6cdd23f
Call-ID: NWE0MjhkYWQ0YjM3OTlmNjNmM2VhY2NhMzRiMzgwYjE.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="NDI0567891234.MPY.THD@sfr.fr",realm="sfr.fr",nonce="b7c9036dbf3054aea940e9703dc611fc3a98f84c2708",uri="sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP",response="c9186ad3686c81a55b66cf12c73306f4",cnonce="4757df0d7970c65435c37615172b192f",nc=00000001,qop=auth,algorithm=MD5,opaque="ALU:QbkRBthOEgEQAkgFAQ0NWEYPAhxeGQIRQkVbHxoLVwknMG0qIDJ9fXlze3c1Yy42OG9iZw__"
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.737051 IP 192.168.66.151.61309 > 192.168.66.1.sip: SIP: SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
E....*@.@.M=..B...B..}......SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.66.151:61309;branch=z9hG4bK-d8754z-195336741c5b4fe1-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:192.168.66.151:61309>
To: <sip:6001@turris.lan;transport=UDP>;tag=d941626e
From: <sip:>;tag=4857624a
Call-ID: M2QzZDlhMWM4MDdlMWMxYmE2OWIzNDdiYjIwZWUyNmY.
CSeq: 1 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.743382 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 841
E..e..@.4...M.....B....}.Q..SIP/2.0 200 OK
Call-ID: NWE0MjhkYWQ0YjM3OTlmNjNmM2VhY2NhMzRiMzgwYjE.
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-c69471992470ed53-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=60d2672d-611fc3aa2e6fbdbe
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=c6cdd23f
CSeq: 2 REGISTER
Allow-Events: reg
Contact: <sip:+33666666666@78.78.78.78:61309;rinstance=f0a91254d6955f5e;transport=udp>;expires=3167
Date: Fri, 20 Aug 2021 15:00:58 GMT
Path: <sip:pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;lr;ottag=ue_term;bidx=47023310;access-type=ADSL>
P-Associated-URI: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Associated-URI: Alias <tel:+33666666666>
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:00.845694 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 1093
E..a..@.@.....B.M....}...M[CPUBLISH sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-ec650b7abd4783b7-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=d539833e
Call-ID: NmUzMzVhN2FkNzc3YjlmMzllNzJmMDYzMGFmY2JiOTU.
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence, kpml
Content-Length: 297

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
          entity="sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP">
  <tuple id="+33666666666" >
     <status><basic>open</basic></status>
     <note>Online</note>
  </tuple>
</presence>

17:01:00.845722 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 805
E..A..@.@./...B.M....}...-Z#SUBSCRIBE sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-3d1fb51c0bc8780b-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=b2c3b55c
Call-ID: OWNkZTBkNmI3NDQ5YTFlMTFiZTk1YWYwYjJmZjZkZWQ.
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.845734 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 814
E..J..@.@./...B.M....}...6Z,SUBSCRIBE sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-ca50e28f3e4032b5-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=fa32dc38
Call-ID: NDQ1MDYzZTQ5NjM2Y2ZmODhmZThlZjAwZDYxNWEyMjk.
CSeq: 1 SUBSCRIBE
Expires: 3600
Accept: application/simple-message-summary
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.903288 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1256
E.....@.4...M.....B....}....SUBSCRIBE sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e SIP/2.0
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK8d0355762e57414d890b1054f2daaafa60da5209-0-1be382e1-611fc3aa38367ebc;_aluscr_
Max-Forwards: 65
Contact: <sip:+33666666666@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;encoded-parm=QbkRBthOEgsTXk5VVF1fXVpdWFdbRTECEAcTWxQeHB5wby4tMXQuOyp7eWIkIzx-IjQhejszI2Mhd1dQWgkFBgcOFAMe>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=fa32dc38
Call-ID: ALU-1629471658942965@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 SUBSCRIBE
Expires: 3600
Accept: application/simple-message-summary
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
Supported: replaces,norefersub,extended-refer,timer,X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: message-summary
Allow-Events: presence,kpml
P-Asserted-Identity: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Asserted-Identity: Alias <tel:+33666666666>
Content-Length: 0
Record-Route: <sip:pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;lr;lsstag=pps-123885-10708.14078>
P-Called-Party-ID: <tel:+33666666666>


17:01:00.905325 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 509
E.....@.@.1...B.M....}....X.SIP/2.0 489 Event Package Not Supported
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK8d0355762e57414d890b1054f2daaafa60da5209-0-1be382e1-611fc3aa38367ebc;_aluscr_
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=126c8b59
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=fa32dc38
Call-ID: ALU-1629471658942965@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 SUBSCRIBE
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.908891 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1430
E.....@.4..VM.....B....}...<PUBLISH sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e SIP/2.0
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK9afdb2a10b7a89248372921d1b3f60e560da5209-0-1be382e3-611fc3aa388d1ba4;_aluscr_
Max-Forwards: 65
Contact: <sip:+33666666666@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;encoded-parm=QbkRBthOEgsTXk5VVF1fXVpdWFdbRTECEAcTWxQeHB5wby4tMXQuOyp7eWIkIzx-IjQhejszI2Mhd1dQWgkFBgcOFAMe>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=d539833e
Call-ID: ALU-1629471658948691@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces,norefersub,extended-refer,timer,X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence,kpml
Content-Length: 297
P-Asserted-Identity: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Asserted-Identity: Alias <tel:+33666666666>
P-Called-Party-ID: <tel:+33666666666>

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
          entity="sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP">
  <tuple id="+33666666666" >
     <status><basic>open</basic></status>
     <note>Online</note>
  </tuple>
</presence>

17:01:00.910616 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 519
E..#..@.@.0...B.M....}....Y.SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK9afdb2a10b7a89248372921d1b3f60e560da5209-0-1be382e3-611fc3aa388d1ba4;_aluscr_
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=6f7e1242
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=d539833e
Call-ID: ALU-1629471658948691@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 PUBLISH
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0


17:01:00.914738 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1247
E.....@.4...M.....B....}....SUBSCRIBE sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e SIP/2.0
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK659bc189b419293f0fd6f2fb2cb962f260da5209-0-1be382e4-611fc3aa38e58445;_aluscr_
Max-Forwards: 65
Contact: <sip:+33666666666@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;encoded-parm=QbkRBthOEgsTXk5VVF1fXVpdWFdbRTECEAcTWxQeHB5wby4tMXQuOyp7eWIkIzx-IjQhejszI2Mhd1dQWgkFBgcOFAMe>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=b2c3b55c
Call-ID: ALU-1629471658954393@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
Supported: replaces,norefersub,extended-refer,timer,X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence,kpml
P-Asserted-Identity: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Asserted-Identity: Alias <tel:+33666666666>
Content-Length: 0
Record-Route: <sip:pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;lr;lsstag=pps-123904-10711.14080>
P-Called-Party-ID: <tel:+33666666666>


17:01:00.916768 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 509
E.....@.@.1...B.M....}....X.SIP/2.0 489 Event Package Not Supported
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK659bc189b419293f0fd6f2fb2cb962f260da5209-0-1be382e4-611fc3aa38e58445;_aluscr_
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=8506f404
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=b2c3b55c
Call-ID: ALU-1629471658954393@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 SUBSCRIBE
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 0


17:01:00.928007 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 490
E.....@.4...M.....B....}....SIP/2.0 489 Event Package Not Supported
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-ca50e28f3e4032b5-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=126c8b59
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=fa32dc38
Call-ID: NDQ1MDYzZTQ5NjM2Y2ZmODhmZThlZjAwZDYxNWEyMjk.
CSeq: 1 SUBSCRIBE
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence,kpml
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:00.933876 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 659
E.....@.4..YM.....B....}..;.SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-ec650b7abd4783b7-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=6f7e1242
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=d539833e
Call-ID: NmUzMzVhN2FkNzc3YjlmMzllNzJmMDYzMGFmY2JiOTU.
CSeq: 1 PUBLISH
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
P-Asserted-Identity: Alias <tel:+33666666666>
P-Asserted-Identity: Alias <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:00.939852 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 490
E.....@.4...M.....B....}....SIP/2.0 489 Event Package Not Supported
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-3d1fb51c0bc8780b-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=8506f404
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=b2c3b55c
Call-ID: OWNkZTBkNmI3NDQ5YTFlMTFiZTk1YWYwYjJmZjZkZWQ.
CSeq: 1 SUBSCRIBE
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence,kpml
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:04.737189 IP 192.168.66.151.61309 > 192.168.66.1.sip: SIP: SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
E....#@.@.KD..B...B..}......SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.66.151:61309;branch=z9hG4bK-d8754z-195336741c5b4fe1-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:192.168.66.151:61309>
To: <sip:6001@turris.lan;transport=UDP>;tag=d941626e
From: <sip:>;tag=4857624a
Call-ID: M2QzZDlhMWM4MDdlMWMxYmE2OWIzNDdiYjIwZWUyNmY.
CSeq: 1 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0


17:01:08.744515 IP 192.168.66.151.61309 > 192.168.66.1.sip: SIP: SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
E.....@.@.I...B...B..}......SUBSCRIBE sip:6001@turris.lan;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.66.151:61309;branch=z9hG4bK-d8754z-195336741c5b4fe1-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:192.168.66.151:61309>
To: <sip:6001@turris.lan;transport=UDP>;tag=d941626e
From: <sip:>;tag=4857624a
Call-ID: M2QzZDlhMWM4MDdlMWMxYmE2OWIzNDdiYjIwZWUyNmY.
CSeq: 1 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0


17:01:16.180808 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 1099
E..g.k@.@..6..B.M....}...S[IPUBLISH sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-92657a3e6870a015-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=54d9b40a
Call-ID: ZWIwZmY2YzU4NmZhN2QyZjFjZGJmMjNjODY3NzdmNTQ.
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence, kpml
Content-Length: 303

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
          entity="sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP">
  <tuple id="+33666666666" >
     <status><basic>open</basic></status>
     <note>On the phone</note>
  </tuple>
</presence>

17:01:16.180832 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 805
E..A.l@.@..[..B.M....}...-Z#SUBSCRIBE sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-0d09d02e1dddb242-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;transport=UDP>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=81cdf343
Call-ID: YjMzMzJmMjBhNTgxNzRkY2U0MzFkODc2YzljYzdiYjg.
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence, kpml
Content-Length: 0


17:01:16.233796 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1436
E.....@.4..PM.....B....}..{|PUBLISH sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e SIP/2.0
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK716b06e8265668cb915c9fa1e1d2a46c60da5209-0-1be38d7e-611fc3ba104e952e;_aluscr_
Max-Forwards: 65
Contact: <sip:+33666666666@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;encoded-parm=QbkRBthOEgsTXk5VVF1fXVpdWFdbRTECEAcTWxQeHB5wby4tMXQuOyp7eWIkIzx-IjQhejszI2Mhd1dQWgkFBgcOFAMe>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=54d9b40a
Call-ID: ALU-1629471674273497@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 PUBLISH
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
Content-Type: application/pidf+xml
Supported: replaces,norefersub,extended-refer,timer,X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence
Allow-Events: presence,kpml
Content-Length: 303
P-Asserted-Identity: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Asserted-Identity: Alias <tel:+33666666666>
P-Called-Party-ID: <tel:+33666666666>

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
          entity="sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP">
  <tuple id="+33666666666" >
     <status><basic>open</basic></status>
     <note>On the phone</note>
  </tuple>
</presence>

17:01:16.234382 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 997
E....r@.@.....B.M....}....Z.INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:61309;branch=z9hG4bK-d8754z-4ae72af76157a630-1---d8754z-
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:61309;transport=UDP>
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=bb83cf3e
Call-ID: ODhiZWRmYWRjZTY2ZDI0M2E5MGNjNDlmOWUzMTE1MmM.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 243

v=0
o=Z 0 0 IN IP4 78.78.78.78
s=Z
c=IN IP4 78.78.78.78
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 98 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

17:01:16.234473 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 519
E..#.s@.@..r..B.M....}....Y.SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bK716b06e8265668cb915c9fa1e1d2a46c60da5209-0-1be38d7e-611fc3ba104e952e;_aluscr_
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=ccbc9258
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=54d9b40a
Call-ID: ALU-1629471674273497@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 PUBLISH
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0


17:01:16.250098 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 477
E.....@.4...M.....B....}..{.SIP/2.0 100 Trying
Call-ID: ODhiZWRmYWRjZTY2ZDI0M2E5MGNjNDlmOWUzMTE1MmM.
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-4ae72af76157a630-1---d8754z-
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP;user=phone>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP;user=phone>;tag=bb83cf3e
CSeq: 1 INVITE
Date: Fri, 20 Aug 2021 15:01:14 GMT
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:16.250098 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1247
E.....@.4...M.....B....}....SUBSCRIBE sip:+33666666666@78.78.78.78:61309;transport=udp;rinstance=f0a91254d6955f5e SIP/2.0
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bKd3ae4ca67b00f7b5149fe20a096da4d760da5209-0-1be38d80-611fc3ba114969bd;_aluscr_
Max-Forwards: 65
Contact: <sip:+33666666666@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;encoded-parm=QbkRBthOEgsTXk5VVF1fXVpdWFdbRTECEAcTWxQeHB5wby4tMXQuOyp7eWIkIzx-IjQhejszI2Mhd1dQWgkFBgcOFAMe>
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=81cdf343
Call-ID: ALU-1629471674289829@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 SUBSCRIBE
Expires: 600
Accept: application/watcherinfo+xml
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
Supported: replaces,norefersub,extended-refer,timer,X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Event: presence.winfo
Allow-Events: presence,kpml
P-Asserted-Identity: Main <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
P-Asserted-Identity: Alias <tel:+33666666666>
Content-Length: 0
Record-Route: <sip:pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;lr;lsstag=pps-123956-12735.16276>
P-Called-Party-ID: <tel:+33666666666>


17:01:16.250853 IP 192.168.66.151.61309 > 29.6.136.77.rev.sfr.net.na-localise: UDP, length 509
E....t@.@..{..B.M....}....X.SIP/2.0 489 Event Package Not Supported
Via: SIP/2.0/UDP 77.136.6.29:5062;branch=z9hG4bKd3ae4ca67b00f7b5149fe20a096da4d760da5209-0-1be38d80-611fc3ba114969bd;_aluscr_
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=db93d455
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=81cdf343
Call-ID: ALU-1629471674289829@imsgroup0-030.mit2isc12.ims.sfr.net
CSeq: 1 SUBSCRIBE
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence, kpml
Content-Length: 0


17:01:16.259983 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 659
E.....@.4..YM.....B....}....SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-92657a3e6870a015-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=udp>;tag=ccbc9258
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=54d9b40a
Call-ID: ZWIwZmY2YzU4NmZhN2QyZjFjZGJmMjNjODY3NzdmNTQ.
CSeq: 1 PUBLISH
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,MESSAGE,OPTIONS,INFO,SUBSCRIBE
P-Asserted-Identity: Alias <tel:+33666666666>
P-Asserted-Identity: Alias <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:16.319198 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 490
E.....@.4...M.....B....}..`.SIP/2.0 489 Event Package Not Supported
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-0d09d02e1dddb242-1---d8754z-
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=db93d455
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=81cdf343
Call-ID: YjMzMzJmMjBhNTgxNzRkY2U0MzFkODc2YzljYzdiYjg.
CSeq: 1 SUBSCRIBE
User-Agent: Z 3.3.25608 r25552
Allow-Events: presence,kpml
Server: Alcatel-Lucent-HPSS/3.0.3
Content-Length: 0


17:01:18.602089 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1068
E..H..@.4...M.....B....}.4..SIP/2.0 183 Session Progress
Call-ID: ODhiZWRmYWRjZTY2ZDI0M2E5MGNjNDlmOWUzMTE1MmM.
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-4ae72af76157a630-1---d8754z-
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=udp;user=phone>;tag=60da5209-611fc3ba114b6bbf-gm-po-lucentPCSF-148813
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP;user=phone>;tag=bb83cf3e
CSeq: 1 INVITE
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,SUBSCRIBE,NOTIFY,INFO,REFER,UPDATE
Contact: <sip:lucentNGFS-152520@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;x-afi=8>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";audio
Content-Type: application/sdp
P-Early-Media: inactive
Server: Alcatel-Lucent-HPSS/3.0.3
Supported: precondition
Content-Length: 239

v=0
o=LucentPCSF 671209888 671209888 IN IP4 imsgroup0-030.mit2isc12.ims.sfr.net
s=-
c=IN IP4 109.3.79.152
t=0 0
m=audio 43788 RTP/AVP 8 101
b=AS:80
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=maxptime:20

17:01:18.859282 IP 29.6.136.77.rev.sfr.net.na-localise > 192.168.66.151.61309: UDP, length 1059
E..?..@.4...M.....B....}.+n.SIP/2.0 180 Ringing
Call-ID: ODhiZWRmYWRjZTY2ZDI0M2E5MGNjNDlmOWUzMTE1MmM.
Via: SIP/2.0/UDP 78.78.78.78:61309;received=78.78.78.78;branch=z9hG4bK-d8754z-4ae72af76157a630-1---d8754z-
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=udp;user=phone>;tag=60da5209-611fc3ba114b6bbf-gm-po-lucentPCSF-148813
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP;user=phone>;tag=bb83cf3e
CSeq: 1 INVITE
Allow: INVITE,BYE,REGISTER,ACK,OPTIONS,CANCEL,SUBSCRIBE,NOTIFY,INFO,REFER,UPDATE
Contact: <sip:lucentNGFS-152520@pcgw-0006.imsgroup0-030.mit2isc12.ims.sfr.net:5062;x-afi=8>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";audio
Content-Type: application/sdp
P-Early-Media: sendrecv
Server: Alcatel-Lucent-HPSS/3.0.3
Supported: precondition
Content-Length: 239

v=0
o=LucentPCSF 671209888 671209888 IN IP4 imsgroup0-030.mit2isc12.ims.sfr.net
s=-
c=IN IP4 109.3.79.152
t=0 0
m=audio 43788 RTP/AVP 8 101
b=AS:80
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=maxptime:20

407 is not an error.

We’d need the whole INVITE, not just the summary from the history, to understand what is happening. However, my guess is that the outbound proxy has confused it.

Also, if you are behind NAT, you need to tell chan_pjsip your public addresses.

Thank you for your reply,

The whole message from Asterisk is in the first post (collapsed under the summary) and from Zoiper is in the second post (Pastebbin link should be public, but for some reason is not working)

Regarding the NAT, I see in the logs that my public IP is already used. However, the port is 5060. Technically it could be used as src port (I’m not using that port) but is weird using the same (usually they are higher values).

Honestly I don’t understand why it tries to use the default 5060 port there even if is already communicating with the proxy under other valid port

I think my problem is that Asterisk is setting the Route header. Is the only different thing that Asterisk does.

But I’m not able to remove it for outgoing calls (when I do it with PJSIP_HEADER, the logs tell me that the header doesn’t exist but it appears after)

It is setting the Route header because you have told it to use an outbound proxy. Remove the outbound proxy specification.

As I said in my first reply:

Tried with no luck. I can’t even register without the proxy

My ISP requires that I use a proxy in order to register and make calls. Still looking what it could be …

I thought I’d seen the proxy address the same as the target URI, which isn’t the case. However, I’m wondering if you were specifically told to use loose routing, as I think that using the SIP 1.0 Route header semantics, without loose routing, would mean that no Route header was sent to the last (and in this case, only) proxy, so I’d suggest dropping the \;lr (or finding a service provider that isn’t 19 years behind the times).

It would simplify things a lot. But is not the case

If I don’t set lr I’m still getting the 407. Example INVITE that is sent without it:

INVITE sip:0666666666@residential.p-cscf.sfr.net SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPj341b559d-4daf-4ef8-b6c9-bbdbb8e4b647
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=cc223d96-c475-4577-81c1-7554e7b550fc
To: <sip:0666666666@residential.p-cscf.sfr.net>
Contact: <sip:+33666666666@78.78.78.78:5060>
Call-ID: bd04c5a9-fb96-4a1f-81cd-f3609fcd5636
CSeq: 28856 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.3.0
Content-Type: application/sdp
Content-Length:   289

I think I will sniff the traffic with the ISP OEM router and check which headers it use usually. Maybe there is other way to set the config and make it work.

Can’t be more agree. But the phone line comes free with the fiber and can make calls to national phones & mobiles without any cost.

There are info to make this stuff work with sip_chan but I wanted try to setup it with PJSIP, just for fun :slight_smile:

Hello,

I’ve just captured a legacy INVITE from my ISP:

INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;user=phone SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;branch=z9hG4bK15150f3a
From: "+33666666666" <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>;tag=16DA4891
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
User-Agent: otherIAD - rNB6VAC-MAIN-R4.0.44j-36091
P-Preferred-Identity: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
Call-ID: CBCBCBCBCBCBCB@78.78.78.78
CSeq: 1 INVITE
Allow: INVITE, ACK, BYE, CANCEL, REFER, NOTIFY, SUBSCRIBE, REGISTER, UPDATE
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:5060;user=phone>
Content-Type: application/sdp
Content-Length: 279

v=0
o=+33666666666 1629798315 1629798316 IN IP4 78.78.78.78
s=-
c=IN IP4 78.78.78.78
t=0 0
m=audio 35530 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
a=sendrecv
a=ptime:20

I will try to reproduce it. I hope the reason of failing is not the Route header…

Sooo, finally can confirm that the Route header is which cause the problems.

AFAIK, modifying that header with PJSIP is not possible without modifying source code and recompiling. There was some discussion to support that in PJSIP, but it was never implemented.

So my only option is fallback to chan_sip

There is no Route header in your failing case in post number 9.

1 Like

And the Route header can be removed from the message by adding:

\;hide

To the outbound_proxy URI.

1 Like

Ops, you’re right

:smiley: :smiley: :smiley:

However, I’m still in the same point. For some reason it rejects the Asterisk INVITE. Honestly, I’m starting to be out of ideas. Maybe is not a SIP problem, but some filter they use to exclude Asterisk PBXs?

Just for summarize the whole process between Zoiper client (working) and Asterisk (not working):


REGISTER Zoiper:

REGISTER sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:47928;branch=z9hG4bK-d8754z-6280a857ae291edf-1---d8754z-;rport
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=0ca89c39
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
Contact: <sip:+33666666666@78.78.78.78:47928;rinstance=857803695ad10874;transport=UDP>

Max-Forwards: 70
Call-ID: MDVmZTRiNDI3YWFiZTIwNGI3ZjhiYzQxMGY0MmY5MmE.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Authorization: Digest username="NDI0666666666.MPY.THD@sfr.fr",realm="sfr.fr",nonce="b7c9036dbf3054a6125f7c5ea940e9703dc8f84c1508",uri="sip:ims.mnc010.mcc208.3gppnetwork.org;transport=UDP",response="4a36c25e92deba05e813464af472d2ff",cnonce="66d8c6bed627c8d2947fa2ec4dac8d18",nc=00000001,qop=auth,algorithm=MD5,opaque="ALU:QbkRBthOEgEQAkgFAQ0NW0YBBBpdGQIRQkZbHxoLVwknMG0qIDJ9fXlze3c1Yy42OG9j"
Allow-Events: presence, kpml
Content-Length: 0

REGISTER Asterisk:

REGISTER sip:ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPj4e940e16-863e-4a15-baeb-ed95f9b6145f
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=615c936b-4c8e-4ff4-a551-1a161cf84993
To: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>
Contact: <sip:+33666666666@78.78.78.78:5060>

Call-ID: ae41511b-d006-45d4-85f9-a976a9a4c204
CSeq: 60275 REGISTER
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: otherIAD - rNB6VAC-MAIN-R4.0.44j-36091
Authorization: Digest username="NDI0666666666.MPY.THD@sfr.fr", realm="sfr.fr", nonce="b7c9036dbf3054aea940e976125faed03dc8f84c2308", uri="sip:ims.mnc010.mcc208.3gppnetwork.org", response="8a283510bceabab5764549259fbb5f19", algorithm=MD5, cnonce="6106c2e9-eed2-4426-80fc-c38f9764eb81", opaque="ALU:QbkRBthOEgEQAkgFAQ0NWEYBBBpdGQIRQkRbHxoLVwknMG0qIDJ9fXlze3c1Yy42OG9gYw__", qop=auth, nc=00000001
Content-Length:  0

In the case of REGISTERs:

  • Both receive a 200 OK

INVITE Zoiper

INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:47928;branch=z9hG4bK-d8754z-e4c573387752243f-1---d8754z-;rport
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>;tag=ed83613f
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;transport=UDP>
Contact: <sip:+33666666666@78.78.78.78:47928;transport=UDP>

Call-ID: Y2Q0ZjEwNzYxMWI0MDNjOGU0YTc3OTg5OTE2N2MyMmE.
CSeq: 1 INVITE
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.3.25608 r25552
Content-Length: 243
Allow-Events: presence, kpml

v=0
o=Z 0 0 IN IP4 78.78.78.78
s=Z
c=IN IP4 78.78.78.78
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 98 101
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

INVITE Asterisk:

INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;rport;branch=z9hG4bKPj11b22aa0-8cd6-452c-b471-1c163c47354e
From: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org>;tag=36c7da17-5529-470b-9678-2795f43ba63a
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org>
Contact: <sip:+33666666666@78.78.78.78:5060>

Call-ID: 89dfc4ca-2e96-461d-ac45-fe9546fbcf8c
CSeq: 29040 INVITE
Max-Forwards: 70
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Type: application/sdp
Supported: 100rel, timer, replaces, norefersub
User-Agent: otherIAD - rNB6VAC-MAIN-R4.0.44j-36091
Content-Length:   289
Session-Expires: 1800
Min-SE: 90

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

INVITE legacy ISP phone (just for some extra working reference):

INVITE sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;user=phone SIP/2.0
Via: SIP/2.0/UDP 78.78.78.78:5060;branch=z9hG4bK15150f3a
From: "+33666666666" <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>;tag=16DA4891
To: <sip:0777777777@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
User-Agent: otherIAD - rNB6VAC-MAIN-R4.0.44j-36091
P-Preferred-Identity: <sip:+33666666666@ims.mnc010.mcc208.3gppnetwork.org;user=phone>
Call-ID: CBCBCBCBCBCBCB@78.78.78.78
CSeq: 1 INVITE
Allow: INVITE, ACK, BYE, CANCEL, REFER, NOTIFY, SUBSCRIBE, REGISTER, UPDATE
Max-Forwards: 70
Contact: <sip:+33666666666@78.78.78.78:5060;user=phone>
Content-Type: application/sdp
Content-Length: 279

v=0
o=+33666666666 1629798315 1629798316 IN IP4 78.78.78.78
s=-
c=IN IP4 78.78.78.78
t=0 0
m=audio 35530 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
a=sendrecv
a=ptime:20

Relevant stuff

  • The tag inFrom is larger in Asterisk
  • Call-ID doesn’t seem the cause (completly different in ISP legacy)
  • transport=UDP not present in legacy ISP, so discarded too
  • rport tag present in Zoiper. Discarded
  • CSeq? Asterisk doesn’t use 1 as first number
  • Allow? PRACK is only in Asterisk
  • User-Agent cloned from ISP legacy but nothing changes
  • Extra field Min-SE
  • Order of the fields? Would be a very big wtf (I’ve sorted them for better reading)

There is an illegal blank line after the Contact header in all of these. That can’t be in all the originals.

As I said, 407 is not an error, it is a request by the proxy, rather than the main system, for the requester to authenticate itself.

I cannot think of anything here that would make the proxy behave differently, but it is possible that 407 is being used to disguise the real reason for the rejection, which may be some weird policy. I think you need the information from the logs on the provider’s proxy, so you will need to talk to them.

Yeah, that’s my fault. I did it for better reading

Yes, I understand that. What doesn’t make sense is that it only appears when I try to call through Asterisk. Doing it with Zoiper works as expected

I don’t think I can do that. All technical support that I can reach will not help me with that, since they expect me to use their ISP router, on which that is not happening

Hello,

I found a very interesting thing. If I retry the call after the 407 message (several times), it let me finally make a call. And if I insert 100rel = no it almost let me call in the first attempt (not always). I can make them even if the INVITE has the Route field in the headers

Is a very weird stuff what is doing the proxy, but at least I can make calls with a simple RetryDial. So the final endpoint config looks like this:

[sfr-out]
type = endpoint
transport = transport-udp
context = from-sfr
outbound_auth = auth_reg_residential.p-cscf.sfr.net
from_domain = ims.mnc010.mcc208.3gppnetwork.org
from_user = +33666666666
allow=!all,g722,alaw,ulaw,gsm
aors = sfr-out
outbound_proxy = sip:residential.p-cscf.sfr.net\;lr
100rel = no
allow_subscribe = no