Hi, I've multidomain OpenSer and I want the possibility of adding new domains without having to write in conf file and restart OpenSer, so I use "domain" module and functions. It works fine.
The problem is that WengoPhone includes a "Route" in the REGISTER so it is matches in "loose_route" and creates an infinite loop:
------------------------------------------- U 2007/09/12 11:00:47.770226 212.121.235.18:1029 -> 88.95.0.210:5060 REGISTER sip:sip.domain.net SIP/2.0 Via: SIP/2.0/UDP 192.168.1.58:5061;rport;branch=123456789 Route: sip:sip.domain.net;lr
U 2007/09/12 11:00:47.772884 88.95.0.210:5060 -> 88.95.0.210:5060 REGISTER sip:sip.domain.net SIP/2.0 Max-Forwards: 10 Via: SIP/2.0/UDP 88.95.0.210;branch=z9hG4bK734e.08122386.0 Via: SIP/2.0/UDP 192.168.1.58:5061;received=212.121.235.18;rport=1029;branch=123456789 Route: sip:sip.domain.net;lr
U 2007/09/12 11:00:47.775153 88.95.0.210:5060 -> 88.95.0.210:5060 REGISTER sip:sip.domain.net SIP/2.0 Max-Forwards: 9 Via: SIP/2.0/UDP 88.95.0.210;branch=z9hG4bK734e.18122386.0 Via: SIP/2.0/UDP 88.95.0.210;rport=5060;branch=z9hG4bK734e.08122386.0 Via: SIP/2.0/UDP 192.168.1.58:5061;received=212.121.235.18;rport=1029;branch=123456789 Route: sip:sip.domain.net;lr
etc etc... -------------------------------------------
A developer of WengoPhone said me that this "Route" header is not necessary but still valid, and that I can solve it by adding:
alias=sip.domain.org
But I don't want to write in conf file for each new added domain, and I don't want to restart OpenSer when it.
I'm thinking in change:
if (loose_route()) {
by
if (loose_route() && method!="REGISTER") {
but it doesn't seem very ellegatn solution.
How could I solve it? Thanks for any help.
El Wednesday 12 September 2007 11:18:22 Iñaki Baz Castillo escribió:
alias=sip.domain.org
But I don't want to write in conf file for each new added domain, and I don't want to restart OpenSer when it.
Humm, I could add each domain to /etc/resolv.conf so it works, but it is just valid for DNS A type... what about DNS SRV SIP?
Hi!
This is a known limitation with openser - loose_route does not import the domains from domain module.
Maybe we already have it on the feature request list - but if not, please submit it on the feature request tracker
regards klaus
Iñaki Baz Castillo schrieb:
Hi, I've multidomain OpenSer and I want the possibility of adding new domains without having to write in conf file and restart OpenSer, so I use "domain" module and functions. It works fine.
The problem is that WengoPhone includes a "Route" in the REGISTER so it is matches in "loose_route" and creates an infinite loop:
U 2007/09/12 11:00:47.770226 212.121.235.18:1029 -> 88.95.0.210:5060 REGISTER sip:sip.domain.net SIP/2.0 Via: SIP/2.0/UDP 192.168.1.58:5061;rport;branch=123456789 Route: sip:sip.domain.net;lr
U 2007/09/12 11:00:47.772884 88.95.0.210:5060 -> 88.95.0.210:5060 REGISTER sip:sip.domain.net SIP/2.0 Max-Forwards: 10 Via: SIP/2.0/UDP 88.95.0.210;branch=z9hG4bK734e.08122386.0 Via: SIP/2.0/UDP 192.168.1.58:5061;received=212.121.235.18;rport=1029;branch=123456789 Route: sip:sip.domain.net;lr
U 2007/09/12 11:00:47.775153 88.95.0.210:5060 -> 88.95.0.210:5060 REGISTER sip:sip.domain.net SIP/2.0 Max-Forwards: 9 Via: SIP/2.0/UDP 88.95.0.210;branch=z9hG4bK734e.18122386.0 Via: SIP/2.0/UDP 88.95.0.210;rport=5060;branch=z9hG4bK734e.08122386.0 Via: SIP/2.0/UDP 192.168.1.58:5061;received=212.121.235.18;rport=1029;branch=123456789 Route: sip:sip.domain.net;lr
etc etc...
A developer of WengoPhone said me that this "Route" header is not necessary but still valid, and that I can solve it by adding:
alias=sip.domain.org
But I don't want to write in conf file for each new added domain, and I don't want to restart OpenSer when it.
I'm thinking in change:
if (loose_route()) {
by
if (loose_route() && method!="REGISTER") {
but it doesn't seem very ellegatn solution.
How could I solve it? Thanks for any help.
El Thursday 13 September 2007 15:22:18 Klaus Darilion escribió:
This is a known limitation with openser - loose_route does not import the domains from domain module.
Yes, ok.
I've found a work around that is adding the domains in "/etc/hosts", but that just valid for DNS A registry, what about a SRV registry?
Maybe we already have it on the feature request list - but if not, please submit it on the feature request tracker
Ok, I'll do.
Thanks.
Iñaki Baz Castillo writes:
I've found a work around that is adding the domains in "/etc/hosts", but that just valid for DNS A registry, what about a SRV registry?
if your proxy has hostname myproxy.foo.bar and it is serving domain company.com, then srv entry for that domain looks like
_sip._udp.company.com. IN SRV 0 0 5060 myproxy.foo.bar.
if wengo phone then puts company.com in route header instead of myproxy.foo.bar, you should report a bug or switch to a better sip ua.
-- juha
El Thursday 13 September 2007 15:41:07 Juha Heinanen escribió:
Iñaki Baz Castillo writes:
I've found a work around that is adding the domains in "/etc/hosts", but that just valid for DNS A registry, what about a SRV registry?
if your proxy has hostname myproxy.foo.bar and it is serving domain company.com, then srv entry for that domain looks like
_sip._udp.company.com. IN SRV 0 0 5060 myproxy.foo.bar.
if wengo phone then puts company.com in route header instead of myproxy.foo.bar, you should report a bug or switch to a better sip ua.
I haven't tryed it again, I will do ;)
Klaus Darilion writes:
A developer of WengoPhone said me that this "Route" header is not necessary but still valid, and that I can solve it by adding:
alias=sip.domain.org
But I don't want to write in conf file for each new added domain, and I don't want to restart OpenSer when it.
i thought that route header includes list of proxies that the request should visit, not domains the request should visit:
20.34 Route The Route header field is used to force routing for a request through the listed set of proxies. Examples of the use of the Route header field are in Section 16.12.1.
Example:
Route: sip:bigbox3.site3.atlanta.com;lr,sip:server10.biloxi.com;lr
so there should be no need to add aliases for each domain your proxy is serving (unless you want your proxy to have a separate hostname for each of its domains).
-- juha
El Thursday 13 September 2007 15:37:39 Juha Heinanen escribió:
i thought that route header includes list of proxies that the request should visit, not domains the request should visit:
20.34 Route The Route header field is used to force routing for a request through the listed set of proxies. Examples of the use of the Route header field are in Section 16.12.1.
Example:
Route: sip:bigbox3.site3.atlanta.com;lr,sip:server10.biloxi.com;lr
so there should be no need to add aliases for each domain your proxy is serving (unless you want your proxy to have a separate hostname for each of its domains).
Yes, but note what Klaus Darilion said: "This is a known limitation with openser - loose_route does not import the domains from domain module."
The problem is just in "loose_route()" function. So I've open a bug/wish for that: https://sourceforge.net/tracker/index.php?func=detail&aid=1793928&gr...
Regards.
Iñaki Baz Castillo writes:
Yes, but note what Klaus Darilion said: "This is a known limitation with openser - loose_route does not import the domains from domain module."
and it should not do so. see my reply to you. your feature request is not valid no matter what klaus said.
-- juha
El Thursday 13 September 2007 16:33:40 Juha Heinanen escribió:
Iñaki Baz Castillo writes:
Yes, but note what Klaus Darilion said: "This is a known limitation with openser - loose_route does not import the domains from domain module."
and it should not do so. see my reply to you. your feature request is not valid no matter what klaus said.
You said: "i thought that route header includes list of proxies that the request should visit, not domains the request should visit"
But what I mean is that if my OpenSer is has as local domains (in "domain" table):
domain1.org domain2.org
A DNS type A or SRV of those domain should give us the IP of OpenSer, so finally the proxy = the domain.
So if WengoPhones includes a "Route: domain1.org" in REGISTER then it'll do a DNS query (SRV or A) for "domain1.org" and it will get OpenSer IP.
So, what is the difference?
Thanks for your replies.
El Thursday 13 September 2007 16:46:35 Iñaki Baz Castillo escribió:
You said: "i thought that route header includes list of proxies that the request should visit, not domains the request should visit"
But what I mean is that if my OpenSer is has as local domains (in "domain" table):
domain1.org domain2.org
A DNS type A or SRV of those domain should give us the IP of OpenSer, so finally the proxy = the domain.
So if WengoPhones includes a "Route: domain1.org" in REGISTER then it'll do a DNS query (SRV or A) for "domain1.org" and it will get OpenSer IP.
So, what is the difference?
Ops, I didn't see your reply in Sourceforge:
"this request is invalid. route header contains hostnames or host addresses, not domains."
That convinces me ;)
Juha Heinanen schrieb:
Iñaki Baz Castillo writes:
Yes, but note what Klaus Darilion said: "This is a known limitation with openser - loose_route does not import the domains from domain module."
and it should not do so. see my reply to you. your feature request is not valid no matter what klaus said.
Are you sure? I think INVITE sip:klaus@iptel.org SIP/2.0 Route: sip:iptel.org;lr
is a valid request. (btw: osip puts the outboundproxy into Route headers)
regards klaus
Klaus Darilion writes:
Are you sure? I think INVITE sip:klaus@iptel.org SIP/2.0 Route: sip:iptel.org;lr
that kind of route header uri does not provide any added value to request uri.
-- juha
El Thursday 13 September 2007 17:17:54 Juha Heinanen escribió:
Klaus Darilion writes:
Are you sure? I think INVITE sip:klaus@iptel.org SIP/2.0 Route: sip:iptel.org;lr
that kind of route header uri does not provide any added value to request uri.
Completely useless. I reported the wish in Wengophone (that uses oSip) and a developer told me that it's possible to take it off for future versiones since it isn't useful at all.
Juha Heinanen schrieb:
Klaus Darilion writes:
Are you sure? I think INVITE sip:klaus@iptel.org SIP/2.0 Route: sip:iptel.org;lr
that kind of route header uri does not provide any added value to request uri.
You are correct but IMO it is still legal.
El Friday 14 September 2007 13:17:09 Klaus Darilion escribió:
Juha Heinanen schrieb:
Klaus Darilion writes:
Are you sure? I think INVITE sip:klaus@iptel.org SIP/2.0 Route: sip:iptel.org;lr
that kind of route header uri does not provide any added value to request uri.
You are correct but IMO it is still legal.
I think "Route" header should be canonical hostname and not the SIP domain:
In "SIP Forum"'s SIPconnect program to get SIP compliant devices and services we can read:
"SIP Proxy Servers MUST use canonical hostnames in any 'Via:' and/or 'Route:' SIP header field that it inserts in the SIP message.":
http://www.zoomerang.com/web/SharedResults/SharedResultsSurveyResultsPage.as... (step 15)
So if that is true then OpenSer behaviour is correct and there is a bug in oSIP stack because it shouldn't add a "Route" header with SIP domain value in REGISTER messages. Could anyone confirm this in order to report the bug to oSIP developers?
Hi,
Klaus Darilion wrote:
This is a known limitation with openser - loose_route does not import the domains from domain module.
Maybe we already have it on the feature request list - but if not, please submit it on the feature request tracker
Daniel once suggested a workaround for this issue:
if(loose_route()) { if($du != null && is_domain_local("$dd")) { $du = null; } else { # do loose-routing here } }
Works fine here.
Andreas
El Thursday 13 September 2007 16:41:36 Andreas Granig escribió:
Hi,
Klaus Darilion wrote:
This is a known limitation with openser - loose_route does not import the domains from domain module.
Maybe we already have it on the feature request list - but if not, please submit it on the feature request tracker
Daniel once suggested a workaround for this issue:
if(loose_route()) { if($du != null && is_domain_local("$dd")) { $du = null; } else { # do loose-routing here } }
Works fine here.
Could you explain what $du and $dd are for? I'am logging them and they are always "null" ¿?
Thanks.
On Thursday 13 September 2007, Iñaki Baz Castillo wrote:
El Thursday 13 September 2007 16:41:36 Andreas Granig escribió:
Hi,
Klaus Darilion wrote:
This is a known limitation with openser - loose_route does not import the domains from domain module.
Maybe we already have it on the feature request list - but if not, please submit it on the feature request tracker
Daniel once suggested a workaround for this issue:
if(loose_route()) { if($du != null && is_domain_local("$dd")) { $du = null; } else { # do loose-routing here } }
Works fine here.
Could you explain what $du and $dd are for? I'am logging them and they are always "null" ¿?
You find information about this pseudovariables in the wiki:
http://openser.org/dokuwiki/doku.php/pseudovariables:1.2.x#domain_of_destina...
Cheers,
Henning
El Thursday 13 September 2007 17:19:26 Henning Westerholt escribió:
Could you explain what $du and $dd are for? I'am logging them and they are always "null" ¿?
You find information about this pseudovariables in the wiki:
http://openser.org/dokuwiki/doku.php/pseudovariables:1.2.x#domain_of_destin ation_uri
Yes, sure I looked for them before asking in the list.
The point is that I don't understand what they are for.
$du - reference to destination uri $ru - reference to request's URI
What does "reference to destination uri" mean? what is "destination uri"? it shows me "null" in any case.
If loose_route() returns true, a destination uri ($du) is set according to the first Route header. $dd refers to the domain part of this uri.
So if there's a destination uri resulting from a Route header, you can check its domain using is_domain_local() and thereby distinguish whether the domain is served by your proxy.
Andreas
Iñaki Baz Castillo wrote:
El Thursday 13 September 2007 16:41:36 Andreas Granig escribió:
Hi,
Klaus Darilion wrote:
This is a known limitation with openser - loose_route does not import the domains from domain module.
Maybe we already have it on the feature request list - but if not, please submit it on the feature request tracker
Daniel once suggested a workaround for this issue:
if(loose_route()) { if($du != null && is_domain_local("$dd")) { $du = null; } else { # do loose-routing here } }
Works fine here.
Could you explain what $du and $dd are for? I'am logging them and they are always "null" ¿?
Thanks.
El Thursday 13 September 2007 17:21:13 Andreas Granig escribió:
If loose_route() returns true, a destination uri ($du) is set according to the first Route header. $dd refers to the domain part of this uri.
Ok, understood now.
If nobody matter I will add this explanation in the wiki.
El Thursday 13 September 2007 17:21:13 Andreas Granig escribió:
If loose_route() returns true, a destination uri ($du) is set according to the first Route header. $dd refers to the domain part of this uri.
I understand but can't get it working:
if (loose_route()) {
xlog("L_INFO", "loose_route()\n"); xlog("L_INFO", "Route = $hdr(Route)\n"); xlog("L_INFO", "du = $du -- dd = $dd -- ds = $ds\n");
But in the ACK or re-INVITE I just see:
loose_route() Route = sip:86.92.0.210;lr=on;ftag=zxmjg;dialog-id=326.db350534 du = <null> -- dd = <null> -- ds = <null>
Why these 3 variables ($du, $dd, $ds) are <null> ?
So if there's a destination uri resulting from a Route header, you can check its domain using is_domain_local() and thereby distinguish whether the domain is served by your proxy.
Yes, the idea is good.