Freepbx to Panasonic TDE pjsip trunk 30 seconds issue

I setup a pjsip trunk between freepbx and TDE600 over a site-to-site VPN (two different subnets)
Calls are OK but drop after 30 seconds.
Remote subnet (TDE one) is declared into asterisk sip settings as local network.
That’s what happens at disconnection:

– Channel PJSIP/TDE-0000000d left ‘simple_bridge’ basic-bridge <3a2ad60e-9338-4d4d-ace9-4be2660368ce>
– Channel PJSIP/207-0000000c left ‘simple_bridge’ basic-bridge <3a2ad60e-9338-4d4d-ace9-4be2660368ce>
== Spawn extension (macro-dialout-trunk, s, 33) exited non-zero on ‘PJSIP/207-0000000c’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 799397, 12) exited non-zero on ‘PJSIP/207-0000000c’
– Executing [h@from-internal:1] Macro(“PJSIP/207-0000000c”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/207-0000000c”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/207-0000000c”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“PJSIP/207-0000000c”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘PJSIP/207-0000000c’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/207-0000000c’
– PJSIP/207-0000000c Internal Gosub(crm-hangup,s,1) start
– Executing [s@crm-hangup:1] NoOp(“PJSIP/207-0000000c”, “Sending Hangup to CRM”) in new stack
– Executing [s@crm-hangup:2] NoOp(“PJSIP/207-0000000c”, “HANGUP CAUSE: 16”) in new stack
– Executing [s@crm-hangup:3] ExecIf(“PJSIP/207-0000000c”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
– Executing [s@crm-hangup:4] NoOp(“PJSIP/207-0000000c”, “MASTER CHANNEL: 1688538323.13 = 1688538323.13”) in new stack
– Executing [s@crm-hangup:5] GotoIf(“PJSIP/207-0000000c”, “0?return”) in new stack
– Executing [s@crm-hangup:6] Set(“PJSIP/207-0000000c”, “__CRM_HANGUP=1”) in new stack
– Executing [s@crm-hangup:7] AGI(“PJSIP/207-0000000c”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
– <PJSIP/207-0000000c>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
– Executing [s@crm-hangup:8] Return(“PJSIP/207-0000000c”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/207-0000000c’
– PJSIP/207-0000000c Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

that seems a normal clearing, so I suppose issue is on TDE side.

Any suggestion ?

Further investigation :

I suppose ACK transmitted by freepbx is NOT received by remote panasonic pbx

<— Transmitting SIP request (396 bytes) to UDP:192.168.10.1:35060 —>
ACK sip:[email protected]:35060 SIP/2.0
Via: SIP/2.0/UDP MY_PUBLIC_IP_ADDRESS:5060;rport;branch=z9hG4bKPj27b575f2-0688-4a8e-afa3-362b396918f5
From: “Office2” <sip:[email protected]>;tag=7fa6eeaf-c64b-4802-97ba-e46f1536ca3e
To: <sip:[email protected]>;tag=11
Call-ID: 9212007e-fe5f-454a-a3aa-59e5e82b1a79
CSeq: 7043 ACK
Max-Forwards: 70
User-Agent: FPBX-16.0.40.4(16.30.0)
Content-Length: 0

192.168.10.1 is Panasonic TDE LAN ip address
172.16.200.200 is Freepbx
10.10.31.1 is the address freepbx trunk points to (panasonic) further natted into 192.168.10.1

Also I don’t understand why ACK is sent VIA freepbx real public ip address (I think the one declared/detected in asterisk sip settings ->NAT settings).

That would typically happen if your local networks list was incomplete. However,

Double NAT is always going to be a problem. Ideally the other side should send contact headers that compensate for the NAT, but setting the rewrite contact option might help work round this.

Note that Asterisk 16 no longer has routine support and is fast coming up on end of life.

Well , NAT is a bad beast if you don’t know how to tame it :upside_down_face:

I just enabled nat traversal with pre-nat ip address as outgoing one on Panasonic machine to solve issue.

I’ll switch to a newer asterisk version then.

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