[Asterisk-Users] Cut leading digit?
Derek Whitten
derek at kfuq.net
Mon Aug 22 06:47:29 MST 2005
try something like this.. the EXTEN:1 strips the leading 8 off
exten => _8.,s,1,Dial(IAX2/user at provider/${EXTEN:1},60,Ttr)
On Mon, 2005-08-22 at 05:43, Rich Adamson wrote:
> Using a spa3000 with asterisk cvs head, and the spa3k is config'ed with
> a dialplan that essentially routes any call starting with an "8" to
> asterisk. All other US 7 and 10 digit calls, 911, etc, route via the
> spa3k's fxo port.
>
> Is there a way in extensions.conf to:
> - inspect the dialed exten number,
> - if first digit is "8", drop the 8,
> - continue through each "include => ...",
> - dial the remaining $extn digits
>
> The number of elements in extensions.conf is somewhat lengthy, so
> looking for a way to do the above one time early in asterisk's
> search through the various dialplan elements.
>
> I guess an alternative might be to strip the "8" in the spa3k before
> it sends the call to asterisk, but I've not found a way to do that
> as yet.
>
> Thoughts?
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/GIT> d-@ s+:+ a? C+++ BLHIS$ U+++ P+> L+++ !E W+++$ N++ o+ K w--
PS+++ PE@ Y+ PGP++ t 5? X !R tv+ b- DI-- D G e+> h---- r+++ y++++
------END GEEK CODE BLOCK------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050822/7df9a834/attachment.pgp
More information about the asterisk-users
mailing list