Assistance with Migrating SIP Trunks from chan_sip to PJSIP in FreePBX

Hello!

I currently have FreePBX 14 installed and would like to upgrade to FreePBX 17. The issue is that my SIP trunks are configured via chan_sip, and I’m unsure how to properly migrate them to PJSIP.

Current chan_sip Configuration:

Outbound Calls:

[trunk]  
type=friend  
transport=udp  
secret=467546  
port=5060  
nat=force_rport,comedia  
insecure=port,invite  
host=70.1.1.1  
fromuser=467546  
fromdomain=10.171.55.1  
dtmfmode=inband  
disallow=all  
directmedia=nonat  
defaultuser=467546  
context=from-pstn-toheader  
canreinvite=no  
allow=alaw&ulaw&g729

Inbound Calls:
Registration string:


 467546:[email protected]/467546

Issue When Switching to PJSIP:

A year ago, I attempted to configure this trunk via PJSIP but encountered the following problem:

  • The trunk would register but disconnect after 10–30 seconds without establishing a connection.
  • To restore connectivity, I had to modify the settings and save them repeatedly.

Request:
Could you please help me correctly migrate the configuration from chan_sip to PJSIP? If I made any mistakes in the setup, kindly point them out.

Thank you in advance for your assistance!

You haven’t provided the configuration that failed, or identified the system at the other end.

Why do you have insecure=port? (Although the simplest pjsip configuration tend to imply this.)

What do you think defaultuser does?

The combination of dtmfmode=inband and allow=g729 doesn’t make sense, as G.729 will not reliably carry DTMF.

The first interesting time is 32 seconds. If things are failing as early as 10 seconds, you need to provide the logging showing the cause of the disconnect. (I suppose you may have a 10 second timeout, on the router, for dynamic port forwarding.)

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