Working Trunk to Asterisk server failed

raymond.norton

Gold Partner
Basic Certified
Joined
Apr 24, 2024
Messages
32
Reaction score
6
V20, self-hosted

I configured an IP-based trunk between 3CX and Asterisk. I was working fine, but the trunk suddenly went down as if there was a firewall rule between the servers. Asterisk sees 3CX as an endpoint, but no traffic flows between them, and no logs are produced on the asterisk side (verbose). Outbound rules are in place, but 3CX acts as if the rules are not active. if I dial 6111, it should reach the asterisk server, but instead, it rings many times and ends with the message "destination is not available." I have removed and recreated the trunk, but that has not resolved the issue. 3CX can ping the Asterisk server by fqdn. The same Asterisk server has another IP-based trunk to a 2nd 3cx server, which is rock solid. Removing that trunk to test the problem child did not resolve the issue.

I am attaching some logs in hopes that it will reveal why 3CX is unhappy with the trunk:

The logs are from a web client and 3CX on Android:

Code:
12/18/2024 5:21:19.811 PM    Lsip{582909/380.3/Inv*[Connected&Neutral]} termination message:
InvTERM Send Req BYE from 0.0.0.0:0 tid=9bf583107a19f439 Call-ID=qZBn6_uxAA7Fw1xm8yZulA..:
BYE sip:[email protected]:5483 SIP/2.0
Via: SIP/2.0/ ;branch=z9hG4bK-524287-1---9bf583107a19f439;rport
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=7fba5e2b
From: "3CXUser"<sip:5151@3CXPublicIP>;tag=87ad4b45
Call-ID: qZBn6_uxAA7Fw1xm8yZulA..
CSeq: 2 BYE
Reason: SIP;text="Call terminated"
Content-Length: 0

12/18/2024 5:21:19.811 PM    Lsip{582909/380.3/Inv*[Connected&Neutral]} sends: SendReq Send Req BYE from 0.0.0.0:0 tid=ddf2d97144ad970e Call-ID=qZBn6_uxAA7Fw1xm8yZulA..:
BYE sip:[email protected]:5483 SIP/2.0
Via: SIP/2.0/ ;branch=z9hG4bK-524287-1---ddf2d97144ad970e;rport
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=7fba5e2b
From: "3CXUser"<sip:5151@3CXPublicIP>;tag=87ad4b45
Call-ID: qZBn6_uxAA7Fw1xm8yZulA..
CSeq: 2 BYE
Reason: SIP;text="Call terminated"
Content-Length: 0

12/18/2024 5:21:19.811 PM    L:380.3[EndCall:EndCall{268d1b19a61f}] onReadyToSend: Send Send Req BYE from 0.0.0.0:0 tid=ddf2d97144ad970e Call-ID=qZBn6_uxAA7Fw1xm8yZulA..:
BYE sip:[email protected]:5483 SIP/2.0
Via: SIP/2.0/ ;branch=z9hG4bK-524287-1---ddf2d97144ad970e;rport
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=7fba5e2b
From: "3CXUser"<sip:5151@3CXPublicIP>;tag=87ad4b45
Call-ID: qZBn6_uxAA7Fw1xm8yZulA..
CSeq: 2 BYE
Reason: SIP;text="Call terminated"
Content-Length: 0

12/18/2024 5:21:19.810 PM    Lsip{582819/380.1/UAS*[Connected&Neutral]} termination message:
InvTERM Recv Req BYE from 127.0.0.1:5080 tid=Pj56289f9a-36b3-433d-b012-656f7db95228 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj56289f9a-36b3-433d-b012-656f7db95228;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj56289f9a-36b3-433d-b012-656f7db95228;alias
Max-Forwards: 69
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8188 BYE
User-Agent: 3CXPhone for Android 20.2.0.13
Content-Length: 0

12/18/2024 5:21:19.810 PM    Lsip{582819/380.1/UAS*[Connected&Neutral]} sends: SendResp Send 200/BYE from 0.0.0.0:0 tid=Pj56289f9a-36b3-433d-b012-656f7db95228 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj56289f9a-36b3-433d-b012-656f7db95228;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj56289f9a-36b3-433d-b012-656f7db95228;alias
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8188 BYE
Content-Length: 0

12/18/2024 5:21:19.810 PM    L:380.1[Extn:5151{30d2657ddd2a}] onReadyToSend: Send Send 200/BYE from 0.0.0.0:0 tid=Pj56289f9a-36b3-433d-b012-656f7db95228 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj56289f9a-36b3-433d-b012-656f7db95228;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj56289f9a-36b3-433d-b012-656f7db95228;alias
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8188 BYE
Content-Length: 0

12/18/2024 5:21:16.598 PM    Lsip{582819/380.1/UAS*[Connected&Neutral]}: confirmed:
InvIN Recv Req ACK from 127.0.0.1:5080 tid=Pj0f3b88ce-6a52-4c3b-945d-37365dea5642 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj0f3b88ce-6a52-4c3b-945d-37365dea5642;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj0f3b88ce-6a52-4c3b-945d-37365dea5642;alias
Max-Forwards: 69
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8187 ACK
Content-Length: 0

