[asterisk-users] Prefix/Suffix/StripLSD/StripMSD gone?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Nov 21 14:31:55 MST 2006


On Tue, Nov 21, 2006 at 09:41:45PM +0100, Paul Schenkeveld wrote:
> On Tue, Nov 21, 2006 at 01:18:47PM -0600, Don Pobanz wrote:
> > >Have Prefix, Suffix, StripLSD and StripMSD disappeared?
> > 
> > yes
> > 
> > >Is there another way to manipulate the current extention 
> > >an continue at the appropriate line in the current context?
> > 
> > see substrings and String Concatenation under variables 
> > http://www.voip-info.org/wiki-Asterisk+variables
> 
> Ok, but if I use this to change EXTEN, asterisk will continue to
> process statements in the same context based on the original value
> of EXTEN.

EXTEN is read-only. Instead of manipulating EXTEN directly, use Goto.

> 
> What I tried to accomplish is this:
> 
>     112     emergency call to be routed through 
>     _0.     outside line calls using LCR rules in extensions.conf
>     _90.    force outside calls through ISDN
>     _91.    force outside calls through provider 1
>     _92.    force outside calls through provider 2
> 
> Note that in many countries here in Europe 0 is used for outside lines,
> 06 are cellphone numbers, 0800 tollfree, 09XX payed services and 112 is
> the emergency number.
> 
> So what I had thought up is:
> 
>     [globals]
>     PROV_EMERG=90   ; Emergency calls go out via ISDN
>     PROV_INT=91     ; Provider 1 for international calls
>     PROV_NAT=92     ; Provider 2 for national calls
>     PROV_0800=90    ; Tollfree calls go out via ISDN
>     PROV_09XX=90    ; Payed services calls go out via ISDN
>     PROV_06=90      ; Cellphone calls go out via ISDN
> 
>     [outgoing]
>     ; Allow emergency calls with or without 0 for outside lines
>     exten => 112,1,Prefix(0)
> 
>     ; Emergency calls always via ISDN
>     exten => 0112,1,NoOp(Emergency call)
>     exten => 0112,n,Prefix(${PROV_EMERG})

Goto(${PROV_EMERG}${EXTEN},1) ?

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list