Hi all,
I'm having issues using flags in a t_branch_timeout() of failure_route{}
A brief summary of the code -
onreply_route{ setflag(14); }
failure_route { if (t_branch_timeout()) { xlog("L_ALERT","t_branch_timeout()\n$mb"); if (isflagset(14)) { xlog("L_ALERT","isflagset(14) - YES\n$mb"); } } }
The call flow is below, t_branch_timeout() is being triggered when the 200 OK is not ACK'd
-- INVITE -> <- 100 Trying -- <- 180 Ringing -- <- 200 OK -- <- 200 OK -- <- 200 OK -- <- 200 OK --
I can attempt to create a minimal .cfg if anyone wishes to replicate it, assuming I'm not missing something stupid.
Thanks,
Matthew
Hi,
Flags of this sort are unfortunately per-message; you'd want something transaction-persistent, like $avps.
-- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: Marrold Sent: Sunday, April 24, 2016 10:34 To: Kamailio (SER) - Users Mailing List Reply To: Kamailio (SER) - Users Mailing List Subject: [SR-Users] Using flags in t_branch_timeout() section of failure_route{}
Hi Alex,
Thanks for the response, I will try using an avp instead.
I interpreted "message flags (or transaction flags) will works as they do now, but the branch mask will be removed (rolling back as in 0.9.x versions). These flags are transaction persistent." from https://www.kamailio.org/dokuwiki/doku.php/utils:flags to mean the flags were per transaction, however that Wiki page is a little old.
Is there some more updated documentation regarding flags I should read?
On Sun, Apr 24, 2016 at 4:20 PM, Alex Balashov abalashov@evaristesys.com wrote:
Hi,
Flags of this sort are unfortunately per-message; you'd want something transaction-persistent, like $avps.
-- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: Marrold Sent: Sunday, April 24, 2016 10:34 To: Kamailio (SER) - Users Mailing List Reply To: Kamailio (SER) - Users Mailing List Subject: [SR-Users] Using flags in t_branch_timeout() section of failure_route{}
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
As an update, I've attempted to use the AVPs but they still don't appear in the t_branch_timeout() function for a missing ACK.
Daniel-Constantin did mention in a previous thread that he wasn't certain t_branch_timeout() would trigger for an ACK, as the INVITE, 200 OK Transaction completes, and the ACK is a separate transaction.
Testing indicates that t_branch_timeout() does trigger for a missing ACK, but perhaps as it's technically a separate transaction the AVPs associated with the invite are lost?
Unfortunately I'm not much of a programmer so I can't dive into the code for clues.
On Sun, Apr 24, 2016 at 4:44 PM, Marrold kamailio@marrold.co.uk wrote:
Hi Alex,
Thanks for the response, I will try using an avp instead.
I interpreted "message flags (or transaction flags) will works as they do now, but the branch mask will be removed (rolling back as in 0.9.x versions). These flags are transaction persistent." from https://www.kamailio.org/dokuwiki/doku.php/utils:flags to mean the flags were per transaction, however that Wiki page is a little old.
Is there some more updated documentation regarding flags I should read?
On Sun, Apr 24, 2016 at 4:20 PM, Alex Balashov abalashov@evaristesys.com wrote:
Hi,
Flags of this sort are unfortunately per-message; you'd want something transaction-persistent, like $avps.
-- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: Marrold Sent: Sunday, April 24, 2016 10:34 To: Kamailio (SER) - Users Mailing List Reply To: Kamailio (SER) - Users Mailing List Subject: [SR-Users] Using flags in t_branch_timeout() section of failure_route{}
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
That's a good point. I didn't think about the scenario too carefully. When a timeout triggers a failure_route, it's a branch failure--rather more abstract than a transaction timeout. So, transaction variables may not be in scope for it.
In that case, I'm not sure what to suggest other than keeping your own data (keyed by Call-ID, say) in 'htable', for instance.
-- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: Marrold Sent: Sunday, April 24, 2016 12:21 To: Kamailio (SER) - Users Mailing List Reply To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Using flags in t_branch_timeout() section of failure_route{}
In that case, I'm not sure what to suggest other than keeping your own
data (keyed by Call-ID, say) in 'htable', for instance.
I'm guessing this will be necessary, I will give it a try.
Thanks again
On Sun, Apr 24, 2016 at 5:25 PM, Alex Balashov abalashov@evaristesys.com wrote:
That's a good point. I didn't think about the scenario too carefully. When a timeout triggers a failure_route, it's a branch failure--rather more abstract than a transaction timeout. So, transaction variables may not be in scope for it.
In that case, I'm not sure what to suggest other than keeping your own data (keyed by Call-ID, say) in 'htable', for instance.
-- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: Marrold Sent: Sunday, April 24, 2016 12:21 To: Kamailio (SER) - Users Mailing List Reply To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Using flags in t_branch_timeout() section of failure_route{}
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