Changing default IAX (Inter Asterisk Exchange ) port number

When you live in a country that Voice Over IP is banned and filtered you will test everything to overcome filtering . Changing default ports to non-standard ports are one of them (changing port will not solve filtering issue but may be useful for security scenarios ) . The bindport is an option in iax.conf to change the default port to listen on . But it never worked for me and this is what I did .

edit the source code for iax channel :

vim /usr/local/src/asterisk-11.7.0/channels/iax2.h

And search for default iax port that is 4569 ( the last 4 digits of mark spencer cell number ) and chang it to the port number you want :

#define IAX_DEFAULT_PORTNO              8001

you will need to recompile asterisk . 

cd /usr/local/src/asterisk-11.7.0/
make install


  1. dear sir,
    i fallow your instrution so i install frash copy of asterisk
    so edit the iax2.h to new port and also sip.h to new port so its install with new port but now client are not connected i have a vps server also open iptables port please help me more whare is problem

  2. Dear Zia ,

    you need the change your clients ports as well .


Post a Comment