Can't use PJSIP trunk to send calls to sending A2B Server

fwconsole ma delete userman

The following error(s) occured:

  • Cannot disable: The following modules depend on this one: contactmanager,fax,findmefollow,ucp,xmpp

delete them all one by one, you can always reinstall them later, but don’t install modules you don’t use.

At the Asterisk command prompt, type
pjsip show aor vbill6-intnl
and post the output

What does /etc/asterisk/pjsip.aor.conf have in the vbill6-intnl section?

Do you have any manual additions to the pjsip config files?

CLI> pjsip show aor vb6-intnl

  Aor:  <Aor..............................................>  <MaxContact>
Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>

==========================================================================================

  Aor:  vb6-intnl                                            0
Contact:  vb6-intnl/sip:XX.XX.49.40:5160             9083518675 Unavail         nan

ParameterName : ParameterValue

authenticate_qualify : false
contact : sip:XX.XX.49.40:5160
default_expiration : 3600
mailboxes :
max_contacts : 0
maximum_expiration : 7200
minimum_expiration : 60
outbound_proxy :
qualify_frequency : 60
qualify_timeout : 3.000000
remove_existing : false
remove_unavailable : false
support_path : false
voicemail_extension :

Here’s a good one…

[2023-05-10 06:52:37] ERROR[5406]: res_pjsip.c:852 ast_sip_create_dialog_uac: Endpoint ‘vb6-pj’: Could not create dialog to invalid URI ‘vb6-pj’. Is endpoint registered and reachable?
[2023-05-10 06:52:37] ERROR[5406]: chan_pjsip.c:2681 request: Failed to create outgoing session to endpoint ‘vb6-pj’
[2023-05-10 06:52:37] NOTICE[10565][C-00000012]: app_dial.c:2707 dial_exec_full: Unable to create channel of type ‘PJSIP’ (cause 3 - No route to destination)

Your output of “pjsip show aor vb6-intnl” shows the contact as unreachable, meaning Asterisk received no response to the OPTIONS requests it sent. Calls aren’t sent to unreachable contacts.

Simply insane. If in our freepbx16 server change outbound route to go to another server with the trunk setup as PJSIP, works flawlessly.Just tried it to be sure.

Hi JColb, deleted the trunk, and created new pjsip trunk. Did not help at all. The other sending server now being used with pjsip trunk and settings port=5160 is working. Even if copy trunk settings from working server to problematic server, calls simply fail. .

Endpoints => FreePBX 16 server => partial FreePBX server (only SIP supported) => various carrriers

sip1*CLI> pjsip show aor vb6-pj

 Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

      Aor:  vb6-pj                                               0
    Contact:  vb6-pj/sip:XX.XX.49.40:5160                9083518675 Unavail         nan


 ParameterName        : ParameterValue
 =============================================
 authenticate_qualify : false
 contact              : sip:XX.XX.49.40:5160
 default_expiration   : 3600
 mailboxes            :
 max_contacts         : 0
 maximum_expiration   : 7200
 minimum_expiration   : 60
 outbound_proxy       :
 qualify_frequency    : 60
 qualify_timeout      : 3.000000
 remove_existing      : false
 remove_unavailable   : false
 support_path         : false
 voicemail_extension  :

sip1*CLI> pjsip show aor vbill1-pj
This is the working pbx server

   Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

      Aor:  vbill1-pj                                            0
    Contact:  vbill1-pj/sip:XX.XX.49.72:5060             b0b5293b95 Avail         2.099


 ParameterName        : ParameterValue
 =============================================
 authenticate_qualify : false
 contact              : sip:XX.XX.49.72:5060
 default_expiration   : 3600
 mailboxes            :
 max_contacts         : 0
 maximum_expiration   : 7200
 minimum_expiration   : 60
 outbound_proxy       :
 qualify_frequency    : 60
 qualify_timeout      : 3.000000
 remove_existing      : false
 remove_unavailable   : false
 support_path         : false
 voicemail_extension  :

Not really sure what you’re showing. Two different configs, two different contacts, two different results. One sending to port 5160 at an IP address, one sending to port 5060 at another IP address. The one sending to 5160 not getting a response.

Changed vb6-pj to use port 5060. Now its available but outbound overseas fail.

