[asterisk-users] Manipulating of a dialed sequence

Rafael dos Santos Saraiva rafaelsnsa at gmail.com
Sat Dec 5 12:02:33 CST 2015


Hi

Try this:

[pbx]
exten => _1X.,1,Answer()
same  => n,Set(VAR=012345*543210)
same  => n,Set(VAR1=${CUT(VAR,*,1)})    ;012345
same  => n,Set(VAR1=${CUT(VAR,*,2)})    ;543210



[image: Sua Foto] <rafaelsnsa at gmail.com>Rafael S. SaraivaPorto Alegre - RS
| Mobile:  (51) 8174-7956
<http://br.linkedin.com/pub/rafael-saraiva/52/aab/230>
<https://plus.google.com/u/0/+RafaelSaraivaRS>

2015-12-05 14:21 GMT-02:00 Frank <mailinglist at linuxista.com>:

> Hi Asterisk List
>
> Given, as an example, the following sequence
>
> 012345*543210
>
> I would like to store into a variable all digits before "*" (012345) and
> in a different variable all digits after the "*" (543210) for further
> processing in the dial plan.
>
> The length of the dialed sequence may be variable and "*" is the
> separator between the two values to store.
>
> Any idea?
>
> Thanks
>
> Francesco
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151205/fe370825/attachment.html>


More information about the asterisk-users mailing list