New installaion of asterisk

i am new to asterisk and just completed the installation i have 2 issues , my configuration is as below as you can see its very simple , the problem is the quality is very poor one way, that is when i call the pstn assciated with my sip number the soft phone connected to extension 2000 rings but the quality is very poor but the person who called get clear reception from me , is this a NAT issue or a codec issue, where do i need to look to resolve this

the second issue is a configuration, if i want extension 2000 to be another sip number how do i configure it to forward all calls to 2000 to a sip number

many thanks

port = 5060
bindaddr =
register =>
register =>






exten => 2000,1,Dial(SIP/2000,20)

If you are using a standard domestic ADSL and this is shared with other applications (i.e. web browsing) this will cause quality problems because you are contending for bandwidth that is already contended at 50:1 with other users.

You could try using a low bandwidth codec. The default is probably G.711 which is high quality but uses a lot of bandwidth (for ADSL anyway). G.729 is good but needs a license from Digium to work (costs $10.00). You could try GSM as a test by adding:


to the definition in sip.conf for the SIP phone extension.

Find out which codecs the sip provider will support as you could try G.723 if they support this as it’s better quality and GSM and uses fairly low bandwidth.

Also add:


to the definition for the sip provider so that you can see the lag between your Asterisk server and the provider.

thanks for the quick reply, just a few issue i like to clarify with regards to your reply, the bandwidth, i do have an adsl its adsl2+ they sy it can be upto 22meg dnload but i get about 4meg on a good day and about 512 upload. hence , since my upload is only 512 and there is good quality between me to the far end but the other direction , the 4meg direction its really bad
once the qualify=yes is placed in the general tab what is an acceptable lag

many thanks

you might want to check with your ISP as to whether they throttle VoIP.

my advice would depend on their answer, whether or not your have QoS on your router, and what codecs your ITSP supports.

G729 is very useful if you’re heavily contended or the ISP limits your rate, but you need to remember to buy 1 licence per encoder or decoder, e.g. 1 call might use 2 (or even more !) licences.

The lower the better really for qualify value. This is what I get:

Name/username Host Dyn Nat ACL Port Status
sipgate/xxxxxxx N 5060 OK (31 ms)
sipdiscount/xxxxx N 5060 OK (37 ms)

However, 100-150 ms would probably be OK. Depends on various things including size of jitter buffer, etc.

What does the conversation sound like from your end? Is it quiet, does it break up, do you loose words, etc?

as you know from my earlier question i was getting bad quality , i have added the following to my extensions .conf
exten => 2000,1,Dial(SIP/

this bascially transfers all calls to extension to the sip address , the call get transfered but on reply theres no voice transmission, i think this is a nat issue can someone help me with this as the sip address also sits behind a router, so its double nat will this work