[asterisk-users] Parsing incoming extension till first @

Ali Jawad alijawad1 at gmail.com
Tue Apr 22 05:49:32 CDT 2008


Thanks Patrick this resulted in

   -- Executing [009613041705 at asterisk.myJab.net@google-in:1]
Set("Gtalk/jabber1-c06e", "dst=009613041705") in new stack
    -- Auto fallthrough, channel 'Gtalk/jabber1-c06e' status is 'UNKNOWN'

It seems to have cut the correct part but I am not sure about the rest
of it, it is causing auto fallthrough with status UNKNOWN

On Tue, Apr 22, 2008 at 1:33 PM, Philipp Kempgen
<philipp.kempgen at amooma.de> wrote:
> Ali Jawad schrieb:
>
>
>
>  > When I dial a number it reaches the asterisk switch as abc at xyz@123.com
>  > what I need to do is to parse the abc and send it to my pstn gateway
>  > as in
>  >
>  > exten => _.,2,Dial(SIP/${EXTEN}@pstn.gw)
>  >
>  > this does work but I do have a varying number of numbers before the @
>  >
>  > exten => _.,1,Dial(SIP/${EXTEN:0:12}@pstn.gw)
>  >
>  > Well can I use some kind of regular expression to take all numbers
>  > before the first @ and send them to the pstn
>  >
>  > something like
>  >
>  > exten => _.,1,Dial(SIP/${regexp(condition,Exten)}@pstn.gw)
>
>  core show function CUT
>
>  Regards,
>   Philipp Kempgen
>
>  --
>  amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
>     Let's use IT to solve problems and not to create new ones.
>           Asterisk? -> http://www.das-asterisk-buch.de
>
>  Geschäftsführer: Stefan Wintermeyer
>  Handelsregister: Neuwied B 14998
>
>  _______________________________________________
>  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
>  asterisk-users mailing list
>  To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
-- 
With Regards
Ali Jawad System Administrator
http://www.alijawad.org
Phone : +961-01-559031
Mobile : +961-03-041705


----------------------------------------------------


Confidentiality Notice: The contents of this E-mail are intended for the
named recipient only. It may contain confidential and privileged
information. If you received it in error, please notify us immediately and
then destroy it. Internet communications are not secure and therefore
I do we do not accept legal responsibility
for the contents of this message. Also, and though we provide every effort
to keep our network free from viruses, you would need to check this E-mail
and any attachments for viruses as we can take no responsibility for any
computer virus which might be transferred by way of this E-mail.



More information about the asterisk-users mailing list