[Kamailio-Users] AVP to store user contact information

Asim Riaz ariaz78 at gmail.com
Tue Aug 26 00:27:28 CEST 2008


Hi Baz,
I dont know much about avp, could you explain me or give an example  howto
store information in the avp then save once i received the reply 200.
what i am doing at the moment

t_on_reply("2");
fix_nated_register();
avp_write("$from/username","$avp(i:678)");
subst('/^Contact:.*<sip:(.*)@(.*)>/Contact:<sip:$avp(i:678)@ipaddress of
openser>/ig');

onreply_route[2] {
  if(status=="200") {
   route(6);
   }
route[6]{
        save_noreply("location");
        exit;

its works but I am loosing some of the original contact information, as I am
saving the reply.

Thanks
Asim Riaz

On Mon, Aug 25, 2008 at 7:06 PM, Iñaki Baz Castillo <ibc at aliax.net> wrote:

> El Lunes, 25 de Agosto de 2008, Asim Riaz escribió:
> > Hi All,
> > I am wondering if there is a way to store the user contact info into
>  avp,
> > relay it to existing Regitrar and store the original contact info into
> > location through a function(which i dont know)  once i received
> successful
> > reply from my sip registrar.
>
> Sure, save $ct (the Contact URI) in an AVP and process on_reply_route for
> the
> outbound REGISTER so in case the reply is 200 you can store the AVP content
> in database and so.
>
>
>
> --
> Iñaki Baz Castillo
>
> _______________________________________________
> Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20080825/f053ca57/attachment.htm 


More information about the Users mailing list