(SOLVED) How to add SIP virtual DID?

First off am running AsteriskNOW ver. 1.5 with updated asterisk to 1.6 on a Dell PowerEdge 1950. We are trying to upgrade our production server from an older version of asterisknow (before FreePBX), and am having some issues.

We currently have 4 trunks from Vonage with 3 addition Virtual DID numbers.

I see a place to add Zap Channel DIDs but how about SIP DIDs?

Do I have to place these within an incoming route and then specify from there where the destination will go?

Or how about an outgoing route from that DID?

Can I make calls from a Virtual DID, or will it show from the trunk that is giving out the DID?

Any help with this would be greatly appreciated, as it just makes me very confused.

Thanks in advance,



In case anyone else seems to be having this problem as well, though it doesn’t appear so.

I had to write a custom script to extensions.custom.conf

exten => 18*********,1,Set(DNIS=${SIP_HEADER(TO):5:11})
exten => 18*********,n,Goto(from-trunk,${DNIS},1)

that seemed to get it working!

I’ll assume the 3 “virtual” DID numbers are Vonage soft phone accounts while your Vonage “trunks” are off the Vonage analog terminal adapter and connected to trunk ports on the PC.

Check out the “Inbound Routes” on FreePBX. That is where you should put the inbound DID number for SIP trunks and save yourself a lot of custom programming. The softphone accounts would be registered as trunks on your system.

If these are 800 numbers with DNIS, there is no built-in way to extract the DNIS so your manual way would be required.

Vonage has a help category about just this topic:

Google is a friend to those who seek knowledge.

Your assumption is correct in that they are provided to us by Vonage and these are are not 800 numbers nor are they for the softphone.

But originally had them within the inbound routes. But from the asterisk verbosity we could tell that the call was being routed through the trunk and not the virtual. The custom code helped in finding the correct route.