"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