[SR-Users] Basic question

Olle E. Johansson oej at edvina.net
Sun Apr 21 17:17:36 CEST 2013


21 apr 2013 kl. 15:09 skrev אורן אברהם <oren.av.jnk at gmail.com>:

> thank you for the explanation.
> 
> can  you please tell me the name of the function that copy the changes to the inbound buffer ?
> 
http://www.kamailio.org/docs/modules/4.0.x/modules/textopsx.html
msg_apply_changes()

/O
> 
> 
> 
> 2013/4/21 Olle E. Johansson <oej at edvina.net>
> 
> 21 apr 2013 kl. 01:50 skrev אורן אברהם <oren.av.jnk at gmail.com>:
> 
> > Dear List.
> >
> > I'm trying to change the contact header of a message. ( by calliing add_contact_alias - that shuld add the ;alias= parameter to the contact header)
> > but, when i print the contact header (with xlog), it shows no change.
> >
> > I know the function works, and that it added the parameter as expected by using debug mode. (it sais that it was added)
> >
> > Can anyone explain me why i don't see that change in the xlog ? (i've printer both $ct and $hdr(Contact))
> >
> 
> Kamailio keeps two buffers of the incoming message, one is a copy of the incoming and the other one
> is the one where changes happen, a template for any outbound message used when forwarding
> to the next hop.
> 
> If you change headers, they are changed in the outbound buffer, not the incoming. When you use
> functions to check headers, you check the incoming buffer.
> 
> There is a function to apply changes to the inbound buffer that is needed sometimes, but very
> few times. It can be quite confusing if you are not aware of how changes to messages are applied.
> 
> /O
> 
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130421/2e334445/attachment.htm>


More information about the sr-users mailing list