[Freeswitch-users] Fwd: How to change Music-on-hold while digit_bind_action is used ? (Michael Collins)
Michael Collins
msc at freeswitch.org
Thu Apr 25 21:23:25 MSD 2013
Yeah, try using execute_extension instead of exec:Lua. Write a simple
extension that sets the hold_music variable on the channel in question. Be
sure to add lots of log lines before and after setting the variable and
also prior to calling playback on that variable. Hopefully that will tell
you exactly what is going on.
-MC
On Thu, Apr 25, 2013 at 4:06 AM, julien terrasson <
julien.terrasson at gmail.com> wrote:
>
>
> Subject: Re: How to change Music-on-hold while digit_bind_action is used ?
> (Michael Collins)
>
>
> Hi Michael,
>
> Please find the debug information in the pastebin :
> http://pastebin.freeswitch.org/20831
> Not sure this will be enought to understand the root cause. Don't hesitate
> to ask for more..
>
> Regards,
>
> Julien
>
>
> On Wed, Apr 24, 2013 at 2:44 PM, julien terrasson <
> julien.terrasson at gmail.com> wrote:
>
>> Hi Michael,
>>
>> Thanks for your answer (quoted hereafter)..
>>
>> "To answer your initial question: yes, what you are trying to accomplish
>> is definitely possible. However if you want the caller ("A" in your
>> scenario) to press only a single key then you can't use bind_meta_app
>> (BMA). BMA requires two key presses: * and one other DTMF. That's why your
>> scenario requires ** to trigger."
>>
>> ... but i'm already using bind_digit_action :-)
>>
>> I probably gave too much information and made the problem description
>> unclear.
>> Sorry about that & let me try to explain again :
>>
>> Every time the star key is pressed, it will correctly execute the lua
>> script, no problem here.. But
>>
>> When executing that lua script :
>> The first time, the standard freeswitch moh is heard (on the b_leg) when
>> playAndGetDigits is called (on the a_leg).
>> The 2nd time, my custom freeswitch moh is heard (on the b_leg) when
>> playAndGetDigits is called (on the a_leg).
>>
>> Here are the instruction which are causing me headaches :
>>
>> */* Change the moh on the A leg */
>> *api:executeString("uuid_setvar ".. b_leg_uuid .. " hold_music
>> /usr/local/freeswitch/sounds/fr/ca/june/voxService/*fr_wait_**email.wav*
>> ");*
>> /* Play and request digit (B leg) */*
>> digit = session:playAndGetDigits(1, 1, 1, 5000, '#',
>> '/usr/local/freeswitch/sounds/
>> fr/ca/june/voxService/fr_ask_email.wav', '', '\\d+');
>>
>> I was expecting fr_wait_email.wav to be played every time, but it look
>> like "uuid_setvar <b_leg_uuid> hold_music <custom_wav>" is not taken into
>> account on-the-fly, but only after bind_digit_action is finished.
>> Is that a normal behaviour ? If yes, what would be the correct way of
>> changing the moh when bind_digit_action is executed ?
>>
>> Regards,
>>
>> Julien
>>
>>
>>
>>
>>
>>
>>
>
>
> _________________________________________________________________________
> 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
>
>
--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130425/3ed8f77b/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list