15.08.2013 0:34, Nick Khamis пишет:
Hello Muhammad,

After thinking about it some more, it seems that pre-processing in the
manner that I described earlier lacks a lot of flexibility, your
scenario included, even if I did it just temporarily. That is why I
would like to implement the LCR using a simple perl program
that basically:

* Queries the database for the route using shortest matching prefix
* Orders them from least expensive to more

Once I have the gateway list, openSIPS would route the call, and fail over
to the next available gateway.

If this was c++ or Java it would be quite simple. However, perl, and
OpenSIPS scripting is another story... I saw the following unrelated
tutorial which I will start with:

http://www.opensips.org/Documentation/Tutorials-Perl-183-to-180

If anyone has more helpful tips/examples, they would be greatly appreciated.

Kind Regards,

Nick.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
In my experiance perl works perfectly with Opensips only when it is used with brain :). However I would recomend not to use queries to databases, (especially MongoDB that has broken driver for perl) from perl and do a lot of other complicated things. Just send variables to perl, process it as perl does it very well with its regex and other tools, and return back to opensips as AVP. There is clearly a lot of issues in XS. Sometimes I face bugs that cannot be explained. The main problem in my view that eval block cannot be handled when it is compiled as XS.

Regards;

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to