To add my 2c, if the performance is a **really big** concern, the solution with transaction flags as mentioned by Alex is one of the best.
In request route test for to-tag and then setflag(x). Then in onreply_route[...] or failure_route[...] test if isflagset(x). The other suggestions are also very fast, but not as fast as with transaction flags. On the other hand -- some details about avp names -- i: for avp names is saying that the name has to be treated as integer id, which is not the case for your example with: $avp(i:is_reinvite) = 1; After i: must be a number up to 2^16. Or just remove the i: and let it be string name. Cheers, Daniel On 12/07/16 15:55, Olle E. Johansson wrote: > >> On 12 Jul 2016, at 15:18, Grant Bagdasarian <g...@cm.nl >> <mailto:g...@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 > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla http://www.asipto.com - http://www.kamailio.org http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users