<div dir="ltr">Hello guys,<br><br>We have faced almost the same problem adding <b>Reason: SIP;cause=200;text="Call completed elsewhere"</b> to the t_relayed CANCEL request.<div>Is there an elegant solution to add this header?</div><div><br></div><div>PS. Switching to the stateless mode does not look pretty for us...<br> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto <<a href="mailto:alfonso.pinto@gmail.com">alfonso.pinto@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Hi guys,</div></div><div dir="auto"><br></div><div dir="auto">Thanks for your answers.</div><div dir="auto">I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?</div><div dir="auto"><br></div><div dir="auto">As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.</div><div dir="auto"><br></div><div dir="auto">Thanks for the piece of code, I will check what can be done here.</div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Alfonso</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El El vie, 31 ene 2020 a las 22:10, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alex,<br>
<br>
ok, I was reading that he wants to get just one reason header, not one dynamic generated.<br>
<br>
Just looked briefly, this seems to be the code:<br>
<br>
t_msgbuilder.c<br>
/* Build a local request based on a previous request; main<br>
 * customers of this function are local ACK and local CANCEL<br>
 */<br>
char *build_local(struct cell *Trans,unsigned int branch,<br>
        unsigned int *len, char *method, int method_len, str *to<br>
        , struct cancel_reason* reason<br>
        )<br>
<br>
Cheers,<br>
<br>
Henning<br>
<br>
-- <br>
Henning Westerholt – <a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
Kamailio services – <a href="https://gilawa.com" rel="noreferrer" target="_blank">https://gilawa.com</a> <br>
<br>
-----Original Message-----<br>
From: sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> On Behalf Of Alex Balashov<br>
Sent: Friday, January 31, 2020 9:45 PM<br>
To: <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL<br>
<br>
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?<br>
<br>
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?<br>
<br>
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:<br>
<br>
> Hello,<br>
> <br>
> have you tried to use this parameter:<br>
> <br>
> <a href="http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r" rel="noreferrer" target="_blank">http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r</a><br>
> eason<br>
> <br>
> Cheers,<br>
> <br>
> Henning<br>
> <br>
> --<br>
> Henning Westerholt – <a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a> Kamailio services – <br>
> <a href="https://gilawa.com" rel="noreferrer" target="_blank">https://gilawa.com</a><<a href="https://gilawa.com/" rel="noreferrer" target="_blank">https://gilawa.com/</a>><br>
> <br>
> From: sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> On Behalf Of <br>
> Alfonso Pinto<br>
> Sent: Wednesday, January 29, 2020 8:04 PM<br>
> To: Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
> Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL<br>
> <br>
> Hi everyone,<br>
> <br>
> I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.<br>
> <br>
> Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?<br>
> <br>
> Regards,<br>
> Alfonso<br>
<br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
--<br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div><div>BR,</div><div>Denys Pozniak<br></div><div><br></div><div><br></div></div></div></div>