Sip Port to a non standard number

Hi, i would like to get some help with a problem, i want to change the default port of sip registration to a other diferent from default, i read some post and tutorials but something is wrong since i used the bindport and port in the extension sip config respectively but i cant get it to work im testing it first on a lan to aboid network problems, im using a freepbx with asterisk 1.6 and i made the changes in the file /etc/asterisk/sip_general_custom.conf

sip_general_custom.conf

bindport=5080
bindaddr=0.0.0.0

after that i modify the file sip_aditional.conf

sip_aditional.conf

; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

[500]
deny=0.0.0.0/0.0.0.0
secret=tamarindo23
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
type=friend
nat=yes
port=5080
qualify=yes
callgroup=
pickupgroup=
dial=SIP/500

then i do a sip reload and the cli says that is listening on the defined port

localhost*CLI> sip reload
Reloading SIP
== Parsing ‘/etc/asterisk/sip.conf’: == Found
== Parsing ‘/etc/asterisk/sip_general_additional.conf’: == Found
== Parsing ‘/etc/asterisk/sip_general_custom.conf’: == Found
== Parsing ‘/etc/asterisk/sip_nat.conf’: == Found
== Parsing ‘/etc/asterisk/sip_registrations_custom.conf’: == Found
== Parsing ‘/etc/asterisk/sip_registrations.conf’: == Found
== Parsing ‘/etc/asterisk/sip_custom.conf’: == Found
== Parsing ‘/etc/asterisk/sip_additional.conf’: == Found
== Parsing ‘/etc/asterisk/sip_custom_post.conf’: == Found
== SIP Listening on 0.0.0.0:5080
== Using SIP TOS bits 96
== Using SIP CoS mark 4

until that i think all the configuration are ok but when i make the changes in the sip phone it just dont register the phone is in the same lan, if i look at the cli in the server it dont show nothing, then i go out and check the udp connection with:

tcpdump udp | grep SIP

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
11:22:40.850878 IP 192.168.1.156.5080 > 192.168.1.116.sip: SIP, length: 479
11:22:41.394609 IP 192.168.1.156.5080 > 192.168.1.116.sip: SIP, length: 479
11:22:42.355823 IP 192.168.1.156.5080 > 192.168.1.116.sip: SIP, length: 479

i can see that the phone is trying to connect on the server but the server is ingnoring it, if i change the port to default everything works ok, but i want to change the default port because i want to setup some remote stations, but when i setup it by default port in 1 day i got a bot trying to get in my server :frowning: and slowing down the network.
So far at this point im out of ideas, can any one help me with this problem? Thanks in advance.

You need to tell your phone to use port 5080 when talking to asterisk.

Hi thanks for the quick reply, i already configured the phone, and i try with a softphone too, but it just dont register, if i revert the server to the default port everything works ok, i checked the input network on the server and its receiving the request but asterisk is not doing nothing with it :frowning:

tcpdump udp | grep SIP

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
11:22:40.850878 IP 192.168.1.156.5080 > 192.168.1.116.sip: SIP, length: 479
11:22:41.394609 IP 192.168.1.156.5080 > 192.168.1.116.sip: SIP, length: 479
11:22:42.355823 IP 192.168.1.156.5080 > 192.168.1.116.sip: SIP, length: 479

the ip 192.168.1.156 is the phone and the 192.168.1.116 is the asterisk server, any other idea?

You did not change the port on the phone. It is still sending requests to port 5060.
What you did change is the originating port on the phone which does not really matter in this case.
You probably should specify the PBX address on your phone as 192.168.1.116:5080 if there is no separate option for the destination port. This is the sort of issue which makes many people convinced only port 5060 works with SIP :wink:

ee i feel like a dumbas now hehehe, you are absoluty right, i use a spa501g and i was putting the not default port on the port field its a little confusing that port managment but i put it in the proxy field the ip:5080 format and now its working thanks alot man really i was going crazy with that :slight_smile:

dear all ,
i did as above ,
now elastix can use 5080 , but still can use 5060 !!!

my question , also when i register with port 5080 , and type "sip show peers "
i see the registerd port is 5060 not 5080 !!!
does that mean that port 5060 cant be removed from elastix ??

wish to clarify

regards

i mean freepbx ,
sorry

regards

i tried to put port in range of 64000 , but it failed !!!

it succeded when i put ports of range close to 5060

plz wish to clarify with data

regards

Try google, it will almost always explain all to you:-

Then you did something incorrectly. It works as documented. Unless of course Elastix has overridden that part of the “Real FreePBX” mas well, you really need to ask in that forum if you continue to use it.