El Thursday 13 September 2007 17:21:13 Andreas Granig escribió:
If loose_route() returns true, a destination uri ($du) is set according to the first Route header. $dd refers to the domain part of this uri.
I understand but can't get it working:
if (loose_route()) {
xlog("L_INFO", "loose_route()\n"); xlog("L_INFO", "Route = $hdr(Route)\n"); xlog("L_INFO", "du = $du -- dd = $dd -- ds = $ds\n");
But in the ACK or re-INVITE I just see:
loose_route() Route = sip:86.92.0.210;lr=on;ftag=zxmjg;dialog-id=326.db350534 du = <null> -- dd = <null> -- ds = <null>
Why these 3 variables ($du, $dd, $ds) are <null> ?
So if there's a destination uri resulting from a Route header, you can check its domain using is_domain_local() and thereby distinguish whether the domain is served by your proxy.
Yes, the idea is good.