12/18/2024 5:21:16.365 PM    Lsip{582819/380.1/UAS*[Sent200OK&AnswerSent]} Updated contact: <sip:[email protected]:5060>
12/18/2024 5:21:16.365 PM    Lsip{582819/380.1/UAS*[Sent200OK&AnswerSent]} Updating target <sip:6111@3CXPublicIP:0> with "" user = EndCall
12/18/2024 5:21:16.365 PM    C:380.1 Attached data:
====
ID = '1354'
dnid = '213'
callid = '380'
legid = '1'
refby = '0'
prevCall = '0'
prevLeg = '0'
initiator = '1'
devcontact = 'sip:[email protected]:5060;rinstance=0-4d34a0bc-7305-442f-8f19-bee66cde695e'
sdpoffered = '1'
partyConnection = '1355'
public_push_pickupinfo = '9983bcfd-9dee-4055-a9f6-faefc0b221f5;to-tag=3060a05b;from-tag=4418f879-a880-4125-a827-9bf836e49b87'
sip_displayname = '3CXUser'
lookup_displayname = '3CXUser'
tag3cx = '2ae98fd3-bd66-4436-8538-3535202d2f44'
msep_id = '[email protected]:5482'
sip_dialog_set_id = '9983bcfd-9dee-4055-a9f6-faefc0b221f503060a05b'
time = '(type = 5)'
statusEvent = '4'
recordstate = '0'
extnumber = '6111'
chid = 'dbdd12dc93010000_380'
public_push_callerid = 'EndCall'
public_push_callername = ''
 
V20, self-hosted

I configured an IP-based trunk between 3CX and Asterisk. I was working fine, but the trunk suddenly went down as if there was a firewall rule between the servers. Asterisk sees 3CX as an endpoint, but no traffic flows between them, and no logs are produced on the asterisk side (verbose). Outbound rules are in place, but 3CX acts as if the rules are not active. if I dial 6111, it should reach the asterisk server, but instead, it rings many times and ends with the message "destination is not available." I have removed and recreated the trunk, but that has not resolved the issue. 3CX can ping the Asterisk server by fqdn. The same Asterisk server has another IP-based trunk to a 2nd 3cx server, which is rock solid. Removing that trunk to test the problem child did not resolve the issue.

I am attaching some logs in hopes that it will reveal why 3CX is unhappy with the trunk:

The logs are from a web client and 3CX on Android:

Code:
12/18/2024 5:21:19.811 PM    Lsip{582909/380.3/Inv*[Connected&Neutral]} termination message:
InvTERM Send Req BYE from 0.0.0.0:0 tid=9bf583107a19f439 Call-ID=qZBn6_uxAA7Fw1xm8yZulA..:
BYE sip:[email protected]:5483 SIP/2.0
Via: SIP/2.0/ ;branch=z9hG4bK-524287-1---9bf583107a19f439;rport
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=7fba5e2b
From: "3CXUser"<sip:5151@3CXPublicIP>;tag=87ad4b45
Call-ID: qZBn6_uxAA7Fw1xm8yZulA..
CSeq: 2 BYE
Reason: SIP;text="Call terminated"
Content-Length: 0

12/18/2024 5:21:19.811 PM    Lsip{582909/380.3/Inv*[Connected&Neutral]} sends: SendReq Send Req BYE from 0.0.0.0:0 tid=ddf2d97144ad970e Call-ID=qZBn6_uxAA7Fw1xm8yZulA..:
BYE sip:[email protected]:5483 SIP/2.0
Via: SIP/2.0/ ;branch=z9hG4bK-524287-1---ddf2d97144ad970e;rport
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=7fba5e2b
From: "3CXUser"<sip:5151@3CXPublicIP>;tag=87ad4b45
Call-ID: qZBn6_uxAA7Fw1xm8yZulA..
CSeq: 2 BYE
Reason: SIP;text="Call terminated"
Content-Length: 0

12/18/2024 5:21:19.811 PM    L:380.3[EndCall:EndCall{268d1b19a61f}] onReadyToSend: Send Send Req BYE from 0.0.0.0:0 tid=ddf2d97144ad970e Call-ID=qZBn6_uxAA7Fw1xm8yZulA..:
BYE sip:[email protected]:5483 SIP/2.0
Via: SIP/2.0/ ;branch=z9hG4bK-524287-1---ddf2d97144ad970e;rport
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=7fba5e2b
From: "3CXUser"<sip:5151@3CXPublicIP>;tag=87ad4b45
Call-ID: qZBn6_uxAA7Fw1xm8yZulA..
CSeq: 2 BYE
Reason: SIP;text="Call terminated"
Content-Length: 0

