<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>I've just found the solution that works<br>
<br>
<b>session:execute("set",
"ringback=/usr/local/freeswitch/sounds/music/8000/ponce-preludio-in-e-major.wav");</b><br>
session:execute("bridge",
"{originate_timeout=20,origination_caller_id_number=6006,origination_caller_id_name=Peter
Volchek}sofia/192.168.1.52/1004");<br>
</tt><br>
Cheers<br>
<br>
Chris Burns wrote:
<blockquote cite="mid:200910161538.28961.chris@cloudtel.com" type="cite">
<pre wrap="">Did you already answer the channel?
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Variable_ringback">http://wiki.freeswitch.org/wiki/Variable_ringback</a>
vs.
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Variable_transfer_ringback">http://wiki.freeswitch.org/wiki/Variable_transfer_ringback</a>
On October 16, 2009 01:25:01 pm Peter Volchek wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Using some hints, that Mike sent me, I found the answer to my question #2.
I found an answer to question 2
local session1 =
freeswitch.Session("{originate_timeout=20}sofia/192.168.1.52/1004"); This
will be trying to connect fo 20 seconds
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
local session1 = freeswitch.Session(
"{originate_timeout=20,
ringback=/usr/local/freeswitch/sounds/music/8000/ponce-preludio-in-e-major.
wav}sofia/192.168.1.52/1004");
Any solutions?
PV
Michael Jerris wrote:
There is no reason to re-create this functionality in lua, it already
exists.
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate">http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Variable_ringback">http://wiki.freeswitch.org/wiki/Variable_ringback</a>
Mike
On Oct 15, 2009, at 8:55 PM, Peter Volchek wrote:
Hi Guys,
Here is the task I need your help with.
The feature I am trying to build is called 'Find Me" or 'Follow Me'.
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.
I am using the lua language.
Here is what I am doing (pseudo code)
I'll be asking the question just in the code
session:answer();
playPrompt('transfer_greeting');
next_number = getNextNumber();
-- Question #1:
-- I am about to start a new session.
-- However, at this point I'd like to play some moho (music on hold) for
the existing one
-- Creating a new session. The destination phone start ringing
local session1 = freeswitch.Session("sofia/192.168.1.52/" .. next_number
); -- Question #2:
-- How could I specify the number of rings to wait before session answers?
Or maybe the timeout
if( session1:ready() == true ) then
-- Question #3
-- Session answered. At this point I need to stop the music on hold.
How? -- Now I need to join the existing session with the newly created one
-- there is a session:transfer method, but I can't see how I can use it
here else
playPrompt("Can't find. Please leave a message");
doReceiveMessage()'
end
Has anyone worked on that feature before. I would appreciate all possible
solutions and explanations. Thank you in advance.
_______________________________________________
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>
<pre wrap=""><!---->
_______________________________________________
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>