[Serusers] How long does exec_msg wait for result??

Zeus Ng zeus.ng at isquare.com.au
Fri Aug 13 06:12:51 CEST 2004


This does not directly address you problem, but why don't you use the
does_uri_exist() function to check the user account instead of calling an
external function?

Zeus

> 
> Hi,
> 
> In our ser.cfg we do a database query to determine if the 
> dialed number 
> is a valid subscriber, if the user dialed a wrong number then 
> it is sent 
> to an IVR prompt.  This works well most of the time, but every now an 
> then we see calls that were dialed properly yet they where 
> transfered to 
> the prompt.  I would like to know how long exec_msg waits for 
> the query 
> result and if it is tunable.  The database is on the same 
> host as ser so 
> the result should be very fast, yet I am unsure as to why it 
> is failing 
> to query the subscriber table many times a day.
> 
> MySQL is set for 1000 connections and I am not seeing a 
> problem here.  
> Any other MySQL things to look at?
> 
> Here is the code snippet:
> 
> #Now check to see if Dialed Number is Valid for one of our Subs
>      if (method == "INVITE"){
>                 if (!exec_msg('
>                 QUERY="select username from subscriber where 
> username=\"$SIP_OUSER\"";
>                 RESULT=`mysql -uXXX -pXXX -e "$QUERY" ser`;
>                 if [ -z "$RESULT" ];
>                 then exit 1; fi ;'))
>                 {# User Does Not Exist
>                      rewriteuser("9993");
>                      log(1, "Wrong Number IVR Prompt\n");
>                      route(6);
>                      break;
>                 };
>      };
> 
> Our estimates indicate this fails about 5% of the time.  Any ideas?
> 
> -- 
> Andres
> Network Admin
> http://www.telesip.net
> 
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
> 




More information about the sr-users mailing list