Get help with installing, upgrading and running a PBX such as Asterisk.
User avatar
By Mike999
Posts Avatar Topics
I have 2 Voipfone accounts with a number on each account. My PBX is Asterisk/FreePBX 13

Both Trunks are configured and working fine for calls in and out.

However I would like to route calls from one of the numbers (which is on a separate account) to a different destination than the other number. Currently they go through the same inbound route with a blank DID set.

I have tried creating an inbound route with DID set as the voipfone account number (8 digit beginning with 3) but it does not match. It's almost like the DID is not being passed through. I have tried using SIP (with a registration string) and also PJSIP. I have tried various context headers, fromvoipfone, from-pstn and from-pstn-toheader.

Anyone any idea why this may not be working. If I look in the CDR reports of inbound calls, it simply shows the DID as 's'

User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
Voipfone don't pass the DID through (unless something has changed recently) so set it all up as follows...

Trunk Name: 3xxxxxxx
Outbound CallerID: by-3xxxxxxx

Trunk Name: 3xxxxxxx
secret=enter your voipfone password here

Register String: 3xxxxxxx:enter your voipfone password

Description: 3xxxxxxx
DID Number: 3xxxxxxx

Now under the Set Destination section at the bottom enter the route destination (e.g. Extension 200), save the changes and then apply them. Do this for both Voipfone accounts. :)

3xxxxxxx would be your Voipfone account number obviously... Replace "enter your voipfone password here" with your real Voipfone account password.
User avatar
By VoipIT
Posts Likes Avatar Topics
Whilst that's a very good general setup, it sounded from your first post like you are already happy with the in/out config apart from the routing.

sip.conf (or indeed pjsip.conf) is not usually your friend for routing by extension as you will end up identifying voipfone either as anonymous or by ip. However in the dialplan you can use:
Code: Select all
exten => _30000000*200,1,Goto(FredsPhone,s,1)
exten => _30000000*201,1,Goto(BillsPhone,s,1)
or the freepbx equivalent (I am hazy on FreePBX as I got fed up with it - if you can't do any of these things directly in freePBX then use its _custom context files to make your voipfone in context and feed it back into the context it wants you to use). Post if you are stuck on this and I will dig out how we used to do it a long, long time ago ;-)

Another cool trick with voipfone is to set your inbound numbers to 'Name & calling number' in 'Inbound Number Setup' then apply a label to each line in the Name box (e.g. BillsLine) - this allows you to test incoming calls using ${CALLERID(name)}=BillsLine and route accordingly (again I fear this will need some real code rather freePBX clicks) or an even simpler:
Code: Select all
exten => _30000000*20X,1,Goto(trunk-in-context,from-${CALLERID(name)},1) 
exten => from-BillsLine,1,Playback(en_GB/tt-monty-knights)
exten => from-FredsLine,1,Hangup()
You could almost certainly manage the trunk-in-context using the standard freePBX tools...(but don't, vim is your friend)

My HT801 was configured for another UK provider. I rea…

Sip to PSTN lines gateway

Hi All I am looking for a gateway that will allow a le…

Hi all! We have Cisco 7941 phones that we are battlein…

TalkTalk -residential VOIP

Do not touch it. No incomming caller ID no call rou…

Sign up for VIP membership