Call pickup

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Call pickup

Dmitriy Abramov
Hi.
Anyone has example files how make call pickup with opensips? 
I read about b2bua, but i can't understand how to use it for call pickup. 

Best regards, 
Dmitriy Abramov

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Bogdan-Andrei Iancu-2
Hello Dmitriy,

A call pickup scenario is related to call setup, so it is more appropriate to handle it at transaction level (while b2bua is at call level).

On the other hand, as far I understand the call pickup scenario, you can try using the MI commands to cancel/terminate the current ringing call and from failure route to create a new branch to the new device.

Regards,
Bogdan

On 12/26/2011 09:21 AM, Dmitriy Abramov wrote:
Hi.
Anyone has example files how make call pickup with opensips? 
I read about b2bua, but i can't understand how to use it for call pickup. 

Best regards, 
Dmitriy Abramov
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Dmitriy Abramov
Hello, Bogdan.
Thank you for answer
Where i can read more about MI and how to use it. maybe examples.

Regards,
Dmitriy Abramov.

On Dec 27, 2011, at 2:15 PM, Bogdan-Andrei Iancu wrote:

Hello Dmitriy,

A call pickup scenario is related to call setup, so it is more appropriate to handle it at transaction level (while b2bua is at call level).

On the other hand, as far I understand the call pickup scenario, you can try using the MI commands to cancel/terminate the current ringing call and from failure route to create a new branch to the new device.

Regards,
Bogdan

On 12/26/2011 09:21 AM, Dmitriy Abramov wrote:
Hi.
Anyone has example files how make call pickup with opensips? 
I read about b2bua, but i can't understand how to use it for call pickup. 

Best regards, 
Dmitriy Abramov
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Bogdan-Andrei Iancu-2
Hi Dmitriy,

