<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Arnout,</p>
<p>don't worry, everybody started somewhere. Great that it works now. :-)<br>
</p>
<p>About the changing the from and to header - there is indeed functionality in the uac module for that, look for the "replace" functions there.</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="moz-cite-prefix">Am 17.09.19 um 13:35 schrieb Arnout Van Den Kieboom:<br>
</div>
<blockquote type="cite" cite="mid:CANZmcfOxSRtsS0zVEjW=7K-_nfuwNuE-s24WBZkMpDdNhiki0Q@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">Yes sorry, it is a typo.
<div><br>
</div>
<div>I meant public ip...</div>
<div><br>
</div>
<div>But indeed, it does go once again through the firewall.</div>
<div>I am thinking the problem is here:</div>
<div><br>
</div>
<div>In the tcpdump (on kamailio) I see it says incoming call from:</div>
<div><br>
</div>
<div>sip:number@IP OF CARRIER</div>
<div><br>
</div>
<div>Ans it is forwarded this way to pbx</div>
<div><br>
</div>
<div>I "think" that this way the PBX will send a reply directly to the IP of the carrier for RTP. </div>
<div>When I look at the tcpdump (on the pbx) it does seem this way.</div>
<div>(I am still trying to comprehend the whole sip dialog, learning bit by bit)</div>
<div><br>
</div>
<div>So, I am trying to change the "from" and "to" header to use the ip of kamailio, and not of the carrier.</div>
<div>For this I am using uac module. But no success until now...</div>
<div><br>
</div>
<div>I had to do this to get call from extension on pbx, through kamailio , to carrier to work (And this works (hurray)). </div>
<div><br>
</div>
<div>(Maybe I'm saying stupid stuff and I'm totally wrong)</div>
<div><br>
</div>
<div>Thanks a lot for the help! </div>
<div><br>
</div>
<div>Arnout</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Op di 17 sep. 2019 om 11:01 schreef 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 dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>might be just a typing mistake, but:</div>
<div><br>
</div>
<div>rtpproxy -A  "private ip" -F -l "local ip" -m 10000 -M 20000 -s udp:*:7722 -d INFO</div>
<div><br>
</div>
<div>says that -A is private ip, it should be public IP.</div>
<div><br>
</div>
<div>Then, towards asterisk, is it everything on a private network, or does it go again through some FW with public ip and port forwarding?</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Daniel<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Sep 17, 2019 at 10:23 AM Arnout Van Den Kieboom <<a href="mailto:arnoutvdkieboom@gmail.com" target="_blank" moz-do-not-send="true">arnoutvdkieboom@gmail.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">
<div dir="ltr">Hi,
<div><br>
</div>
<div>Firewall (PFsense) does port forwarding:</div>
<div><br>
</div>
<div>inbound publicIP:5060 -->  private ip (192.168.150.119)</div>
<div><br>
</div>
<div>inbound PublicIP:10000 to 20000 -> private ip (192.168.150.119)</div>
<div><br>
</div>
<div>The public ip is set in the config file (kamailio.cfg) and RTP proxy is started with </div>
<div><br>
</div>
<div>rtpproxy -A  "private ip" -F -l "local ip" -m 10000 -M 20000 -s udp:*:7722 -d INFO<br>
</div>
<div><br>
</div>
<div>In the cfg file NATtin is defined. (define with_nat)</div>
<div>rtpproxy module is loaded. </div>
<div><br>
</div>
<div>This works for most audio situations, except with the carrier </div>
<div>Also very important: the carrier i am using for testing requires authentication, so I am using the uac module.</div>
<div><br>
</div>
<div>I can see the registration with the provider, i see the inbound call in kamailio, I see the inbound call in asterisk. </div>
<div>A connection is set up like it should, but then there is One way audio.</div>
<div><br>
</div>
<div>The weird thing is: </div>
<div>this route works without a problem: carrier --> FW -->kamailio --> (back through firewall) FW --> user subscribed to kamaiolio.</div>
<div>(which should imply the same NAT'ing problems?)</div>
<div><br>
</div>
<div>If you need more info, feel free to ask!</div>
<div><br>
</div>
<div>PS: What i haven't tried yet is to call from asterisk through kamailio to the carrier number, this is what i'll set up and test next)</div>
<div><br>
</div>
<div>Arnout</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Op ma 16 sep. 2019 om 13:26 schreef Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank" 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 dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>is Kamailio and RTPProxy (or Asterisk) using public IP addresses? Or they listen on a private address and the firewall does port forwarding of a public IP address?</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Daniel<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Sep 16, 2019 at 10:51 AM Arnout Van Den Kieboom <<a href="mailto:arnoutvdkieboom@gmail.com" target="_blank" moz-do-not-send="true">arnoutvdkieboom@gmail.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">
<div dir="ltr">Hi,
<div><br>
</div>
<div>First of all, I'm really new to Kamailio. So sorry if I ask a stupid question, or perhaps a really weird one.</div>
<div><br>
</div>
<div>I started using kamailio in a test environment about a week ago.</div>
<div><br>
</div>
<div>for setup i have the situation for inbound calls: Carrier --> FW (NAT) --> Kamailio</div>
<div>for outbound to an asterisk box i have: Kamailio --> FW (NAT) --> Asterisk</div>
<div>for outbound to users i have: Kamailio --> FW (NAT) --> sip-phone (yealink) or grandstream</div>
<div><br>
</div>
<div>During that time i was able to :</div>
<div>Set up calls to users,</div>
<div>Use the dispatcher module</div>
<div>use the avpops module to do data lookups. </div>
<div>Get calls from asterisk to kamailio user to work.</div>
<div>Also calls between users (even though behind nat) are having good audio.</div>
<div><br>
</div>
<div>I have installed rtpproxy and it works nicely. </div>
<div><br>
</div>
<div>There is just one situation where it fails: </div>
<div><br>
</div>
<div>Carrier --> FW (NAT) Kamailio --> asterisk </div>
<div><br>
</div>
<div>There is only one way audio (from asterisk to carrier) but not from carrier to asterisk.</div>
<div><br>
</div>
<div>I believe I need to do something with the rtp proxy module ... and tried different things (forcing the r flag, forcing the w flag)</div>
<div>Any idea where I might need to start looking? It's been driving me crazy...</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Pemp </div>
<div><br>
</div>
<div><br>
</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">
<br>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Daniel-Constantin Mierla - <a href="https://www.asipto.com" target="_blank" moz-do-not-send="true">
https://www.asipto.com</a></div>
<div><a href="https://twitter.com/miconda" target="_blank" moz-do-not-send="true">https://twitter.com/miconda</a> -
<a href="https://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">
https://www.linkedin.com/in/miconda</a></div>
<div>Kamailio Advanced Training - <a href="https://www.asipto.com/u/kat" target="_blank" moz-do-not-send="true">
https://www.asipto.com/u/kat</a></div>
</div>
</div>
</div>
</div>
</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>
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-m_2014630300455520770gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Daniel-Constantin Mierla - <a href="https://www.asipto.com" target="_blank" moz-do-not-send="true">
https://www.asipto.com</a></div>
<div><a href="https://twitter.com/miconda" target="_blank" moz-do-not-send="true">https://twitter.com/miconda</a> -
<a href="https://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">
https://www.linkedin.com/in/miconda</a></div>
<div>Kamailio Advanced Training - <a href="https://www.asipto.com/u/kat" target="_blank" moz-do-not-send="true">
https://www.asipto.com/u/kat</a></div>
</div>
</div>
</div>
</div>
</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>
</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">-- 
Kamailio Merchandising - <a class="moz-txt-link-freetext" href="https://skalatan.de/merchandising/">https://skalatan.de/merchandising/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a>
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a></pre>
</body>
</html>