[SR-Users] How to determine if a 4xx message came from dispatcher or a client?
miconda at gmail.com
Thu Sep 4 09:42:28 CEST 2014
On 23/08/14 11:47, Olli Heiskanen wrote:
> A question on Kamailio variables and using dispatcher:
> When in failure_route I want to know if the request message was going
> to a dispatcher ip or a sip client ip (as in any other than dispatcher
> ip), how do I make an if statement for that?
> If I use ds_is_from_list(), I get wrong results because in both cases
> the request was sent by Kamailio. Also, I don't seem to be able to get
> the source ip of the 4xx message (src_ip shows the source ip of the
> request message).
In failure_route the request is processed again, not the reply.
You can use $T_rpl($si) to get the source ip of the reply inside a
failure_route. But I think ds_is_from_list() doesn't take the IP as
What you can do is to mark the transaction with a specific flag if you
sent it via dispatcher. Then the replies should come from a dispatcher
ip, so you just need to check if that flag is set in failure route.
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany
More information about the sr-users