<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Actually I am a bit more skeptical than Alex on this one and I
tend to say that messing with that avp value it is a wrong
approach.</p>
<p>The value of the received_avp is saved in the location table and
used later for sending traffic to that device, so if you remove
the transport from there, practically you make Kamailio to use UDP
instead of the correct transport, even if that transport is still
in the contact address -- obviously, traffic will fail to be
routed to the device unless the device is listening on same port
for UDP.</p>
<p>More than that, when building the Contact headers for 200ok of
REGISTER, the value might not be taken from the avp, but from the
location table records. For sure that is done in case the user has
many devices, because the 200ok has all the Contacts of that
device, not only the one for that specific REGISTER request (this
is required by SIP specs).</p>
<p>Because I haven't developed this part of the code, I cannot say
for sure, but again, it is my expectation based on SIP specs and
what is done during save() and lookup() of location records.</p>
<p>So I strongly recommend at least to test properly before
deploying to production or look at the related C code in registrar
and usrloc modules to confirm the behaviour you expect.</p>
<p>What is for sure is that by setting the modparam received_param
to empty, the received parameter is not added to Contact headers
of 200ok. It is not impacting at all what Kamailio has to do
internally during save() location.</p>
<p>The parameter for received_avp is for telling to kamailio what
variable to use to store a string build from source ip/port/proto
for some operations during save().</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 30.01.19 03:27, David Cunningham
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHGbP-9QjV+-QkGcPk1ZHWkMdg9ZAZC1TyQ8DgUL4mNfFr-+Uw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Great, thanks for letting me know.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 30 Jan 2019 at 13:10,
Alex Balashov <<a href="mailto:abalashov@evaristesys.com"
moz-do-not-send="true">abalashov@evaristesys.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I
don't see any issues with it, no...<br>
<br>
On Wed, Jan 30, 2019 at 01:06:40PM +1300, David Cunningham
wrote:<br>
<br>
> Hi Alex,<br>
> <br>
> We already had this line in our kamailio.cfg:<br>
> modparam( "nathelper|registrar", "received_avp",
"$avp(RECEIVED)" )<br>
> <br>
> We do need to change the received parameter conditionally
depending on the<br>
> user agent, and the following seems to work:<br>
> if ( $ua =~ "ewb2bua" ) {<br>
> avp_subst( "$avp(RECEIVED)",
"/(.*);transport=TLS/\1/i" );<br>
> }<br>
> <br>
> Can you see any issues with this?<br>
> <br>
> Thank you!<br>
> <br>
> <br>
> On Wed, 30 Jan 2019 at 10:50, David Cunningham <<a
href="mailto:dcunningham@voisonics.com" target="_blank"
moz-do-not-send="true">dcunningham@voisonics.com</a>><br>
> wrote:<br>
> <br>
> > Hello everyone who replied, and thank you for your
advice! We will try the<br>
> > suggestions given.<br>
> ><br>
> ><br>
> > On Wed, 30 Jan 2019 at 01:34, Alex Balashov <<a
href="mailto:abalashov@evaristesys.com" target="_blank"
moz-do-not-send="true">abalashov@evaristesys.com</a>><br>
> > wrote:<br>
> ><br>
> >> Hi David,<br>
> >><br>
> >> Well, the registrar's 200 OK should include the
very Contact binding<br>
> >> that was stored for the given AOR, and for a TLS
registrant, that's<br>
> >> going to unavoidably contain the ;transport=TLS
attribute, because TLS<br>
> >> is not the default presumed transport in the
absence of a ;transport<br>
> >> attribute.<br>
> >><br>
> >> If the issue is specifically with the occurrence
of ;transport=TLS in<br>
> >> the 'received' parameter, that can be modulated
here:<br>
> >><br>
> >><br>
> >> <a
href="https://kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.p.received_param"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.p.received_param</a><br>
> >><br>
> >> And if it needs to be controlled on a
situational/per-registration<br>
> >> basis, one can use the AVP:<br>
> >><br>
> >><br>
> >> <a
href="https://kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.p.received_avp"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.p.received_avp</a><br>
> >><br>
> >> If you set it to empty for a registration from a
certain type of device,<br>
> >> the parameter will not be populated and thus not
reflected back to the<br>
> >> registering UA.<br>
> >><br>
> >> -- Alex<br>
> >><br>
> >> On Tue, Jan 29, 2019 at 03:28:38PM +1300, David
Cunningham wrote:<br>
> >><br>
> >> > Hello,<br>
> >> ><br>
> >> > I'm hoping someone can give advice on
altering the received parameter in<br>
> >> > the Contact header on a reply. The
situation is that a customer is<br>
> >> > REGISTERing using TLS, and our Kamailio
replies with a 200 OK that<br>
> >> includes<br>
> >> > a Contact header like this:<br>
> >> ><br>
> >> > Contact: <<a class="moz-txt-link-freetext" href="sip:123456789@xx.xx.102.10">sip:123456789@xx.xx.102.10</a><br>
> >> ><br>
> >>
:5061;transport=tls>;expires=3600;received=<a class="moz-txt-link-rfc2396E" href="sip:xx.xx.102.10:36051;transport=TLS">"sip:xx.xx.102.10:36051;transport=TLS"</a><br>
> >> ><br>
> >> > The customer's device apparently had an
issue with this, and the device<br>
> >> > manufacturer advises that they need the
";transport=TLS" on the received<br>
> >> > parameter removed. This sounds like a
strange requirement, but it's what<br>
> >> > we've been told. Does anyone know how to
alter this in a Kamailio<br>
> >> > configuration?<br>
> >> ><br>
> >> > Our system uses www_authorize to
authenticate and is running Kamailio<br>
> >> 4.2.1.<br>
> >> ><br>
> >> > Thanks in advance for any help!<br>
> >> ><br>
> >> > --<br>
> >> > David Cunningham, Voisonics Limited<br>
> >> > <a href="http://voisonics.com/"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://voisonics.com/</a><br>
> >> > USA: +1 213 221 1092<br>
> >> > New Zealand: +64 (0)28 2558 3782<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>
> >><br>
> ><br>
> ><br>
> > --<br>
> > David Cunningham, Voisonics Limited<br>
> > <a href="http://voisonics.com/" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://voisonics.com/</a><br>
> > USA: +1 213 221 1092<br>
> > New Zealand: +64 (0)28 2558 3782<br>
> ><br>
> <br>
> <br>
> -- <br>
> David Cunningham, Voisonics Limited<br>
> <a href="http://voisonics.com/" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://voisonics.com/</a><br>
> USA: +1 213 221 1092<br>
> New Zealand: +64 (0)28 2558 3782<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>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>David Cunningham, Voisonics Limited<br>
<a href="http://voisonics.com/"
target="_blank" moz-do-not-send="true">http://voisonics.com/</a><br>
USA: +1 213 221 1092<br>
New Zealand: +64 (0)28 2558 3782</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</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>
Kamailio World Conference - May 6-8, 2019 -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in Washington, DC, USA -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
</body>
</html>