Changing Default SIP Port in Asterisk

*Try Risk Free for first month and know the DIDforSale SIP Trunking difference*

Best asterisk sip provider

Some of our key SIP Trunking features:-

Special Intro Offer

FREE First Month

Scale as per your need
Flexible Pricing options to choose
 Reliable service & support
 Easy account management
 Multiple compatible platforms

Largest Phone Number inventory
SMS/MMS enabled Phone Numbers
 Number Portability
 Easy Integration
 30-day money back guarantee

Changing Default SIP Port in Asterisk

Asterisk by default use 5060 as its SIP signaling port. It is a good idea to change the default SIP port as most of the SIP vulnerable attacks occurs on it’s default port 5060.

To change the SIP port, open /etc/asterisk/sip.conf in your favorite text editor, look for the entry bindport and change the value of it to your new port number. If you didn’t find the bindport entry in your sip.conf file, add the below line under the [general] section inside sip.conf

bindport=portnumber

i.e., if you want to change the port number to 5080, add the line as

bindport = 5080

Reload your asterisk configuration to make the changes active. Use the below command to check if the changes are active and SIP listens on the new port number

netstat -ntulp | grep portnumber

example : netstat -ntulp | grep 5080

If you see an output for the above command, then the changes are active and SIP now listens on new port number.

Why to manage a phone system

when you can get for free.

New Posts

Benefits of Using Bulk SMS Service

Special Intro Offer FREE First MonthBenefits of Using Bulk SMS ServiceYou want to get the word out on your exciting new offers? How do you achieve that with certainty? You need an assurance that your customers would follow up with you. Working it up with a bulk SMS...

read more

Why Are Businesses Switching to SIP?

Switching to SIP?Special Intro Offer FREE First MonthWhy Are Businesses Switching to SIP? You must be trying to find out the business telephony system. Your checklist should come down to selecting between two core options, SIP and PRI. Which one is best for your...

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan best suits your business!

With so many options to pick from it can often be hard to decide what’s best.
Our plans have been packaged together to give you optimum output.

Our SIP Trunks are Compatible with wide range of PBX & Platforms.

MATH Dialplan Function in Asterisk

Asterisk provides the MATH function to do mathematical operations from dialplan. It allows to perform mathematical operations between two parameters.

The syntax for math function is

MATH(expression,type)

The operators supported by math function are

+,-,/,*,%,<<,>>,^,AND,OR,XOR,<,>,<=,>=,==

The possible output types are

f : float,

i: int,

h: hex ,

c: char

if type int is used for the math function, all the decimals from output will be removed.

Examples

division with output type as float

exten => 111,1,Set(i=${MATH(30/60,f)})

output : 0.500000

 

division with output type as integer

exten => 111,1,Set(i=${MATH(30/60,i)})

output : 0 // integer type removes all the decimal part from output

 

modular division with output type as integer

exten => 111,1,Set(i=${MATH(1%2,i)})

output : 1

 

 

Hangup Active Calls from Asterisk CLI

*Try Risk Free for first month and know the DIDforSale SIP Trunking difference*

asterisk sip trunk provider

 Some of our key SIP Trunking features:-

Scale as per your need
Flexible Pricing options to choose
 Reliable service & support
 Easy account management
 Multiple compatible platforms

Largest Phone Number inventory
SMS/MMS enabled Phone Numbers
 Number Portability
 Easy Integration
 30-day money back guarantee

Make your own brand with
our VoIP Platform!

Hangup Active Calls from Asterisk CLI

Asterisk CLI provides Hangup command to hangup live calls. For using the hangup command, you need to get the name of the channel that you want to hangup.

Get Active Channels

Use the command below to get all the active channels in your Asterisk server.

core show channels

This command will show all the active channels in your server. Copy the channel name which you want to hangup.

Get detailed channel information

If you want to see a detailed information on the channels in asterisk, use the command

core show channels concise

Call Hangup

For hanging up the call, use following command

hangup request channelname

How to use hangup command from Linux shell?

If you want to use hangup command from your linux shell, use

asterisk -rx “hangup request channelname”

Hang up all calls

To hang up all the calls running through your Asterisk , use the command

hangup request all

Why to manage a phone system

when you can get for free.

Check Out

Asterisk Most frequently used commands

Find most frequently used asterisk commands. This is simple cheat sheet to view what’s happening inside your asterisk server. You can see how many calls, how many users who is communicating with your system.

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan best suits your business!

With so many options to pick from it can often be hard to decide what’s best.
Our plans have been packaged together to give you optimum output.

Our SIP Trunks are Compatible with wide range of PBX & Platforms.

 

Configure SIP Trunk on Grandstream PBX

For Configuring Grandstream PBX with didforsale, you need to create four sip trunks. Two trunks for incoming calls and two trunks for outgoing.

 

For creating trunks, go to PBX => VoIP Trunks => Create new SIP Trunk. Add the details as shown in below figure

trunks

 

Similarly create three more sip trunks with the following IP address

209.216.15.70

209.216.15.71

209.216.2.212

 

Once all the trunks are added, the page will looks like

trunksall

 

 

Now you need to configure your DID number.

For configuring DID number, go to PBX => Inbound Routes => Create New Inbound Rule and add the details as shown in below figure

 

inbound

 

Now configure outbound routes for sending outgoing calls through didforsale.

For outbound routes, go to PBX => outbound Routes => Create New Outbound Rule as shown in below figure

 

outbound

 

 

Select any one of the outgoing trunks in outbound routes. If you want to do a failover, click the option “click to add failover trunk” on the bottom side and select the second outbound trunk here.

Configure SIP Trunk on goautodial

For configuring our DID number with goautodial, you will have to create two trunks in your system to allow calls from our server. You can do that by going to Admin section in your goautodial and choose carriers. Click on “Add a New Carrier” and add the following parameters

Carrier Name : DIDforsale_in1

Account Entry :
host=209.216.2.211
type=peer
context=trunkinbound
disallow=all
allow=ulaw
nat=yes
canreinvite=yes
insecure=very
dtmfmode=rfc2833

Protocol : SIP
Active : Y
Leave other fields as default or blank. Create one more carrier with same options except the host parameter in Account Entry field. Change the host from 209.216.2.211 to 209.216.15.70 in the new carrier.

Now you will have to route the DID number to the extension you want. You can do that by selecting Inbound –> Add a new DID, Add your DID number, and add the extension to where you want to forward the calls coming to DID in the Extension field and submit.

Local Phone Numbers for your Business

Get the SIP Trunking for your Asterisk, we guarantee best price, best coverage and Free Support for Asterisk. 

Try it for Free Now!