I would like to set up kamailio in order to listen to multiple port.
I have set : port=5060 port=5228
But it always listen on the port indicated on last line:
Listening on
udp: 127.0.0.1:5228
udp: x.x.x.x:5228
tcp: 127.0.0.1:5228
tcp: x.x.x.x:5228
Aliases:
I don't have any "listen" in my config file.
Is it supposed to work like that ?
Hello i think 5228 port override 5060. use "listen" parameter to listen multiple ports.
http://www.kamailio.org/wiki/cookbooks/4.3.x/core#port
-- View this message in context: http://sip-router.1086192.n5.nabble.com/listening-on-multiple-port-tp142689p... Sent from the Users mailing list archive at Nabble.com.
You are right. That's what I have found.
The issue for listen is that I need to add a line for each protocol, interface.
Hopefully it is possible to write: listen=udp:eth0:5060
to avoid to specify the IP.
2015-10-30 16:28 GMT+01:00 ycaner yasin.caner@netgsm.com.tr:
Hello i think 5228 port override 5060. use "listen" parameter to listen multiple ports.
http://www.kamailio.org/wiki/cookbooks/4.3.x/core#port
-- View this message in context: http://sip-router.1086192.n5.nabble.com/listening-on-multiple-port-tp142689p... Sent from the Users mailing list archive at Nabble.com.
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
Thank you for your answer.
However in my case (4.3.3 with tcp enabled), the 2 lines with port neither lines with 0.0.0.0 are working.
2015-11-02 10:23 GMT+01:00 Daniel Tryba d.tryba@pocos.nl:
On Friday 30 October 2015 18:35:18 Thibault Gueslin wrote:
Hopefully it is possible to write: listen=udp:eth0:5060
to avoid to specify the IP.
listen=udp:0.0.0.0:5060 listen=udp:0.0.0.0:5228
should be equivalent to port=5060 port=5228
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
On Monday 02 November 2015 15:08:16 Thibault Gueslin wrote:
Thank you for your answer.
However in my case (4.3.3 with tcp enabled), the 2 lines with port neither lines with 0.0.0.0 are working.
Well, if you want tcp you need to add that as listen proto. Making my answer that listen... is equivalent to port untrue, since you have to add a lister per protocol you need.
I have the following in a config (4.2.6):
# grep -e ^listen -e ^port kamailio.cfg listen=udp:0.0.0.0:5060 listen=udp:0.0.0.0:5062 listen=tcp:0.0.0.0:5060 listen=tcp:0.0.0.0:5062
Starting this kamailio shows: # kamailio loading modules under config path: /usr/lib/x86_64-linux-gnu/kamailio/modules/ Listening on udp: 0.0.0.0:5060 udp: 0.0.0.0:5062 tcp: 0.0.0.0:5060 tcp: 0.0.0.0:5062
netstat/lsof tell me kamailio is listening on al specified ports.
On 02/11/15 15:25, Daniel Tryba wrote:
On Monday 02 November 2015 15:08:16 Thibault Gueslin wrote:
Thank you for your answer.
However in my case (4.3.3 with tcp enabled), the 2 lines with port neither lines with 0.0.0.0 are working.
Well, if you want tcp you need to add that as listen proto. Making my answer that listen... is equivalent to port untrue, since you have to add a lister per protocol you need.
I have the following in a config (4.2.6):
# grep -e ^listen -e ^port kamailio.cfg listen=udp:0.0.0.0:5060 listen=udp:0.0.0.0:5062 listen=tcp:0.0.0.0:5060 listen=tcp:0.0.0.0:5062
Starting this kamailio shows: # kamailio loading modules under config path: /usr/lib/x86_64-linux-gnu/kamailio/modules/ Listening on udp: 0.0.0.0:5060 udp: 0.0.0.0:5062 tcp: 0.0.0.0:5060 tcp: 0.0.0.0:5062
netstat/lsof tell me kamailio is listening on al specified ports.
If people find it useful, I can extend the code so that port global parameter becomes a list instead of a single value. Although I didn't need it so far (even at some point I thought it is a list already, but code proved to be different), it looks like some people would like to have this option.
Of course, that will break the current behaviour that setting the port second time will overwrite previous value, so the question would be if someone thinks that has to stay... anyone?
Cheers, Daniel
This could be interesting. The first step will to be to modify the doc to reflect the code behaviour. Currently it is written that multiple lines with port= configures kamailio for listening on multiple ports But it is not the case as you confirmed.
Additionnaly it does not work for me to configure with IP=0.0.0.0 with lines like this: listen=tcp:0.0.0.0:5062 (4.3.3) It shows "Listening on.." but kamailio is not listening on any ports.
To listen on multiple ports without specifying the IP, I have only found that the config line with eth0 is working. listen=tcp:eth0:5062
regards
thibault
2015-11-03 11:26 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
On 02/11/15 15:25, Daniel Tryba wrote:
On Monday 02 November 2015 15:08:16 Thibault Gueslin wrote:
Thank you for your answer.
However in my case (4.3.3 with tcp enabled), the 2 lines with port
neither
lines with 0.0.0.0 are working.
Well, if you want tcp you need to add that as listen proto. Making my
answer
that listen... is equivalent to port untrue, since you have to add a
lister
per protocol you need.
I have the following in a config (4.2.6):
# grep -e ^listen -e ^port kamailio.cfg listen=udp:0.0.0.0:5060 listen=udp:0.0.0.0:5062 listen=tcp:0.0.0.0:5060 listen=tcp:0.0.0.0:5062
Starting this kamailio shows: # kamailio loading modules under config path:
/usr/lib/x86_64-linux-gnu/kamailio/modules/
Listening on udp: 0.0.0.0:5060 udp: 0.0.0.0:5062 tcp: 0.0.0.0:5060 tcp: 0.0.0.0:5062
netstat/lsof tell me kamailio is listening on al specified ports.
If people find it useful, I can extend the code so that port global parameter becomes a list instead of a single value. Although I didn't need it so far (even at some point I thought it is a list already, but code proved to be different), it looks like some people would like to have this option.
Of course, that will break the current behaviour that setting the port second time will overwrite previous value, so the question would be if someone thinks that has to stay... anyone?
Cheers, Daniel
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Nov 30-Dec 2, Berlin - http://asipto.com/kat
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