[Serusers] exec_msg

Jan Janak jan at iptel.org
Mon Mar 15 12:41:39 CET 2004


If you want to rewrite the Request-URI then use exec_dst instead of
exec_msg. The script should print the new Request-URI on the stdout.
See exec module documentation for more details.
  
  Jan.

On 14-03 12:29, M.I. Deen wrote:
> 
> 
> Hi,
> 
> I am trying to create an external script using exec_msg, such that the request uri is written based on the SIP_HF_FROM. I have appended this below. Is it possible to have a rewriteuri within an exec_msg. Please give your comments on the script below.
> 
> Deen
> 
> if (!exec_msg('
>         QUERY="select ouser from subscriber1 
>                where user=\"$SIP_HF_FROM\"";
>         OUSER1=`mysql  -Bsuser -pheslo -e "$QUERY" ser`;
>         Rewriteuri("sip:$OUSER1 at 192.168.0.1")')) {
>                sl_send_reply("404", "User does not exist");
>         } else {
>                sl_send_reply("600", "user exists");
>         };
> 

> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list