Bridge, Ringing

New features you'd like see on SIP Sorcery
Post Reply
bosserer
Posts: 5
Joined: Wed Feb 27, 2008 8:43 pm

Bridge, Ringing

Post by bosserer » Tue Aug 24, 2010 10:44 am

Hi,

I would like to request these two Dial Plan functions:

Bridge: Bridges 2 legs.
Ringing: Signals Ringing to the caller

What I want to do:
SS is registered with 2 providers. Provider 1 receives a call, SS does not switch this incoming call but signals "ringing" to the caller. Meanwhile SS initiates a call to my mobile number via provider 2. I reject the call and immediately call back via provider 2. SS connects these 2 calls.

My Dial Plan would look something like this:

In-Plan for SIPAccount 1:
sys.Dial(<mobile number>@SipProvider2) # will be rejected on mobile phone (could yet be accepted,too...)
sys.Ringing(<ring timeout>) # caller is kept waiting for <ring timeout> seconds and hears ringing signal.
sys.Respond(<Cannot complete call>)


In-Plan for SIPAccount2:
if <caller is my mobile phone and SIPAccount1.call is waiting>
sys.Bridge(SIPAccount1)

or so...

Regards,
bosserer

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Bridge, Ringing

Post by Aaron » Tue Aug 24, 2010 12:18 pm

You can already generate a ringing response by using sys.Respond(180, nil).

In regards to the bridge feature I don't think it would end up being very practical. Most callers won't wait around long enough for the steps you've mentioned to happen, generally you've got 15 to 20s max and then the caller will give up. It could take something like 5s for your mobile to start ringing, another 5 to 10s for you to look at it and reject the call, another 10 to 15s for you to dial in and attempt the bridge.

A much better way to do it would be to put a hold step in there. For example you could forward the incoming call to your mobile and if rejected get the sipsorcery dialplan to forward it off to a free music on hold server. You could then dial into sipsorcery with your mobile and transfer the on hold call to your mobile. In other words call parking.

bosserer
Posts: 5
Joined: Wed Feb 27, 2008 8:43 pm

Re: Bridge, Ringing

Post by bosserer » Tue Aug 24, 2010 12:46 pm

Hi,

thanks for the quick respond. What you suggest sounds reasonable, however, how do I do this:
Aaron wrote:You could then dial into sipsorcery with your mobile and transfer the on hold call to your mobile. In other words call parking.
Thanks,
bosserer

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Bridge, Ringing

Post by Aaron » Tue Aug 24, 2010 12:59 pm

You could hook up with tropo.com along the lines of http://sipsorcery.wordpress.com/2010/01 ... transfers/, that will require a fair bit of configuration.

A different approah would be to use my switchboard at http://www.sipsorcery.com/mainsite/Home/Switchboard which is designed for exactly that type of scenario.

Brad101
Posts: 5
Joined: Tue May 06, 2014 4:40 pm

Re: Bridge, Ringing

Post by Brad101 » Sun May 11, 2014 6:22 pm

I would love to see this feature too, I would like to be able to receive an incoming call, replace the ringing the user hears with music and message (by calling a sip account) whilst my mobile is still ringing, then cut the music off when I answer.

As far as I'm aware sipsorcery doesn't have event handlers right? i.e

if provider1.answer() then

else provider1.hangup() then

end

that would be cool too...

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Bridge, Ringing

Post by Aaron » Mon May 12, 2014 11:41 am

You could try this:

Code: Select all

sys.Dial("early_music@iptel.org&your_sipaccount@sipsorcery.com")
What it does is calls the easrly_music address as well as placing the call to your SIP account. The early_music address never answers the call but does respond with a Session Progress response and sets up an audio channel with some lovely music. If you answer the call then the early_music call is cancelled.

Post Reply