The docs on the MI functions (names and what they are doing) can be found as part of the module online docs (like http://www.opensips.org/html/docs/modules/1.7.x/tm.html#id294662).

MI commands can be triggered via FIFO files, via XMLRPC or via simple UDP package.

For same examples, check "examples/web_im/" directory.

Regards,
Bogdan

On 12/28/2011 10:46 AM, Dmitriy Abramov wrote:
Hello, Bogdan.
Thank you for answer
Where i can read more about MI and how to use it. maybe examples.

Regards,
Dmitriy Abramov.

On Dec 27, 2011, at 2:15 PM, Bogdan-Andrei Iancu wrote:

Hello Dmitriy,

A call pickup scenario is related to call setup, so it is more appropriate to handle it at transaction level (while b2bua is at call level).

On the other hand, as far I understand the call pickup scenario, you can try using the MI commands to cancel/terminate the current ringing call and from failure route to create a new branch to the new device.

Regards,
Bogdan

On 12/26/2011 09:21 AM, Dmitriy Abramov wrote:
Hi.
Anyone has example files how make call pickup with opensips? 
I read about b2bua, but i can't understand how to use it for call pickup. 

Best regards, 
Dmitriy Abramov
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Dmitriy Abramov
Hi, Bogdan.
Where i can get full list of MI command? 
I saw http://www.opensips.org/Resources/DocsCoreMi17, but i want to know how i can get info about calls in opensips? 
Regards,
Dmitriy

On Dec 28, 2011, at 4:00 PM, Bogdan-Andrei Iancu wrote:

Hi Dmitriy,

The docs on the MI functions (names and what they are doing) can be found as part of the module online docs (like http://www.opensips.org/html/docs/modules/1.7.x/tm.html#id294662).

MI commands can be triggered via FIFO files, via XMLRPC or via simple UDP package.

For same examples, check "examples/web_im/" directory.

Regards,
Bogdan

On 12/28/2011 10:46 AM, Dmitriy Abramov wrote:
Hello, Bogdan.
Thank you for answer
Where i can read more about MI and how to use it. maybe examples.

Regards,
Dmitriy Abramov.

On Dec 27, 2011, at 2:15 PM, Bogdan-Andrei Iancu wrote:

Hello Dmitriy,

A call pickup scenario is related to call setup, so it is more appropriate to handle it at transaction level (while b2bua is at call level).

On the other hand, as far I understand the call pickup scenario, you can try using the MI commands to cancel/terminate the current ringing call and from failure route to create a new branch to the new device.

Regards,
Bogdan

On 12/26/2011 09:21 AM, Dmitriy Abramov wrote:
Hi.
Anyone has example files how make call pickup with opensips? 
I read about b2bua, but i can't understand how to use it for call pickup. 

Best regards, 
Dmitriy Abramov
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Ovidiu Sas
Take a look at the dialog MI functions:
http://www.opensips.org/html/docs/modules/1.7.x/dialog.html#id294909


Regards,
Ovidiu Sas

On Sun, Jan 15, 2012 at 5:42 PM, Dmitriy Abramov <[hidden email]> wrote:

> Hi, Bogdan.
> Where i can get full list of MI command?
> I saw http://www.opensips.org/Resources/DocsCoreMi17, but i want to know how
> i can get info about calls in opensips?
> Regards,
> Dmitriy
>
> On Dec 28, 2011, at 4:00 PM, Bogdan-Andrei Iancu wrote:
>
> Hi Dmitriy,
>
> The docs on the MI functions (names and what they are doing) can be found as
> part of the module online docs (like
> http://www.opensips.org/html/docs/modules/1.7.x/tm.html#id294662).
>
> MI commands can be triggered via FIFO files, via XMLRPC or via simple UDP
> package.
>
> For same examples, check "examples/web_im/" directory.
>
> Regards,
> Bogdan
>
> On 12/28/2011 10:46 AM, Dmitriy Abramov wrote:
>
> Hello, Bogdan.
> Thank you for answer
> Where i can read more about MI and how to use it. maybe examples.
>
> Regards,
> Dmitriy Abramov.
>
> On Dec 27, 2011, at 2:15 PM, Bogdan-Andrei Iancu wrote:
>
> Hello Dmitriy,
>
> A call pickup scenario is related to call setup, so it is more appropriate
> to handle it at transaction level (while b2bua is at call level).
>
> On the other hand, as far I understand the call pickup scenario, you can try
> using the MI commands to cancel/terminate the current ringing call and from
> failure route to create a new branch to the new device.
>
> Regards,
> Bogdan
>
> On 12/26/2011 09:21 AM, Dmitriy Abramov wrote:
>
> Hi.
> Anyone has example files how make call pickup with opensips?
> I read about b2bua, but i can't understand how to use it for call pickup.
>
> Best regards,
> Dmitriy Abramov
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> OpenSIPS solutions and "know-how"
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> OpenSIPS solutions and "know-how"
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Andrew Pogrebennyk
In reply to this post by Dmitriy Abramov
On 01/15/2012 11:42 PM, Dmitriy Abramov wrote:
> Hi, Bogdan.
> Where i can get full list of MI command?
> I saw http://www.opensips.org/Resources/DocsCoreMi17, but i want to know
> how i can get info about calls in opensips?
> /Regards,/
> /Dmitriy/

You should look for the paragraph "Exported MI Functions" in the
documentation of your module e.g.:
http://www.opensips.org/html/docs/modules/1.7.x/tm.html#id294563

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Dmitriy Abramov
In reply to this post by Ovidiu Sas
Thank to all. 
С Уважением,
Абрамов Дмитрий
ООО "ПиН Телеком"
Тел.: (812) 703-37-73 (доб.777)
Мобел.: (911) 718-20-02
Элдрес: [hidden email]

On Jan 16, 2012, at 2:48 AM, Ovidiu Sas wrote:

Take a look at the dialog MI functions:
http://www.opensips.org/html/docs/modules/1.7.x/dialog.html#id294909


Regards,
Ovidiu Sas

On Sun, Jan 15, 2012 at 5:42 PM, Dmitriy Abramov <[hidden email]> wrote:
Hi, Bogdan.
Where i can get full list of MI command?
I saw http://www.opensips.org/Resources/DocsCoreMi17, but i want to know how
i can get info about calls in opensips?
Regards,
Dmitriy

On Dec 28, 2011, at 4:00 PM, Bogdan-Andrei Iancu wrote:

Hi Dmitriy,

The docs on the MI functions (names and what they are doing) can be found as
part of the module online docs (like
http://www.opensips.org/html/docs/modules/1.7.x/tm.html#id294662).

MI commands can be triggered via FIFO files, via XMLRPC or via simple UDP
package.

For same examples, check "examples/web_im/" directory.

Regards,
Bogdan

On 12/28/2011 10:46 AM, Dmitriy Abramov wrote:

Hello, Bogdan.
Thank you for answer
Where i can read more about MI and how to use it. maybe examples.

Regards,
Dmitriy Abramov.

On Dec 27, 2011, at 2:15 PM, Bogdan-Andrei Iancu wrote:

Hello Dmitriy,

A call pickup scenario is related to call setup, so it is more appropriate
to handle it at transaction level (while b2bua is at call level).

On the other hand, as far I understand the call pickup scenario, you can try
using the MI commands to cancel/terminate the current ringing call and from
failure route to create a new branch to the new device.

Regards,
Bogdan

On 12/26/2011 09:21 AM, Dmitriy Abramov wrote:

Hi.
Anyone has example files how make call pickup with opensips?
I read about b2bua, but i can't understand how to use it for call pickup.

Best regards,
Dmitriy Abramov

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

osiris123d
In reply to this post by Dmitriy Abramov
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?
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Bogdan-Andrei Iancu-2
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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

osiris123d
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 <[hidden email]> 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
>
> [hidden email]
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Bogdan-Andrei Iancu-2
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, [hidden email] 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 <[hidden email]> 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
> >
> > [hidden email]
> >
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> >
> >
> >

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

osiris123d
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"); <-- tU equals the first caller - Caller A
# - 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"); <-- fu equals the person trying to capture the Call Pickup - Caller C
};


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") ) { <-- fU equals the first caller - Caller A
$dlg_val("CancelCall") = $var(x)
}

if(get_dialog_info("CallPickupNewCallee","$var(y)","CallPickupGrabber","$fU") ) { <-- fU equals the first caller - Caller A
$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 <[hidden email]> 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, [hidden email] 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 [hidden email]> 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
>
> >
>
> > [hidden email]
>
> >
>
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> >
>
> >
>
> >
>
> >
>
> >
>
>
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

osiris123d
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 , [hidden email] 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 [hidden email]> 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, [hidden email] 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 [hidden email]> 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
> >
> > >
> >
> > > [hidden email]
> >
> > >
> >
> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> >
> >
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

osiris123d
Just tested the AVP method and that is a lot cleaner since CallerC's INVITE with the Replaces header gets canceled way before the failure_route sets the new branch to CallerC. This method also doesn't give me the issue that I was seeing in the last method where CallerA hung up and CallerC still thought CallerA was on the phone.
Here is what I did

RouteX
if(search("^Replaces:.*;")){
$var(Replacesb2b) = $(hdr(replaces){s.select,0,;});
exec_msg("/usr/local/sbin/opensipsctl fifo t_uac_cancel $var(Replacesb2b) 2 > /tmp/test.txt");

t_reply("404", "All Good"); <----------- Can you think of anything better to do here?
exit;
};



Failure_Route
if(avp_db_load("$ru/username","$avp(callpickupDest)"))
{
if ( $avp(callpickupDest) != null)
{
$rU = $avp(callpickupDest);

alias_db_lookup("dbaliases" , "d");
lookup("location");

t_relay();
exit;
}
}


I'm trying to figure out if there is a better way of using the IF statement in RouteX instead of looking to see if there is a Replaces header. With Snom phones I can't put a prefix in front of the number or else it wouldn't be able to SUBSCRIBE for dialog updates and see if someone is calling the person. I'm sure there is some way. Might just need to add a prefix and when the SUBSCRIBE comes in strip it off.

Thanks for the help Bogdan!




On , [hidden email] 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 , [hidden email] 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 [hidden email]> 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, [hidden email] 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 [hidden email]> 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
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > > > [hidden email]
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > > >
>
>
> > >
>
>
> > >
>
>
> > >
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Bogdan-Andrei Iancu-2
In reply to this post by osiris123d
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, [hidden email] 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 , [hidden email] 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 [hidden email]> 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, [hidden email] 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 [hidden email]> 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
> > >
> > > >
> > >
> > > > [hidden email]
> > >
> > > >
> > >
> > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > >
> > >

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Call pickup

Bogdan-Andrei Iancu-2
In reply to this post by osiris123d
I guess any reply will do it...you may force an "487 Request Terminated"
, like the call from C (to do the pickup) was canceled :)

Regards

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 06/12/2012 05:57 AM, [hidden email] wrote:

> Just tested the AVP method and that is a lot cleaner since CallerC's
> INVITE with the Replaces header gets canceled way before the
> failure_route sets the new branch to CallerC. This method also doesn't
> give me the issue that I was seeing in the last method where CallerA
> hung up and CallerC still thought CallerA was on the phone.
> Here is what I did
>
> RouteX
> if(search("^Replaces:.*;")){
> $var(Replacesb2b) = $(hdr(replaces){s.select,0,;});
> exec_msg("/usr/local/sbin/opensipsctl fifo t_uac_cancel
> $var(Replacesb2b) 2 > /tmp/test.txt");
>
> t_reply("404", "All Good"); <----------- Can you think of anything
> better to do here?
> exit;
> };
>
>
>
> Failure_Route
> if(avp_db_load("$ru/username","$avp(callpickupDest)"))
> {
> if ( $avp(callpickupDest) != null)
> {
> $rU = $avp(callpickupDest);
>
> alias_db_lookup("dbaliases" , "d");
> lookup("location");
>
> t_relay();
> exit;
> }
> }
>
>
> I'm trying to figure out if there is a better way of using the IF
> statement in RouteX instead of looking to see if there is a Replaces
> header. With Snom phones I can't put a prefix in front of the number
> or else it wouldn't be able to SUBSCRIBE for dialog updates and see if
> someone is calling the person. I'm sure there is some way. Might just
> need to add a prefix and when the SUBSCRIBE comes in strip it off.
>
> Thanks for the help Bogdan!
>
>
>
>
> On , [hidden email] 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 , [hidden email] 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 [hidden email]> 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, [hidden email] 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 [hidden email]> 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
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > > > [hidden email]
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > > >
> >
> >
> > > >
> >
> >
> > > >
> >
> >
> > > >

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users