[SR-Users] Detect 200 OK for ReINVITE
Grant Bagdasarian
gb at cm.nl
Tue Jul 12 17:11:00 CEST 2016
Hi Olle,
Yes, I knew that :D.
I went with the method Alex suggested.
In route[WITHINDLG] inside the loose_route block:
if(is_method("INVITE")) {
$avp(s:is_reinvite) = "1";
}
In onreply_route
if($avp(s:is_reinvite) == "1") {
xlog("L_INFO", "[R-ONREPLY-ROUTE-MANAGE-REPLY:$ci] !>" "Received $rs for ReINVITE $rr \r\n");
exit;
}
I’ve tested it, and it worked.
From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Olle E. Johansson
Sent: Tuesday, July 12, 2016 3:56 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
Subject: Re: [SR-Users] Detect 200 OK for ReINVITE
On 12 Jul 2016, at 15:18, Grant Bagdasarian <gb at cm.nl<mailto:gb at cm.nl>> wrote:
Hi,
Is it possible in Kamailio, or SIP in general, to detect if a 200 OK is for a ReINVITE?
Not from the 200 OK, but the matching INVITE you can check if there’s a to-tag in Kamailio and SIP.
In Kamailio, if you are stateful, you can use the TMX module pseudovariables to check the request
matching the response and check if there’s a to-tag. Check the cookbook for
$T_req(pv)
http://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables
/O
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160712/103f20a6/attachment.html>
More information about the sr-users
mailing list