[Freeswitch-users] No reINVITE when bridging two sessions from JavaScript with bypass_media_after_bridge=true
Michael Jerris
mike at jerris.com
Wed Feb 10 07:14:22 PST 2010
I would suggest using scripts in between the bridge attempts when you need to do logic, but to do most of this in dialplan where you can. so through 3, you can handle however you were, then drip A back to dialplan to bridge the call (continue_on_fail, hangup_after_bridge=false), then after bridge, call another script if you need to do more advanced logic.
On Feb 10, 2010, at 3:35 AM, Timur Valishev wrote:
> Dear Mike,
>
> I'm trying to build a kind of complicated callback. I will be happy if
> you suggest alternative way to do it!
>
> Scenario is:
>
> 0. Get command over the socket to initiate connection, get A-number,
> B-number, route preference, Caller ID option (incognito/normal)
> 1. Call billing stored procedure to determine maximum call duration
> 2. Reply over the socket (or better through database?) that connection
> is in progrees (to display it on the user GUI)
> 3. Initiate connection to A-number
> 4. Upon connection to A, say welcome, start calling B, play ringback tone
> 5. Upon dialling B, call billing stored procedure to report that
> session state changed and report the status to user GUI (over the
> socket or through the database?)
> 5.1 If there was error during connection - speak the reason to end
> user (e.g. "Number busy" or "Timeout expired" etc.)
> 6. Join peers in bypass media mode
> 6.1 Wait for various commands over the socket - e.g. transfer the
> call, put on hold, join to conference etc. User will have GUI for that
> operations.
> 7. If B hangs up, call billing stored procedure to finalize session
> and calculate the cost of the call. Cost is to be calculated only by
> B-leg length. Speak to A the cost of the call, say thanks and hang up.
> 7.1 If A hangs up, just call billing and terminate.
>
> Best regards,
> Timur Valishev
>
> 2010/2/10 Michael Jerris <mike at jerris.com>:
>> controlling multiple calls in a script like this is tricky, you need to use
>> the first session to create the second one. Why are you not just doing an
>> originate to do all of this not even in a js file? What exactly are you
>> trying to accomplish
>> Mike
More information about the FreeSWITCH-users
mailing list