<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    I've successfully transitioned to using a lua script instead of
    using the &amp;record command directly:<br>
    <br>
    something like this:<br>
    <br>
    in the api:<br>
    originate <a class="moz-txt-link-abbreviated" href="mailto:sofia/sipinterface_1/8839@1xxx.xx.xx">sofia/sipinterface_1/8839@1xxx.xx.xx</a> &amp;lua(hello.lua)<br>
    <br>
    and in the hello.lua script:<br>
    <br>
    session:answer();<br>
    session:recordFile("/tmp/myrecording.wav");<br>
    session:hangup();<br>
    <br>
    this is much more flexible than doing:<br>
    <br>
    originate <a class="moz-txt-link-abbreviated" href="mailto:sofia/sipinterface_1/8839@141.106.29.6">sofia/sipinterface_1/8839@141.106.29.6</a>
    &amp;record('/tmp/myrecording.wav')<br>
    <br>
    On 6/15/2011 3:03 PM, Michael Collins wrote:
    <blockquote
      cite="mid:BANLkTimtgaj81mSzzHPPfgbQwY7gp_yFpg@mail.gmail.com"
      type="cite">You can use ignore_early_media=true if your scenario
      allows it.
      <div>-MC<br>
        <br>
        <div class="gmail_quote">On Tue, Jun 14, 2011 at 8:30 AM, <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:wes-fs@499x.com">wes-fs@499x.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div bgcolor="#ffffff" text="#000000"> based on the
              documentation here, it looks like I might be able to
              execute a script, instead of directly doing the record
              command.&nbsp; Then the script could maybe set the parameters I
              need?<br>
              <br>
              <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org/wiki/Mod_commands#originate"
                target="_blank">http://wiki.freeswitch.org/wiki/Mod_commands#originate</a>
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <br>
                  On 6/14/2011 10:06 AM, <a moz-do-not-send="true"
                    href="mailto:wes-fs@499x.com" target="_blank">wes-fs@499x.com</a>
                  wrote:
                  <blockquote type="cite"> This did not work, I still
                    heard the ringing.<br>
                    <br>
                    On 6/10/2011 5:30 PM, Michael Collins wrote:
                    <blockquote type="cite">Try this:
                      <div><br>
                      </div>
                      <div> originate {<a moz-do-not-send="true"
href="mailto:media_bug_answer_req=true%7Dsofia/sipinterface_1/912625551212@141.xxx.xxx.xxx"
                          target="_blank">media_bug_answer_req=true}sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx</a>&nbsp;&amp;record(/tmp/myrecording.wav)</div>
                      <div><br>
                      </div>
                      <div>Let us know if it works.</div>
                      <div>-MC</div>
                      <div><br>
                        <div class="gmail_quote">On Fri, Jun 10, 2011 at
                          1:05 PM, <span dir="ltr">&lt;<a
                              moz-do-not-send="true"
                              href="mailto:wes-fs@499x.com"
                              target="_blank">wes-fs@499x.com</a>&gt;</span>
                          wrote:<br>
                          <blockquote class="gmail_quote" style="margin:
                            0pt 0pt 0pt 0.8ex; border-left: 1px solid
                            rgb(204, 204, 204); padding-left: 1ex;"> I'm
                            extremely new to freeswitch, and anything
                            like it, so please forgive me!<br>
                            <br>
                            I'd like to be able to use the API to
                            originate a call and record it.<br>
                            So far, I have the following figured out:<br>
                            <br>
                            originate <a moz-do-not-send="true"
                              href="mailto:sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx"
                              target="_blank">sofia/sipinterface_1/912625551212@141.xxx.xxx.xxx</a><br>
                            &amp;record(/tmp/myrecording.wav)<br>
                            And it dials out to an external number and
                            successfully records the<br>
                            conversation.<br>
                            <br>
                            But, it also records the ringing. &nbsp;When I
                            was trying this through a<br>
                            dialplan, I found an option:<br>
                            &lt;action application="set"
                            data="media_bug_answer_req=true"/&gt;<br>
                            which delayed the recording until the call
                            was answered.<br>
                            <br>
                            Is there a way to do the same thing through
                            the API?<br>
                            <br>
                            Thanks!<br>
                            Wes<br>
                            <br>
_______________________________________________<br>
                            FreeSWITCH-users mailing list<br>
                            <a moz-do-not-send="true"
                              href="mailto:FreeSWITCH-users@lists.freeswitch.org"
                              target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
                            <a moz-do-not-send="true"
                              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                              target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                            UNSUBSCRIBE:<a moz-do-not-send="true"
                              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                              target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                            <a moz-do-not-send="true"
                              href="http://www.freeswitch.org"
                              target="_blank">http://www.freeswitch.org</a><br>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                      <pre><fieldset></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a moz-do-not-send="true" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
                    </blockquote>
                    <br>
                    <pre><fieldset></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a moz-do-not-send="true" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            FreeSWITCH-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
            UNSUBSCRIBE:<a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
              target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              target="_blank">http://www.freeswitch.org</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
  </body>
</html>