Hey Guys,
I was recently playing with "register_myself" setting of the domain module (which I was the impression that I have used it successfully in the past) and I have the feeling it does not longer behave.
I have the following config:
""" modparam("domain", "db_url", DBURL) modparam("domain", "register_myself", 1) ....
# block foreign domains here if !is_uri_host_local() { sl_send_reply("603","Only local domains accepted"); exit; } """
Based on the register_myself setting I would expect that is_uri_host_local passes the request but it does not although the request is towards the IP address of my server.
Is this the intended behavior or am I just unlucky and hit a bug?
Ta, DanB
Hello,
register_myself set to 1 makes the 'myself' condition match the records from domain table. But it doesn't make is_uri_host_local() to match the listen IP addresses, unless those IP addresses are also added in the domain table. it was this behavior from its first implementation.
You can use instead of is_uri_host_local() the condition (uri==myself) -- this one will match listen ip addresses as well as what is in domain table.
Cheers, Daniel
On 02/11/15 13:22, DanB wrote:
Hey Guys,
I was recently playing with "register_myself" setting of the domain module (which I was the impression that I have used it successfully in the past) and I have the feeling it does not longer behave.
I have the following config:
""" modparam("domain", "db_url", DBURL) modparam("domain", "register_myself", 1) ....
# block foreign domains here if !is_uri_host_local() { sl_send_reply("603","Only local domains accepted"); exit; } """
Based on the register_myself setting I would expect that is_uri_host_local passes the request but it does not although the request is towards the IP address of my server.
Is this the intended behavior or am I just unlucky and hit a bug?
Ta, DanB
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