sip1*CLI> pjsip show aor vb6-pj


      Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

      Aor:  vb6-pj                                               0
    Contact:  vb6-pj/sip:XX.XX.49.40:5060                e7bf446982 Avail         1.624


 ParameterName        : ParameterValue
 =============================================
 authenticate_qualify : false
 contact              : sip:XX.XX.49.40:5060
 default_expiration   : 3600
 mailboxes            :
 max_contacts         : 0
 maximum_expiration   : 7200
 minimum_expiration   : 60
 outbound_proxy       :
 qualify_frequency    : 60
 qualify_timeout      : 3.000000
 remove_existing      : false
 remove_unavailable   : false
 support_path         : false
 voicemail_extension  :

Below is call attempt. Log taken from freepbx 16 server endpoint is connected to.

Spawn extension (func-apply-sipheaders, s, 13) exited non-zero on 'PJSIP/vb6-pj-00000029'
    -- PJSIP/vb6-pj-00000029 Internal Gosub(func-apply-sipheaders,s,1(13)) complete GOSUB_RETVAL=
    -- Called PJSIP/011972553313494@vb6-pj
  == Everyone is busy/congested at this time (1:0/0/1)

Call log from vb6-pj server to see what it says


<--- SIP read from UDP:XX.XX.49.61:5160 --->
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5160;rport;branch=z9hG4bKPjd0822299-f592-4b4e-b68b-89bb2f8772e7
From: "LAMER" <sip:[email protected]>;tag=873e8dd3-e07d-4df7-989b-0a9ab93bbd37
To: <sip:[email protected]>
Contact: <sip:[email protected]:5160>
Call-ID: 10ac5280-4c06-41bb-afad-5c8e11d6cb35
CSeq: 17255 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: "LAMER" <sip:[email protected]>
Remote-Party-ID: "LAMER" <sip:[email protected]>;party=calling;privacy=off;screen=no
Max-Forwards: 49
User-Agent: FPBX-16.0.40(20.2.1)
Content-Type: application/sdp
Content-Length: 237

v=0
o=- 561691102 561691102 IN IP4 XX.XX.49.61
s=Asterisk
c=IN IP4 XX.XX.49.61
t=0 0
m=audio 18324 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<------------->
--- (17 headers 12 lines) ---
Sending to XX.XX.49.61:5160 (no NAT)
Sending to XX.XX.49.61:5160 (no NAT)
Using INVITE request as basis request - 10ac5280-4c06-41bb-afad-5c8e11d6cb35
[2023-05-10 10:41:28] WARNING[1850][C-00000924]: chan_sip.c:31440 build_peer: '' is not a valid RTP hold time at line 0.  Using default.
[2023-05-10 10:41:28] WARNING[1850][C-00000924]: chan_sip.c:31445 build_peer: '' is not a valid RTP hold time at line 0.  Using default.
[2023-05-10 10:41:28] WARNING[1850][C-00000924]: chan_sip.c:31277 build_peer: no value given for outbound proxy on line 0 of sip.conf
Found peer '6160775458' for '+1XXX3504975' from XX.XX.49.61:5160
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port XX.XX.49.61:18324
Looking for 011972553313494 in a2billing (domain XX.XX.49.40)
sip_route_dump: route/path hop: <sip:[email protected]:5160>

<--- Transmitting (no NAT) to XX.XX.49.61:5160 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP XX.XX.49.61:5160;branch=z9hG4bKPjd0822299-f592-4b4e-b68b-89bb2f8772e7;received=XX.XX.49.61;rport=5160
From: "LAMER" <sip:[email protected]>;tag=873e8dd3-e07d-4df7-989b-0a9ab93bbd37
To: <sip:[email protected]>
Call-ID: 10ac5280-4c06-41bb-afad-5c8e11d6cb35
CSeq: 17255 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:[email protected]:5060>
Content-Length: 0


<------------>
[2023-05-10 10:41:28] WARNING[1850][C-00000924]: chan_sip.c:31440 build_peer: '' is not a valid RTP hold time at line 0.  Using default.
[2023-05-10 10:41:28] WARNING[1850][C-00000924]: chan_sip.c:31445 build_peer: '' is not a valid RTP hold time at line 0.  Using default.
[2023-05-10 10:41:28] WARNING[1850][C-00000924]: chan_sip.c:31277 build_peer: no value given for outbound proxy on line 0 of sip.conf
Scheduling destruction of SIP dialog '10ac5280-4c06-41bb-afad-5c8e11d6cb35' in 32000 ms (Method: INVITE)

