[Asterisk-Users] How to use the Cut() command to chop off an ending character

Adams, Gavin gadams at promisant.com
Fri Oct 24 13:29:14 MST 2003


> -----Original Message-----
> From: Andrew Joakimsen [mailto:andrew at envisionstudio.net]
> 
> I don't see what the problem is, Asterisk will see them as two
separate
> extensions
> 

Thanks for the response Andrew,

Okay, in my case I don't have a set number of digits (taking into
account all countries, etc.).

> Exten => _9011xxxxxxxxx#,1,StripLSD(1)      (or _9011.# if there is
not
> a fixed number of digits, change the other xxxxxxx to be .)

exten => _9011.#,1,StripLSD(1)      ; will work for me, no bother
creating
                                    ; a 2nd exten for intl calls

But now that I've stripped the #, would the following work:

exten => _9011.#,2,Dial(IAX2/{EXTEN:1})

or would EXTEN now match on _9011. only? If that's the case, it might
mess up my other intl exten of:

exten => _9011.,1,Dial(IAX2/{EXTEN:1})
exten => _9011.,2,Congestion

Many ways to skin the cat, looking for the best solution.

Regards,

--- Gavin



More information about the asterisk-users mailing list