Page 1 of 1

Change SIP port 5060 to SIP port 8891 through out the server

PostPosted: Fri Aug 12, 2011 9:24 am
by kashutu
Hi,

Goautodial CE 2.0
VERSION: 2.2.1-237
BUILD: 100510-2015
Pentium 4 2.8 GHz 1GB RAM

I have a call center running with 5 agents. I have a sitution where my agents are able to log on and dial without any problems through Goautdial. However, when i go home and try to log onto the dialer, i am not able to register the softphone. I know for sure that the ISP that i have at work has all the SIP ports open and the ISP that i have at home has all of them blocked. The reason SIP ports being blocked at home's ISP is because they only allow SIP ports for commercial businesses like call center.
So, my question is, is it possible to change the port on my Goautodial server to 8891 so i will be able to log onto Vicidial from anywhere and my softphone will register on port 8891.
Thank You

PostPosted: Fri Aug 12, 2011 11:53 am
by drg
edit your /etc/asterisk/sip.conf file.

there is an option bindport=5060

change that to the port you want to use.

PostPosted: Fri Aug 12, 2011 3:44 pm
by kashutu
No that is not working. Is there anything else that needs to be configured to register with port 8891?

PostPosted: Fri Aug 12, 2011 3:56 pm
by drg
If you have a router/firewall, you need to make sure you port forward the new port... otherwise it will still appear to "not work".

PostPosted: Fri Aug 12, 2011 4:37 pm
by kashutu
I have already forwarded the port through my router to my vicidial server. but still i am not able to register.

PostPosted: Fri Aug 12, 2011 10:48 pm
by williamconley
did you restart the server after changing the port?

do any of your sip.conf entries explicitly list "port=" ?

have you used:
Code: Select all
lsof -i :5060

and
Code: Select all
lsof -i :8891

PostPosted: Thu Aug 18, 2011 2:41 pm
by kashutu
No i have not used lsof -i:5060 & 8891. BTW what does lsof do?

PostPosted: Thu Aug 18, 2011 4:45 pm
by williamconley
welcome to linux:

Code: Select all
man lsof


but that gives a complex definition. easier to try it and see what it tells you ... 8-)

PostPosted: Fri Aug 19, 2011 8:22 am
by kashutu
ok i did check out man lsof, but if you would be kind enough to explain this in layman's term. What are we trying to aquire after running lsof -i for port 5060 & 8891.

Ok after i have changed the bindport AND port here is what my sip.conf looks like:
externip=xxx.xxx.xxxx.xxx
localnet=10.110.1.0/255.255.255.0
externrefresh=10
port=8891 ; Port to bind to (SIP is 5060)
nat=yes


context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=8891

Now i am not able to register my extension from within the network as well.

PostPosted: Fri Aug 19, 2011 10:34 am
by williamconley
did lsof show the new port being bound or the old one or neither?

PostPosted: Fri Aug 19, 2011 1:03 pm
by kashutu
William this is what i am getting:

[root@ibbs-dc ~]# lsof -i:5060
[root@ibbs-dc ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
asterisk 2431 root 15u IPv4 8255 UDP *:ddi-udp-4
[root@ibbs-dc ~]#

PostPosted: Sat Aug 20, 2011 9:41 am
by williamconley
well, that looks like it's bound to the new port. now use iftop to see what port the request is coming on. (or some other tool, i like iftop because it shows live data without having to "collect" and then sort through) Push H for help (you can turn OFF DNS lookups and turn ON port viewing and see every link to every computer with ports and numbers only ... and see if the soft phone is sending the request on the correct port)

PostPosted: Mon Sep 12, 2011 4:57 am
by abdulqadir1
drg wrote:edit your /etc/asterisk/sip.conf file.

there is an option bindport=5060

change that to the port you want to use.


while typng edit your /etc/asterisk/sip.conf file in the linux service it says "bad command & allowguest=yes

how do i know my port no

PostPosted: Mon Sep 12, 2011 8:10 am
by williamconley
if you don't know it, it's 5060. it should only be edited if your provider requires a different port number for some reason or you "decide" to change the setting for another technical reason. 99.9% use 5060.

PostPosted: Wed Sep 28, 2011 3:44 am
by kashutu
Sorry for the late reply, but THanks to WIlliam, after i restarted the server, i was able to log on port 8891. Once again thank you William.

Re: Change SIP port 5060 to SIP port 8891 through out the se

PostPosted: Tue Oct 28, 2014 9:31 am
by dukemuzaffar
Dear All,

I am trying to use port 777 instead of 5060 and added the below parameter to sip.conf but still my vicidial is not listening.

bindport=777

version of Asterisk 1.8.28.2-vici
Linux vicidial 3.11.10-11

Re: Change SIP port 5060 to SIP port 8891 through out the se

PostPosted: Thu Nov 20, 2014 10:34 pm
by mdionglay
Deal All,

this is work perfectly.

nano /etc/asterisk/sip.conf

look for below
;bindport=5060
bindport=7777

then CRTL X and then Y... to exit

then

nano /etc/sysconfig/iptables

#-A RH-Firewall-1-INPUT -m udp -p udp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m udp -p udp --dport 7777 -j ACCEPT

CRTL X and then Y to exit.

/etc/init.d/iptables restart
/etc/init.d/asterisk restart

in Softphone Domain: 192.222.222.222:7777

Close and Exit.

Work Fine!


Marlon Dionglay
Skype: marlon.dionglay
Mobile +63 917.541.9178

Re: Change SIP port 5060 to SIP port 8891 through out the se

PostPosted: Wed Dec 05, 2018 1:03 pm
by Mequetref43
So useful,

thank you very much