Hi,
I have (silly) question about the realm for authenication which I am not able to fix it.
Currently, i have the following config.
if (uri==myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest authentication if (!www_authorize("1.1.1.1", "subscriber")) { www_challenge("1.1.1.1", "0"); exit; }; if (!check_to()) { sl_send_reply("401", "Unauthorized"); exit; }; consume_credentials(); save("location"); exit; };
if (method=="INVITE") { if (!proxy_authorize("1.1.1.1","subscriber")) { proxy_challenge("1.1.1.1","0"); exit; } if (!check_from()&& !does_uri_exist()) { sl_send_reply("403", "Use From=ID"); exit; } consume_credentials(); };
lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); };
My problem is user can only register or make phone call using 1.1.1.1 as a domain. I have setup a domain name on this ip address. for example sip.proxy.com. when i set up sip.proxy.com as the domain/proxy address in the UA, i was not able to register and received a 503 service unavailable.
What do i need to do to allow user register using ip address or the host/domain name at the same time? currently i have it working for ip address only.
In the subscriber tables-domain column, i have ip address for the users, do i need to add another entry with the domain name in the domain column instead of he ip address? if that is the case, i will have 2 username which the same number in the table.
Please help.