Hi,
unfortunately I think it is not possible to do what you want. save()
function is specifically ddesigned to work on a SIP request and not on
a SIP reply.
regards,
bogdan
Jean-Michel Foucher wrote:
Hello users,
i know the subject is ugly but i am dealing with a nasty registrar.
Here is the architecture :
UAC <--> openser <--> registrar (not openser)
Because of various reasons, i HAVE to make openser do save("location")
and this has to be done only when registrar replies a 200 OK.
Here is a piece of my openser.conf :
------------
route{
if (method))"REGISTER") {
t_on_reply("1");
t_relay("udp:registrar")
};
}
route[1] {
save_noreply("location");
}
onreply_route[1] {
if (status=="200") {
route(1);
};
}
------------
My problem is, when a 200 OK arrives, User-Agent and Allow header
field disappeared.
As far as i understood the source code of 'save' function, it reads
the original message (in my case, the received 200 OK packet) before
recording the contact.
This was confirmed when i tried to append_hf("User-Agent: xxx\r\n")
before saving -> it was null in the database.
Do you have any idea how i could get back these fields when receiving
a 200 OK?
Best regards,