12/18/2024 5:21:19.810 PM    Lsip{582819/380.1/UAS*[Connected&Neutral]} termination message:
InvTERM Recv Req BYE from 127.0.0.1:5080 tid=Pj56289f9a-36b3-433d-b012-656f7db95228 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj56289f9a-36b3-433d-b012-656f7db95228;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj56289f9a-36b3-433d-b012-656f7db95228;alias
Max-Forwards: 69
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8188 BYE
User-Agent: 3CXPhone for Android 20.2.0.13
Content-Length: 0

12/18/2024 5:21:19.810 PM    Lsip{582819/380.1/UAS*[Connected&Neutral]} sends: SendResp Send 200/BYE from 0.0.0.0:0 tid=Pj56289f9a-36b3-433d-b012-656f7db95228 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj56289f9a-36b3-433d-b012-656f7db95228;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj56289f9a-36b3-433d-b012-656f7db95228;alias
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8188 BYE
Content-Length: 0

12/18/2024 5:21:19.810 PM    L:380.1[Extn:5151{30d2657ddd2a}] onReadyToSend: Send Send 200/BYE from 0.0.0.0:0 tid=Pj56289f9a-36b3-433d-b012-656f7db95228 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj56289f9a-36b3-433d-b012-656f7db95228;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj56289f9a-36b3-433d-b012-656f7db95228;alias
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
Contact: <sip:[email protected]:5060>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8188 BYE
Content-Length: 0

12/18/2024 5:21:16.598 PM    Lsip{582819/380.1/UAS*[Connected&Neutral]}: confirmed:
InvIN Recv Req ACK from 127.0.0.1:5080 tid=Pj0f3b88ce-6a52-4c3b-945d-37365dea5642 Call-ID=9983bcfd-9dee-4055-a9f6-faefc0b221f5:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---Pj0f3b88ce-6a52-4c3b-945d-37365dea5642;rport=5080
Via: SIP/2.0/UDP 3CXAPPUser:10028;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985
Via: SIP/2.0/TCP 127.0.0.1:50195;rport;branch=z9hG4bKPj0f3b88ce-6a52-4c3b-945d-37365dea5642;alias
Max-Forwards: 69
Record-Route: <sip:[email protected]:5080;user=proxy;uri=clnt.0-4d34a0bc-7305-442f-8f19-bee66cde695e_98749985>
To: <sip:6111@3CXPublicIP;tag3cx=2ae98fd3-bd66-4436-8538-3535202d2f44>;tag=3060a05b
From: "3CXUser" <sip:5151@3CXPublicIP>;tag=4418f879-a880-4125-a827-9bf836e49b87
Call-ID: 9983bcfd-9dee-4055-a9f6-faefc0b221f5
CSeq: 8187 ACK
Content-Length: 0

12/18/2024 5:21:16.365 PM    Lsip{582819/380.1/UAS*[Sent200OK&AnswerSent]} Updated contact: <sip:[email protected]:5060>
12/18/2024 5:21:16.365 PM    Lsip{582819/380.1/UAS*[Sent200OK&AnswerSent]} Updating target <sip:6111@3CXPublicIP:0> with "" user = EndCall
12/18/2024 5:21:16.365 PM    C:380.1 Attached data:
====
ID = '1354'
dnid = '213'
callid = '380'
legid = '1'
refby = '0'
prevCall = '0'
prevLeg = '0'
initiator = '1'
devcontact = 'sip:[email protected]:5060;rinstance=0-4d34a0bc-7305-442f-8f19-bee66cde695e'
sdpoffered = '1'
partyConnection = '1355'
public_push_pickupinfo = '9983bcfd-9dee-4055-a9f6-faefc0b221f5;to-tag=3060a05b;from-tag=4418f879-a880-4125-a827-9bf836e49b87'
sip_displayname = '3CXUser'
lookup_displayname = '3CXUser'
tag3cx = '2ae98fd3-bd66-4436-8538-3535202d2f44'
msep_id = '[email protected]:5482'
sip_dialog_set_id = '9983bcfd-9dee-4055-a9f6-faefc0b221f503060a05b'
time = '(type = 5)'
statusEvent = '4'
recordstate = '0'
extnumber = '6111'
chid = 'dbdd12dc93010000_380'
public_push_callerid = 'EndCall'
public_push_callername = ''
In 3CX v20 using Bridge to connect with asterisk/elastic does not work. Use the worldwide provider and one of the available templates.
At the moment I see bye in the traffic from user 5151.
Also another suggestion is to register a third party softphone on the computer behind a firewall and with that check that the network is ready.
 
  • Like
Reactions: raymond.norton
Ok. I will try a different template. This is a full production install, so the network is good.
 
I had initially set up the trunk using the generic ip-based template. it worked fine for a week but then stopped passing traffic. I did follow the recommended advice and moved to a worldwide template, which worked for a single call and then dropped off, the same as the previous configuration. I resolved the issue by adding qualify_frequency=60 on the asterisk side, which I am guessing would have fixed the original issue without changing templates. Problem solved.
 

Latest Posts

Members Online Now

Forum statistics

Threads
111,831
Messages
589,276
Members
164,660
Latest member
RJenkinsROCK