Changing port


#1

Hi friends,

I want to change the standard 5060 sip port to our any
defined port. i made some change in sip.conf but it is
not working, I have 2 softphone which are able to
register with 81 port but the any kind of hardphone is
not able to register using 81 port.
here is my sip.conf configuration

[general]
port=5060

[123456]
type=friend
username=123456
host=dynamic
port=81 ;the hardphone should be register with 81
port
context=voip
allow=g729
allow=alaw
allow=g723.1

Please help me how i can register with 81 port?


#2

[quote=“abdulzu”]I want to change the standard 5060 sip port to our any
defined port.[/quote]
What are you hoping to achieve by doing this?

[quote][general]
port=5060

[123456]
type=friend
username=123456
host=dynamic
port=81 ;the hardphone should be register with 81 port
[/quote]
This is telling Asterisk that the phone is listening on port 81. It must still connect to port 5060 on the Asterisk server. Is that what you want? Is that how you’ve got the phone configured?


#3

Hi willkemp,

Tanx for your reply. I need to change the hardphone to 81 port because in one country they blocked the 5060 and 5062 ports, so our service is not able to work in whole country.

I made the plann to change the whole port with 81 becuase normaly the 81 and 80 ports are always opened from any ISP.

If there is anyway to change whole Asterisk port 5060 with 81 so our clients can connect easly using 81 port.


#4

Yes. Do the following:

[general]
port=81

Then you don’t need to the port statement in the config for the individual phone.


#5

Hi WillKemp,

Thanks for your time I used 8000 port now its start to work.
Can u give me little information, is normally 8000 port is open in all world’s ISP?


#6

It’s not possible to say what’s open in all the world’s ISPs - there are apparently about 600 of them here in Australia alone, so there could easily be 10,000 or more around the world!

Normally, i would expect all ports to be open in an ISP, and i wouldn’t do business with one who didn’t provide that. But i guess that’s not the case in all countries and for all ISPs.


#7

Hello Willkemp,

Thank you for kind of replies, i tested in that country where our 5060 was closed and i changed asterisk with 8000 and it start to work in same country.

Can you explain me how i can make a-z dialpeer for one context.
currently i am using like:

exten => 9745405022,1,Dial(SIP/${EXTEN}@sipp)

i can make call only on 9745405022 number, how i can do to accept all calls start with 00 or without?


#8

[quote=“WillKemp”]
Normally, i would expect all ports to be open in an ISP, and i wouldn’t do business with one who didn’t provide that. But i guess that’s not the case in all countries and for all ISPs.[/quote]

In Croatia ISP by default block lots of ports. You are able to log to your personal pages and desable that firewall.


#9

[quote=“abdulzu”]Can you explain me how i can make a-z dialpeer for one context.
currently i am using like:

exten => 9745405022,1,Dial(SIP/${EXTEN}@sipp)

i can make call only on 9745405022 number, how i can do to accept all calls start with 00 or without?[/quote]

You need to read the documentation at

voip-info.org/wiki/view/Asterisk

And the following book is worth reading too

voip-info.org/wiki/view/Aste … +Telephony