[Serusers] Dynamic Routing

Evan Borgstrom evan.borgstrom at ca.mci.com
Wed Feb 2 21:55:17 CET 2005


http://www.iptel.org/ser/doc/seruser/seruser.html#AEN1174

Example of how to use the exec_ with mysql.


Do a simple: exec_dset("/bin/env > /tmp/env; echo>/dev/null"); break;
Somewhere in your script then take a peek at /tmp/env for all variable
names that start with SIP (grep ^SIP /tmp/env) and you'll find the info
you're looking for. Between this and the exec example above you should
be able to figure out how to query mysql, get your info and rewrite
parameters with it.

-Evan

On Mon, 2005-01-31 at 14:27 +0530, Anurag Srivastava wrote:
> Hello All,
>              My task is to program the ser.cfg in a way that it
> connects to an external database(any machine in LAN,other than the
> server on which SER is running)
>          After getting connected to the database I need to query the
> database and get a result set of IPAddresses based on the destination
> number that I passed in the query..and further use this set to rewrite
> the call to the IP Address retrieved.
>        To accomplish this task I need--
> 
>        1.how to extract the destinationno from sip_uri
>        2.how to use the database interface given in SER programmer's guide
> 
>      I went through SER programmer's guide,but if anybody can provide
> me a simple
>      example of using database interface,it wud be of great help.
> 
>     Thanks!
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list