<div dir="ltr">There's also a Perl module that can be used to execute a Perl script containing your business logic. <div><br></div><div>Sounds like you are doing lots of database queries and doing that from a C module will always be more difficult than using a DB abstraction layer that the one Perl provides.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 20, 2013 at 7:41 AM, Grant Bagdasarian <span dir="ltr"><<a href="mailto:GB@cm.nl" target="_blank">GB@cm.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Alright, thanks guys!<br>
<br>
I'll have a closer look at the existing modules.<br>
<div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a> [mailto:<a href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a>] On Behalf Of Daniel-Constantin Mierla<br>

Sent: Tuesday, August 20, 2013 1:37 PM<br>
To: Kamailio (SER) - Users Mailing List<br>
Subject: Re: [SR-Users] Writing a module<br>
<br>
Hello,<br>
<br>
devel guide is useful for writing own module:<br>
- <a href="http://www.asipto.com/pub/kamailio-devel-guide/" target="_blank">http://www.asipto.com/pub/kamailio-devel-guide/</a><br>
<br>
Also, it was a recent discussion on sr-dev with hits about modules to look at:<br>
- <a href="http://lists.sip-router.org/pipermail/sr-dev/2013-August/020977.html" target="_blank">http://lists.sip-router.org/pipermail/sr-dev/2013-August/020977.html</a><br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 8/20/13 1:33 PM, Grant Bagdasarian wrote:<br>
> It's going to be a custom routing module, with our own business logic.<br>
><br>
> It should load the routes from a database and keep refreshing the data every x interval.<br>
> For SIP-to-PSTN calls (outgoing to carrier) we need to be able to route based on the callerprefix, customer id (which is added as a custom header), originating IP, and some other fields.<br>
> I need a way to select the closest matching route, or fallback to the default route, using the fields described above.<br>
><br>
> Implementing this logic in a stored procedure is quite hard. Another option would be to write a web service and perform http calls to determine the route. I'm just worried that http might delay the setup of calls.<br>

><br>
> Our routes table contains custom fields, but also fields which are used by the dispatcher module. So once a route is selected, the dispatcher module will use the uri in the route set to rewrite the ruri and possibly do failover.<br>

><br>
> -----Original Message-----<br>
> From: <a href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a><br>
> [mailto:<a href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a>] On Behalf Of Alex<br>
> Balashov<br>
> Sent: Tuesday, August 20, 2013 12:43 PM<br>
> To: <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> Subject: Re: [SR-Users] Writing a module<br>
><br>
> On 08/20/2013 06:41 AM, Grant Bagdasarian wrote:<br>
><br>
>> Hello,<br>
>><br>
>> Is this page still up-to-date:<br>
>> <a href="http://www.kamailio.org/dokuwiki/doku.php/development:write-module" target="_blank">http://www.kamailio.org/dokuwiki/doku.php/development:write-module</a> ?<br>
>><br>
>> I'm researching what it takes to create our own custom Kamailio module.<br>
> 1. Skilled C programming.<br>
><br>
> 2. What do you want to accomplish?  Are you sure no combination of existing modules and script constructs fit the bill?<br>
><br>
> Sometimes you really do need a custom module.  But I find those cases to be relatively few, at least for applications of Kamailio that are not truly exotic.<br>
><br>
> -- Alex<br>
><br>
> --<br>
> Alex Balashov - Principal<br>
> Evariste Systems LLC<br>
> 235 E Ponce de Leon Ave<br>
> Suite 106<br>
> Decatur, GA 30030<br>
> United States<br>
> Tel: <a href="tel:%2B1-678-954-0670" value="+16789540670">+1-678-954-0670</a><br>
> Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/" target="_blank">http://www.alexbalashov.com/</a><br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
> list <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
> list <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
--<br>
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>

<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Carlos<div><a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a></div><div>+595981146623</div>
</div>