SV: [reSIProcate] Handling REFERS with Replaces
Thank you for the prompt reply.
Yes, I realised that this was one way of solving the issue.
What I would prefer to do is to send the BYE when the second dialog is
connected,
So I would rather do:
void onConnected(InviteSessionHandle is, const SipMessage& msg) {
.. Do other stuff here that has to do with the
new session
// Finally check to see if this new session replaces any other if (
is.originalInvite().exists(h_Replaces) ) {
pair<InviteSessionHandle, int> presult;
presult =
dum->findInviteSession(is.originalInvite().header(h_Replaces));
if(presult != InviteSessionHandle::NotValid())
{
... // Do stuff in app to swap contexts
Presult.first->end(); // end original session
}
}
}
So in the case that the new session fails for some reason I still have the
old one.
This would be doable if I could access the original INVITE, which is kept in
ServerInviteSession for other reasons.
Is this at all possible, or are there no actual reasons to make sure that
the second session actually gets connected.
Best Regards
Anumeet
-----Ursprungligt meddelande-----
Från: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
Skickat: den 9 december 2005 14:52
Till: Anumeet Singh; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Ämne: RE: [reSIProcate] Handling REFERS with Replaces
DUM will not end the other dialog - you must control that. Here is some
code that will help
if(msg->exits(h_Replaces))
{
pair<InviteSessionHandle, int> presult;
presult = dum->findInviteSession(msg->header(h_Replaces));
if(presult != InviteSessionHandle::NotValid())
{
... // Do stuff in app to swap contexts
Presult.first->end(); // end original session
}
}
Scott
PS. I just added this info to the Wiki:
http://wiki.resiprocate.org/wiki/index.php?title=Dealing_with_REFERs
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-
> devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Anumeet Singh
> Sent: Friday, December 09, 2005 7:54 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] Handling REFERS with Replaces
>
>
> Hi
>
> I have a very simple scenario.
> I want to send a REFER with the Replaces header. This is really simple
> using the refer() method.
> In the UAC receiving the INVITE that is a result of this refer I want
to
> handle the INVITE in a normal manner.
>
> Do I have to terminate the dialog that is replaced, or is this handled
> automatically?
> If I have to do it myself, where can I get a hold of the Replaces
header,
> or
> at least the original INVITE message from the InviteSession?
> When a dialog is connected I want to check if the original request
> contained a Replaces header, use the findInviteSession and finally end
> the
replaced
> dialog. I would not want to keep the Replaces information saved
somewhere
> during the dialog setup, to be used in a later stage when the dialog
is
> connected.
>
> Best Regards
>
> Anumeet
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel