[Kamailio-Users] Forward call

Thiago Rondon thiago.rondon at gmail.com
Thu Sep 4 17:18:19 CEST 2008


Folks,

My problem for forward call, that I need to change username/password
and realm to do my
forward.

So, I try this:

modparam("uac","from_restore_mode", "auto")
modparam("uac","auth_realm_avp","$avp(s:uac_realm)")
modparam("uac","auth_username_avp","$avp(s:uac_username)")
modparam("uac","auth_password_avp","$avp(s:uac_password)"

route {
...
       if(uri=~"^sip:0[0-9]{10}@") {
        xlog("L_INFO","uac_atual: $avp(s:uac_username) !!");
        $avp(s:uac_username)="username";
        $avp(s:uac_realm)="1.1.1.1";
        $avp(s:uac_password)="password";
        xlog("L_INFO","uac_trocado $avp(s:uac_username) !!");
        route(3);
        exit;
       }
..
}

...

route[3] {
        t_on_failure("3");
        # reset flag to mark no authentication yet performed
        resetflag(7);
        # forward to PSTN
        uac_replace_from("username","sip:username at 1.1.1.1");
        rewritehostport("1.1.1.1:5060");
        xlog("L_INFO","rewritehost !!!!!!!!");
        t_relay();
}

..


So, when I do xlog, in the first entry, uac_username don't display, why ?

And its strange, because in one supplier its ok, and in another its not run.

But I don't undestand why uac_username is empty in the first xlog!

Thanks,
-Thiago Rondon




More information about the sr-users mailing list