Hi all,
I'm running into some issues with E164 conversions and was wondering if there 
was a decent standardized method for conversions. Conversions using $rU seem to 
be working great, but $fU is behaving badly. This is what I have so far:

    xlog("$ci - caller id was $avp(src=>callerid)");

    if($avp(src=>callerid) =~ "^\+"){
            xlog("$ci - caller id already E164");
    }else if($(rU{s.substr,0,$(avp(src=>countrycode){s.len})}) == 
$avp(src=>countrycode)){
            $avp(src=>callerid) = "+" + $avp(src=>callerid);
            $fU = $avp(src=>callerid);
            $avp(uacreplacefromdisplay) = $fU;
            $avp(uacreplacefromuri) = $fu;
            xlog("$ci - Adding plus to make caller id e164");
    }else{
            $fU = "+" + $avp(src=>countrycode) + $fU;
            $avp(uacreplacefromdisplay) = $fU;
            $avp(uacreplacefromuri) = $fu;
            xlog("$ci - converting domestic caller id number to $fU ($fu) - 
$avp(uacreplacefromdisplay) $avp(uacreplacefromuri)");
    }

Previously, I'd found a suggestion mentioning using uac_replace_from in the 
route[RELAY] (which is the purpose of the uacreplacefrom avps), but $fU does 
not appear to be changing its value. Is there something I'm doing incorrectly?
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to