<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">David Wafula</b> <span dir="ltr">&lt;<a href="mailto:davidwaf@gmail.com" target="_blank">davidwaf@gmail.com</a>&gt;</span><br>Date: Tue, Feb 2, 2016 at 10:43 AM<br>Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy to Freeswitch<br>To: Bogdan-Andrei Iancu &lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;<br><br><br><div dir="ltr">Yes, the opensips.cfg was indeed  messed up. i was tinkering with it. Anyway, i regenerated a clean one, put in the the alias, and happily got registrations going through. And one way audio. Except that i think am missing the big picture.<div>My goal is to have Opensips front Freeswitch:</div><div><br></div><div>Client  &lt;-&gt;  OpenSips  &lt;-&gt; Freeswitch</div><div><br></div><div><br></div><div>To act as outbound proxy at this stage. As i learn more about it, i hope to get into NATing, loadbalancing etc. Am afraid  i have not  succeeded in achieving this goal unfortunately, yet, though i think am very close. This is what i have done.</div><div><br></div><div>1. Added the alias as advised. The registrations fail. Then when i create  users in opensips, registration work perfectly, and one of the users can call the other. Except that in this case it appears all is happening in Opensips and freeswitch is not in the loop here. Infact, i verified, that obviously registrationds are done on Opensips and not freeswitch.</div><div><br></div><div>2. I removed the alias, deleted the users from opensips. This time the registrations goes through successfully onto freeswitch. Very happy, as this is what i want. But now obviously INVITES fail with 403   Rely forbidden.</div><div><br></div><div>It appears to me, there is more configuration that i must do, beyond setting alias, to get Opensips to act as outboundproxy to freeswitch. I need  registrations and calls to happen on Freeswitch, but via Opensips.</div><div><br></div><div>So after again searching the internet, i can  see that  may be something like dynamic routing  can be done (<a href="http://www.taitclarridge.com/techlog/2012/02/opensips-dynamic-routing.html" target="_blank">http://www.taitclarridge.com/techlog/2012/02/opensips-dynamic-routing.html</a>), or i can see whole lot of other  way of doing it (<a href="http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration" target="_blank">http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration</a>).</div><div><br></div><div>What is the recommended, possibly simplest way to do this: to get opensips proxy registrations, invites , messaging to freeswitch.</div><div><br></div><div>Many thanks.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 5:30 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    David,<br>
    <br>
    Your opensips cfg is bogus - the test for the presence of username
    in RURI should not be done for a REGISTER requests (as they do not
    have a username part).<br>
    <br>
    Where have you taken the script from ? have you changed it by
    yourself ?<span><br>
    <br>
    Regards,<br>
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    </span><div><div><div>On 01.02.2016 15:06, David Wafula
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Thank you Bogdan. Ok  i made the alias change, and
        now am getting &quot;Address Incomplete&quot;  reply.  Please see the log
        below, am not sure what could be now causing this:
        <div><br>
        </div>
        <div>REQUEST</div>
        <div>============</div>
        <div>
          <div>
            <div style="display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);font-family:monospace;background:rgb(248,248,248)">
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                REGISTER sip:<span style="color:rgb(0,128,128)">192.168</span><span style="color:rgb(0,128,128)">.0</span><span style="color:rgb(0,128,128)">.46</span>
                SIP/<span style="color:rgb(0,128,128)">2.0</span></div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Via: SIP/<span style="color:rgb(0,128,128)">2.0</span>/UDP <span style="color:rgb(0,128,128)">10.0</span><span style="color:rgb(0,128,128)">.1</span><span style="color:rgb(0,128,128)">.175</span>:<span style="color:rgb(0,128,128)">30802</span>;rport;branch=z9hG4bKPjGfzHRCN4S.QyGFhBBv9njI9Amj2oU7ko</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Route: &lt;sip:<span style="color:rgb(0,128,128)">192.168</span><span style="color:rgb(0,128,128)">.4</span><span style="color:rgb(0,128,128)">.248</span>;lr&gt;</div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Max-Forwards: <span style="color:rgb(0,128,128)">70</span></div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                From: &lt;sip:<span style="color:rgb(0,128,128)">1000</span>@<span style="color:rgb(0,128,128)">192.168</span><span style="color:rgb(0,128,128)">.0</span><span style="color:rgb(0,128,128)">.46</span>&gt;;tag=eNVm<span style="color:rgb(0,128,128)">.45</span>KTH3OkXAjSikua1cwsZ.XdeRE</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                To: &lt;sip:<span style="color:rgb(0,128,128)">1000</span>@<span style="color:rgb(0,128,128)">192.168</span><span style="color:rgb(0,128,128)">.0</span><span style="color:rgb(0,128,128)">.46</span>&gt;</div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Call-ID: <span style="color:rgb(0,128,128)">9</span>TVBTDFtUPz05axr9qvyynhFWhJetb6m</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                CSeq: <span style="color:rgb(0,128,128)">64838</span> REGISTER</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                User-Agent: Pjsua2 Android <span style="color:rgb(0,128,128)">2.4</span><span style="color:rgb(0,128,128)">.5</span></div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Contact: &lt;sip:<span style="color:rgb(0,128,128)">1000</span>@<span style="color:rgb(0,128,128)">10.0</span><span style="color:rgb(0,128,128)">.1</span><span style="color:rgb(0,128,128)">.175</span>:<span style="color:rgb(0,128,128)">34708</span>;ob&gt;</div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Expires: <span style="color:rgb(0,128,128)">300</span></div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO,
                SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Content-Length:  <span style="color:rgb(0,128,128)">0</span></div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>): </div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.144</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                --end msg--</div>
              <div><br>
              </div>
              <div>REPLY</div>
              <div>=============</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                SIP/<span style="color:rgb(0,128,128)">2.0</span> <span style="color:rgb(0,128,128)">484</span>
                Address Incomplete</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Via: SIP/<span style="color:rgb(0,128,128)">2.0</span>/UDP <span style="color:rgb(0,128,128)">10.0</span><span style="color:rgb(0,128,128)">.1</span><span style="color:rgb(0,128,128)">.175</span>:<span style="color:rgb(0,128,128)">30802</span>;received=<span style="color:rgb(0,128,128)">10.0</span><span style="color:rgb(0,128,128)">.1</span><span style="color:rgb(0,128,128)">.175</span>;rport=<span style="color:rgb(0,128,128)">30802</span>;branch=z9hG4bKPjGfzHRCN4S.QyGFhBBv9njI9Amj2oU7ko</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                From: &lt;sip:<span style="color:rgb(0,128,128)">1000</span>@<span style="color:rgb(0,128,128)">192.168</span><span style="color:rgb(0,128,128)">.0</span><span style="color:rgb(0,128,128)">.46</span>&gt;;tag=eNVm<span style="color:rgb(0,128,128)">.45</span>KTH3OkXAjSikua1cwsZ.XdeRE</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                To: &lt;sip:<span style="color:rgb(0,128,128)">1000</span>@<span style="color:rgb(0,128,128)">192.168</span><span style="color:rgb(0,128,128)">.0</span><span style="color:rgb(0,128,128)">.46</span>&gt;;tag=a0a925d2eca49498ea7382b7b1f63f38.d365</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Call-ID: <span style="color:rgb(0,128,128)">9</span>TVBTDFtUPz05axr9qvyynhFWhJetb6m</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                CSeq: <span style="color:rgb(0,128,128)">64838</span> REGISTER</div>
              <div>02-<span style="color:rgb(0,128,128)">01</span> <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Server: OpenSIPS (<span style="color:rgb(0,128,128)">2.1</span><span style="color:rgb(0,128,128)">.2</span>
                (x86_64/linux))</div>
              <div><span style="color:rgb(0,128,128)">02</span>-<span style="color:rgb(0,128,128)">01</span>
                <span style="color:rgb(0,128,128)">14</span>:<span style="color:rgb(0,128,128)">58</span>:<span style="color:rgb(0,128,128)">53.585</span>:
                I/System.<span style="color:rgb(51,51,51);font-weight:bold">out</span>(<span style="color:rgb(0,128,128)">14726</span>):
                Content-Length: <span style="color:rgb(0,128,128)">0</span></div>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Feb 1, 2016 at 1:07 PM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"></a><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi David,<br>
                <br>
                I see. The problem is all the SIP traffic contains
                references to this </tt><tt>192.168.0.46, but opensips
                has no idea how to handle consider this IP (like local
                or foreign domain).<br>
                <br>
                It should handle it as local domain, so add in your cfg:<br>
                    alias=&quot;</tt><tt>192.168.0.46&quot;<br>
                <br>
                Regards,<br>
              </tt><span>
                <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
              </span>
              <div>
                <div>
                  <div>On 01.02.2016 12:21, David Wafula wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hi Bogdan,
                      <div>OpenSips is listening on 192.168.4.248, which
                        running in  totally different network from
                        freeswitch. Freeswitch is running on
                        192.168.0.46. </div>
                      <div>And, my test user <a href="mailto:1000@192.168.0.46" target="_blank">1000@192.168.0.46</a>, is
                        created on freeswitch. I do not have any local
                        users on opensips at this stage.</div>
                      <div><br>
                      </div>
                      <div>Regards.</div>
                      <div><br>
                      </div>
                      <div><span style="font-family:monospace;font-size:10.4px;color:rgb(0,128,128);background-color:rgb(248,248,248)"> </span></div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Mon, Feb 1, 2016 at
                        11:48 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"></a><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi
                              David,<br>
                              <br>
                              The &quot;relay forbidden&quot; case happens when
                              neither the FROM URI, nor the request URI
                              contain a SIP domain served/local to
                              OpenSIPS. In your case I see that the
                              INVITE has in FROM and RURI the
                              192.168.0.46 SIP domain. Is your OpenSIPS
                              actually listening on this IP ?<br>
                              <br>
                              Regards,<br>
                            </tt>
                            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                            <div>
                              <div>
                                <div>On 30.01.2016 17:25, David Wafula
                                  wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">Hello list,
                                    <div>Am quite new to opensips. So i
                                      want opensips to act as an
                                      outbound proxy to freeswitch. I
                                      followed the tutorial on the
                                      opensips site and set up a running
                                      opensips instance (vanilla). I too
                                      have a running freeswitch
                                      instance. <br clear="all">
                                      <div><br>
                                      </div>
                                      <div>so, on my softphone, when i
                                        set outbound proxy as opensips,
                                         am able to register the phone
                                        successfully to freeswitch via
                                        opensips. But when i attempt to
                                        make a call, i get:</div>
                                      <div><br>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div>send_reply(&quot;403&quot;,&quot;Rely
                                        forbidden&quot;);<br>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div><br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div>David Wafula</div>
</font></span></div>
</div><br><br clear="all"><div><br></div>-- <br><div>David Wafula</div>
</div>