I rewrote the entire script
if (uri=~"0*@DOM") {
if (!www_authorize("DOM", "subscriber")) { www_challenge("DOM", "0"); break; }; if (!is_user_in("credentials", "local")){ sl_send_reply("403", "No permission for local calls"); break; }; rewritehostport("IP:5090"); t_relay_to_udp("IP", "5090"); break; };
It works but I have this problem,
if I hangup within my ip client the pstn number is ringed until answer/timeout
without
f (!is_user_in("credentials", "local")){ sl_send_reply("403", "No permission for local calls"); break; };
all works fine.
Any Idea ?
Tnx
Hello, the CANCEL is not relayed to the gateway. You can use is_user_in("credentials", "local") only for INVITEs: if (method=="INVITE" & !is_user_in("credentials", "local")){ sl_send_reply("403", "No permission for local calls"); break; };
It is better to use proxy_authorize(...) and proxy_challenge(...) instead of www_* to authenticate/authorize the INVITEs.
.Daniel
On 2/10/2004 5:56 PM, Alessio Focardi wrote:
It is better to use proxy_authorize(...) and proxy_challenge(...) instead of www_* to authenticate/authorize the INVITEs.
Oops !
this is working now
if (uri=~"0*@privatel.it"){
if (!www_authorize("privatel.it", "subscriber")) { www_challenge("privatel.it", "0"); sl_send_reply("403", "No permission for local calls"); break; };
if (method=="INVITE" & !is_user_in("credentials", "local")){ sl_send_reply("403", "No permission for local calls"); break; }; rewritehostport("194.177.127.226:5090"); t_relay_to_udp("194.177.127.226", "5090"); break;
};
shall I just substitute www with proxy ?
tnx !