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

List:       sr-users
Subject:    [SR-Users] Re: Choose RTP port in routing script
From:       Barry Flanagan via sr-users <sr-users () lists ! kamailio ! org>
Date:       2023-09-26 14:50:20
Message-ID: 4750c544-9366-81fd-3972-384810674d97 () flantel ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 26/09/2023 15:30, Duarte Rocha via sr-users wrote:
>
> Thanks for the reply.
>
> I want to be able to get different port ranges for some costumers 
> since some of them can only their firewall to a small destination port 
> range .
>
You could run multiple RTPEngine instances each using different RTP port 
ranges and different control ports, and choose which rtpengine to use 
based on your user requirements.

Example, the below would configure two rtpengine sets in Kamailio. One 
which listens on control port localhost:12221 and one on localhost:12222

modparam("rtpengine", "rtpengine_sock","udp:localhost:12221=1 
udp:localhost:12222=2")

Then in your routes use

set_rtpengine_set("1"); or set_rtpengine_set("2");

..to define which set this call should use.

In your rtpengine.conf, the two would be identical except fore the 
following:

_*rtpengine-01:*_

listen-ng = 127.0.0.1:12221

port-min = 10000
port-max = 20000

_*rtpengine-02:*_

listen-ng = 127.0.0.1:12222

port-min = 20001
port-max = 30000


-Barry Flanagan

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 26/09/2023 15:30, Duarte Rocha via
      sr-users wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:DC66E1A0-30E6-454C-AA5F-04941443723A@hxcore.ol">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}.MsoChpDefault
	{mso-style-type:export-only;}div.WordSection1
	{page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks for the reply. </p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I want to be able to get different port
          ranges for some costumers since some of them can only their
          firewall to a small destination port range .<o:p></o:p></p>
      </div>
    </blockquote>
    <p>You could run multiple RTPEngine instances each using different
      RTP port ranges and different control ports, and choose which
      rtpengine to use based on your user requirements. <br>
    </p>
    <p>Example, the below would configure two rtpengine sets in
      Kamailio. One which listens on control port localhost:12221 and
      one on localhost:12222</p>
    <p>modparam("rtpengine", "rtpengine_sock","udp:localhost:12221=1
      udp:localhost:12222=2")</p>
    <p>Then in your routes use</p>
    <p>set_rtpengine_set("1"); or set_rtpengine_set("2"); <br>
    </p>
    <p>..to define which set this call should use.</p>
    <p>In your rtpengine.conf, the two would be identical except fore
      the following:</p>
    <p><u><b>rtpengine-01:</b></u><br>
    </p>
    <p>listen-ng = 127.0.0.1:12221</p>
    <p>port-min = 10000<br>
      port-max = 20000<br>
    </p>
    <p><u><b>rtpengine-02:</b></u><br>
    </p>
    <p>listen-ng = 127.0.0.1:12222</p>
    <p>port-min = 20001<br>
      port-max = 30000<br>
    </p>
    <p><br>
    </p>
    <p>-Barry Flanagan<br>
    </p>
    <p></p>
  </body>
</html>


__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:


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

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