<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Good, there is some progress :).<br>
      <br>
      On the incoming calls, if the WS get's the call, we can park the
      part with the auth (it seems your opensips script is accepting
      calls from unknown sources...we can address this security hole
      later.<br>
      <br>
      So, if a call drop after 30 secs it usually means there is no ACK.
      Can you make a mgrep capture on OpenSIPS to grab the whole call
      flow ? (grab 5060 and 80 ports)<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>

OpenSIPS Bootcamp 2017, Houston, US
  <a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html">http://opensips.org/training/OpenSIPS_Bootcamp_2017.html</a>
</pre>
    <div class="moz-cite-prefix">On 06/30/2017 04:52 PM, Alex
      Megalokonomos wrote:<br>
    </div>
    <blockquote
cite="mid:CALwx21oMoqA938e0mC2JZGbw6KG9U-Bvi64ObSbwMfQr-UWbmA@mail.gmail.com"
      type="cite">
      <div dir="ltr"><img moz-do-not-send="true" class="mailtrack-img"
          style="float:right;" alt=""
src="https://mailtrack.io/trace/mail/6e75bfd6dc44023e20473d0a0d8ea9a6355e2042.png?u=1422671"
          height="0" width="0">I think I set up uac_registrant
        correctly.
        <div><br>
        </div>
        <div>I can dial out from a ws client and the ws extension rings
          from outside calls.</div>
        <div><br>
        </div>
        <div>However:<br>
           a) on incoming calls, when ws client accepts, there is no
          sound and the line is dropped after 30 secs or so</div>
        <div>b) on outgoing calls, when the called extension accepts the
          ws client immediately responds with 401 Unauthorised and then
          BYE </div>
        <div><br>
        </div>
        <div>b) I believe is what you mentioned here "<tt><tt>In
              OpenSIPS, when receiving calls, you need to authorize (by
              IP) the calls from </tt></tt><tt><tt><tt><tt>OmniPCX "</tt></tt></tt></tt><br>
        </div>
        <div><tt><tt><tt><tt><br>
                </tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt>How do I do this?</tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt><br>
                </tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt>and a) seems to be rtp proxy related since
                  I see the following errors in the logs¨</tt></tt></tt></tt></div>
        <div><br>
        </div>
        <div><tt><tt><tt><tt><span
style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
                    UI",Helvetica,Arial,sans-serif,"Apple
                    Color Emoji","Segoe UI
                    Emoji","Segoe UI
                    Symbol";font-size:14px">ERROR:rtpengine:rtpe_function_call:
                    proxy replied with error: Unknown call-id</span><br>
                </tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt><span
style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
                    UI",Helvetica,Arial,sans-serif,"Apple
                    Color Emoji","Segoe UI
                    Emoji","Segoe UI
                    Symbol";font-size:14px"><br>
                  </span></tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt><span
style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
                    UI",Helvetica,Arial,sans-serif,"Apple
                    Color Emoji","Segoe UI
                    Emoji","Segoe UI
                    Symbol";font-size:14px">and</span></tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt><span
style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
                    UI",Helvetica,Arial,sans-serif,"Apple
                    Color Emoji","Segoe UI
                    Emoji","Segoe UI
                    Symbol";font-size:14px"><br>
                  </span></tt></tt></tt></tt></div>
        <div><tt><tt><tt><tt><span
style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
                    UI",Helvetica,Arial,sans-serif,"Apple
                    Color Emoji","Segoe UI
                    Emoji","Segoe UI
                    Symbol";font-size:14px">no matching transaction</span></tt></tt></tt></tt></div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Jun 30, 2017 at 2:27 PM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a></a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>I checked the
                script you mentioned and it does not help you - it has
                only UDP (no WS), it is really basic and it does not
                handle any REGISTER stuff, which is the trickiest - see<br>
                     <a moz-do-not-send="true"
                  class="m_-701523849835307735moz-txt-link-freetext"
href="https://blog.opensips.org/2016/12/13/how-to-proxy-sip-registrations/"
                  target="_blank">https://blog.opensips.org/<wbr>2016/12/13/how-to-proxy-sip-<wbr>registrations/</a><br>
                or<br>
                    
                <a moz-do-not-send="true"
                  class="m_-701523849835307735moz-txt-link-freetext"
href="https://blog.opensips.org/2016/12/20/mid-registrar-scalable-registration-and-call-forking/"
                  target="_blank">https://blog.opensips.org/<wbr>2016/12/20/mid-registrar-<wbr>scalable-registration-and-<wbr>call-forking/</a><br>
                <br>
                Maybe you can start with handling REGISTERs - what you
                need (on top of the script from the WSS tutorial) is to
                add this uac_registrant, to have the WS extensions
                registered into </tt><tt>OmniPCX with a contact URI
                pointing back to OpenSIPS IP:<br>
                    <a moz-do-not-send="true"
                  class="m_-701523849835307735moz-txt-link-freetext"
