On Monday 01 August 2011 17:58:17 Alex Balashov wrote:
> On 08/01/2011 11:57 AM, Alex Hermann wrote:
> > Is it even guaranteed that $du gets set to $ru in every possible
> > scenario?
> 
> No, it is set only in a few cases.
> 
> Good way to check:
> 
>     if(!defined $du)

That does not work:

The following script fragment:

request_route:
        xlog("Relay: <$ru> via <$du>");
        if (defined $du) {
                xlog("Relay: $$du is defined");
        }


branch_route:
        xlog("Branch: <$ru> via <$du>");
        if (defined $du) {
                xlog("Branch: $$du is defined");
        }


Produces the following log fragment:

Relay: <sip:user@domain:8888;transport=udp> via <<null>>
Branch: <sip:user@domain:8888;transport=udp> via 
<sip:user@domain:8888;transport=udp>
Branch: $du is defined

Let me rephrase the question as it may have been a bit unclear: How can i 
determine within branch_route if the current branch had $du set?

-- 
Alex Hermann

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to