[Users] Problem with avp_check
    Jose Gil Navarrete 
    gijoenav at yahoo.com.mx
       
    Tue Dec 19 18:41:11 CET 2006
    
    
  
Hi 
I try to check the username in the URI, this is, if the username do not have ten digits then send a message, I made:
avp_write("^[0-9]{10}","$avp(s:fm_avp)");
if(avp_check("$fU","fm/$avp(s:fm_avp)/g")) {
                insert_hf("To-username: -$fU- \r\n", "Call-ID");
 } else {
                sl_send_reply("400", "Bad Request");
                exit;
};
but I ever obtain 400 message.
I try too with:
if(avp_check("$fU","re/[0-9]{10}$/g")) {
                 insert_hf("To-username: -$fU- \r\n", "Call-ID");
else{
                  sl_send_reply("400", "Bad request");
                  exit;
 }
But I obtain the same message. Any idea?
 __________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20061219/c7440578/attachment.htm 
    
    
More information about the Users
mailing list