I am kinda new on this forum, and on the whole freepbx/asterisk stuff.
I have setup a asterisk/freepbx installation with 3 hardphone and 1 softphone. I have setup 2 trunks:
voipcheap: will be used for outbound calls only
localphone: will be used for inbound calls only (DID’s)
I am not using any classic phonelines.
With localphone, I ordered 1 DID. I made a new (temp) inbound routing that routes al inbound calls to extension 602.
I want to order another DID with localphone, and want to route as following:
DID1 to ring group 600 (contains 601,602 and 603)
DID2 to extension 602.
When I order another DID, wil asterisk then “know” wich DID is used when someone calls me? Because at localphone, the DID will be connected with my VOIP number (6364612).
Or is the easiest way to create a second account at localphone?
I know that is possible with inbound routing, but I’m not shure it can be done with the LocalPhone DID’s.
My inbound phone number is like +3238082288. But when I receive the call in FreePBX, I only see my VOIP number (6364612) in the logs.
So when I order a second DID, my guess is that in FreePBX, bot DID numbers will only show up as “6364612”, because Localphone is not sending the DID with incomming call’s.
If that is the fact, I guess FreePBX won’t know the difference between the 2 DID’s and I won’t be able to route them separate?
check the SIP header of the inbound DID. Some providers put the DID in the TO: field. If that is the case, you can extract and route on it but that requires you run it through a context that will do that.
The from-pstn-toheader context didn’t work for me because my TO header was simply s@myip. My DID was in another header, though, called “x-caller-DNIS”.
My provider is Teliax. Your provider may put this information in a SIP header of a different name, such as “x-caller”. You can find it by turning SIP debug on (“sip set debug” on asterisk CLI) and placing a call to your number and subsequently grepping for your number in the log (“tail /var/log/asterisk/full -n 50000 |grep 8005551212” in a linux shell).
Once you know the header name, create a new context in your extensions_custom.conf like the below, but be sure to change the name of the context and the name of the SIP header appropriately.
Last, direct your incoming calls to that context by adding “context=custom-fix-teliax-DID” to your peer details of your trunk configuration.
Disclaimer: I am by no means an expert, so if Philippe replies and says this is a bad idea, believe him, not me. That being said, this solved my problem and works great for me with no side effects that I have noticed.
Hello
could someone troubleshoot why my localphone account is not receiving calls?
but it seems like I give up, anyone here with suggestions on how to get the incoming work. The outgoing is working fine. Here is my Configuration for the