uuid_displace & FIFO help
Hi All, I'm trying to use uuid_displace to play a message to a caller who is in the fifo queue, but uuid_displace doesn't play until the destination answers. I've tried uuid_broadcast, but the quality of the call becomes *really* bad, then returns to normal quality after the file has finished playing. I have also tried to use streamfile() from lua, but this mixes the audio file with the music on hold of the fifo (also very poor quality). What I am trying to achieve is the ability to play a file (and stop it on demand) to the caller, and/or also be able to use the phrase function to announce the caller's position. At the moment the caller is put into the fifo queue, then a separate script is run via luarun which dials the destination and bridges. Any ideas or suggestions on how to do this would be highly appreciated. Thanks Adnan
What SVN rev are you on? /b On Apr 23, 2009, at 9:44 AM, Adnan Barakat wrote:
Hi All,
I'm trying to use uuid_displace to play a message to a caller who is in the fifo queue, but uuid_displace doesn't play until the destination answers.
I've tried uuid_broadcast, but the quality of the call becomes *really* bad, then returns to normal quality after the file has finished playing.
I have also tried to use streamfile() from lua, but this mixes the audio file with the music on hold of the fifo (also very poor quality).
What I am trying to achieve is the ability to play a file (and stop it on demand) to the caller, and/or also be able to use the phrase function to announce the caller's position.
At the moment the caller is put into the fifo queue, then a separate script is run via luarun which dials the destination and bridges.
Any ideas or suggestions on how to do this would be highly appreciated.
Thanks
Adnan
Brian West brian@freeswitch.org -- Meet us at ClueCon! http://www.cluecon.com
13130 Brian West wrote:
What SVN rev are you on?
/b
On Apr 23, 2009, at 9:44 AM, Adnan Barakat wrote:
Hi All,
I'm trying to use uuid_displace to play a message to a caller who is in the fifo queue, but uuid_displace doesn't play until the destination answers.
I've tried uuid_broadcast, but the quality of the call becomes *really* bad, then returns to normal quality after the file has finished playing.
I have also tried to use streamfile() from lua, but this mixes the audio file with the music on hold of the fifo (also very poor quality).
What I am trying to achieve is the ability to play a file (and stop it on demand) to the caller, and/or also be able to use the phrase function to announce the caller's position.
At the moment the caller is put into the fifo queue, then a separate script is run via luarun which dials the destination and bridges.
Any ideas or suggestions on how to do this would be highly appreciated.
Thanks
Adnan
Brian West brian@freeswitch.org <mailto:brian@freeswitch.org>
-- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/>
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
look at the chimelist feature On Thu, Apr 23, 2009 at 10:06 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk
wrote:
13130
Brian West wrote:
What SVN rev are you on?
/b
On Apr 23, 2009, at 9:44 AM, Adnan Barakat wrote:
Hi All,
I'm trying to use uuid_displace to play a message to a caller who is in the fifo queue, but uuid_displace doesn't play until the destination answers.
I've tried uuid_broadcast, but the quality of the call becomes *really* bad, then returns to normal quality after the file has finished playing.
I have also tried to use streamfile() from lua, but this mixes the audio file with the music on hold of the fifo (also very poor quality).
What I am trying to achieve is the ability to play a file (and stop it on demand) to the caller, and/or also be able to use the phrase function to announce the caller's position.
At the moment the caller is put into the fifo queue, then a separate script is run via luarun which dials the destination and bridges.
Any ideas or suggestions on how to do this would be highly appreciated.
Thanks
Adnan
Brian West brian@freeswitch.org <mailto:brian@freeswitch.org>
-- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/>
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
On Thu, Apr 23, 2009 at 2:18 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
look at the chimelist feature
FYI, this was a bit difficult to find because of the way the wiki indexes stuff. I'll see what I can do to make it easier. In the meantime check this out: http://wiki.freeswitch.org/wiki/Mod_fifo#Additional_variables_.28not_yet_doc... -MC
I tried this; session:setVariable("fifo_chime_list", "/mnt/nas/freeswitch/recordings/misc/pf-unavailable.al"); session:setVariable("fifo_chime_freq", "20"); session:execute("fifo", queue_name.." in"); which didn't work - but using this is it possible to use the phrase function to say the caller's position? I'm I right in assuming uuid_displace only works on bridged calls? Thanks Adnan Anthony Minessale wrote:
look at the chimelist feature
On Thu, Apr 23, 2009 at 10:06 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk <mailto:technical@ttnc.co.uk>> wrote:
13130
Brian West wrote: > What SVN rev are you on? > > /b > > On Apr 23, 2009, at 9:44 AM, Adnan Barakat wrote: > >> Hi All, >> >> I'm trying to use uuid_displace to play a message to a caller who is in >> the fifo queue, but uuid_displace doesn't play until the destination >> answers. >> >> I've tried uuid_broadcast, but the quality of the call becomes *really* >> bad, then returns to normal quality after the file has finished playing. >> >> I have also tried to use streamfile() from lua, but this mixes the audio >> file with the music on hold of the fifo (also very poor quality). >> >> What I am trying to achieve is the ability to play a file (and stop it >> on demand) to the caller, and/or also be able to use the phrase function >> to announce the caller's position. >> >> At the moment the caller is put into the fifo queue, then a separate >> script is run via luarun which dials the destination and bridges. >> >> Any ideas or suggestions on how to do this would be highly appreciated. >> >> Thanks >> >> Adnan > > Brian West > brian@freeswitch.org <mailto:brian@freeswitch.org> <mailto:brian@freeswitch.org <mailto:brian@freeswitch.org>> > > -- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/> > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Freeswitch-users mailing list > Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Actually; Just noticed that if I set fifo_music it doesn't work, whereas if I set fifo_music to "" it works. Thanks, Adnan Anthony Minessale wrote:
look at the chimelist feature
On Thu, Apr 23, 2009 at 10:06 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk <mailto:technical@ttnc.co.uk>> wrote:
13130
Brian West wrote: > What SVN rev are you on? > > /b > > On Apr 23, 2009, at 9:44 AM, Adnan Barakat wrote: > >> Hi All, >> >> I'm trying to use uuid_displace to play a message to a caller who is in >> the fifo queue, but uuid_displace doesn't play until the destination >> answers. >> >> I've tried uuid_broadcast, but the quality of the call becomes *really* >> bad, then returns to normal quality after the file has finished playing. >> >> I have also tried to use streamfile() from lua, but this mixes the audio >> file with the music on hold of the fifo (also very poor quality). >> >> What I am trying to achieve is the ability to play a file (and stop it >> on demand) to the caller, and/or also be able to use the phrase function >> to announce the caller's position. >> >> At the moment the caller is put into the fifo queue, then a separate >> script is run via luarun which dials the destination and bridges. >> >> Any ideas or suggestions on how to do this would be highly appreciated. >> >> Thanks >> >> Adnan > > Brian West > brian@freeswitch.org <mailto:brian@freeswitch.org> <mailto:brian@freeswitch.org <mailto:brian@freeswitch.org>> > > -- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/> > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Freeswitch-users mailing list > Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto:Freeswitch-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Any ideas? Is there no way uuid_displace can work on a non-bridged channel as it appears to be the ideal solution? TTNC - Adnan Barakat wrote:
Actually; Just noticed that if I set fifo_music it doesn't work, whereas if I set fifo_music to "" it works. I just noticed this wasn't very clear, I meant fifo_chime_list only works if fifo_music is blank.
Thanks Adnan
Just thinking - is there anyway to temporarily pause or silence the moh in fifo via lua? as this would solve the problem. Thanks Adnan TTNC - Adnan Barakat wrote:
Any ideas?
Is there no way uuid_displace can work on a non-bridged channel as it appears to be the ideal solution?
TTNC - Adnan Barakat wrote:
Actually; Just noticed that if I set fifo_music it doesn't work, whereas if I set fifo_music to "" it works. I just noticed this wasn't very clear, I meant fifo_chime_list only works if fifo_music is blank.
Thanks
Adnan
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Nope, It works fine with fifo_music set. I just tested it... might wanna look at fifo_chime_freq also. /b On Apr 24, 2009, at 2:20 AM, TTNC - Adnan Barakat wrote:
I just noticed this wasn't very clear, I meant fifo_chime_list only works if fifo_music is blank.
Brian West brian@freeswitch.org -- Meet us at ClueCon! http://www.cluecon.com
Just tried this which didn't work (moh plays - but no announcement); session:setVariable("fifo_music", "tone_stream://%(400,200,400,450);%(400,2200,400,450)"); session:setVariable("fifo_chime_list", "/mnt/nas/freeswitch/recordings/misc/pf-unavailable.al"); session:setVariable("fifo_chime_freq", "15"); session:execute("fifo", queue_name.." in"); I also tried setting fifo_music to a filename like so which also had the same behaviour as above; session:setVariable("fifo_music", "/mnt/nas/freeswitch/recordings/moh/Deliberate Thought.al"); Then tried this which does work, but no moh; session:setVariable("fifo_music", ""); session:setVariable("fifo_chime_list", "/mnt/nas/freeswitch/recordings/misc/pf-unavailable.al"); session:setVariable("fifo_chime_freq", "15"); session:execute("fifo", queue_name.." in"); Is there a way temporarily pause or silence the moh? as I've found a way to play the message and the caller's position via the script called by luarun, only problem is it's trying to mix the audio which sounds very choppy. Thanks, Adnan Brian West wrote:
Nope, It works fine with fifo_music set. I just tested it... might wanna look at fifo_chime_freq also.
/b
On Apr 24, 2009, at 2:20 AM, TTNC - Adnan Barakat wrote:
I just noticed this wasn't very clear, I meant fifo_chime_list only works if fifo_music is blank.
Brian West brian@freeswitch.org <mailto:brian@freeswitch.org>
-- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/>
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
what platform are you running on and what rev of the code? first off media bugs are intentionally disabled in fifo and uuid_displace uses that. I cut and pasted your script and all i changed was the name of the chime file and it works. I heard uk ring for 15 seconds then my file plays then ringing ... repeating.... then i did this from the cli uuid_broadcast <uuid> phrase:voicemail_message_count:12:new and it works i suggest maybe you update your code or rebuild it clean. On Fri, Apr 24, 2009 at 9:11 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk>wrote:
Just tried this which didn't work (moh plays - but no announcement); session:setVariable("fifo_music", "tone_stream://%(400,200,400,450);%(400,2200,400,450)"); session:setVariable("fifo_chime_list", "/mnt/nas/freeswitch/recordings/misc/pf-unavailable.al"); session:setVariable("fifo_chime_freq", "15"); session:execute("fifo", queue_name.." in");
I also tried setting fifo_music to a filename like so which also had the same behaviour as above; session:setVariable("fifo_music", "/mnt/nas/freeswitch/recordings/moh/Deliberate Thought.al");
Then tried this which does work, but no moh; session:setVariable("fifo_music", ""); session:setVariable("fifo_chime_list", "/mnt/nas/freeswitch/recordings/misc/pf-unavailable.al"); session:setVariable("fifo_chime_freq", "15"); session:execute("fifo", queue_name.." in");
Is there a way temporarily pause or silence the moh? as I've found a way to play the message and the caller's position via the script called by luarun, only problem is it's trying to mix the audio which sounds very choppy.
Thanks,
Adnan
Brian West wrote:
Nope, It works fine with fifo_music set. I just tested it... might wanna look at fifo_chime_freq also.
/b
On Apr 24, 2009, at 2:20 AM, TTNC - Adnan Barakat wrote:
I just noticed this wasn't very clear, I meant fifo_chime_list only works if fifo_music is blank.
Brian West brian@freeswitch.org <mailto:brian@freeswitch.org>
-- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/>
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Anthony Minessale wrote:
what platform are you running on and what rev of the code? SVN rev 13130 on Linux.
i suggest maybe you update your code or rebuild it clean. Looking through my lua script, it seems timer_name=soft is causing the problem, if I set this variable the quality becomes really bad when doing uuid_broadcast - but if I don't set it the quality becomes bad on the b leg when playing the group_confirm file (as mentioned in a previous thread). Also is there any way to stop uuid_broadcast as I'd need to stop it somehow if the destination picks up?
Just wondering - would it be possible to originate to a destination which plays the message (then hangs up when the file(s) are finished playing - or - gets uuid_kill(ed) when the destination picks up), then the luarun script executes eavesdrop on the aleg to listen to the message? In tests I've done nothing happens on the aleg when eavesdrop is executed just the moh continues - is there a way to get this to work? eg. in the luarun script to do something like this; osess = freeswitch.Session(uuid); -- aleg asess = asess = freeswitch.Session("sofia/default/queue-announce@x.x.x.x"); -- announcement leg auuid = asess:getVariable("uuid"); osess:execute("eavesdrop", auuid); queue-announce@x.x.x.x would look like this; <action application="answer"/> <action application="playback" data="/tmp/filename.wav"/> <action application="hangup"/> Thanks again Adnan
On Mon, Apr 27, 2009 at 3:39 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk>wrote:
Anthony Minessale wrote:
what platform are you running on and what rev of the code? SVN rev 13130 on Linux.
i suggest maybe you update your code or rebuild it clean. Looking through my lua script, it seems timer_name=soft is causing the problem, if I set this variable the quality becomes really bad when doing uuid_broadcast - but if I don't set it the quality becomes bad on the b leg when playing the group_confirm file (as mentioned in a previous thread).
What scenario is this, what are you calling out to, there currently no open issues mentioning anything about this?
Also is there any way to stop uuid_broadcast as I'd need to stop it somehow if the destination picks up?
break <uuid> all
Just wondering - would it be possible to originate to a destination which plays the message (then hangs up when the file(s) are finished playing - or - gets uuid_kill(ed) when the destination picks up), then the luarun script executes eavesdrop on the aleg to listen to the message? In tests I've done nothing happens on the aleg when eavesdrop is executed just the moh continues - is there a way to get this to work?
eg. in the luarun script to do something like this;
If you need commercial help you can email consulting@freeswitch.org for rates.
osess = freeswitch.Session(uuid); -- aleg asess = asess = freeswitch.Session("sofia/default/queue-announce@x.x.x.x"); -- announcement leg
auuid = asess:getVariable("uuid"); osess:execute("eavesdrop", auuid);
queue-announce@x.x.x.x would look like this; <action application="answer"/> <action application="playback" data="/tmp/filename.wav"/> <action application="hangup"/>
Thanks again
Adnan
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Anthony Minessale wrote:
What scenario is this, what are you calling out to, there currently no open issues mentioning anything about this? I just updated and rebuilt FreeSWITCH to the latest trunk, everything seems to be ok, uuid_broadcast works perfectly now.
Also is there any way to stop uuid_broadcast as I'd need to stop it somehow if the destination picks up?
break <uuid> all
Excellent thanks, this is what I was looking for. One last question if you don't mind; is there anyway to pull the caller out of a fifo after a certain time either from api or by setting a variable (eg. the destination didn't answer after sometime, so carry on in the dialplan to eg. voicemail)? Thanks again for your help and time. Adnan
Excellent thanks, this is what I was looking for.
One last question if you don't mind; is there anyway to pull the caller out of a fifo after a certain time either from api or by setting a variable (eg. the destination didn't answer after sometime, so carry on in the dialplan to eg. voicemail)?
There is a "uuid_transfer" that will allow you to route them accordingly. Regards, Chris
Chris Danielson wrote:
Excellent thanks, this is what I was looking for.
One last question if you don't mind; is there anyway to pull the caller out of a fifo after a certain time either from api or by setting a variable (eg. the destination didn't answer after sometime, so carry on in the dialplan to eg. voicemail)?
There is a "uuid_transfer" that will allow you to route them accordingly.
Thanks Chris Adnan
Anthony Minessale wrote:
Also is there any way to stop uuid_broadcast as I'd need to stop it somehow if the destination picks up?
break <uuid> all
"uuid_broadcast <uuid> phrase::saynumber,1" doesn't set the 'current_application_response' variable in the same way as "uuid_broadcast <uuid> playback::filename.wav" does (which my script looks for to know when to move on to the next application). I've attached a patch which sets this variable if it's any use to anyone (I'm not that great at C so I hope it's correct, any comments/improvements are welcome). Thanks again Adnan Index: src/mod/applications/mod_dptools/mod_dptools.c =================================================================== --- src/mod/applications/mod_dptools/mod_dptools.c (revision 13172) +++ src/mod/applications/mod_dptools/mod_dptools.c (working copy) @@ -1807,6 +1807,7 @@ char *mydata = NULL; switch_input_args_t args = { 0 }; switch_channel_t *channel = switch_core_session_get_channel(session); + switch_status_t status; if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) { const char *lang; @@ -1825,8 +1826,23 @@ switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "" ); - switch_ivr_phrase_macro(session, macro, mdata, lang, &args); + status = switch_ivr_phrase_macro(session, macro, mdata, lang, &args); + } else { + status = SWITCH_STATUS_NOOP; } + + switch (status) { + case SWITCH_STATUS_SUCCESS: + case SWITCH_STATUS_BREAK: + switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "PHRASE PLAYED"); + break; + case SWITCH_STATUS_NOOP: + switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "NOTHING"); + break; + default: + switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "UNKNOWN ERROR"); + break; + } }
can you submit the patch over jira http://jira.freeswitch.org they do not transfer well over email and we need to document all the patches. On Fri, May 1, 2009 at 12:50 AM, TTNC - Adnan Barakat <technical@ttnc.co.uk>wrote:
Anthony Minessale wrote:
Also is there any way to stop uuid_broadcast as I'd need to stop it somehow if the destination picks up?
break <uuid> all
"uuid_broadcast <uuid> phrase::saynumber,1" doesn't set the 'current_application_response' variable in the same way as "uuid_broadcast <uuid> playback::filename.wav" does (which my script looks for to know when to move on to the next application).
I've attached a patch which sets this variable if it's any use to anyone (I'm not that great at C so I hope it's correct, any comments/improvements are welcome).
Thanks again
Adnan
Index: src/mod/applications/mod_dptools/mod_dptools.c =================================================================== --- src/mod/applications/mod_dptools/mod_dptools.c (revision 13172) +++ src/mod/applications/mod_dptools/mod_dptools.c (working copy) @@ -1807,6 +1807,7 @@ char *mydata = NULL; switch_input_args_t args = { 0 }; switch_channel_t *channel = switch_core_session_get_channel(session); + switch_status_t status;
if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) { const char *lang; @@ -1825,8 +1826,23 @@
switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "" );
- switch_ivr_phrase_macro(session, macro, mdata, lang, &args); + status = switch_ivr_phrase_macro(session, macro, mdata, lang, &args); + } else { + status = SWITCH_STATUS_NOOP; } + + switch (status) { + case SWITCH_STATUS_SUCCESS: + case SWITCH_STATUS_BREAK: + switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "PHRASE PLAYED"); + break; + case SWITCH_STATUS_NOOP: + switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "NOTHING"); + break; + default: + switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "UNKNOWN ERROR"); + break; + } }
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
participants (6)
-
Adnan Barakat
-
Anthony Minessale
-
Brian West
-
Chris Danielson
-
Michael Collins
-
TTNC - Adnan Barakat