Hello guys,
so i'm doing on a failure_route:
$var(xgws_in_reply) = $T_rpl($hdr(X-GWs));
which when it’s present on the reply is cool…
but when there is NO REPLY, then kamailio sets it to “0”… anyway over this?
i only want to know whether it is present on the reply
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
Hello,
maybe just guard the assignment with the is_reply() function?
https://kamailio.org/docs/modules/5.5.x/modules/siputils.html#siputils.f.is_...
Or evaluate the specific header before actually assigning it with an if check?
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: David Villasmil david.villasmil.work@gmail.com Sent: Samstag, 3. Juni 2023 13:02 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] header from failure_route
Hello guys,
so i'm doing on a failure_route:
$var(xgws_in_reply) = $T_rpl($hdr(X-GWs));
which when it’s present on the reply is cool…
but when there is NO REPLY, then kamailio sets it to “0”… anyway over this?
i only want to know whether it is present on the reply
Regards,
David Villasmil email: david.villasmil.work@gmail.commailto:david.villasmil.work@gmail.com phone: +34669448337
Hey Henning,
Thanks! Well, the problem is I can’t evaluate the header on the failure_route. That’s why I was trying with T_rpl, but hdr returns 0 (as int) of the header is not present, as opposed to $null…
On Sat, 3 Jun 2023 at 22:46, Henning Westerholt hw@gilawa.com wrote:
Hello,
maybe just guard the assignment with the is_reply() function?
https://kamailio.org/docs/modules/5.5.x/modules/siputils.html#siputils.f.is_...
Or evaluate the specific header before actually assigning it with an if check?
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* David Villasmil david.villasmil.work@gmail.com *Sent:* Samstag, 3. Juni 2023 13:02 *To:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* [SR-Users] header from failure_route
Hello guys,
so i'm doing on a failure_route:
$var(xgws_in_reply) = $T_rpl($hdr(X-GWs));
which when it’s present on the reply is cool…
but when there is NO REPLY, then kamailio sets it to “0”… anyway over this?
i only want to know whether it is present on the reply
Regards,
David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337