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

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sun Aug 1 18:18:35 CEST 2010


Hi Nauman,

As docs say, the save() function is processing a REGISTER request by: 
extracting the SIP contacts, update them into user location table 
(registration table) and sends back a reply. See :
    http://www.opensips.org/html/docs/modules/1.6.x/registrar.html#id228529

if you want to prevent the function to send a reply back, see the "r" 
flag that you can pass to it.

Best regards,
Bogdan

Nauman Sulaiman wrote:
> 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;
> }
>  
>
>
>       
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Users mailing list