[Kamailio-Users] Forward call
Daniel-Constantin Mierla
miconda at gmail.com
Tue Sep 9 08:45:49 CEST 2008
Hello,
On 09/04/08 18:18, Thiago Rondon wrote:
> 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 ?
>
you set the $avp(s:uac_username) after first xlog.
> And its strange, because in one supplier its ok, and in another its not run.
>
The uac module has known limitations regarding the authentication. Maybe
one does CSEq check the other doesn't. See the readme.
Cheers,
Daniel
> But I don't undestand why uac_username is empty in the first xlog!
>
> Thanks,
> -Thiago Rondon
>
> _______________________________________________
> Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>
>
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the Users
mailing list