[SR-Users] db_text issue

Eric Hiller mrraptor98 at hotmail.com
Fri Apr 15 05:58:36 CEST 2011


 I would like to use dbtext to store a list of whitelisted gateways, but each time I load it I get a core segmentation fault.

Any ideas? Here is my gateways db file:
key_name(str) key_type(int) value_type(int) key_value(str)
gwip:1:0:a
gwip:1:0:b
gwip:1:0:c
gwcount:0:1:3

And in my config:
modparam("htable","htable","gateways=>size=4;dbtable=gateways;")
modparam("htable","db_url","text:///usr/local/etc/kamailio")

                while( $var(i) < $sht(gateways=>gwcount) ){
                        if( $sht(gateways=>gwip[$var(i)]) == $si ){
                                setflag(gateway);
                                xlog("ISFROMGW: request from IP $si matches $sht(gateways=>gwip[$var(i)]) ...\n");
                        }
                }

Do you see anything wrong with this setup?
-Eric
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110414/630441b0/attachment.htm>


More information about the sr-users mailing list