<!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">
<tt>Thanks Mike,<br>
However, I do have a reason to implement it in the script. So, if you
know how to do it, you are welcome to help.<br>
<br>
Peter<br>
</tt><br>
Michael Jerris wrote:
<blockquote cite="mid:E6A7CC39-DC44-4C26-A5DA-7EDDAEE4FC37@jerris.com"
 type="cite">There is no reason to re-create this functionality in lua,
it already exists.
  <div><br>
  </div>
  <div><a moz-do-not-send="true"
 href="http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate">http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate</a></div>
  <div><br>
  </div>
  <div><a moz-do-not-send="true"
 href="http://wiki.freeswitch.org/wiki/Variable_ringback">http://wiki.freeswitch.org/wiki/Variable_ringback</a></div>
  <div><br>
  </div>
  <div><br>
  </div>
  <div>Mike</div>
  <div><br>
  <div>
  <div>On Oct 15, 2009, at 8:55 PM, Peter Volchek wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div bgcolor="#ffffff" text="#000000"><tt>Hi Guys,<br>
Here is the task I need your help with.<br>
    <br>
The feature I am trying to build is called 'Find Me" or 'Follow Me'.<br>
When the call comes in, I am trying the call the predefined list of
numbers in sequence, and if none answers, I am going into voice
receiving mode.<br>
    <br>
I am using the lua language.<br>
    <br>
Here is what I am doing (pseudo code)<br>
I'll be asking the question just in the code<br>
    <br>
    <br>
session:answer();<br>
    <br>
playPrompt('transfer_greeting');<br>
    <br>
next_number = getNextNumber();<br>
    <br>
    <b>-- Question #1:<br>
    </b>-- I am about to start a new session. <br>
-- However, at this point I'd like to play some moho (music on hold)
for the existing one<br>
    <br>
    <br>
-- Creating a new session. The destination phone start ringing<br>
local session1 = freeswitch.Session("sofia/192.168.1.52/" .. </tt><tt>next_number
    </tt><tt>);<br>
    </tt><tt><b>-- Question #2:<br>
    </b>-- How could I specify the number of rings to wait before
session
answers? Or maybe the timeout<br>
    </tt><tt><br>
    <br>
    <br>
if( session1:ready() == true ) then<br>
    <b>&nbsp; -- Question #3<br>
    </b>&nbsp; -- Session answered. At this point I need to stop the music
on
hold. How?<br>
&nbsp; -- Now I need to join the existing session with the newly created one<br>
&nbsp; -- there is a session:transfer method, but I can't see how I can use
it here<br>
else<br>
&nbsp;&nbsp;&nbsp; playPrompt("Can't find. Please leave a message");<br>
&nbsp;&nbsp;&nbsp; doReceiveMessage()'<br>
end<br>
    <br>
    <br>
    <br>
    <br>
Has anyone worked on that feature before. I would appreciate all
possible solutions and explanations.<br>
Thank you in advance.<br>
    </tt></div>
  </blockquote>
  </div>
  <br>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
FreeSWITCH-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
  </pre>
</blockquote>
</body>
</html>