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/