Hello,
On 08/11/08 18:09, Alex Balashov wrote:
Ali Soltani wrote:
Hi Alex,
Thank you for the response.
I tried to use onreply_route block in the main route as well as in
route1 as follow but still can not log response messages (180, 200, ..)
route
{
t_on_reply("1");
...
}
route[1]
{
if (is_method("INVITE"))
{
t_on_reply("1");
}
...
}
onreply_route[1]
{
xlog("(onreplyroute1) usr=$ru method=$rm request_port=$rp
received_port=$Rp original port=$op destination_port=$dp src_port=$sp");
}
You can only have one reply route per request. If you specify multiple
ones, only the last one will take effect.
The problem in this case is that route[1] will never be called.
Here's what you want:
route {
if(is_method("INVITE"))
t_on_reply("1");
}
onreply_route[1] {
...
}
as extra detail, if the onreply_route has not index (or the index is 0),
then all sip replies are going there, no matter the transaction has a
t_on_reply() on it (also stateless replies - not belonging to a
transaction - are going there).
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com