<--- Reliably Transmitting (no NAT) to XX.XX.49.61:5160 --->
SIP/2.0 603 Declined
Via: SIP/2.0/UDP XX.XX.49.61:5160;branch=z9hG4bKPjd0822299-f592-4b4e-b68b-89bb2f8772e7;received=XX.XX.49.61;rport=5160
From: "LAMER" <sip:[email protected]>;tag=873e8dd3-e07d-4df7-989b-0a9ab93bbd37
To: <sip:[email protected]>;tag=as1a6c10cc
Call-ID: 10ac5280-4c06-41bb-afad-5c8e11d6cb35
CSeq: 17255 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Content-Length: 0


<------------>

<--- SIP read from UDP:XX.XX.49.61:5160 --->
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5160;rport;branch=z9hG4bKPjd0822299-f592-4b4e-b68b-89bb2f8772e7
From: "LAMER" <sip:[email protected]>;tag=873e8dd3-e07d-4df7-989b-0a9ab93bbd37
To: <sip:[email protected]>;tag=as1a6c10cc
Call-ID: 10ac5280-4c06-41bb-afad-5c8e11d6cb35
CSeq: 17255 ACK
Max-Forwards: 49
User-Agent: FPBX-16.0.40(20.2.1)
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---

<— Reliably Transmitting (no NAT) to XX.XX.49.61:5160 —>
SIP/2.0 603 Declined

Check with xx.xx.49.61 and/or xx.xx.49.40 as to why

https://secure.data102.com/knowledgebase/15/SIP-and-ISDN-Hangup-Cause-Codes.html

vb6-pj is rejecting the call. So you should look at the call logs to see why vb6-pj is not allowing the call and returning the 603.

The call below was sent from our FreePBX 16 distro server to VB6 server but the trunk used was plain old SIP (since using the pjsip trunk just fails for overseas calls for some unknown reason on VB6). The carrier used requires +E164 format, along with a P-Asserted-Identity and that is why a PJSIP trunk was created for this carrier.

I didn’t think SIP trunk would send out PAI + E164

<— SIP read from UDP:XX.XX.49.61:5060 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618
Max-Forwards: 70
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-16.0.40(20.2.1)
Date: Thu, 11 May 2023 08:06:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Remote-Party-ID: “LAMER” sip:[email protected];party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 241

v=0
o=root 1775707737 1775707737 IN IP4 XX.XX.49.61
s=Asterisk PBX 20.2.1
c=IN IP4 XX.XX.49.61
t=0 0
m=audio 14204 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
<------------->
— (15 headers 11 lines) —
Sending to XX.XX.49.61:5060 (no NAT)
Sending to XX.XX.49.61:5060 (no NAT)
Using INVITE request as basis request - [email protected]:5060
[2023-05-11 04:06:20] WARNING[1850][C-00000aa2]: chan_sip.c:31440 build_peer: ‘’ is not a valid RTP hold time at line 0. Using default.
[2023-05-11 04:06:20] WARNING[1850][C-00000aa2]: chan_sip.c:31445 build_peer: ‘’ is not a valid RTP hold time at line 0. Using default.
[2023-05-11 04:06:20] WARNING[1850][C-00000aa2]: chan_sip.c:31277 build_peer: no value given for outbound proxy on line 0 of sip.conf
Found peer ‘7530791895’ for ‘+1XXX3504961’ from XX.XX.49.61:5060
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port XX.XX.49.61:14204
Looking for 011972553313494 in a2billing (domain XX.XX.49.40)
sip_route_dump: route/path hop: sip:[email protected]:5060

<— Transmitting (no NAT) to XX.XX.49.61:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618;received=XX.XX.49.61
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected]
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]:5060
Content-Length: 0

<------------>
Audio is at 12986
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 108.59.2.133:5060:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.40:5060;branch=z9hG4bK52a88538
Max-Forwards: 70
From: “LAMER” sip:[email protected];tag=as095b681f
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-13.0.197.31(13.14.0)
Date: Thu, 11 May 2023 08:06:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 238

v=0
o=root 33134847 33134847 IN IP4 XX.XX.49.40
s=Asterisk PBX 13.14.0
c=IN IP4 XX.XX.49.40
t=0 0
m=audio 12986 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv


