Yeah it makes a little sense. I guess I would need to do a MySQL DB query and add the URI into an AVP.<br /><br />I found this post on Nabble and thought I might be able to use it<br />http://opensips-open-sip-server.1449251.n2.nabble.com/NEW-exchanging-info-between-dialogs-td4975220.html#a5035451<br /><br />I will test to see if this works. Here is what I am thinking<br /><br />C sends a Call Pickup INVITE to PREFIX+A.<br /><br />OpenSIPS does the following when it gets this INVITE<br /> if(search("^Replaces:.*;")){<br /> # Grab the CallID in the Replaces Header so we can cancel the call to User B<br /> $var(Replacesb2b) = $(hdr(replaces){s.select,0,;});<br /> exec_msg("/usr/local/sbin/opensipsctl fifo t_uac_cancel $var(Replacesb2b) 2");<br /><br /> # - Set the dialog variables so the B2B dialog can see who we need to fail the call over to<br /> store_dlg_value("CallPickupGrabber","$tU"); <-- tU equals the first caller - Caller A<br /> # - Set the dialog variables so the B2B dialog can see what CallID to Cancel<br /> store_dlg_value("CallPickupCallID","$ci");<br /> # - Set the value of the new URI the call needs to go to when it fails over<br /> store_dlg_value("CallPickupNewCallee","$fu"); <-- fu equals the person trying to capture the Call Pickup - Caller C<br /> };<br /><br /><br />So a Cancel gets sent to B<br /><br />Now the first dialog, the B2B dialog, goes to failure route and we need to do the following within the failure_route<br /><br /> if(get_dialog_info("CallPickupCallID","$var(x)","CallPickupGrabber","$fU") ) { <-- fU equals the first caller - Caller A<br /> $dlg_val("CancelCall") = $var(x)<br /> }<br /><br /> if(get_dialog_info("CallPickupNewCallee","$var(y)","CallPickupGrabber","$fU") ) { <-- fU equals the first caller - Caller A<br /> $dlg_val("NewBranch") = $var(y)<br /> }<br /><br /> # Cancel the call from Caller C who wanted to do a call pickup<br /> exec_msg("/usr/local/sbin/opensipsctl fifo t_uac_cancel $dlg_val("CancelCall") 1");<br /><br /> # Set the new Branch call<br /> $ru = "sip:" + $dlg_val("NewBranch");<br /><br /> t_relay();<br /> exit;<br /><br />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<br /><br /><br />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)?<br /><br /><br /><br /><br />On , Bogdan-Andrei Iancu <bogdan@opensips.org> wrote:<br />> 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.<br />> <br />> <br />> <br />> Does it make sense ?<br />> <br />> <br />> <br />> Regards,<br />> <br />> <br />> <br />> Bogdan-Andrei Iancu<br />> <br />> OpenSIPS Founder and Developer<br />> <br />> http://www.opensips-solutions.com<br />> <br />> <br />> <br />> <br />> <br />> On 06/11/2012 08:08 PM, duane.larson@gmail.com wrote:<br />> <br />> <br />> I was thinking about this last night and with the Snom Phones I am able to do the following.<br />> <br />> <br />> <br />> 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?<br />> <br />> <br />> <br />> On , Bogdan-Andrei Iancu bogdan@opensips.org> wrote:<br />> <br />> > Hi Duane,<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > How I see this "call pickup" functionality:<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > 1) A calls to B, call is in ringing state<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > 2) C wants to pickup ringing call to B (this means C want to get to his phone the the call ringing from B).<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > 3) C dials PREFIX+B, indicating he wants to grab the call for B)<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > 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<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > 5) as a result, the call from C will be terminated and the call from A will be serially forked to C.<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > This is how I see this scenario.<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > 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.<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > Regards,<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > Bogdan-Andrei Iancu<br />> <br />> ><br />> <br />> > OpenSIPS Founder and Developer<br />> <br />> ><br />> <br />> > http://www.opensips-solutions.com<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > On 06/10/2012 03:44 AM, osiris123d wrote:<br />> <br />> ><br />> <br />> ><br />> <br />> > Bogdan,<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > I'm trying to figure out how to get Call Pickup working since the PSTN<br />> <br />> ><br />> <br />> > provider can't handle the Replaces: header. Here is my post here<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > http://opensips-open-sip-server.1449251.n2.nabble.com/B2B-with-Call-Pickup-td7580224.html<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > I see in this post you talk about using MI commands and the TM and Dialog<br />> <br />> ><br />> <br />> > modules and the failure route to make this work. I think with the TM module<br />> <br />> ><br />> <br />> > I can send a CANCEL to the original Callee but how would you make the call<br />> <br />> ><br />> <br />> > then fail over to the Failure Route so I can send it to the next callee?<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > --<br />> <br />> ><br />> <br />> > View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Call-pickup-tp7127393p7580251.html<br />> <br />> ><br />> <br />> > Sent from the OpenSIPS - Users mailing list archive at Nabble.com.<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > _______________________________________________<br />> <br />> ><br />> <br />> > Users mailing list<br />> <br />> ><br />> <br />> > Users@lists.opensips.org<br />> <br />> ><br />> <br />> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> ><br />> <br />> > <br />> <br />> <br />>