I have a provider that wants me to setup 2 trunks to 2 different IP addresses. Because we have a direct connection to them the IP addresses are not accessible over the Internet or via a public FQDN.
Here is what they want for the registration string.
However to make FreePBX register to the correct IP address I have to enter voip.provider.tld in the hosts file and enter the IP address for the Trunk SBC I am trying to connect.
Is there any way to do that without using the hosts file? Like overwrite where the registration is going on a per Trunk setting but include the host domain still?
One trunk would register to voip.provider.tld with one the primary IP address and the other trunk would register to voip.provider.tld with the backup IP address.
Username: TN
Auth username: TRUNKGROUPID
Secret: PASSWORD
Authentication: Ooubound
Registration: Send
SIP Server: voip.provider.tld
SIP Server Port: 5100
Outbound Proxy: sip:1.2.3.4:5100\;lr\;hide
(replace 1.2.3.4 with provider IP address)
Contact User: TN
From Domain: voip.povider.tld
Depending on how they want outbound caller ID to be sent, you may need to set From User and/or Send RPID\PAI.
If you have trouble registering, turn on pjsip logger and paste the Asterisk log for a registration attempt (and any replies) at pastebin.com and post the link here.
If registration is successful but calls fail, paste the Asterisk log for a failing call, including pjsip logger.
“Registration string” is a chan_sip concept that is not relevant for this system.
The trunk is showing as up but no inbound calls are making it.
I do not think the registration is working correctly. Maybe its because the FREEPBX system is behind a NAT statement because the provider required the connection to come from a specific IP range?
There still seems to be some options wrong/missing. We have some extra TRUNKGROUPID that gets passed in the string when its setup using chan_sip.
I am confused about the Route headers in the OPTIONS request. The Outbound Proxy setting should have backslash semicolon in two places. Did you change this for some reason?
Please explain your network hardware setup. Is the SBC on your site? If so, why is there NAT?
Because you aren’t using chan_sip?
Do you mean “pjsip show registrations?”
When I try something similar with JPSIP I get a status of rejected.
[2024-03-22 15:12:10] WARNING[123263]: res_pjsip_outbound_registration.c:1055 handle_registration_response: '404' fatal response received from 'sip:SBCIP:5100' on registration attempt to 'sip:TN@SBCIP:5100', retrying in '30' seconds
Must have something wrong still. It is missing the :TRUNKGROUPID: part and the username does not have that @ in it. When I try to enter as that I get an error that the URI is invalid.
Which is it?
In the working chan_sip case, use sip debug to look at the REGISTER request and report what appears in the From and To headers, and the username parameter in the Authorization header.
Yes, sorry that is a little confusing. They want the username to include the @voip.provider.tld.
Using the @ in the username part of the register string allowed me to register to the two different SBC IP addresses and not have to modify the hosts file as they recommended. They still expect the password and TRUNKGROUPID but I have not figured out how to do all that using the UI for pjsip.