[OpenSIPS-Users] A Dynamic List of Gateways

SamyGo govoiper at gmail.com
Fri Aug 31 08:28:11 CEST 2012


Hi Shaahin,

I see what you are trying to do here, get a list of gateways to be used for
a particular destination(or any other logic) and then based on that list
involve the drouting module. What I can imagine here is this would result
in something like inserting the returned list into opensips first and then
asking the module(insert into module table, refresh the module list and
then) to do the processing for you.

If you have something like above in your mind, then it will be a
performance overhead on per call basis !

I'd suggest you to go without the Drouting module, in your perl script do
all the gateway processing and send back results to opensips in AVPs and
develop the "Drouting like" functionality in opensips.

Though I'm not sure about your whole scenario precisely, what I can tell
you is how I had done somewhat similar setup. I had all the gateways in a
different DB and was using OpenSIPS-RADIUS integration. RADIUS used perl
scripts and returned a list of sorted gateways to try. The list was
processed in opensips in serial-forking manner.

Another possibility, that I can think for you, is tell your Drouting module
to connect to the DB containing the table with ALL the gateways in it. The
perl script will just return you the prefixes or enough logic to be input
to the DROUTING functions and Drouting decides the actual gateway. (Make
sure in your perl script you put intelligent logic which will ensure that
DROUTING module selects from only your desired gateways)

I hope I made some sense here.

Regards,
Sammy


On Fri, Aug 31, 2012 at 7:55 AM, Shaahin Madani <shaahin.madani at gmail.com>wrote:

> Greetings,
>
> Thanks for the helpful replies. Presently, the list of gateways cannot be
> retrieved using a direct query on the external database, and hence I need
> the Perl script to act as the middle-ware too. Some changes in the external
> database may fix this, and then I would be able to use the avops module
> as Ali suggested, but I need to first thoroughly study all the
> consequences ...
>
> Regarding the bottleneck issue, I don't see any way that I can avoid the
> queries (or Perl). In case it turns out to be a real bottleneck, then is
> there any way to go around it, or will I actually be hitting an OpenSIPS
> limitation?
>
> Cheers,
> Shaahin
>
> P.S. [to Ali and Rudy]: It's "Shaahin", not "Shaheen" :-)
>
>
>
> On Fri, Aug 31, 2012 at 2:03 AM, Rudy <rudy at dynamicpacket.com> wrote:
>
>> Brett,
>>
>>  Any complex logic, perl, sql or otherwise can impact performance and
>> create a bottleneck. Regarding the perl module in particular, I can
>> tell you that it works pretty well.
>>
>> Thanks in advance,
>> --Rudy
>> Dynamic Packet
>> Toll-Free: 888.929.VOIP ( 8647 )
>>
>>
>> On Thu, Aug 30, 2012 at 11:58 AM, Brett Nemeroff <brett at nemeroff.com>
>> wrote:
>> > If you can sum up the logic in an SQL query I'd recommend doing that.
>> If you
>> > can cache the results in memcache, even better. Just keep in mind that
>> any
>> > complicated logic can serve as a significant bottleneck. Depending on
>> your
>> > traffic load, that may or may not be an issue.
>> >
>> > I know there are a few recommendations for the perl module here, but
>> I'm not
>> > sure of the status of the module and if it's actively maintained. I'd
>> love
>> > to hear from others about their own experiences using it. I haven't
>> used it
>> > myself in maybe 6 years or so.
>> > -Brett
>> >
>> >
>> > On Thu, Aug 30, 2012 at 9:09 AM, Shaahin Madani <
>> shaahin.madani at gmail.com>
>> > wrote:
>> >>
>> >> Hi Bogdan and Brett,
>> >>
>> >> Thanks for your replies. The issue here is that my OpenSIPS simply does
>> >> not have the list of gateways, that is the gateways are *not*
>> available in
>> >> the dr_gateways table. For every INVITE request, the list of gateways
>> must
>> >> be dynamically built, and only afterwards the actual dynamic routing
>> can
>> >> take place. The logic behind building the list of gateways relies on a
>> >> totally separate database.
>> >> To sum it up, I would say the desired scenario would resemble the steps
>> >> below:
>> >>
>> >> 1) OpenSIPS receives an INVITE
>> >> 2) OpenSIPS asks an external system (e.g. the Perl script) for the
>> >> gateways available for this specific INVITE request
>> >> 3) A list of gateways is returned to OpenSIPS (based on some black-box
>> >> logic)
>> >> 4) OpenSIPS dynamically routes the INVITE to the specified gateways,
>> >> prioritising based on cost, time, or ...
>> >>
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120831/f734c51c/attachment-0001.htm>


More information about the Users mailing list