It's UAC Kamailio module designed to send a INVITE to a provider trunk with authentication or, in opposite, it's only to send REGISTER?
Asked
Active
Viewed 1,494 times
1 Answers
2
UAC module can be used to authenticate a forwarded INVITE that was challenged by the next node. Look at the readme of uac module for credential, auth_* parameters and uac_auth() function.
Here are some config snippets that should help:
modparam("uac","auth_username_avp","$avp(auser)")
modparam("uac","auth_password_avp","$avp(apass)")
modparam("uac","auth_realm_avp","$avp(arealm)")
request_route {
...
if(is_method("INVITE")) {
t_on_failure("TRUNKAUTH");
}
...
}
failure_route[TRUNKAUTH] {
if (t_is_canceled()) {
exit;
}
if(t_check_status("401|407")) {
$avp(auser) = "test";
$avp(apass) = "test";
uac_auth();
t_relay();
exit;
}
}
If you want to update the CSeq (which then needs to be done for all requests within the call), then you have to load dialog module and track cseq updates (see the readme of the dialog module).

miconda
- 1,754
- 11
- 14