[Freeswitch-dev] connecting two sessions
Michael Jerris
mike at jerris.com
Thu Oct 15 18:48:58 PDT 2009
There is no reason to re-create this functionality in lua, it already
exists.
http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate
http://wiki.freeswitch.org/wiki/Variable_ringback
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20091015/c9fb1efa/attachment-0001.html
More information about the FreeSWITCH-dev
mailing list