<!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>Using some hints, that Mike sent me, I found the answer to my
question #2.<br>
<br>
</tt><tt>I found an answer to question 2<br>
local session1 =
freeswitch.Session("{<b>originate_timeout=20</b>}sofia/192.168.1.52/1004");<br>
This will be trying to connect fo 20 seconds<br>
<br>
HOwever, when I place a call like that, there is a silence in the
caller handset. I was trying to play some music on hold (question #1
and #3) using the following syntax, but that did not work<br>
</tt><br>
<tt>local session1 =
freeswitch.Session(<br>
"{originate_timeout=20,<br>
<b>ringback=/usr/local/freeswitch/sounds/music/8000/ponce-preludio-in-e-major.wav</b>}sofia/192.168.1.52/1004");<br>
</tt><br>
Any solutions?<br>
PV<br>
<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> -- Question #3<br>
</b> -- Session answered. At this point I need to stop the music
on
hold. How?<br>
-- Now I need to join the existing session with the newly created one<br>
-- there is a session:transfer method, but I can't see how I can use
it here<br>
else<br>
playPrompt("Can't find. Please leave a message");<br>
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>