Hello,
if parameter register_myself of domain module is set to 1, then the
module registers a callbacks to core for matching myself. So practically
you don't need domain module functions for doing uri==myself. Because
domain module does not store port, I guess it is ignored. So in this
case it is better to keep register_myself=0 and match per domain and
port separately, with domain module functions and config comparison for
port.
Cheers,
Daniel
On 6/3/13 10:59 AM, Klaus Darilion wrote:
Try:
if (uri == myself) ...
IIRC it uses the same functions like the loose_route() function, which
are port sensitive.
regards
Klaus
On 03.06.2013 10:16, Daniel-Constantin Mierla wrote:
Hello,
I haven't implemented that function, but from its name I would say it
takes only host part in consideration.
IIRC, domain module works only with host part everywhere, port not being
specified in database at all. Thus it is ignored, like matching any
port.
Cheers,
Daniel
On 5/30/13 1:39 PM, DanB wrote:
Guys,
I was wondering if I am doing something wrong or domain module not
considering properly local ips within is_uri_host_local().
Although I have domain loaded with register_myself on 1, the request
going to my IP is simply not matching local domain (listening on
127.0.0.1 port 5070).
Bellow the trace of such request:
"""
#
U 2013/05/30 12:35:56.436485 10.10.10.21:5060 -> 127.0.0.1:5070
OPTIONS sip:127.0.0.1:5070 SIP/2.0.
Via: SIP/2.0/UDP
10.10.10.21;branch=z9hG4bK4866.b4f45983000000000000000000000000.0.
To: <sip:127.0.0.1:5070>.
From:
<sip:e...@iec.itsyscom.com>;tag=ae9b2706b606c3acb0ebe4f1c8f81cee-f20d.
CSeq: 10 OPTIONS.
Call-ID: 467de807489c4482-3002@10.10.10.21.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: iClass4-EP 4.0.0.
.
#
U 2013/05/30 12:35:56.440410 127.0.0.1:5070 -> 10.10.10.21:5060
SIP/2.0 484 Address Incomplete.
Via: SIP/2.0/UDP
10.10.10.21;branch=z9hG4bK4866.b4f45983000000000000000000000000.0.
To: <sip:127.0.0.1:5070>;tag=46a6e639fa023622ac1ba4fea686e961.d61e.
From:
<sip:e...@iec.itsyscom.com>;tag=ae9b2706b606c3acb0ebe4f1c8f81cee-f20d.
CSeq: 10 OPTIONS.
Call-ID: 467de807489c4482-3002@10.10.10.21.
Server: iClass4-AP 4.0.0.
Content-Length: 0.
"""
My script looks something like bellow, so Address Incomplete should
never be reached:
"""
#!define LISTEN_IP 127.0.0.1
#!define LISTEN_PORT 5070
...
listen=LISTEN_IP
port=LISTEN_PORT
auto_aliases=yes
...
# ----- domain params -----
modparam("domain", "db_url", DBURL)
modparam("domain", "register_myself", 1)
...
if (is_method("OPTIONS") && is_uri_host_local()) {
options_reply();
exit;
}
...
if ($rU==$null) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
"""
I am running on git master with the test patch Daniel did few days
back for me.
Thanks in advance for any tip!
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
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
* http://asipto.com/u/katu *
_______________________________________________
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