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?
On Friday 27 November 2015 13:01:19 Alexandru Covalschi wrote:
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?
Why/What is the error reported?
Have you read: http://www.kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%... " 4.7. uac_auth()
This function can be called only from failure route and will build the authentication response header and insert it into the request without sending anything.
This function can be used from FAILURE_ROUTE. "
So is the error that you are using a function in the reply route that isn't being allowed in that router?
I saw that, but 1. It doesn't work in failure_route (MANAGE_FAILURE from std. config) either 2. My question was more general - is it even possible to do what I need with Kamailio
2015-11-27 13:24 GMT+02:00 Daniel Tryba d.tryba@pocos.nl:
On Friday 27 November 2015 13:01:19 Alexandru Covalschi wrote:
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?
Why/What is the error reported?
Have you read:
http://www.kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%... " 4.7. uac_auth()
This function can be called only from failure route and will build the authentication response header and insert it into the request without sending anything.
This function can be used from FAILURE_ROUTE. "
So is the error that you are using a function in the reply route that isn't being allowed in that router?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Friday 27 November 2015 13:50:36 Alexandru Covalschi wrote:
I saw that, but
- It doesn't work in failure_route (MANAGE_FAILURE from std. config) either
- My question was more general - is it even possible to do what I need
with Kamailio
Yes it is possible. I tried the exact example from http://www.kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%... once upon a time and it worked.
Well I tried but didn't work for me :( however problem is solved using other voip provider. Thanks for help! 27 нояб. 2015 г. 14:09 пользователь "Daniel Tryba" d.tryba@pocos.nl написал:
On Friday 27 November 2015 13:50:36 Alexandru Covalschi wrote:
I saw that, but
- It doesn't work in failure_route (MANAGE_FAILURE from std. config)
either
- My question was more general - is it even possible to do what I need
with Kamailio
Yes it is possible. I tried the exact example from
http://www.kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%... once upon a time and it worked.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users