Asterisk one way audio issue

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

asterisk sip trunk 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

How to resolve one way or no audio issues?

Are you having an audio issues in your Asterisk?

Well it’s a common issue with PBX to have audio issues like one way audio or no audio. Sometimes only caller can hear remote party or remote party only can hear the caller. You must be wondering what causes this issue? This problem in audio is mainly because of the NAT issues. We recommend to use NAT with enabling 10000-20000 UDP ports on firewalls and also to enable natting on trunks

Example:

[didforsale1] type=peer
host=209.216.2.211
nat=yes
canreinvite=no
disallow=all
allow=ulaw&g729
context=from-trunk
dtmfmode=auto

—————————————————————————–

[didforsale2] type=peer
host=209.216.15.70
nat=yes
canreinvite=no
disallow=all
allow=ulaw&g729
context=from-trunk
dtmfmode=auto

The Second possible reason for causing one way audio could possibly be Codec, This often happens when a call comes in with ULAW and the system tries to accept with other codecs which can cause superfluous codec negotiation. To avoid this we need to remove the unwanted codec on your switch. For example if you are using G729 then remove ULAW parameter from our trunks. If you are using ULAW then remove g729.

Example

[didforsale1] type=peer
host=209.216.2.211
nat=yes
canreinvite=no
disallow=all
allow=g729 (Use either one of the codec you want)
context=from-trunk
dtmfmode=auto

Well if both of the previous steps don’t work for you. Then check if you are in a local network? If Yes, then you will need to add additional parameters in /etc/asterisk/sip.conf

Under the general context add your Public IP, NAT and local IP

Example

[general] externip= (Your public ip)
localnet= (your local network address)
nat = yes

Say your public IP is 208.54.15.6 and your local network is 192.168.1.0
externip= 208.54.15.6
localnet= 192.168.1.0/255.255.255.0
nat = yes

Hope these steps resolve the Asterisk audio issues for you!.

Check Out

Asterisk one way audio issue

Are you having an audio issues in your Asterisk? 
Well it’s a common issue with PBX to have audio issues like one way audio or no audio. Sometimes only caller can hear remote party or remote party only can hear the caller. You must be wondering what causes this issue? This problem in audio is mainly because of the NAT issues. We recommend to use NAT with enabling 10000-20000 UDP ports on firewalls and also to enable natting on trunks

read more

How to limit the number of calls in asterisk

Learn how you can limit number of simultaneous calls on Asterisk based SIP Trunk. If you want to limit the number calls for your SIP peer or friend in Asterisk use call-limit in your trunk configuration.

read more

Asterisk time based routing

This is a very common requirement that route the calls to Voice-mail after office hours. Or you can transfer the calls to your cell phone after certain time say 6:00pm. In Asterisk you can also control the call location based on time and date.

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan 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.

How to limit the number of calls in asterisk

*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!

How to limit number of calls in Asterisk?

Limit number of simultaneous calls on Asterisk based SIP Trunk.

If you want to limit the number calls for your SIP peer or friend in Asterisk use call-limit in your trunk configuration.

Create a trunk:
trunkname
type=peer
host=HOST IP ADDRESS
qualify=no
context=from-trunk
dtmf:rfc2833
call-limit=30

This will create a SIP trunk and the max number of calls allowed on the SIP Trunk will be 30.

call-limit = number : Number of simultaneous calls through this user/peer.

These configurations can be used for any soft switch based on Asterisk.

Examples are Elastix, PIAF, Trixbox

Why to manage a phone system

when you can get for free.

Check Out

Asterisk one way audio issue

Are you having an audio issues in your Asterisk? 
Well it’s a common issue with PBX to have audio issues like one way audio or no audio. Sometimes only caller can hear remote party or remote party only can hear the caller. You must be wondering what causes this issue? This problem in audio is mainly because of the NAT issues. We recommend to use NAT with enabling 10000-20000 UDP ports on firewalls and also to enable natting on trunks

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.

 

Asterisk time based routing

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

asterisk sip trunk 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

Asterisk time based routing.