<— SIP read from UDP:108.59.2.133:5060 —>
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP XX.XX.49.40:5060;received=XX.XX.49.40;rport=5060;branch=z9hG4bK52a88538
From: “LAMER” sip:[email protected];tag=as095b681f
To: sip:[email protected]
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: OpenSIPS (1.8.8-notls (x86_64/linux))
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:108.59.2.133:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP XX.XX.49.40:5060;received=XX.XX.49.40;rport=5060;branch=z9hG4bK52a88538
To: sip:[email protected];tag=3892781184-452915936
From: “LAMER” sip:[email protected];tag=as095b681f
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Allow: UPDATE,PRACK,REFER,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL
Contact: sip:[email protected];did=068.539c1b63
Content-Length: 0

<------------->
— (9 headers 0 lines) —
sip_route_dump: route/path hop: sip:[email protected];did=068.539c1b63

<— Transmitting (no NAT) to XX.XX.49.61:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618;received=XX.XX.49.61
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected];tag=as6ed4e2df
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]:5060
Content-Length: 0

<------------>

<— SIP read from UDP:108.59.2.133:5060 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP XX.XX.49.40:5060;received=XX.XX.49.40;rport=5060;branch=z9hG4bK52a88538
To: sip:[email protected];tag=3892781184-452915936
From: “LAMER” sip:[email protected];tag=as095b681f
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Allow: UPDATE,PRACK,REFER,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL
Contact: sip:[email protected];did=068.539c1b63
Content-Type: application/sdp
Content-Length: 239

v=0
o=rt-sbc-01 86901126046548 86901126046548 IN IP4 178.22.13.14
s=sip call
c=IN IP4 74.201.101.220
t=0 0
m=audio 29974 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
<------------->
— (10 headers 11 lines) —
sip_route_dump: route/path hop: sip:[email protected];did=068.539c1b63
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|h264|mpeg4), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 74.201.101.220:29974
Audio is at 11304
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (no NAT) to XX.XX.49.61:5060 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618;received=XX.XX.49.61
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected];tag=as6ed4e2df
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]:5060
Content-Type: application/sdp
Require: timer
Content-Length: 242

v=0
o=root 1910357766 1910357766 IN IP4 XX.XX.49.40
s=Asterisk PBX 13.14.0
c=IN IP4 XX.XX.49.40
t=0 0
m=audio 11304 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv

<------------>

<— SIP read from UDP:XX.XX.49.61:5060 —>
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618
Max-Forwards: 70
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected]
Call-ID: [email protected]:5060
CSeq: 102 CANCEL
User-Agent: FPBX-16.0.40(20.2.1)
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to XX.XX.49.61:5060 (no NAT)

<— Reliably Transmitting (no NAT) to XX.XX.49.61:5060 —>
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618;received=XX.XX.49.61
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected];tag=as6ed4e2df
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>

<— Transmitting (no NAT) to XX.XX.49.61:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618;received=XX.XX.49.61
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected];tag=as6ed4e2df
Call-ID: [email protected]:5060
CSeq: 102 CANCEL
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 6400 ms (Method: INVITE)
Reliably Transmitting (no NAT) to 108.59.2.133:5060:
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.40:5060;branch=z9hG4bK52a88538
Max-Forwards: 70
From: “LAMER” sip:[email protected];tag=as095b681f
To: sip:[email protected]
Call-ID: [email protected]:5060
CSeq: 102 CANCEL
User-Agent: FPBX-13.0.197.31(13.14.0)
Content-Length: 0


<— SIP read from UDP:XX.XX.49.61:5060 —>
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5060;branch=z9hG4bK7f3ee618
Max-Forwards: 70
From: “LAMER” sip:[email protected];tag=as69201479
To: sip:[email protected];tag=as6ed4e2df
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-16.0.40(20.2.1)
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 6400 ms (Method: INVITE)

