[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serusers
Subject:    Re: [SR-Users] Re-write contact header
From:       David Villasmil <david.villasmil.work () gmail ! com>
Date:       2020-01-29 13:03:17
Message-ID: CAFGRPVq9o8+DfsAs2GtkUfM1JJiBCdFiNFzvYReFUWecLJzzYg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


i Don't see any reference to redis in
https://kamailio.org/docs/modules/4.3.x/modules/topoh.html it should work
without redis.

Can you please share the log when kamailio receives the ACK?

On Wed, 29 Jan 2020 at 12:25, Yuriy Gorlichenko <ovoshlook@gmail.com> wrote:

> You always can realize all those things by your own by saving information
> in additional params in contact and ruri or locally in the db you are using
> with kamailio or in the hash.
> It's required to write more config aka codebut still a way.
>
> On Wed, 29 Jan 2020, 13:06 egemen ulus, <ulus_egemen@hotmail.com> wrote:
>
>> Definitely you're right but remote site can't solve their problem, that's
>> why I am trying to solve that.
>>
>> Btw, I ve achieved to hide the IP address of contact header thanks to
>> topoh. But once kamailio got ack, it doesn't know where to send, that means
>> it can't decode the key. (it is my opinion)
>>
>> When I searched it, I saw that I should use topos & redis to store. But
>> no module on Kamailio 4.3.x. it might be released on 5.x and above..
>>
>> Is there any recommendation for decoding properly?
>>
>> Get Outlook for Android <https://aka.ms/ghei36>
>>
>> ------------------------------
>> *From:* sr-users <sr-users-bounces@lists.kamailio.org> on behalf of
>> Yuriy Gorlichenko <ovoshlook@gmail.com>
>> *Sent:* Wednesday, January 29, 2020 12:25:03 PM
>> *To:* Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
>> *Subject:* Re: [SR-Users] Re-write contact header
>>
>> It is wrong if your remote party ignores record-route. If it does not
>> support work with RR/Route headers it at least should interrupt transaction
>> on the first reply that contains RR.
>>
>> However There are a couple of ways to make kamailio work as SBC:
>> - topos module
>> - Rewrite contact header manually ( by removing old and inserting new one)
>>
>> NAT helper functions will not help you as they are check source address
>> of the message and fix contact based on this part. So it will not Rewrite
>> Contact address on SBC address. It will Rewrite contact if it does not
>> match with the source address of the message.
>>
>> On Wed, 29 Jan 2020, 09:52 egemen ulus, <ulus_egemen@hotmail.com> wrote:
>>
>> Hi everyone,
>>
>> I have asterisk farm and kamailio which located front of asterisks farm
>> as a proxy.
>>
>> When someone send a invite from outside to my kamailio (without record
>> route), i forward it to my Asterisk farm. Then My one of Asterisk reply it
>> as 200 ok. Then my kamailio forward this 200 ok to remote side with record
>> route. But in my 200 ok message, contact header contains my Asterisk IP
>> address. That is why remote side tries to send ACK to Asterisk.
>>
>> How to rewrite my contact header as my kamailio (SBC) address ?
>>
>> Actually I tried fixed nated contact and advertise ip but I couldn't make
>> it worked. I am really new on that. Kamailio cfg file is attached.
>>
>> Please help!
>>
>> Egemen
>>
>> Get Outlook for Android <https://aka.ms/ghei36>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337

[Attachment #5 (text/html)]

<div><div dir="auto">i Don't see any reference to redis in  <div><a \
href="https://kamailio.org/docs/modules/4.3.x/modules/topoh.html">https://kamailio.org/docs/modules/4.3.x/modules/topoh.html</a> \
it should work without redis.</div><div dir="auto"><br></div><div dir="auto">Can you \
please share the log when kamailio receives the ACK?</div></div></div><div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 29 Jan 2020 at 12:25, \
Yuriy Gorlichenko &lt;<a \
href="mailto:ovoshlook@gmail.com">ovoshlook@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div \
dir="auto">You always can realize all those things by your own by saving information \
in additional params in contact and ruri or locally in the db you are using with \
kamailio or in the hash.<div dir="auto">It&#39;s required to write more config aka \
codebut still a way.  </div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Wed, 29 Jan 2020, 13:06 egemen ulus, &lt;<a \
href="mailto:ulus_egemen@hotmail.com" target="_blank">ulus_egemen@hotmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">




<div>
<div dir="auto" style="direction:ltr;margin:0px;padding:0px;font-family:sans-serif;font-size:11pt;color:black">
 Definitely you&#39;re right but remote site can&#39;t solve their problem, \
that&#39;s why I am trying to solve that.<br> <br>
</div>
<div dir="auto" style="direction:ltr;margin:0px;padding:0px;font-family:sans-serif;font-size:11pt;color:black">
 Btw, I ve achieved to hide the IP address of contact header thanks to topoh. But \
once kamailio got ack, it doesn&#39;t know where to send, that means it can&#39;t \
decode the key. (it is my opinion)<br> <br>
</div>
<div dir="auto" style="direction:ltr;margin:0px;padding:0px;font-family:sans-serif;font-size:11pt;color:black">
 When I searched it, I saw that I should use topos &amp; redis to store. But no \
module on Kamailio 4.3.x. it might be released on 5.x and above.. <br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0px;padding:0px;font-family:sans-serif;font-size:11pt;color:black">
 Is there any recommendation for decoding properly?<br>
<br>
</div>
<div dir="auto" style="direction:ltr;margin:0px;padding:0px;font-family:sans-serif;font-size:11pt;color:black">
 <span id="m_-2085450699106402547m_-788615538718736154OutlookSignature" \
style="font-family:sans-serif"> <div dir="auto" \
style="direction:ltr;margin:0px;padding:0px;font-family:sans-serif;font-size:11pt;color:black">
 Get <a href="https://aka.ms/ghei36" rel="noreferrer" target="_blank" \
style="font-family:sans-serif">Outlook for Android</a></div> </span><br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-2085450699106402547m_-788615538718736154divRplyFwdMsg" dir="ltr"><font \
face="Calibri, sans-serif" \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><b \
style="font-family:Calibri,sans-serif">From:</b> sr-users &lt;<a \
href="mailto:sr-users-bounces@lists.kamailio.org" rel="noreferrer" target="_blank" \
style="font-family:Calibri,sans-serif">sr-users-bounces@lists.kamailio.org</a>&gt; on \
behalf of Yuriy Gorlichenko &lt;<a href="mailto:ovoshlook@gmail.com" rel="noreferrer" \
target="_blank" style="font-family:Calibri,sans-serif">ovoshlook@gmail.com</a>&gt;<br>
 <b style="font-family:Calibri,sans-serif">Sent:</b> Wednesday, January 29, 2020 \
12:25:03 PM<br> <b style="font-family:Calibri,sans-serif">To:</b> Kamailio (SER) - \
Users Mailing List &lt;<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" \
target="_blank" style="font-family:Calibri,sans-serif">sr-users@lists.kamailio.org</a>&gt;<br>
 <b style="font-family:Calibri,sans-serif">Subject:</b> Re: [SR-Users] Re-write \
contact header</font> <div>  </div>
</div>
<div>
<div dir="auto">
<div>It is wrong if your remote party ignores record-route. If it does not support \
work with RR/Route headers it at least should interrupt transaction on the first \
reply that contains RR.  </div> <div dir="auto"><br>
</div>
<div dir="auto">However There are a couple of ways to make kamailio work as SBC:  \
</div> <div dir="auto">- topos module</div>
<div dir="auto">- Rewrite contact header manually ( by removing old and inserting new \
one)</div> <div dir="auto">  </div>
<div dir="auto">NAT helper functions will not help you as they are check source \
address of the message and fix contact based on this part. So it will not Rewrite \
Contact address on SBC address. It will Rewrite contact if it does not match with the \
source address  of the message.  <br>
<br>
<div dir="auto">
<div dir="ltr">On Wed, 29 Jan 2020, 09:52 egemen ulus, &lt;<a \
href="mailto:ulus_egemen@hotmail.com" rel="noreferrer noreferrer" \
target="_blank">ulus_egemen@hotmail.com</a>&gt; wrote:<br> </div>
<blockquote style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
 <div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 Hi everyone,</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 <br>
</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 I have asterisk farm and kamailio which located front of asterisks farm as a \
proxy.</div> <div dir="auto" \
style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)"> <br>
</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 When someone send a invite from outside to my kamailio (without record route), i \
forward it to my Asterisk farm. Then My one of Asterisk reply it as 200 ok. Then my \
kamailio forward this 200 ok to remote side with record route. But in my 200 ok \
message, contact  header contains my Asterisk IP address. That is why remote side \
tries to send ACK to Asterisk.</div> <div dir="auto" \
style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)"> <br>
</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 How to rewrite my contact header as my kamailio (SBC) address ?  </div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 <br>
</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 Actually I tried fixed nated contact and advertise ip but I couldn&#39;t make it \
worked. I am really new on that. Kamailio cfg file is attached.</div> <div dir="auto" \
style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)"> <br>
</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 Please help!  </div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 <br>
</div>
<div dir="auto" style="text-align:left;background-color:rgb(255,255,255);color:rgb(33,33,33)">
 Egemen  </div>
<div id="m_-2085450699106402547m_-788615538718736154x_m_-8952056524737673405m_-4021647340761879394ms-outlook-mobile-signature">
 <div><br>
</div>
Get <a href="https://aka.ms/ghei36" rel="noreferrer noreferrer noreferrer" \
target="_blank">Outlook for Android</a></div> </div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer noreferrer" \
target="_blank">sr-users@lists.kamailio.org</a><br> <a \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer \
noreferrer noreferrer noreferrer" \
target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br> \
</blockquote> </div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" \
target="_blank">sr-users@lists.kamailio.org</a><br> <a \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer \
noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
 </blockquote></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></div>-- <br><div dir="ltr" class="gmail_signature" \
data-smartmail="gmail_signature"><div \
dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a \
href="mailto:david.villasmil.work@gmail.com" \
target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: \
+34669448337</div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic