Hi there,
Could someone please explain to me the actual difference between *Alias=*and *Listen=*. I have read the documentation ( http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#alias and http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#listen) but still cannot distinguish between what the two functions are doing differently. Do I *need* to use both Alias and Listen at the same time in the config?
For example, if I have an openser server responsible for multiple domains * sip1.foobar.com*, *sip2.foobar.com*, etc and also listening in on multiple ports (*5060*, *5061*, *5062*), would I have to add the following to my openser.cfg?
listen=udp:localhost:5060 /* Loopback */ listen=udp:localhost:5061 listen=udp:localhost:5062
listen=udp:192.168.1.101:5060 /* LAN IP of the server */ listen=udp:192.168.1.101:5061 listen=udp:192.168.1.101:5062
listen=udp:sip1.foobar.com:5060 /* Domain 1 */ listen=tcp:sip1.foobar.com:5060 listen=udp:sip1.foobar.com:5061 listen=tcp:sip1.foobar.com:5061 listen=udp:sip1.foobar.com:5062 listen=tcp:sip1.foobar.com:5062
listen=udp:sip2.foobar.com:5060 /* Domain 2 */ listen=tcp:sip2.foobar.com:5060 listen=udp:sip2.foobar.com:5061 listen=tcp:sip2.foobar.com:5061 listen=udp:sip2.foobar.com:5062 listen=tcp:sip2.foobar.com:5062
alias="sip1.foobar.com:5060" /* Aliases for Domain 1 */ alias="sip1.foobar.com:5061" alias="sip1.foobar.com:5062"
alias="sip2.foobar.com:5060" /* Aliases for Domain 2 */ alias="sip2.foobar.com:5061" alias="sip2.foobar.com:5062"
alias="111.222.333.444>" /* IP OF SERVER */
Now if I understand correctly then *if (uri==myself) { }* should now be true for each of these domains.
"listen" defines the sockets on which openser is listening.
inside openser there are several function which need to know if a message is addressed to this openser or not.
eg. INVITE asfas@domain.com
Openser has to know if domain.com is itself and it should process the message or if it should forward the request to domain.com.
For the from URI or request URI there the functions from the domain module which stores this information in a database.
You can also use the "myself" function. myself and the loose_routing function uses the "aliases" to find out if a message is addressed to this openser or not.
Thus, openser internally has a list of aliases it is responsible of. This list includes: - all the IP addresses on which openser is listening - all the domain names found out by reverse lookups of the listening IPs - all aliases which were defined with the alias= option
regards klaus
Max Gregorian wrote:
Hi there,
Could someone please explain to me the actual difference between */Alias=/* and */Listen=/*. I have read the documentation ( http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#alias and http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#listen http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#listen) but still cannot distinguish between what the two functions are doing differently.
Do I _need_ to use both Alias and Listen at the same time in the config?
For example, if I have an openser server responsible for multiple domains /sip1.foobar.com http://sip1.foobar.com /, /sip2.foobar.com http://sip2.foobar.com/, etc and also listening in on multiple ports (/5060/, /5061/, /5062/), would I have to add the following to my openser.cfg?
listen=udp:localhost:5060 /* Loopback */ listen=udp:localhost:5061 listen=udp:localhost:5062
listen=udp:192.168.1.101:5060 http://192.168.1.101:5060 /* LAN IP of the server */ listen=udp: 192.168.1.101:5061 http://192.168.1.101:5061 listen=udp:192.168.1.101:5062 http://192.168.1.101:5062
listen=udp:sip1.foobar.com:5060 http://sip1.foobar.com:5060 /* Domain 1 */ listen=tcp:sip1.foobar.com:5060 http://sip1.foobar.com:5060 listen=udp:sip1.foobar.com:5061 http://sip1.foobar.com:5061 listen=tcp:sip1.foobar.com:5061 http://sip1.foobar.com:5061 listen=udp:sip1.foobar.com:5062 http://sip1.foobar.com:5062 listen=tcp:sip1.foobar.com:5062 http://sip1.foobar.com:5062
listen=udp:sip2.foobar.com:5060 http://sip2.foobar.com:5060 /* Domain 2 */ listen=tcp:sip2.foobar.com:5060 http://sip2.foobar.com:5060 listen=udp:sip2.foobar.com:5061 http://sip2.foobar.com:5061 listen=tcp: sip2.foobar.com:5061 http://sip2.foobar.com:5061 listen=udp:sip2.foobar.com:5062 http://sip2.foobar.com:5062 listen=tcp:sip2.foobar.com:5062 http://sip2.foobar.com:5062
alias="sip1.foobar.com:5060 http://sip1.foobar.com:5060" /* Aliases for Domain 1 */ alias="sip1.foobar.com:5061 http://sip1.foobar.com:5061" alias=" sip1.foobar.com:5062 http://sip1.foobar.com:5062"
alias="sip2.foobar.com:5060 http://sip2.foobar.com:5060" /* Aliases for Domain 2 */ alias="sip2.foobar.com:5061 http://sip2.foobar.com:5061" alias=" sip2.foobar.com:5062 http://sip2.foobar.com:5062"
alias="111.222.333.444>" /* IP OF SERVER */
Now if I understand correctly then *if (uri==myself) { }* should now be true for each of these domains.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Many thanks for your response.
So, in short, both 'alias' and 'listen' are needed for a multi-domain, multi-port setup?
I have recently come across the domain module as you rightly mention, and will be looking further into its use as it does seem like the more flexible option. It does however require that I configure support for mysql database.
Just to clarify though, should the above setup still work for a multiple domain environment (with the obvious drawback of having to put multiple entries for each served domain)? I tried it as is, but it seems to be affected by internal DNS (as we have internal DNS servers for our network), even though I was still 'listening' on the required domain names and the LAN IP of the server, so I will try putting entries in /etc/hosts when I get a chance to see if it makes a difference.
Basically what I am trying to achieve is to just have the server listening on a specific (fixed) IP and just point multiple domain names at it's public IP without having to edit the config or restart openser. Do you know if this is possible?
Thanks in advance.
On 10/19/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
"listen" defines the sockets on which openser is listening.
inside openser there are several function which need to know if a message is addressed to this openser or not.
eg. INVITE asfas@domain.com
Openser has to know if domain.com is itself and it should process the message or if it should forward the request to domain.com.
For the from URI or request URI there the functions from the domain module which stores this information in a database.
You can also use the "myself" function. myself and the loose_routing function uses the "aliases" to find out if a message is addressed to this openser or not.
Thus, openser internally has a list of aliases it is responsible of. This list includes:
- all the IP addresses on which openser is listening
- all the domain names found out by reverse lookups of the listening IPs
- all aliases which were defined with the alias= option
regards klaus
Max Gregorian wrote:
Hi there,
Could someone please explain to me the actual difference between */Alias=/* and */Listen=/*. I have read the documentation ( http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#alias and http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#listen <
http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#listen%3E)
but still cannot distinguish between what the two functions are doing differently.
Do I _need_ to use both Alias and Listen at the same time in the config?
For example, if I have an openser server responsible for multiple domains /sip1.foobar.com http://sip1.foobar.com /, /sip2.foobar.com http://sip2.foobar.com/, etc and also listening in on multiple ports (/5060/, /5061/, /5062/), would I have to add the following to my openser.cfg?
listen=udp:localhost:5060 /* Loopback */ listen=udp:localhost:5061 listen=udp:localhost:5062
listen=udp:192.168.1.101:5060 http://192.168.1.101:5060 /* LAN IP of the server */ listen=udp: 192.168.1.101:5061 http://192.168.1.101:5061 listen=udp:192.168.1.101:5062 http://192.168.1.101:5062
listen=udp:sip1.foobar.com:5060 http://sip1.foobar.com:5060 /* Domain 1 */ listen=tcp:sip1.foobar.com:5060 http://sip1.foobar.com:5060 listen=udp:sip1.foobar.com:5061 http://sip1.foobar.com:5061 listen=tcp:sip1.foobar.com:5061 http://sip1.foobar.com:5061 listen=udp:sip1.foobar.com:5062 http://sip1.foobar.com:5062 listen=tcp:sip1.foobar.com:5062 http://sip1.foobar.com:5062
listen=udp:sip2.foobar.com:5060 http://sip2.foobar.com:5060 /* Domain 2 */ listen=tcp:sip2.foobar.com:5060 http://sip2.foobar.com:5060 listen=udp:sip2.foobar.com:5061 http://sip2.foobar.com:5061 listen=tcp: sip2.foobar.com:5061 http://sip2.foobar.com:5061 listen=udp:sip2.foobar.com:5062 http://sip2.foobar.com:5062 listen=tcp:sip2.foobar.com:5062 http://sip2.foobar.com:5062
alias="sip1.foobar.com:5060 http://sip1.foobar.com:5060" /* Aliases for Domain 1 */ alias="sip1.foobar.com:5061 http://sip1.foobar.com:5061" alias=" sip1.foobar.com:5062 http://sip1.foobar.com:5062"
alias="sip2.foobar.com:5060 http://sip2.foobar.com:5060" /* Aliases for Domain 2 */ alias="sip2.foobar.com:5061 http://sip2.foobar.com:5061" alias=" sip2.foobar.com:5062 http://sip2.foobar.com:5062"
alias="111.222.333.444>" /* IP OF SERVER */
Now if I understand correctly then *if (uri==myself) { }* should now be true for each of these domains.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users