<— SIP read from UDP:XX.XXX.2.133:5060 —>
SIP/2.0 200 canceling
Via: SIP/2.0/UDP XX.XX.49.40:5060;received=XX.XX.49.40;rport=5060;branch=z9hG4bK52a88538
From: “LAMER” sip:[email protected];tag=as095b681f
To: sip:[email protected];tag=ae7a8cec11372a827e55d7147ba55fe7-692b
Call-ID: [email protected]:5060
CSeq: 102 CANCEL
Server: OpenSIPS (1.8.8-notls (x86_64/linux))
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:108.59.2.133:5060 —>
SIP/2.0 487 Request cancelled
Via: SIP/2.0/UDP XX.XX.49.40:5060;received=XX.XX.49.40;rport=5060;branch=z9hG4bK52a88538
From: “LAMER” sip:[email protected];tag=as095b681f
To: sip:[email protected];tag=2283ef55d8cd9f773784ed9616b0f414-f77e
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: OpenSIPS (1.7.1-notls (x86_64/linux))
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Transmitting (no NAT) to 108.59.2.133:5060:
ACK sip:[email protected];did=068.539c1b63 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.40:5060;branch=z9hG4bK52a88538
Max-Forwards: 70
From: “LAMER” sip:[email protected];tag=as095b681f
To: sip:[email protected];tag=2283ef55d8cd9f773784ed9616b0f414-f77e
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-13.0.197.31(13.14.0)
Content-Length: 0


Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 6400 ms (Method: INVITE)
Really destroying SIP dialog ‘[email protected]:5060’ Method: ACK
[2023-05-11 04:06:26] ERROR[1850]: stasis_cache.c:845 caching_topic_exec: Attempting to remove an item from the SIP/7530791895-cached cache that isn’t there: ast_endpoint_snapshot_type SIP/7530791895
vbill6*CLI> exit

Now change outbound route to use the pjsip trunk in our FreePBX 16 distro server sending the call to VB6 (same as above successful call) and it fails.

Notice using the PJSIP trunk the call is sent to port 5160 probably because our sip settings have chan_sip as 5060 and pjsip as 5160. The successful call above sends to Port 5060 and that trunk is PJSIP. So how can it be it changes the port??

<— SIP read from UDP:XX.XX.49.61:5160 —>
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5160;rport;branch=z9hG4bKPj8a21d7d8-6407-47df-92bb-8d743b67dab9
From: “LAMER” sip:[email protected];tag=eb1f4190-4fe7-43ce-b5e6-91ba75727a08
To: sip:[email protected]
Contact: sip:[email protected]:5160
Call-ID: 788f4e3a-bf3c-4974-a987-a28bf2f36826
CSeq: 31298 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: “LAMER” sip:[email protected]
Remote-Party-ID: “LAMER” sip:[email protected];party=calling;privacy=off;screen=no
Max-Forwards: 70
User-Agent: FPBX-16.0.40(20.2.1)
Content-Type: application/sdp
Content-Length: 237

v=0
o=- 122630261 122630261 IN IP4 XX.XX.49.61
s=Asterisk
c=IN IP4 XX.XX.49.61
t=0 0
m=audio 13138 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<------------->
— (17 headers 12 lines) —
Sending to XX.XX.49.61:5160 (no NAT)
Sending to XX.XX.49.61:5160 (no NAT)
Using INVITE request as basis request - 788f4e3a-bf3c-4974-a987-a28bf2f36826
[2023-05-11 04:30:52] WARNING[1850][C-00000aa3]: chan_sip.c:31440 build_peer: ‘’ is not a valid RTP hold time at line 0. Using default.
[2023-05-11 04:30:52] WARNING[1850][C-00000aa3]: chan_sip.c:31445 build_peer: ‘’ is not a valid RTP hold time at line 0. Using default.
[2023-05-11 04:30:52] WARNING[1850][C-00000aa3]: chan_sip.c:31277 build_peer: no value given for outbound proxy on line 0 of sip.conf
Found peer ‘6160775458’ for ‘+1XXX3504965’ from XX.XX.49.61:5160
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port XX.XX.49.61:13138
Looking for 011972553313494 in a2billing (domain XX.XX.49.40)
sip_route_dump: route/path hop: sip:[email protected]:5160

<— Transmitting (no NAT) to XX.XX.49.61:5160 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP XX.XX.49.61:5160;branch=z9hG4bKPj8a21d7d8-6407-47df-92bb-8d743b67dab9;received=XX.XX.49.61;rport=5160
From: “LAMER” sip:[email protected];tag=eb1f4190-4fe7-43ce-b5e6-91ba75727a08
To: sip:[email protected]
Call-ID: 788f4e3a-bf3c-4974-a987-a28bf2f36826
CSeq: 31298 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:[email protected]:5060
Content-Length: 0

