using fs api to originate a call and record it
I'm extremely new to freeswitch, and anything like it, so please forgive me! I'd like to be able to use the API to originate a call and record it. So far, I have the following figured out: originate sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav) And it dials out to an external number and successfully records the conversation. But, it also records the ringing. When I was trying this through a dialplan, I found an option: <action application="set" data="media_bug_answer_req=true"/> which delayed the recording until the call was answered. Is there a way to do the same thing through the API? Thanks! Wes
Try this: originate {media_bug_answer_req=true}sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav) Let us know if it works. -MC On Fri, Jun 10, 2011 at 1:05 PM, <wes-fs@499x.com> wrote:
I'm extremely new to freeswitch, and anything like it, so please forgive me!
I'd like to be able to use the API to originate a call and record it. So far, I have the following figured out:
originate sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav) And it dials out to an external number and successfully records the conversation.
But, it also records the ringing. When I was trying this through a dialplan, I found an option: <action application="set" data="media_bug_answer_req=true"/> which delayed the recording until the call was answered.
Is there a way to do the same thing through the API?
Thanks! Wes
_______________________________________________ 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
This did not work, I still heard the ringing. On 6/10/2011 5:30 PM, Michael Collins wrote:
Try this:
originate {media_bug_answer_req=true}sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav)
Let us know if it works. -MC
On Fri, Jun 10, 2011 at 1:05 PM, <wes-fs@499x.com <mailto:wes-fs@499x.com>> wrote:
I'm extremely new to freeswitch, and anything like it, so please forgive me!
I'd like to be able to use the API to originate a call and record it. So far, I have the following figured out:
originate sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav) And it dials out to an external number and successfully records the conversation.
But, it also records the ringing. When I was trying this through a dialplan, I found an option: <action application="set" data="media_bug_answer_req=true"/> which delayed the recording until the call was answered.
Is there a way to do the same thing through the API?
Thanks! Wes
_______________________________________________ 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
based on the documentation here, it looks like I might be able to execute a script, instead of directly doing the record command. Then the script could maybe set the parameters I need? http://wiki.freeswitch.org/wiki/Mod_commands#originate On 6/14/2011 10:06 AM, wes-fs@499x.com wrote:
This did not work, I still heard the ringing.
On 6/10/2011 5:30 PM, Michael Collins wrote:
Try this:
originate {media_bug_answer_req=true}sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav)
Let us know if it works. -MC
On Fri, Jun 10, 2011 at 1:05 PM, <wes-fs@499x.com <mailto:wes-fs@499x.com>> wrote:
I'm extremely new to freeswitch, and anything like it, so please forgive me!
I'd like to be able to use the API to originate a call and record it. So far, I have the following figured out:
originate sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav) And it dials out to an external number and successfully records the conversation.
But, it also records the ringing. When I was trying this through a dialplan, I found an option: <action application="set" data="media_bug_answer_req=true"/> which delayed the recording until the call was answered.
Is there a way to do the same thing through the API?
Thanks! Wes
_______________________________________________ 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 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
You can use ignore_early_media=true if your scenario allows it. -MC On Tue, Jun 14, 2011 at 8:30 AM, <wes-fs@499x.com> wrote:
based on the documentation here, it looks like I might be able to execute a script, instead of directly doing the record command. Then the script could maybe set the parameters I need?
http://wiki.freeswitch.org/wiki/Mod_commands#originate
On 6/14/2011 10:06 AM, wes-fs@499x.com wrote:
This did not work, I still heard the ringing.
On 6/10/2011 5:30 PM, Michael Collins wrote:
Try this:
originate { media_bug_answer_req=true}sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav)
Let us know if it works. -MC
On Fri, Jun 10, 2011 at 1:05 PM, <wes-fs@499x.com> wrote:
I'm extremely new to freeswitch, and anything like it, so please forgive me!
I'd like to be able to use the API to originate a call and record it. So far, I have the following figured out:
originate sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx &record(/tmp/myrecording.wav) And it dials out to an external number and successfully records the conversation.
But, it also records the ringing. When I was trying this through a dialplan, I found an option: <action application="set" data="media_bug_answer_req=true"/> which delayed the recording until the call was answered.
Is there a way to do the same thing through the API?
Thanks! Wes
_______________________________________________ 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 listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ 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
I've successfully transitioned to using a lua script instead of using the &record command directly: something like this: in the api: originate sofia/sipinterface_1/8839@1xxx.xx.xx &lua(hello.lua) and in the hello.lua script: session:answer(); session:recordFile("/tmp/myrecording.wav"); session:hangup(); this is much more flexible than doing: originate sofia/sipinterface_1/8839@141.106.29.6 &record('/tmp/myrecording.wav') On 6/15/2011 3:03 PM, Michael Collins wrote:
You can use ignore_early_media=true if your scenario allows it. -MC
On Tue, Jun 14, 2011 at 8:30 AM, <wes-fs@499x.com <mailto:wes-fs@499x.com>> wrote:
based on the documentation here, it looks like I might be able to execute a script, instead of directly doing the record command. Then the script could maybe set the parameters I need?
http://wiki.freeswitch.org/wiki/Mod_commands#originate
On 6/14/2011 10:06 AM, wes-fs@499x.com <mailto:wes-fs@499x.com> wrote:
This did not work, I still heard the ringing.
On 6/10/2011 5:30 PM, Michael Collins wrote:
Try this:
originate {media_bug_answer_req=true}sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx <mailto:media_bug_answer_req=true%7Dsofia/sipinterface_1/912625551212@141.xxx.xxx.xxx> &record(/tmp/myrecording.wav)
Let us know if it works. -MC
On Fri, Jun 10, 2011 at 1:05 PM, <wes-fs@499x.com <mailto:wes-fs@499x.com>> wrote:
I'm extremely new to freeswitch, and anything like it, so please forgive me!
I'd like to be able to use the API to originate a call and record it. So far, I have the following figured out:
originate sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx <mailto:sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx> &record(/tmp/myrecording.wav) And it dials out to an external number and successfully records the conversation.
But, it also records the ringing. When I was trying this through a dialplan, I found an option: <action application="set" data="media_bug_answer_req=true"/> which delayed the recording until the call was answered.
Is there a way to do the same thing through the API?
Thanks! Wes
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
participants (3)
-
Michael Collins
-
Wes
-
wes-fs@499x.com