Hi Spandy,

Your script is a bit wrong, and the "if" for "avp_check" does not do anything (there is no "then" or "else" branch),. Better try:

 if (avp_db_load("$fu/username","$avp(Linea-LW)"))
        {
                xlog("L_DBG",
                "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
                if (avp_check("$avp(Linea-LW)","eq/y/i")) {
                        if ($rU=~"^sip:0[0-9]{11}@")
                        {
                         xlog("L_DBG",
                                "URI modificato per FAX SEVER\n");
                         strip(1);
                         prefix("87019");
                         rewritehostport("10.9.6.3:5060");
                         route(1);
                         exit;
                        }
                }
        }


At least the above code will take care of the RURI part.

Regards,
Bogdan

On 12/05/2011 05:09 PM, spady wrote:
Hi Again, i am tryng to do, as sayd, my first script.
I setted up the following:



  if (avp_db_load("$fu/username","$avp(Linea-LW)"))
         {
                 xlog("L_DBG",
                 "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
                 if (avp_check("$avp(Linea-LW)","eq/y/i"));
                 if ($rU=~"^sip:0[0-9]{11}@")
                 {
                 xlog("L_DBG",
                 "URI modificato per FAX SEVER\n");
                 strip(1);
                 prefix("87019");
                 rewritehostport("10.9.6.3:5060");
                 route(1);
                 exit;
                 }
         }

But it does not work.

What's wrong?
Thanks in advance


--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-To-s-field-and-forward-tp7040781p7063178.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to