[Freeswitch-users] lua startup scripts (possibly!)

David Ponzone david.ponzone at ipeva.fr
Thu Sep 2 12:32:00 PDT 2010


Pete,

define "heavy" :)
How much time does it take to get the reply from your DB ?

Consider also that 100 concurrent calls, it's nothing.
If you consider an avg call duration of 1 min, it's around 1,6CPS.
Don't you think your DB can handle that (MS Access probably can't) ?

You could also extract the XML dialplan containing your regexps (as  
far as they can be written using the regexp lib provided with FS) from  
the DB at startup.

David Ponzone  Direction Technique
email: david.ponzone at ipeva.fr
tel:      01 74 03 18 97
gsm:   06 66 98 76 34

Service Client IPeva
tel:      0811 46 26 26
www.ipeva.fr  -   www.ipeva-studio.com

Ce message et toutes les pièces jointes sont confidentiels et établis  
à l'intention exclusive de ses destinataires. Toute utilisation ou  
diffusion non autorisée est interdite. Tout message électronique est  
susceptible d'altération. IPeva décline toute responsabilité au titre  
de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes  
pas destinataire de ce message, merci de le détruire immédiatement et  
d'avertir l'expéditeur.




Le 01/09/2010 à 21:19, Pete Kelly a écrit :

> Hi
>
> I am new to freeswitch, so please excuse me if I have some  
> terminology slightly wrong! I am writing an IVR application using  
> mod_lua, to do simple auth then enter a menu tree etc.
>
> I need to "preprocess" the incoming SIP INVITE by running a series  
> of regular expressions (which are stored in a mysql database)  
> against the request URI (and/or From header),   to add an extra  
> header to the INVITE for internal use.
>
> I only want to read in the regular expressions from the database at  
> "startup" (or by a controlled reload), as the query to get them is  
> quite heavy and the IVR will be handling upwards of 100 concurrent  
> calls - so to query for the regex list on each INVITE is impractical.
>
> Is this startup scenario possible? Two options that I think I might  
> have are:
>
> 1) Have a lua startup script which reads the regex list in at  
> startup, and listens for incoming call events. I would then apply  
> the header within the lua script before the dialplan extension is  
> looked up. Does anyone have any examples, or know of any  
> documentation which shows something similar to this happening. I  
> have searched the wiki high and low but can only find very basic  
> documentation on event handling in lua, and startup scripts in lua.
>
> 2) Have the regular expressions stored somewhere within the dialplan  
> (global variables?) and make it part of a dialplan extension to add  
> this header.
>
>
> Any advice or tips anybody could give me will be very helpful.
>
> Thanks
>
> Pete
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100902/ea04e4df/attachment.html 


More information about the FreeSWITCH-users mailing list