View Single Post
Unread 10-13-2006, 11:02 AM   #15
Join Date: Sep 2006
Posts: 94
Thanks: 1
Thanked 8 Times in 8 Posts
ptruman is on a distinguished road

Ok, I've now subscribed to in the UK, for cheap PSTN calls.

As a result, I've decided to hook into SipBroker for ENUM lookups, so I only use PSTN when I have to...

Again, this is on my SPA3102.

My new dialplan is thus :

The ATA is registered with, and gw1 is setup as Voxalot

Chunk by chunk :


I've setup 764 as a "dialplan" at Voxalot, for a friends PBX. I want to be able to dial *xxx (where xxx is the SIP shortcode in SipBroker/Voxalot), but Voxalot passes anything with a * direct to SipBroker - and 764 is my friends exchange, and not recognised by SipBroker. This bit removes the leading * when it's dialled, and fires 764xxxx (4 digit extension) at Voxalot. It also removes any trailing # pressed - still immediately connecting, but not sending the # which confuses Voxalot


When going "off-hook" on Line1, pressing # will immediately present a PSTN dialtone. This is to override any VOIP dialling and get an outside line if necessary.

Route 999 straight to PSTN immediately. For emergency calls.

And now the SipBroker bits
If you've not already gone to look at it, go check and If someone (like I have) registers their PSTN number with e164, they can point it to a SIP number, and VOIP->PSTN callers will actually make a VOIP->VOIP call.


In the UK, starting a number with 00 means it's international. This removes the 00, leaves the rest of the number intact, and passes it up to SipBroker. It also removes any trailing # pressed - still immediately connecting the call.

The SPA3102 uses # as a "I've finished dialling" message, but still sometimes sends it if pressed. I don't have to press #, but if I do, it does what it should, but also ensures it isn't passed along.


This handles local calls. If you're in the UK and not in Birmingham, replace 121 with your local area code (less the leading zero). If your local numbers are not 7 digits long, change the number of xs accordingly. The dialplan prepends 44<area code> on the number, and fires it to SipBroker as above, again dealing with #s - no local numbers should start with 0, so this doesnt have anything to remove them.


This handles national calls, detected by dialling 0<digit>. Any leading zero is removed and replaced with 44, leaving the rest of the number intact. Again, this deals with #s and passes to SipBroker.


The SPA3102 has *xx codes used for altering behaviour - *18 for example turns secure calls on. As I want to use * for calling via Voxalot, I use this dialplan to detect *xx# - however this again removes the #, dials the code, and presents me a dialtone so I can dial as normal.

I can go off hook and dial *18# and then dial a full number, or I can dial *18#<full number> and go off hook.

Interestingly, although this chunk of the dial plan is near the end, the , allows a new dialstring, which still checks the other dial plans - all calls route as they should.


Route anything else starting with * via Voxalot


The same, forcing # removal - I can remove the previous rule I just haven't yet - this was there to check it behaved as intended.


Route anything else via

In a nutshell, I can now use the phone for PSTN calls, and they route over for 1 ppm or 2 ppm depending on time of day. However, the SipBroker bit means if friends/family have a SIP address, they can register @ , and I will connect to them for free - and don't have to dial any other numbers. Any number not found in SipBroker just routes back to my provider and out.

Hopefully that will help someone out
ptruman is offline   Reply With Quote