[Freeswitch-users] Striping destination number

Miha Zoubek miha at softnet.si
Mon Feb 6 11:11:03 MSK 2012


HI @Avi,

I do not know how did I missed that.

Not it works:)

Thanks!

BR,
Miha

On 2/6/2012 8:50 AM, Avi Marcus wrote:
> Try ${sip_redirect_contact_user_0:1} to tell it to skip character 0...
> -Avi
>
> On Mon, Feb 6, 2012 at 9:44 AM, Miha Zoubek <miha at softnet.si 
> <mailto:miha at softnet.si>> wrote:
>
>     Hi @Michael,
>
>     I set in dialplan like this:
>
>     <action application="bridge"
>     data="sofia/external/386${sip_redirect_contact_user_0:0}@xxx.xxx.xxx.xxx"
>     <mailto:sofia/external/386$%7Bsip_redirect_contact_user_0:0%7D at xxx.xxx.xxx.xxx>
>     />
>
>     sip_redirect_contact_user_0 is set to 051325856, so 0 should be
>     trimed.
>
>     But in log I get this:
>
>
>     EXECUTE sofia/internal/0038618100100 at xxx.xxx.xxx.xxx
>     <mailto:sofia/internal/0038618100100 at xxx.xxx.xxx.xxx>
>     bridge(sofia/external/386051357952 at xxx.xxx.xxx.xxx
>     <mailto:sofia/external/386051357952 at xxx.xxx.xxx.xxx>)
>
>     You can see that 0 is not trimed. Can you pls help me why?
>
>     Thanks!
>
>     BR,
>     Miha
>
>     I have one problem.
>
>     On 2/1/2012 7:25 PM, Michael Collins wrote:
>>     If you know for a fact that it's only a leading zero then you can
>>     use the variable manipulation features:
>>
>>     http://wiki.freeswitch.org/wiki/Manipulating_Channel_Variables
>>
>>     -MC
>>
>>     On Wed, Feb 1, 2012 at 1:19 AM, Miha Zoubek <miha at softnet.si
>>     <mailto:miha at softnet.si>> wrote:
>>
>>         Hi,
>>
>>         how can I strip destination number in my dialplan if the
>>         destination
>>         number is not in condition option.
>>
>>         <anti-action application="bridge"
>>         data="sofia/external/386${sip_redirect_contact_user_0}@xxx.xxx.xxx.xxx"
>>         <mailto:sofia/external/386$%7Bsip_redirect_contact_user_0%7D at xxx.xxx.xxx.xxx>
>>         />
>>         I need to stip leading zero from
>>         ${sip_redirect_contact_user_0} variable.
>>
>>         Thanks!
>>         Miha
>>
>>
>>         --
>>         Best regards / Lep Pozdrav
>>         Miha Zoubek
>>         Softnet d.o.o.
>>
>>
>>         _________________________________________________________________________
>>         Professional FreeSWITCH Consulting Services:
>>         consulting at freeswitch.org <mailto: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
>>         <mailto: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
>>
>>
>>
>>
>>     _________________________________________________________________________
>>     Professional FreeSWITCH Consulting Services:
>>     consulting at freeswitch.org  <mailto: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  <mailto: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
>
>
>     -- 
>     Best regards / Lep Pozdrav
>     Miha Zoubek
>     Softnet d.o.o.
>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto: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
>     <mailto: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
>
>
>
>
> _________________________________________________________________________
> 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


-- 
Best regards / Lep Pozdrav
Miha Zoubek
Softnet d.o.o.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120206/7e9af931/attachment-0001.html 


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