Hi, I’m using FreePBX 126.96.36.199 and I’m having a little difficulty. I’m sorry if this topic has been covered before, but I did browse the forum but I couldn’t find anything.
My problem is that I have multiple trunks from the same sip trunk supplier however when I dial a number that is associated to one of the trunks that isn’t the first trunk to register the call appears to come in on the first trunk.
I have done a little bit of exploration into the issue and I believe this is because FreePBX doesn’t make any differentiation between trunk names it’s all down to IP address. Is this correct? if so is there anyway to trick it into thinking that it is talking to a different IP address?
I don’t want to change the way I have set it up with multiple trunks per installation unless there is no other way.
FreePBX has nothing to do with the trunks, that’s all Asterisk.
To understand this you need to understand SIP peers in Asterisk. Asterisk will match on the first peer that matches the settings in the peer. There is also a clear order of precedent in what fields are matched.
Please review Asterisk SIP info at: http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf
The latest formal Digium document: http://www.asterisk.org/doxygen/trunk/Config_sip.html
For your specific install what field differentiates the trunks you are creating?
Thank you for the links and appoogise for confusing FreePBX & Asterisk.
I am still very new to Asterisk and so whilst I am sure that the links are very informative for those that have a good understanding, I am still in the dark.
Here are 2 of the offending trunks, all calls appear to come in over the first trunk even though my SIP supplier insists they are coming in over seperate trunks. Is there a simple setting to add in the register string that will solve my issue?
There is no simple setting nor any way around not understanding what you are trying to do.
I can tell you that it is matching the host and secret. You don’t even need username the way you are setting this up.
Also you have g.729 enabled, do you have g.729 licenses if not g.729 calls will fail. I also can’t imagine you need ilbc.
What I want is calls that come in over number range 1 that is associated to trunk 1 to be shown against that incomming trunk
Calls that are against number range 2 which are associated to trunk 2 to be shown against that trunk.
Currently all calls that come in are shown against trunk 1 no matter what number range is dialed.
My sip supplier is routing the calls over seperate trunks, it’s just my asterisk system is lumping them all togeather on trunk 1.
I had the same issue where I have multiple accounts with a provider (SIPStation) as we need different e911 for 3 different offices. I am doing call concurrency analysis on the CDR, and kept thinking it was a bug in the code that showed 2 of the 3 trunks with no calls before I smartened up and looked at the asterisk logs and saw that it is logging all inbound calls from these account trunks to only one of the trunks.
I believe what is happening is that since the 3 trunks are from the same IP, asterisk does not (for logging and CDR) differentiate between the trunks and (in my case) uses the trunk that is the last one(of the 3) specified in the SIP config file.
Asterisk should be able to use different ports for different peers. This would allow to distinguish different peers coming from the same IP and port. This is currently not possible. Somebody should put a feature request over at asterisk.org.