2 sip trunks route to 2 extensions


(Rob) #1

Hi all,
I have two sip trunks setup in FreePBX. They both connect to sipgate.co.uk and have their own phone numbers. How can I configure the incoming route to route each sip trunk to a different internal extension? I have 100 and 200 configured as internal extensions and would like to route all incoming calls from sip trunk 1 to ext 100 and all incoming calls from siptrunk 2 to ext 200.

Thanks,


#2

Don’t try and route trunks, route the individual DID’s (DDI’s) as you want.


(Rob) #3

ok, but I see in the full.log the incoming info as the username from the sip trunk. Could I define this as a DDI then route the incoming extension ?


(Rob) #4

right got it sorted. Thanks. I needed to use the _username for the incoming DDI. Cheers :slight_smile:


(Lorne Gaetz) #5

With this setup, you won’t get the DID logged in the CDR for inbound calls. It’s possible that your provider sends the DID in the to header, in which case your trunk context can be set to from-pstn-toheader to get it. Otherwise you can do something like this: https://community.freepbx.org/t/did-from-provider-breaks-incoming-routes-did-matching/50338/6?u=lgaetz