<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>how do you expect to fill the value of the header?</p>
<p>Typically it is build based on the response of the INVITE,
probably the reason it was implemented inside the tm module. I
need some example of possible cases you want to be covered to see
what's possible now or what can be added to enable them.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 17.11.20 15:17, Denys Pozniak wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+x3Axo2YifJghBDvBrS=5STxXoczG+_fm9Tpk_VvAwwLkriaQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello!
<div><br>
</div>
<div>We need to append our own Reason header for the "relayed"
CANCEL message, if it is not on the input.</div>
<div>Like below:</div>
<div><br>
</div>
<div><i>if ( is_method("CANCEL") &&
!is_present_hf("Reason") ) {<br>
</i></div>
<div><i> append_hf("Reason: ....);</i></div>
<div><i> t_relay();</i></div>
<div><i>...</i></div>
<div><i><br>
</i></div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вт, 17 нояб. 2020 г. в 13:00,
Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@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>
<p>Hello,</p>
<p>what is exactly the problem? The header is not added if
you enable:</p>
<p> *
<a
href="http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason"
target="_blank" moz-do-not-send="true">http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason</a></p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 16.11.20 20:43, Denys Pozniak wrote:<br>
</div>
<blockquote type="cite">
<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"
target="_blank" moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">https://skalatan.de/blog/</a><br>
Kamailio services – <a
href="https://gilawa.com" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://gilawa.com</a>
<br>
<br>
-----Original Message-----<br>
From: sr-users <<a
href="mailto:sr-users-bounces@lists.kamailio.org"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services – <br>
> <a href="https://gilawa.com"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://gilawa.com</a><<a
href="https://gilawa.com/" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://gilawa.com/</a>><br>
> <br>
> From: sr-users <<a
href="mailto:sr-users-bounces@lists.kamailio.org"
target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
> <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">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"
moz-do-not-send="true">http://www.evaristesys.com/</a>,
<a href="http://www.csrpswitch.com/"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://www.csrpswitch.com/</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">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" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr"><br>
<div>
<div>BR,</div>
<div>Denys Pozniak<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</div>
</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>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>