Adrian Merwood
2008-Mar-14 07:29 UTC
[asterisk-users] Dialing patterns and "GSM" format numbers
H, Just a quick question that has been bugging me for a while..... Most of my address book phone numbers are stored in the format: +<country code><area code minus the 0><local number> i.e. +XXXXXXXXXXXX In my asterisk (Trixbox) server I would like to be able to dial numbers from my address book using HUD or the SIP client on my 3G phone using numbers in this format. On asterisk I would like to strip of the + and replace it with an international dialing prefix. Secondly (in the future) I would like to strip off certain country codes and replace them with a local dialing prefix. Can anyone help me figure ths out? Thanks, Adrian
Horwich IT Services (Godwin Stewart)
2008-Mar-14 08:48 UTC
[asterisk-users] Dialing patterns and "GSM" format numbers
On Fri, 14 Mar 2008 07:29:33 +0000, Adrian Merwood <adrian at adrian-merwood.net> wrote:> Secondly (in the future) I would like to strip off certain country > codes and replace them with a local dialing prefix. > > Can anyone help me figure ths out?This might get you started: http://howto-pages.org/asterisk -- Godwin Stewart - Horwich IT services
Adrian Merwood
2008-Mar-14 11:39 UTC
[asterisk-users] Dialing patterns and "GSM" format numbers
Horwich IT Services (Godwin Stewart) wrote:> On Fri, 14 Mar 2008 07:29:33 +0000, Adrian Merwood > <adrian at adrian-merwood.net> wrote: > > >> Secondly (in the future) I would like to strip off certain country >> codes and replace them with a local dialing prefix. >> >> Can anyone help me figure ths out? >> > > This might get you started: http://howto-pages.org/asterisk > >A useful link but I pretty much have all this working, the specific issue is handling the + notation and converting it to 00 in my case for the UK. Adrian
Remco Barendse
2008-Mar-14 14:02 UTC
[asterisk-users] Dialing patterns and "GSM" format numbers
On Fri, 14 Mar 2008, Adrian Merwood wrote:> In my asterisk (Trixbox) server I would like to be able to dial > numbers from my address book using HUD or the SIP client on my 3G > phone using numbers in this format. > > On asterisk I would like to strip of the + and replace it with an > international dialing prefix. > Secondly (in the future) I would like to strip off certain country > codes and replace them with a local dialing prefix. > > Can anyone help me figure ths out?I got this workingm, thanks to a solution posted on this list but i didn't find a way how to implement this in FreePBX (Trixbox). This is how i did it in my normal asterisk installation : Include this context as first in your outbound pattern : [intern-all] include => prefix the context that actually fixes the prefix is this : [prefix] exten = _+31.,1,Goto(0${EXTEN:3},1) ; Change +31 to 0 exten = _+.,1,Goto(00${EXTEN:1},1) ; Change + to 00 The tricky part to implement this properly in FreePBX is dissect the dialled telephone number to propely route calls through the appropriate provider. In my case i use the same provider for local calls as for international calls, but those that have free local calls do not want every call to a local number dialled out through their international provider. For me it's all the same :) If you find a solution to properly do it in FreePBX, please post it to the list :))