[Freeswitch-users] stip variable

Michael Collins msc at freeswitch.org
Wed Mar 14 10:45:28 MSK 2012


Try this:

<action application="set" data="my_number=${regex
18005551212 at tf.voipmich.com|^(\d+)|%1}"/>

Also, you may need 'inline="true"' depending on when you need the value
that ends up in ${my_number}.

-MC

On Tue, Mar 13, 2012 at 12:39 AM, Miha Zoubek <miha at softnet.si> wrote:

>  Hi @Brian,
>
> I was looking at Enum.conf but having problem with modifying it.
>
> <route service="E2U+SIP" regex="sip:(.*)" replace="sofia/internal/$1"/>
>
> I can remove sofia/internal/ and Enum will return just
> 18005551212 at tf.voipmich.com.
>
> What is the best why to get rid of @tf.voipmich.com as I need only number?
>
> I was trying to trim it like exp. {18005551212 at tf.voipmich.com:10:10} but
> this is not working properly as length of number change.
>
> Thanks!
>
> Regards,
> Miha
>
>  <sofia/internal/18005551212 at tf.voipmich.com>
>
>
>
>
> On 03/08/2012 04:10 PM, Brian West wrote:
>
> or modify enum.conf to only give you the numer?
>
>  /b
>
>  On Mar 8, 2012, at 4:54 AM, Miha Zoubek wrote:
>
> Hi,
>
> how can I strip this sofia/internal/18005551212 at tf.voipmich.com, so that
> I would have only number 18005551212?
>
> This return enum.
>
>
> Thanks!
> Miha
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:consulting at freeswitch.orghttp://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>
> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
>
> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120314/5136702f/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list