Multiple actions for bind_meta_data app
Hi, I would like to know if the following scenario is possible with Freeswitch: A connection is established between two endpoints ( soft phones). On one end, someone presses *1, a BEEP that indicates the beginning of recording is heard, and then Freeswitch starts to record. I can get recording to work with the following line from wiki: <action application="bind_meta_app" data="2 a s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> In order to generate the BEEP tone, I would need the bin_meta_app to execute two actions, one to gnerate the BEEP and the other to recrod. How can I change the dialplan to do that? Thanks in advance for all your help. Woody
you can bind to execute_extension app and point it at an extension you setup just for that which plays a beep then starts recording. execute_extension lets you execute any extension like it was a little program. On Fri, Oct 24, 2008 at 4:02 AM, Woody Dickson <woodydickson@gmail.com>wrote:
Hi,
I would like to know if the following scenario is possible with Freeswitch:
A connection is established between two endpoints ( soft phones). On one end, someone presses *1, a BEEP that indicates the beginning of recording is heard, and then Freeswitch starts to record. I can get recording to work with the following line from wiki:
<action application="bind_meta_app" data="2 a s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
In order to generate the BEEP tone, I would need the bin_meta_app to execute two actions, one to gnerate the BEEP and the other to recrod.
How can I change the dialplan to do that?
Thanks in advance for all your help.
Woody
_______________________________________________ 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
FYI, check this page out: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_execute_extension Just remember the difference between "transfer" and "execute_extension" Transfer will go and never come back Execute_extension will go "run" an extension like a subroutine and then come back Happy dialplanning! -MC On Fri, Oct 24, 2008 at 10:36 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
you can bind to execute_extension app and point it at an extension you setup just for that which plays a beep then starts recording. execute_extension lets you execute any extension like it was a little program.
On Fri, Oct 24, 2008 at 4:02 AM, Woody Dickson <woodydickson@gmail.com>wrote:
Hi,
I would like to know if the following scenario is possible with Freeswitch:
A connection is established between two endpoints ( soft phones). On one end, someone presses *1, a BEEP that indicates the beginning of recording is heard, and then Freeswitch starts to record. I can get recording to work with the following line from wiki:
<action application="bind_meta_app" data="2 a s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
In order to generate the BEEP tone, I would need the bin_meta_app to execute two actions, one to gnerate the BEEP and the other to recrod.
How can I change the dialplan to do that?
Thanks in advance for all your help.
Woody
_______________________________________________ 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
_______________________________________________ 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
Hi, Thank you very much for your prompt response. I actually did try to put the "read" app in a separate extension, but what happened was that when *1 was pressed, Freeswitch would play MOH and both both soft phone couldn't hear each other anymore. After MOH is played, Freeswitch just continues to place it forever. What I need is for the record to take place at the background without interrupting the existing call. That part can be accomplished by using <action application="bind_meta_app" data="2 a s record_session::$${base_dir}/ recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> In addition to that, the party that presses *1 would hear a BEEP sound, indicating the beginning of the recording. I think the problem may due to a misconfigured dialplan, but I can't figure out what's wrong. Here is my dialplan: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="Redirect to agent dialplan"> <context name="public"> <extension name="test9"> <condition field="destination_number" expression="^(.*)$"> <action application="bind_meta_app" data="3 a a execute_extension::transfer XML features"/> <action application="bind_meta_app" data="1 a a execute_extension::record XML features"/> <action application="bind_meta_app" data="2 a a stop_record_session::/mnt/app/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="4 a s execute_extension::att_xfer XML features"/> <action application="bridge" data="sofia/gateway/mygateway/1000"/> <action application="hangup" /> </condition> </extension> </context> <context name="features"> <extension name="features"> <condition field="destination_number" expression="^att_xfer" break="on-true"> <action application="read" data="1 10 'tone_stream://%(10000,0,350,440)' digits 30000 #"/> <action application="set" data="action=att-xfer" /> <action application="execute_extension" data="att${digits} XML public"/> </condition> <condition field="destination_number" expression="^record" break="on-true"> <action application="record" data="/mnt/app/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> </condition> </extension> </context> </section> </document> The Freeswitch log shows that it plays a MOH after *1 is pressed, which is not what I want: 2008-10-25 17:05:13 [DEBUG] switch_ivr_async.c:1425 meta_on_dtmf() sofia/internal/5454@192.168.1.101 Processing meta digit '1' [execute_extension::record XML features] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/internal/ 5454@192.168.1.101 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101[BREAK] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/external/1000 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/external/1000 Command Execute playback(local_stream://moh) 2008-10-25 17:05:13 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/internal/5454@192.168.1.101 Command Execute execute_extension(record XML features) 2008-10-25 17:05:13 [INFO] mod_dialplan_xml.c:232 dialplan_hunt() Processing 5454->record in context features 2008-10-25 17:05:13 [DEBUG] mod_local_stream.c:320 local_stream_file_open() Opening Stream [moh/8000] 8000hz 2008-10-25 17:05:14 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms 2008-10-25 17:05:14 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-25 17:05:14 [CONSOLE] mod_xml_curl.c:206 xml_url_fetch() XML response is in /tmp/4384f1d4-b856-4817-8ac7-d6f9fb3dd866.tmp.xml 2008-10-25 17:05:14 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [features] destination_number(record) =~ /^att_xfer/ 2008-10-25 17:05:14 [DEBUG] mod_dialplan_xml.c:119 parse_exten() Regex mismatch 2008-10-25 17:05:14 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [features] destination_number(record) =~ /^record/ 2008-10-25 17:05:14 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute record(/mnt/app/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav) Thank you so much for all your help. Woody
are you using "record" or "record_session"? The latter is a background record where the former is a foreground record. On Fri, Oct 24, 2008 at 8:22 PM, Woody Dickson <woodydickson@gmail.com>wrote:
Hi,
Thank you very much for your prompt response. I actually did try to put the "read" app in a separate extension, but what happened was that when *1 was pressed, Freeswitch would play MOH and both both soft phone couldn't hear each other anymore. After MOH is played, Freeswitch just continues to place it forever. What I need is for the record to take place at the background without interrupting the existing call. That part can be accomplished by using <action application="bind_meta_app" data="2 a s record_session::$${base_dir}/ recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
In addition to that, the party that presses *1 would hear a BEEP sound, indicating the beginning of the recording.
I think the problem may due to a misconfigured dialplan, but I can't figure out what's wrong.
Here is my dialplan:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="Redirect to agent dialplan"> <context name="public"> <extension name="test9"> <condition field="destination_number" expression="^(.*)$"> <action application="bind_meta_app" data="3 a a execute_extension::transfer XML features"/> <action application="bind_meta_app" data="1 a a execute_extension::record XML features"/> <action application="bind_meta_app" data="2 a a stop_record_session::/mnt/app/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="4 a s execute_extension::att_xfer XML features"/> <action application="bridge" data="sofia/gateway/mygateway/1000"/> <action application="hangup" /> </condition> </extension> </context> <context name="features"> <extension name="features"> <condition field="destination_number" expression="^att_xfer" break="on-true"> <action application="read" data="1 10 'tone_stream://%(10000,0,350,440)' digits 30000 #"/> <action application="set" data="action=att-xfer" /> <action application="execute_extension" data="att${digits} XML public"/> </condition> <condition field="destination_number" expression="^record" break="on-true"> <action application="record" data="/mnt/app/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> </condition> </extension> </context> </section> </document>
The Freeswitch log shows that it plays a MOH after *1 is pressed, which is not what I want:
2008-10-25 17:05:13 [DEBUG] switch_ivr_async.c:1425 meta_on_dtmf() sofia/internal/5454@192.168.1.101 Processing meta digit '1' [execute_extension::record XML features] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/internal/ 5454@192.168.1.101 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/ 5454@192.168.1.101 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/external/1000 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-25 17:05:13 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/external/1000 Command Execute playback(local_stream://moh) 2008-10-25 17:05:13 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/internal/5454@192.168.1.101 Command Execute execute_extension(record XML features) 2008-10-25 17:05:13 [INFO] mod_dialplan_xml.c:232 dialplan_hunt() Processing 5454->record in context features 2008-10-25 17:05:13 [DEBUG] mod_local_stream.c:320 local_stream_file_open() Opening Stream [moh/8000] 8000hz 2008-10-25 17:05:14 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms 2008-10-25 17:05:14 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-25 17:05:14 [CONSOLE] mod_xml_curl.c:206 xml_url_fetch() XML response is in /tmp/4384f1d4-b856-4817-8ac7-d6f9fb3dd866.tmp.xml 2008-10-25 17:05:14 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [features] destination_number(record) =~ /^att_xfer/ 2008-10-25 17:05:14 [DEBUG] mod_dialplan_xml.c:119 parse_exten() Regex mismatch 2008-10-25 17:05:14 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [features] destination_number(record) =~ /^record/ 2008-10-25 17:05:14 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute record(/mnt/app/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav)
Thank you so much for all your help.
Woody
_______________________________________________ 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
Hi Anthony, Thanks for your reply. It solves the problem. Just one more thing. Is it possible to have Freeswitch not to play moh when *1 is pressed? In the following log, the moh is always played after *1 is pressed and before the execution of the new extension: 2008-10-26 18:21:22 [DEBUG] switch_ivr_async.c:1425 meta_on_dtmf() sofia/internal/5454@192.168.1.101 Processing meta digit '1' [execute_extension::record XML features] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/internal/ 5454@192.168.1.101 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101[BREAK] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/external/1000 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/external/1000 Command Execute playback(local_stream://moh) 2008-10-26 18:21:22 [DEBUG] mod_local_stream.c:320 local_stream_file_open() Opening Stream [moh/8000] 8000hz 2008-10-26 18:21:22 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/internal/5454@192.168.1.101 Command Execute execute_extension(record XML features) Thanks for your great help. Woody On Sat, Oct 25, 2008 at 10:33 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
are you using "record" or "record_session"? The latter is a background record where the former is a foreground record.
you could set the moh on that channel to "hold_music=silence" <action application="set" data="hold_music=silence"/> On Sat, Oct 25, 2008 at 9:26 PM, Woody Dickson <woodydickson@gmail.com>wrote:
Hi Anthony,
Thanks for your reply. It solves the problem. Just one more thing. Is it possible to have Freeswitch not to play moh when *1 is pressed? In the following log, the moh is always played after *1 is pressed and before the execution of the new extension:
2008-10-26 18:21:22 [DEBUG] switch_ivr_async.c:1425 meta_on_dtmf() sofia/internal/5454@192.168.1.101 Processing meta digit '1' [execute_extension::record XML features] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/internal/ 5454@192.168.1.101 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/ 5454@192.168.1.101 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:616 switch_core_session_queue_private_event() Kill sofia/external/1000 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/external/1000 Command Execute playback(local_stream://moh) 2008-10-26 18:21:22 [DEBUG] mod_local_stream.c:320 local_stream_file_open() Opening Stream [moh/8000] 8000hz 2008-10-26 18:21:22 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms 2008-10-26 18:21:22 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/external/1000 [BREAK] 2008-10-26 18:21:22 [DEBUG] switch_ivr.c:382 switch_ivr_parse_event() sofia/internal/5454@192.168.1.101 Command Execute execute_extension(record XML features)
Thanks for your great help.
Woody
On Sat, Oct 25, 2008 at 10:33 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
are you using "record" or "record_session"? The latter is a background record where the former is a foreground record.
_______________________________________________ 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 (3)
-
Anthony Minessale
-
Michael Collins
-
Woody Dickson