This is a very common requirement that route the calls to Voice-mail after office hours. Or you can transfer the calls to your cell phone after certain time say 6:00pm. In Asterisk you can also control the call location based on time and date.

[AutoAttendant]
exten => start,1,Verbose(2,Entering our auto-attedant)
same => n,Answer()
same => n,Playback(silence/1)
; We’re closed on New Years Eve, New Years Day, Christmas Eve, and Christmas Day
same => n,GotoIfTime(*,*,31,dec?holiday,1)
same => n,GotoIfTime(*,*,1,jan?holiday,1)
same => n,GotoIfTime(*,*,24,dec?holiday,1)
same => n,GotoIfTime(*,*,25,dec?holiday,1);
We can set auto-attendant dialplan to check for national holidays, if that is true,jump to “exten => holiday,1,Verbose(2,We’re closed for a holiday.)”
; Our operational hours are Monday-Friday, 9:00am to 5:00pm.
same => n,GotoIfTime(0900-1700,mon-fri,*,*?open,1:closed,1) ; It true jump to exten open, else jump to exten closed.
exten => open,1,Verbose(2,We’re open!)
same => n,Background(custom/open-greeting)
exten => closed,1,Verbose(2,We’re closed.)
same => n,Playback(custom/closed-greeting)
same => n,Voicemail(general-mailbox@default,u)
same => n,Hangup()
exten => holiday,1,Verbose(2,We’re closed for a holiday.)
same => n,Playback(custom/closed-holiday)
same => n,Voicemail(general-mailbox@default,u)
same => n,Hangup()
GotoIfTime() application is not only good for an auto-attendant but it can be used anywhere in the dialplan. For example sometimes we just want to forward calls to different people based on time, such as when support staff is not in the office on weekends, but are on call:
[support]
exten => 100,1,Verbose(2,Calling Support Staff.)
same => n,GotoIfTime(*,sat&sun,*,*?on_call,1)
same => n,Dial(SIP/support,30)
same => n,Voicemail(support@default,u)
same => n,Hangup()
exten => on_call,1,Verbose(2,Calling On-Call Support Staff.)
same => n,Dial(SIP/didforsale/8888888888&SIP/didforsale/8555555555,30)
same => n,Voicemail(support@default,u)
same => n,Hangup()

Why to manage a phone system

when you can get for free.

Check Out

Asterisk one way audio issue

Are you having an audio issues in your Asterisk? 
Well it’s a common issue with PBX to have audio issues like one way audio or no audio. Sometimes only caller can hear remote party or remote party only can hear the caller. You must be wondering what causes this issue? This problem in audio is mainly because of the NAT issues. We recommend to use NAT with enabling 10000-20000 UDP ports on firewalls and also to enable natting on trunks

read more

How to limit the number of calls in asterisk

Learn how you can limit number of simultaneous calls on Asterisk based SIP Trunk. If you want to limit the number calls for your SIP peer or friend in Asterisk use call-limit in your trunk configuration.

read more

Asterisk time based routing

This is a very common requirement that route the calls to Voice-mail after office hours. Or you can transfer the calls to your cell phone after certain time say 6:00pm. In Asterisk you can also control the call location based on time and date.

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan 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.

 

Originating calls from a webpage using asterisk

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

asterisk sip trunk 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

Originating Calls from a Webpage using Asterisk

Asterisk can be used to originate calls from a web page. Asterisk Manager Interface (AMI) allows you to manage call origination. AMI also allows external programs to control Asterisk.

For doing this, you should have

  • A working Asterisk server
  • A SIP termination provider for sending calls out
  • A webpage for entering phone numbers

You have to first create a manager user in Asterisk.  This is created inside /etc/asterisk/manager.conf file

Move the existing manager file using the command

mv /etc/asterisk/manager.conf /etc/asterisk/manager-bk.conf

Create a new manager file

touch /etc/asterisk/manager.conf

Add the below contents to the newly created manager.conf file

[general] enabled = yes
port = 5038
bindaddr = 0.0.0.0
[clicktocall] secret = password
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate,message

