Hi, I read in LCR doc:
1.4.4. to_gw([group-id]) Checks if in-dialog request goes to a gateway. If an optional group-id is given, only gateways belonging to this group are checked.
I suppose that a gateway uses its scheme:IP:port as "Contact" in 200 OK, so "to_gw()" function matches that scheme:IP:port in RURI and verifies if there is a To tag to match an in-dialog message and deliver it to gateway. Is it?
Thanks for any explanation.
Iñaki Baz Castillo writes:
1.4.4. to_gw([group-id]) Checks if in-dialog request goes to a gateway. If an optional group-id is given, only gateways belonging to this group are checked.
I suppose that a gateway uses its scheme:IP:port as "Contact" in 200 OK, so "to_gw()" function matches that scheme:IP:port in RURI and verifies if there is a To tag to match an in-dialog message and deliver it to gateway. Is it?
it does do do anything that complicated. just checks if ip address in request uri matches that of a gateway.
-- juha
El Monday 17 December 2007 10:49:49 Juha Heinanen escribió:
Iñaki Baz Castillo writes:
1.4.4. to_gw([group-id]) Checks if in-dialog request goes to a gateway. If an optional group-id is given, only gateways belonging to this group are checked.
I suppose that a gateway uses its scheme:IP:port as "Contact" in 200 OK, so "to_gw()" function matches that scheme:IP:port in RURI and verifies if there is a To tag to match an in-dialog message and deliver it to gateway. Is it?
it does do do anything that complicated. just checks if ip address in request uri matches that of a gateway.
Ok, and how can we be sure that any gateway will insert that IP in "Contact"? I have no experience on this, but couldn't be possible a gateway inserting a domain isntead of him IP?
Thanks.
Iñaki Baz Castillo writes:
Ok, and how can we be sure that any gateway will insert that IP in "Contact"? I have no experience on this, but couldn't be possible a gateway inserting a domain isntead of him IP?
everything is possible, but those gateways that i have dealt with, insert their ip address in contact header. if your gw does insert its domain name, then you need to start writing another function that can cope with domain names. you also need to add a domain name field to gateway table.
-- juha