[OpenSIPS-Users] Call pickup
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Jun 12 09:52:54 CEST 2012
Hi Duane,
A work around will be:
1) you receive the call from C (doing the pickup)
2) dig for original call from A to B
3) close the call to C by sending a negative reply
4) continue processing in script (for C call) by pushing the new branch
for call A to B
5) put 1 sec delay
6) cancel the original branch for A to B
This chaining will guarantee that you will get (on C) first hanged the
outgoing call and only after that you will receive the can call from A .
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 06/12/2012 03:57 AM, duane.larson at gmail.com wrote:
> Well using "get_dialog_info" works but on the Snom phone it won't ring
> since initially you are already on a call. Then the Call is canceled
> and you see that a second line is receiving a call. So with you select
> that second line you are connected to CallerA. Its a dirty hack but
> works. The only issue I see is when CallerA hangs up CallerC still
> thinks he is on the call and the call doesn't terminate. Will have to
> see whats going wrong there.
>
> I will still try the AVP way and see if that is a cleaner hack.
>
>
>
>
> On , duane.larson at gmail.com wrote:
> > Yeah it makes a little sense. I guess I would need to do a MySQL DB
> query and add the URI into an AVP.
> >
> > I found this post on Nabble and thought I might be able to use it
> >
> http://opensips-open-sip-server.1449251.n2.nabble.com/NEW-exchanging-info-between-dialogs-td4975220.html#a5035451
> >
> > I will test to see if this works. Here is what I am thinking
> >
> > C sends a Call Pickup INVITE to PREFIX+A.
> >
> > OpenSIPS does the following when it gets this INVITE
> > if(search("^Replaces:.*;")){
> > # Grab the CallID in the Replaces Header so we can cancel the call
> to User B
> > $var(Replacesb2b) = $(hdr(replaces){s.select,0,;});
> > exec_msg("/usr/local/sbin/opensipsctl fifo t_uac_cancel
> $var(Replacesb2b) 2");
> >
> > # - Set the dialog variables so the B2B dialog can see who we need
> to fail the call over to
> > store_dlg_value("CallPickupGrabber","$tU"); # - Set the dialog
> variables so the B2B dialog can see what CallID to Cancel
> > store_dlg_value("CallPickupCallID","$ci");
> > # - Set the value of the new URI the call needs to go to when it
> fails over
> > store_dlg_value("CallPickupNewCallee","$fu"); };
> >
> >
> > So a Cancel gets sent to B
> >
> > Now the first dialog, the B2B dialog, goes to failure route and we
> need to do the following within the failure_route
> >
> >
> if(get_dialog_info("CallPickupCallID","$var(x)","CallPickupGrabber","$fU")
> ) { $dlg_val("CancelCall") = $var(x)
> > }
> >
> >
> if(get_dialog_info("CallPickupNewCallee","$var(y)","CallPickupGrabber","$fU")
> ) { $dlg_val("NewBranch") = $var(y)
> > }
> >
> > # Cancel the call from Caller C who wanted to do a call pickup
> > exec_msg("/usr/local/sbin/opensipsctl fifo t_uac_cancel
> $dlg_val("CancelCall") 1");
> >
> > # Set the new Branch call
> > $ru = "sip:" + $dlg_val("NewBranch");
> >
> > t_relay();
> > exit;
> >
> > So I would think that Caller C will press a softkey when he wants to
> do a CallPickup and by pressing the key the call should be canceled
> and then Caller C's phone will ring and he can then talk to Caller A
> >
> >
> > Not sure if my logic is correct or if the get_dialog_info will solve
> my problems. Any thoughts on if you think this might work or not (I'll
> have to test later)?
> >
> >
> >
> >
> > On , Bogdan-Andrei Iancu bogdan at opensips.org> wrote:
> > > Well, this is indeed a missing piece - some kind of way to pass
> information between transactions - either directly append a new branch
> for another transaction (based on AVP matching ?), either a more
> generic way to add an AVP to another transaction.
> > >
> > >
> > >
> > > Does it make sense ?
> > >
> > >
> > >
> > > Regards,
> > >
> > >
> > >
> > > Bogdan-Andrei Iancu
> > >
> > > OpenSIPS Founder and Developer
> > >
> > > http://www.opensips-solutions.com
> > >
> > >
> > >
> > >
> > >
> > > On 06/11/2012 08:08 PM, duane.larson at gmail.com wrote:
> > >
> > >
> > > I was thinking about this last night and with the Snom Phones I am
> able to do the following.
> > >
> > >
> > >
> > > I know how to cancel the first call to the PhoneB and I am
> thinking that I can cancel the call that PhoneC does when it wants to
> do a Call Pickup. The thing I am not sure about is how on the first
> call to add a branch to PhoneCs URI. How can I pass PhoneC's URI info
> to the first call so that I can add the new branch?
> > >
> > >
> > >
> > > On , Bogdan-Andrei Iancu bogdan at opensips.org> wrote:
> > >
> > > > Hi Duane,
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > How I see this "call pickup" functionality:
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > 1) A calls to B, call is in ringing state
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > 2) C wants to pickup ringing call to B (this means C want to get
> to his phone the the call ringing from B).
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > 3) C dials PREFIX+B, indicating he wants to grab the call for B)
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > 4) the INVITE for (for the call from C) should add a new branch
> to C ( for the call to B) and to cancel the branch to B
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > 5) as a result, the call from C will be terminated and the call
> from A will be serially forked to C.
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > This is how I see this scenario.
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > Now there are same small missing pieces to make this happen -
> the most important is first to decide if the manipulation over the
> first call (adding a new branch and terminating the ongoing branch)
> should be done from script or via MI.
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > Regards,
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > Bogdan-Andrei Iancu
> > >
> > > >
> > >
> > > > OpenSIPS Founder and Developer
> > >
> > > >
> > >
> > > > http://www.opensips-solutions.com
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > On 06/10/2012 03:44 AM, osiris123d wrote:
> > >
> > > >
> > >
> > > >
> > >
> > > > Bogdan,
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > I'm trying to figure out how to get Call Pickup working since
> the PSTN
> > >
> > > >
> > >
> > > > provider can't handle the Replaces: header. Here is my post here
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> http://opensips-open-sip-server.1449251.n2.nabble.com/B2B-with-Call-Pickup-td7580224.html
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > I see in this post you talk about using MI commands and the TM
> and Dialog
> > >
> > > >
> > >
> > > > modules and the failure route to make this work. I think with
> the TM module
> > >
> > > >
> > >
> > > > I can send a CANCEL to the original Callee but how would you
> make the call
> > >
> > > >
> > >
> > > > then fail over to the Failure Route so I can send it to the next
> callee?
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > --
> > >
> > > >
> > >
> > > > View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/Call-pickup-tp7127393p7580251.html
> > >
> > > >
> > >
> > > > Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > > _______________________________________________
> > >
> > > >
> > >
> > > > Users mailing list
> > >
> > > >
> > >
> > > > Users at lists.opensips.org
> > >
> > > >
> > >
> > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > >
> > >
More information about the Users
mailing list