Now, create a php script,  and the following contents to it. Your webpage will be posting numbers to this php script. It will then connect to Asterisk using AMI. Send calls to the entered number and connect it to an extension 1000 in the system.

<?php
$host = “127.0.0.1”;
$user = “clicktocall”;
$secret = “password”;
$context = “dial”;
$waitTime = “30”;
$priority = “1”;
$number = $_POST[“number”];
$oSocket = fsockopen($host, 5038, $errnum, $errdesc) or die(“Connection to host failed”);
fputs($oSocket, “Action: loginrn”);
fputs($oSocket, “Events: offrn”);
fputs($oSocket, “Username: $userrn”);
fputs($oSocket, “Secret: $secretrnrn”);
fputs($oSocket, “Action: originatern”);
fputs($oSocket, “Channel: SIP/didforsale/$numberrn”);
fputs($oSocket, “WaitTime: $waitTimern”);
fputs($oSocket, “exten: 1000rn”);
fputs($oSocket, “Context: $contextrn”);
fputs($oSocket, “Async: Truern”);
fputs($oSocket, “Priority: $priorityrnrn”);
fputs($oSocket, “Action: Logoffrnrn”);
sleep(1);
fclose($oSocket);
?>

Create a dialplan entry now to send calls to extension 1000 in the system when the number answers. Open your /etc/asterisk/extensions.conf file and add the following to it

[dial] exten => 1000,1,Dial(SIP/1000)
Same => n,Hangup

Now create your webpage, add a number field in the webpage to enter the number. When someone enters a number in this field, post it to the php script we just created.

That is it and now someone enters a number in the webpage, he will get a call immediately and when he answers the call, extension 1000 will ring and they will get connected.

Why to manage a phone system

when you can get for free.

Check Out

Asterisk one way audio issue

Are you having an audio issues in your Asterisk? 
Well it’s a common issue with PBX to have audio issues like one way audio or no audio. Sometimes only caller can hear remote party or remote party only can hear the caller. You must be wondering what causes this issue? This problem in audio is mainly because of the NAT issues. We recommend to use NAT with enabling 10000-20000 UDP ports on firewalls and also to enable natting on trunks

read more

How to limit the number of calls in asterisk

Learn how you can limit number of simultaneous calls on Asterisk based SIP Trunk. If you want to limit the number calls for your SIP peer or friend in Asterisk use call-limit in your trunk configuration.

read more

Asterisk time based routing

This is a very common requirement that route the calls to Voice-mail after office hours. Or you can transfer the calls to your cell phone after certain time say 6:00pm. In Asterisk you can also control the call location based on time and date.

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan 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.

Count Calls From Asterisk Dialplan

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

asterisk sip trunk 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

Count Calls From Asterisk Dialplan

For counting the calls in Asterisk , you can use the Group() dialplan function from Asterisk dialplan.

To add a call to the group function, use this dialplan application

Set(GROUP()=call_count)

To view the call count, use following dialplan application

Noop(${GROUP_COUNT(call_count)})

Below dialplan example shows you how to use the group function to limit the total call count to 10 in your asterisk box

exten => _X.,1,Set(GROUP()=call_count)
exten => _X.,n, Noop(Total number of calls : ${GROUP_COUNT(call_count)})
exten => _X.,n,GotoIf($[${GROUP_COUNT(call_count)} < 11]?continue:hang)
exten => _X.,n(continue),Noop()

Add your dialplan here to handle calls when the call count is below 11

exten => _X.,n(hang),Hangup

Checkout

Asterisk one way audio issue

Are you having an audio issues in your Asterisk? 
Well it’s a common issue with PBX to have audio issues like one way audio or no audio. Sometimes only caller can hear remote party or remote party only can hear the caller. You must be wondering what causes this issue? This problem in audio is mainly because of the NAT issues. We recommend to use NAT with enabling 10000-20000 UDP ports on firewalls and also to enable natting on trunks

read more

How to limit the number of calls in asterisk

Learn how you can limit number of simultaneous calls on Asterisk based SIP Trunk. If you want to limit the number calls for your SIP peer or friend in Asterisk use call-limit in your trunk configuration.

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan 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.