i wrote alias_contact() function and seems to work fine.  i have not
yet written handle_alias(), but tried to first use scripting means for
that.  that led into trouble with testing is $var has value.

i have this piece of code:

   xlog("L_INFO", "R-URI is <$ru>\n");
   $var(tmp) = $(ru{uri.param,alias});
   xlog("L_INFO", "Alias param is <$var(tmp)>\n");
   if ($var(tmp)) {
            xlog("L_INFO", "Alias param is <$var(tmp)>\n");
            $du = $var(tmp);
            xlog("L_INFO", "Routing in-dialog $rm from <$fu> to <$du>\n");
    } else {
            xlog("L_INFO", "Routing in-dialog $rm from <$fu> to <$ru>\n");
    }

and i get to syslog:

Nov  8 12:51:10 localhost /usr/sbin/sip-proxy[4506]: INFO: R-URI is 
<sip:[email protected]:5074;transport=tcp;alias="192.98.101.10:55375;transport=tcp">
Nov  8 12:51:10 localhost /usr/sbin/sip-proxy[4506]: INFO: Alias param is 
<192.98.101.10:55375;transport=tcp>
Nov  8 12:51:10 localhost /usr/sbin/sip-proxy[4506]: INFO: Routing in-dialog 
BYE from <sip:[email protected]> to 
<sip:[email protected]:5074;transport=tcp;alias="192.98.101.10:55375;transport=tcp">

why does the test

   if ($var(tmp)) {

fail to figure out that $var(tmp) has value?

-- juha

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to