[OpenSIPS-Users] Modify To:'s field and forward

spady spady77 at gmail.com
Tue Dec 6 21:40:34 CET 2011


I am trying to improve my script:

Now I would like that if avp_check fails, Opensips simply rewrite host and
port and keep ruri as recived.
I wrote the following but seems it's wrong.... 

if (avp_db_load("$fu/username","$avp(Linea-LW)"))
         {
                xlog("L_DBG",
                "AVP_DB_LOAD Invocato!!!!!!!!!!!!!!\n");
        if (avp_check("$avp(Linea-LW)","eq/lw/i"))
                {
                if ($rU=~"^0[0-9]+")
                        {
                                xlog("L_DBG",
                                "URI modificato per invio verso OXE\n");
                        strip(1);
                        prefix("87019");
                        rewritehostport("10.9.6.3:5060");
                        route(1);
                        exit;
                        }
                        *else {
                                rewritehostport("10.9.6.3:5060");
                                route(1);
                                exit;*
                                }
                }
        }           

Can you drive me into right way?
Regards           

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



More information about the Users mailing list