[SR-Users] Best way to 'detect' direction
klaus.mailinglists at pernau.at
Mon Feb 4 17:15:31 CET 2013
On 31.01.2013 00:34, Paul Belanger wrote:
> I'm in the process of adding logic to 'detect' the direction of my
> message, I have to set:
> respectively. Rather then hard-coding IP addresses in my
> configuration, I was curious how other people over come this? Perhaps
> tagging their call control in some other method?
On the initial INVITE you usually always have some kind of direction
detection (e.g. is it an incoming call, or outgoing call, or internal
call) as you have different routing.
Then you can set a record-route cookie with this information, e.g.
";dir=inbound" which means an incoming call which means that you have
rtpproxy_manage("ei") for the INVITE and rtpproxy_manage("ie") for the
On in-dialog requests get the value of the RR-Cookie (e.g.
check_route_param("dir=inbound) and check the direction of the
use the same logic as for the initial INVITE (or vice versa).
Instead of a RR cookie you could also use the dialog module and dialog
More information about the sr-users