[OpenSIPS-Users] What does save("location") actually do?

Nauman Sulaiman nauman762-home at yahoo.co.uk
Sat Jul 31 22:38:51 CEST 2010


Hi, we are using opensips 1.6.2.  We are using OpenSIPS as an outbound proxy in open relay mode for time being. For all register requests to provider beyond opensips we wish to save the AoR. So we are calling save("location"). 
This for local routing for 302 later.

However the very act of calling save("location") is causing a 401 to go out??
We are not using authentication on the opensips outbound proxy. There is nothing in the docs to suggest this.

If we remove the save then the register completes fine, code below
added to route[1] of sample script

called from here

 if (!uri==myself)
  {
          xlog(" Route 1 due to non local domain \n");
         route(1);
 }


route[1] {
                        
        # for INVITEs enable some additional helper routes
        if (is_method("INVITE")) {
                xlog("method invite in route 1 \n");
                t_on_branch("2");
                t_on_reply("2");
                t_on_failure("1");
        }
                
        if (method=="REGISTER")
        {
                xlog("saving AoR non local domain \n");
                save("location");
        }
                
         
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}
 


      



More information about the Users mailing list