href="http://www.opensips.org/html/docs/modules/2.3.x/uac_registrant.html"
                  target="_blank">http://www.opensips.org/html/<wbr>docs/modules/2.3.x/uac_<wbr>registrant.html</a><br>
                <br>
                Let me know if you get stuck in this first step.<br>
                <br>
                Regards,<br>
              </tt><span class="">
                <pre class="m_-701523849835307735moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a moz-do-not-send="true" class="m_-701523849835307735moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>

OpenSIPS Bootcamp 2017, Houston, US
  <a moz-do-not-send="true" class="m_-701523849835307735moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html" target="_blank">http://opensips.org/training/<wbr>OpenSIPS_Bootcamp_2017.html</a>
</pre>
    </span><div><div class="h5"><div class="m_-701523849835307735moz-cite-prefix">On 06/30/2017 12:22 PM, Alex
      Megalokonomos wrote:

    </div>
    <blockquote type="cite">
      <div dir="ltr"><img moz-do-not-send="true" class="m_-701523849835307735mailtrack-img" style="float:right" alt="" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" height="0" width="0">Hello Bogdan,
        <div>

        </div>
        <div>First of all, thanks for your time.</div>
        <div>

        </div>
        <div>Unfortunately my SIP/OpensSIPS skills are what I've managed
          to learn in the last couple of days. I am a programmer but
          I've never had to work on SIP stuff before.</div>
        <div>

        </div>
        <div>Frankly to me, both solutions sound equally difficult since
          I have no idea where to start. (And to be honest, I expected
          the first to be simpler)</div>
        <div>

        </div>
        <div>I found this <a moz-do-not-send="true" href="https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/" target="_blank">https://blog.voipxswitch.<wbr>com/2015/03/27/kamailio-basic-<wbr>sip-proxy-all-requests-setup/</a>
          and tried to port the config to OpenSIPS since from what I
          understand Kamailio and OpenSIPS share a common codebase to an
          extent but was unsuccesful.

        </div>
        <div>

        </div>
        <div>In your second scenario,  I am not interested in WS->WS
          calls so that auth part is not an issue.</div>
        <div>

        </div>
        <div>So I guess I need the uac_registrar, authorize by IP and
          usrloc parts.</div>
        <div>

        </div>
        <div>Any relevant documentation to get me started since I'm
          still not clear on what I need to change?</div>
        <div>

        </div>
        <div>Best regards,</div>
        <div>Alex</div>
      </div>
      <div class="gmail_extra">

        <div class="gmail_quote">On Fri, Jun 30, 2017 at 11:29 AM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a moz-do-not-send="true" class="m_-701523849835307735moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:

          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Alex,

                

                To make a kind of WS<>UDP gateway you need a
                complete rework of the script presented in the tutorial,
                as it is a completely different SIP scenario. Not sure
                what are your SIP/OpenSIPS skills.

                

                But, there is a simpler alternative . Instead of a GW,
                you can make OpenSIPS as a sub-server for the WS
                extensions:

                

                Registration handling:

                

                1) WS extensions register only with OpenSIPS (as right
                now) - authentication is done by OpenSIPS

                2) OpenSIPS registers the 3 extensions into </tt><tt>OmniPCX
                using the uac_registrar 

                

                By this, we simply add the uac_registration and you
                achieve kind of decoupled 2 steps registration (with a
                minimum change in the cfg)

                

                

                Inbound calls:

                

                1) </tt><tt><tt>OmniPCX will send all the calls (from
                  other extensions) for the WS extension to OpenSIPS
                  (due the registration via uac_registrar) - this is
                  default behavior , so nothing to change

                  2) In OpenSIPS, when receiving calls, you need to
                  authorize (by IP) the calls from </tt></tt><tt><tt><tt><tt>OmniPCX
                      - and as the current script does, you will handle
                      them via the local opensips usrloc -> calls are
                      sent to WS extension

                      

                    </tt></tt></tt></tt>

              <tt><tt><tt><tt><tt>Outbound calls:

                        

                        1) when you receive a call from a WS extension,
                        you have to check if the call is for a local
                        extension (on opensips) or for an extension in </tt></tt></tt></tt></tt><tt><tt><tt><tt><tt><tt>OmniPCX

                          2) if call is local (WS to WS) you will do
                          authentication for the call

                          3) if the call is to be sent to </tt></tt></tt></tt></tt></tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt>OmniPCX,
                                      simply send the call to  </tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt>OmniPCX
                                                  without auth - the
                                                  auth will be done by </tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt>OmniPCX
                                                          as for any
                                                          other
                                                          extension

                                                          

                                                          

                                                          Hopefully this
                                                          will work for
                                                          you :)

                                                          

                                                          </tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt>Best
                regards,

              </tt><span>
                <pre class="m_-701523849835307735m_-1652678207613874565moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>

OpenSIPS Bootcamp 2017, Houston, US
  <a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html" target="_blank">http://opensips.org/training/O<wbr>penSIPS_Bootcamp_2017.html</a>
