Hello everyone!
Subj is an ethernal theme, I know, but odds are so that I just need to do that.
I've configured UAC auth to successfully register and my route[PSTN] looks like that
# check if PSTN GW IP is defined if (strempty($sel(cfg_get.pstn.gw_ip))) { xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip not defined\n"); return; } if !ds_is_from_list() return; # route to PSTN dialed numbers starting with '+' or '00' # (international format) # - update the condition to match your dialing rules for PSTN routing if(!($rU=~"^(+|00)[1-9][0-9]{3,20}$")) return; if (strempty($sel(cfg_get.pstn.gw_port))) { $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip); } else { $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":" + $sel(cfg_get.pstn.gw_port); }
remove_hf("To"); insert_hf("To: sip:$rU@sipprovider.com\r\n", "Call-ID"); uac_replace_from("","sip:user@sipprovider.com"); route(RELAY); exit;
On INVITE's I get 407 PROXY-AUTH, which are transfered to backend FS. If I try to put if ($T_reply_code == 401 or $T_reply_code == 407) { xlog("L_NOTICE", "Remote asked for authentication"); uac_auth(); } to MANAGE_FAILURE or MANAGE_REPLY route Kamailio can't start.
Is that even possible?