I’m migrating my telephony from a commercial platform to FreePBX.
All registered trunks from various providers migrated fine.
There’s still a toll-free number that we received through a trunk without registration, and I can’t get this trunk up and running.
I’ve created a routing for it.
The provider says they’re sending me traffic, but I’m not receiving anything in return.
The provider sent me a sample setup for pure Asterisk as support, but I have FreePBX 16, and there’s no field to enter a portion of the Asterisk configuration. There are only fields for entering specific values, but not all the necessary ones.
I need help: how do I implement the following configuration on FreePBX 16?
Or can I enter it directly into the Asterisk configuration?
Won’t FreePBX overwrite the Asterisk configuration I’ve written?
This doesn’t look like pure Asterisk; it looks like an attempt to give a FreePBX configuration for the, obsolete, chan_sip driver.
It also contains obvious mistakes, which make me think it cannot be trusted, specifically:
Only one host address is possible in chan_sip. (chan_pjsip allows multiple source addresses, but, I think is still restricted to one destination.)
This is ignored without a secret. insecure=port is rarely needed, unless using TCP, or TLS, and tends to indicate the starting point for the configuration was copy and paste, without considering the meaning.
type=friend was over-used, and needs a specific section name, to give the user name. That section name needs to appear in the From header, from the provider, which is rather unlikely, otherwise this just degenerates to type=peer, with an added security vulnerability.
I’m fairly sure that this was never a valid alternative. The deprecated form of this is canreinvite, and the official current one is directmedia. Turning this on for a provider is unusual, and most FreePBX configurations do things that make it ineffective, as FreePBX tends to need access to the media stream. It isn’t going to necessary to fix your problem.
I think this will only have an effect if you used domain names, rather than IP addresses, and I believe chan_sip support for this is limited.
Generally, if you are using the two sections chan_sip method, you need to duplicate more settings than are shown here, between the two. chan_sip doesn’t always need the in and out hack, but chan_pjsip can handles cases where the former needs it, but without two sections.
I would remove g729, unless you have a specific need for it.
You’ve already said that there is no registration. That configuration indicates there is no authentication. I’d try the chan_psjip configuration, with server set to “xxx.xxx.xxx.xxx”, and match/permit set to “xxx.xxx.xxx.xxx,xxx.xxx.xxx.yyy”. Set both registration and authentication to none.
If it doesn’t work, provide us with the full log, and use the cli command “pjsip set logger on”, to allow capture of the SIP exchange.
If you think “reinvite” will be needed, enable direct media, however, if it is really needed, you are going to have to disable lots of features.
Thanks to everyone who responded! I’m considering switching providers, but only if all else fails.
The provider sent me a sample configuration for FreePBX, but it uses the chan_sip trunk, while FreePBX 16 only has chan_pjsip. I don’t understand how to implement this configuration on my version, since I don’t have the necessary settings fields.
Chan_Sip is just too old to be reliable/secure. If you are already thinking on changing suppliers, do yourself a favor and go ahead. You can get a pjsip trunk and redirect the current numbers to the new provider while you wait for a port to happen. Either that, or the supplier gets you a pjsip trunk to configure.
TLDR: Do yourself a favor and forget about chan_SIP
I found out that I can enable chan_sip in FreePBX 16. If I enable it, will it break the settings I made earlier?
I understand that this is an outdated technology, but I want to get a working trunk on chan_sip, look at the Asterisk configs and try to replicate this result using chan_pjsip.
Just restart asterisk after enabling and it should be fine as far as I know. Do keep a record or a backup just in case.
Regarding the “replicate” part, pjsip is way more advanced and has many times more the amount of asterisk modules associated with it. Configuring is quite easy though, just needing to set a couple options depending on each provider, but they should help with that.
Okay, I found the port field in the trunk settings. One last question remains: can I set the same port, 5060, for both the chan_sip and chan_pjsip trunks?
In Asterisk SIP Settings, the local pjsip port is called Port to Listen On and the local chan_sip port is called Bind Port.
However, your thread is titled “Trunk without registration”, while the chan_sip config you got from provider includes a registration string. Which is it?
On my old telephony platform, it’s a trunk without registration. All the configs in this thread are what the provider’s support team sent me. I’m trying to figure this out.
Unfortunately, the provider’s support is not very supportive.