</pre>
    </span><div><div class="m_-701523849835307735h5"><div class="m_-701523849835307735m_-1652678207613874565moz-cite-prefix">On 06/29/2017 11:54 AM, Alex
      Megalokonomos wrote:

    </div>
    <blockquote type="cite">
      <div dir="ltr"><img moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565mailtrack-img" style="float:right" alt="" height="0" width="0">Hello Bogdan,
        <div>

        </div>
        <div>Yes, a gateway from WS to UDP (as well as DTLS-SRTP to RTP
          in order for it to work) is exactly what we're looking for.</div>
        <div>

        </div>
        <div>Unfortunately our Alcatel OmniPCX call center  is a
          proprietary system that only allows for a limited number of
          SIP extensions (served from what appears to be an outdated
          customised  Kamailio 3.2.2 from what I can tell from the
          headers.</div>
        <div>

        </div>
        <div>For our normal internal office use it all works fine.</div>
        <div>

        </div>
        <div>However we have 3 customer support lines that are currently
          routed to 3 extensions via OmniPCX.</div>
        <div>

        </div>
        <div>We want to integrate these to our custom web-based CRM and
          the best way for us to do it is to use something like SIP js
          to handle and log calls, identify calling parties, bring up
          customer details etc.</div>
        <div>

        </div>
        <div>Since the kamailio version inside OmniPCX does not support
          ws/webrtc we are looking to set up Opensips in exactly the way
          you described as a gateway/proxy for everything in order to
          convert the UDP-only sip extensions to ws+ webRTC capable
          ones.</div>
        <div>

        </div>
        <div>I have used this tutorial <a moz-do-not-send="true" href="http://www.opensips.org/Documentation/Tutorials-WebSocket-2-1" target="_blank">http://www.opensips.o<wbr>rg/Documentation/Tutorials-Web<wbr>Socket-2-1</a>
          to get what I assume is half the work (for RTP proxying)  but
          I havent figured out the rest yet.</div>
        <div>

        </div>
        <div>Best regards,</div>
        <div>Alex</div>
      </div>
      <div class="gmail_extra">

        <div class="gmail_quote">On Thu, Jun 29, 2017 at 11:43 AM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:

          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Alex,

                

                First, some questions regarding the desired topology:

                    1) the WS end-points should register in OpenSIPS or
                all the way into Kamailio ?

                    2) also, the calls from the WS end-points should be
                all the time sent to Kamailio ?

                

                More or less, what I'm asking is : is OpenSIPS suppose
                to act as a gateway from WS to UDP , but pass all the
                resulting traffic to Kamailio ?

                

                Regards,

              </tt>
              <pre class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>

OpenSIPS Bootcamp 2017, Houston, US
  <a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html" target="_blank">http://opensips.org/training/O<wbr>penSIPS_Bootcamp_2017.html</a>
</pre><div><div class="m_-701523849835307735m_-1652678207613874565h5">
    <div class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-cite-prefix">On 06/28/2017 12:47 PM, Alex
      Megalokonomos wrote:

    </div>
    </div></div><blockquote type="cite"><div><div class="m_-701523849835307735m_-1652678207613874565h5">
      <div dir="ltr"><img moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616mailtrack-img" style="float:right" alt="" height="0" width="0">Hello, 
        <div>

        </div>
        <div>We have the following scenario: our office call center is
          an Alcatel OmniPCX Office setup.</div>
        <div>

        </div>
        <div>This handles most of our needs and also provides 4 SIP
          extensions.</div>
        <div>

        </div>
        <div>These are provided by what appears to be a Kamailio SIP
          server v 3.2.2 (no webrtc or websockets support)</div>
        <div>

        </div>
        <div>What we would like to do is set up an OpenSIPS instance to
          handle WebRTC and proxy everything to this Kamailio SIP
          server.</div>
        <div>

        </div>
        <div>The idea is to allow a web client (using sip js or
          something similar) to register / make / receive calls as one
          of the Kamailio extensions.</div>
        <div>

        </div>
        <div>

          <div>I think half of the configuration is this : <a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Tutorials-WebSocket-2-1" target="_blank">http://www.opensips.org/Docu<wbr>mentation/Tutorials-WebSocket-<wbr>2-1</a></div>
          <div>

          </div>
          <div>which I've already completed and indeed, clients can
            register to opensips and chat/make calls over websockets
            between them.</div>
          <div>

          </div>
          <div>How do I go about proxying registrations/invites/etc to
            the kamailio server instead?</div>
          <div>

          </div>
          <div>best regards</div>
        </div>
      </div>
      

      <fieldset class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616mimeAttachmentHeader"></fieldset>
      

      </div></div><span><pre>______________________________<wbr>_________________
Users mailing list
<a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="m_-701523849835307735m_-1652678207613874565m_-6874691586421181616moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
    </span></blockquote>
    

  </div>

</blockquote></div>
</div>



</blockquote>
</div></div></div></blockquote></div>
</div>



</blockquote>
</div></div></div></blockquote></div>
</div>



</blockquote>
</body></html>