I am having trouble setting something up (or maybe I just don’t know how to set it up). Here’s the issue:
I have FreePBX (Asterisk Based) set up in our office with Nextiva for our SIP Trunking service. We have a group trunk from them with 4 trunks. We also have 2 phone numbers attached to the trunk group. Not sure how to manipulate how these numbers are set up, but the way they are set up now is no matter which of the 2 numbers they call it’ll ring our phones. I would like to set it up so that when one of the phone numbers rings, it gets sent to only one of our IP phones. And for that phones outbound caller id to be the same number as well. I thought it would be set up in Inbound routing but it doesn’t do anything when i set up a new inbound route with the DID number to that ext. Any suggestions?
Hope its clear, if not lemme try to explain with the set up we want.
We have a trunk group service with 2 numbers attached to it (818) 555-5555 & (818) 666-6666. We have about 8 ip phones in the office. I need 7 phones to ring when (818)555-5555 is dialed in as well as have that as the outbound caller id on those 7 phones; and 1 phone to ring when (818)666-6666 is dialed with that being its outbound CID.
You filter by DID. Check the DID column in the CDR to see what Asterisk sees when an inbound call arrives and then construct your inbound routes with DID to match exactly.
I checked the log and for some reason whenever I call the second number, it comes it as the same number no matter what so I cant set up a inbound route for it. When I call in 81855555555 the log shows in the DID was 8186666666. I called my SIP Provider and they said it must be configured on the PBX side… any ideas?
This should not be hard to troubleshoot. At the Asterisk command prompt, it you are using a pjsip trunk, type pjsip set logger on
it it’s a chan_sip trunk, the command is sip set debug on
Then, make a test call to 8185555555 and look at the SIP INVITE from the provider in the Asterisk log.
If it says e.g. INVITE sip:[email protected]
then your Inbound Route should specify 18185555555 in the DID field.
If it says e.g. INVITE sip:[email protected]
then look at the To: header to see whether 8185555555 is there.
If it is, try changing the context for the incoming trunk to [from-pstn-toheader]
If the To: header also has 8186666666 then either you have set up something wrong on the Nextiva portal, or they have configured something wrong for you. Show them the SIP and they should be able to straighten it out.
I gave that a shot but when i dial in the test call, so many things pop up in the command prompt to the point where i can’t scroll all the way back up, any ideas? I’m also not sure exactly where to look for the invite part?
Still can’t seem to figure it out. In all the logs i check all I’m seeing is one number no matter which DID i dial in. SIP Provider is insisting it’s on the pbx side… any one have any ideas what it could be i got to change?
This is not a complex problem. Look in the log for an entry that starts
INVITE sip:[some number]@[hostname]
that comes from the provider.
Following the INVITE line, there are some headers, including From: and To:
If the number you are calling into does not appear on the INVITE line nor in any header, the trouble is not on the PBX side. Either you can fix this in the settings on the provider portal, or you should open a ticket with them and include the SIP packet showing that the dialed number is not present.
If the dialed number appears in the request line, setting the Inbound Route to match its format should work.
If the dialed number appears in To:, the change in my previous post should work.
If the dialed number appears in some other header, please post details.
the To: header is correct, that’s the correct number…what am i setting up wrong in the inbounf route? I changed the context setting in the inbound trunk but it didnt change anything