Gold star for you! Thanks for paying the "voluntary" wiki tax. :P<br>-MC<br><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 5:32 PM, Brian Wiese <span dir="ltr"><<a href="mailto:brian.wiese.freeswitch@gmail.com">brian.wiese.freeswitch@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wikified: <a href="http://wiki.freeswitch.org/wiki/Manipulating_Channel_Variables#Search_and_replace" target="_blank">http://wiki.freeswitch.org/wiki/Manipulating_Channel_Variables#Search_and_replace</a><br>
<br>
:)<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Jan 5, 2012 at 5:36 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>> wrote:<br>
> Nicely done! Be sure to wikify this one. If you have any questions about<br>
> updating the wiki just email me off list.<br>
><br>
> -MC<br>
><br>
><br>
> On Thu, Jan 5, 2012 at 1:19 PM, Brian Wiese<br>
> <<a href="mailto:brian.wiese.freeswitch@gmail.com">brian.wiese.freeswitch@gmail.com</a>> wrote:<br>
>><br>
>> Michael:<br>
>><br>
>> Here's what I came up with, and it works really well! I can embed<br>
>> this in a dialplan or use it at the CLI:<br>
>><br>
>> lua ~stream:write(tostring(string.gsub("string_to_search",<br>
>> "string_to_find", "replacement_string")))<br>
>><br>
>> It's awesome!<br>
>><br>
>> Thanks for your help!<br>
>><br>
>> ~Brian<br>
>><br>
>> On Tue, Jan 3, 2012 at 6:16 PM, Brian Wiese<br>
>> <<a href="mailto:brian.wiese.freeswitch@gmail.com">brian.wiese.freeswitch@gmail.com</a>> wrote:<br>
>> > Michael:<br>
>> ><br>
>> > I do think that mod_xml_curl is a little more than what I need here.<br>
>> > I'll try a Lua script and see where I get. I'll try to call a Lua<br>
>> > script and return the bridge string back to the dial plan.<br>
>> ><br>
>> > I'll let you know how my scripting fu works...<br>
>> ><br>
>> > ~Brian<br>
>> ><br>
>> > On Tue, Jan 3, 2012 at 6:10 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>
>> > wrote:<br>
>> >> This kinda sounds like a problem in need of mod_xml_curl. If that seems<br>
>> >> like<br>
>> >> too much of a hassle then I would fall back to a mod_lua or mod_perl<br>
>> >> script<br>
>> >> to do the regex stuff. How is your scripting fu?<br>
>> >><br>
>> >> -MC<br>
>> >><br>
>> >><br>
>> >> On Tue, Jan 3, 2012 at 3:54 PM, Brian Wiese<br>
>> >> <<a href="mailto:brian.wiese.freeswitch@gmail.com">brian.wiese.freeswitch@gmail.com</a>> wrote:<br>
>> >>><br>
>> >>> Michael:<br>
>> >>><br>
>> >>> I sure can!<br>
>> >>><br>
>> >>> What I want to do is create template configurations that I can deploy<br>
>> >>> to multiple servers. Part of the requirement of incoming calls is to<br>
>> >>> configure which extension(s) ring immediately, 6-second delay, and<br>
>> >>> 12-second delay. I have created groups for these extensions, and by<br>
>> >>> using group_call I can get the full dial string for each group...<br>
>> >>> perfect! Now, I just need a way to delay some of these extensions by<br>
>> >>> 6 or 12 seconds. I ultimately want to inject leg variables into the<br>
>> >>> dial string for each extension, so when the group_call is expanded<br>
>> >>> each of them expand with the extra leg variable I define.<br>
>> >>><br>
>> >>> Hope that helps... clear as mud? :)<br>
>> >>><br>
>> >>> ~Brian<br>
>> >>><br>
>> >>> On Tue, Jan 3, 2012 at 4:30 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>
>> >>> wrote:<br>
>> >>> > Can you expand upon this question a bit? I'm curious if there's a<br>
>> >>> > less<br>
>> >>> > hackish way of doing what you want to do. Under what circumstances<br>
>> >>> > do<br>
>> >>> > you<br>
>> >>> > need to add the leg variables? Also, can you give us the big<br>
>> >>> > picture?<br>
>> >>> > What's<br>
>> >>> > the problem you're solving?<br>
>> >>> ><br>
>> >>> > -MC<br>
>> >>> ><br>
>> >>> > On Mon, Jan 2, 2012 at 8:56 AM, Brian Wiese<br>
>> >>> > <<a href="mailto:brian.wiese.freeswitch@gmail.com">brian.wiese.freeswitch@gmail.com</a>> wrote:<br>
>> >>> >><br>
>> >>> >> Hi Everyone.<br>
>> >>> >><br>
>> >>> >> I thought I read somewhere that this was possible, but I can't find<br>
>> >>> >> it<br>
>> >>> >> now...<br>
>> >>> >><br>
>> >>> >> I need a way to find-and-replace within a variable. So, for<br>
>> >>> >> example,<br>
>> >>> >> I want to take variables that have values like this:<br>
>> >>> >><br>
>> >>> >> 123abc123abc<br>
>> >>> >> abc123abc123abc<br>
>> >>> >><br>
>> >>> >> ...and do a find/replace of the "abc" with "xyz" so the variables<br>
>> >>> >> would now return:<br>
>> >>> >><br>
>> >>> >> 123xyz123xyz<br>
>> >>> >> xyz123xyz123xyz<br>
>> >>> >><br>
>> >>> >> The use case I've run into is that I need to add leg variables to<br>
>> >>> >> group_call. In my case, group_call can return any number of<br>
>> >>> >> members,<br>
>> >>> >> so I figured I would just replace the first "[" with<br>
>> >>> >> "[variable-I-want-to-set=...".<br>
>> >>> >><br>
>> >>> >> Thanks for the help!<br>
>> >>> >><br>
>> >>> >> ~Brian<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> _________________________________________________________________________<br>
>> >>> >> Professional FreeSWITCH Consulting Services:<br>
>> >>> >> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
>> >>> >> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>> >>> >><br>
>> >>> >> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> >>> >> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>> >>> >><br>
>> >>> >> Official FreeSWITCH Sites<br>
>> >>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >>> >> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> >>> >> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>> >>> >><br>
>> >>> >> FreeSWITCH-users mailing list<br>
>> >>> >> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> >>> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> >>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> > _________________________________________________________________________<br>
>> >>> > Professional FreeSWITCH Consulting Services:<br>
>> >>> > <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
>> >>> > <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>> >>> ><br>
>> >>> > FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> >>> > <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>> >>> ><br>
>> >>> > Official FreeSWITCH Sites<br>
>> >>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >>> > <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> >>> > <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>> >>> ><br>
>> >>> > FreeSWITCH-users mailing list<br>
>> >>> > <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> >>> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> >>> ><br>
>> >>> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> >>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >>> ><br>
>> >>><br>
>> >>><br>
>> >>> _________________________________________________________________________<br>
>> >>> Professional FreeSWITCH Consulting Services:<br>
>> >>> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
>> >>> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>> >>><br>
>> >>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> >>> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>> >>><br>
>> >>> Official FreeSWITCH Sites<br>
>> >>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >>> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> >>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>> >>><br>
>> >>> FreeSWITCH-users mailing list<br>
>> >>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> >>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> >>><br>
>> >>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> >>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> _________________________________________________________________________<br>
>> >> Professional FreeSWITCH Consulting Services:<br>
>> >> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
>> >> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>> >><br>
>> >> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> >> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>> >><br>
>> >> Official FreeSWITCH Sites<br>
>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> >> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>> >><br>
>> >> FreeSWITCH-users mailing list<br>
>> >> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> >><br>
>> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >><br>
>><br>
>> _________________________________________________________________________<br>
>> Professional FreeSWITCH Consulting Services:<br>
>> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
>> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>><br>
>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>><br>
>> Official FreeSWITCH Sites<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>><br>
>> FreeSWITCH-users mailing list<br>
>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>