<------------>
[2023-05-11 04:30:52] WARNING[1850][C-00000aa3]: chan_sip.c:31440 build_peer: ‘’ is not a valid RTP hold time at line 0. Using default.
[2023-05-11 04:30:52] WARNING[1850][C-00000aa3]: chan_sip.c:31445 build_peer: ‘’ is not a valid RTP hold time at line 0. Using default.
[2023-05-11 04:30:52] WARNING[1850][C-00000aa3]: chan_sip.c:31277 build_peer: no value given for outbound proxy on line 0 of sip.conf
Scheduling destruction of SIP dialog ‘788f4e3a-bf3c-4974-a987-a28bf2f36826’ in 32000 ms (Method: INVITE)

<— Reliably Transmitting (no NAT) to XX.XX.49.61:5160 —>
SIP/2.0 603 Declined
Via: SIP/2.0/UDP XX.XX.49.61:5160;branch=z9hG4bKPj8a21d7d8-6407-47df-92bb-8d743b67dab9;received=XX.XX.49.61;rport=5160
From: “LAMER” sip:[email protected];tag=eb1f4190-4fe7-43ce-b5e6-91ba75727a08
To: sip:[email protected];tag=as48b409cd
Call-ID: 788f4e3a-bf3c-4974-a987-a28bf2f36826
CSeq: 31298 INVITE
Server: FPBX-13.0.197.31(13.14.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Content-Length: 0

<------------>

<— SIP read from UDP:XX.XX.49.61:5160 —>
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.61:5160;rport;branch=z9hG4bKPj8a21d7d8-6407-47df-92bb-8d743b67dab9
From: “LAMER” sip:[email protected];tag=eb1f4190-4fe7-43ce-b5e6-91ba75727a08
To: sip:[email protected];tag=as48b409cd
Call-ID: 788f4e3a-bf3c-4974-a987-a28bf2f36826
CSeq: 31298 ACK
Max-Forwards: 70
User-Agent: FPBX-16.0.40(20.2.1)
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Reliably Transmitting (no NAT) to 95.211.119.240:5060:
OPTIONS sip:95.211.119.240 SIP/2.0
Via: SIP/2.0/UDP XX.XX.49.40:5060;branch=z9hG4bK2a2760c7
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as47d32c2a
To: sip:95.211.119.240
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-13.0.197.31(13.14.0)
Date: Thu, 11 May 2023 08:30:53 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:95.211.119.240:5060 —>
SIP/2.0 200 OK - keepalive
Via: SIP/2.0/UDP XX.XX.49.40:5060;branch=z9hG4bK2a2760c7
From: “Unknown” sip:[email protected];tag=as47d32c2a
To: sip:95.211.119.240;tag=975eb251270ab81705c4ea3580c95c85.62e6
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Server: OpenSIPS (2.3.3 (x86_64/linux))
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
vbill6*CLI> exit

Again, the system is rejecting the call. I asked you to provide a call debug from Asterisk at this system. You keep insisting on showing a SIP debug for this. It’s clear something isn’t happening within Asterisk and the dialplan.

Do both trunks on vb6 go to the same context? You need to provide the debugs people are asking for.

Looks like your a2billing/asterisk server “vb6” is expecting your FreePBX server to be signaling from port 5060. In other words it’s matching by the source IP and the source port. So either change the a2billing server to accept your calls from 5160 or change FreePBX to use 5060 with PJSIP.

ps: this is completely irrelevant to “Asterisk mysteriously stops”

Yeah you are right. It has nothing to do with asterisk mysteriously stopping.

On the VB6 a2b/freepbx server it has two voip settings for our FreePBX 16 Distro server. One for port 5060 and one for 5160 as well as the iptables firewall allowing both ports from the FreePBX 16 server. This is why I am kind of dumbfounded as to why calls fail. One thing I noticed is a2b is looking for 011xxxxxxx and it should be striping the 011. It will not find any valid destination starting with 011.

I’ll ask for this a third time, maybe this will be a charm. We need a call debug to see how this call is being processed via the dialplan. Either show it or there’s nothing else we can do.

Are you telling me the calls pasted above are not debug? If I set verbosity in A2B to debug … ok better just to show it. On Sunday I will do it.

They are a SIP debug not a call debug. We need to see the results of the call from the /var/log/asterisk/full log or straight from the console output with asterisk -rvvvvvvvvvvvv

I guess if this isn’t important enough it can wait another 3-4 days for the debugs.

Yeah it’s important but I don’t work on Saturday which for us starts Friday at sundown. Now its 5:30PM. and I have other things to do. Plus I have to setup the outbound route/trunk as it was to produce the failures. Sunday is better. or even Saturday night my time.