Would someone check my config?

Can anyone see any dumb mistakes? I have poor incoming sound quality on incoming and outgoing calls.

Sip.conf

[code]
[general]
port=5060
bindaddr=0.0.0.0
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=ulaw
callerid=Unknown
notifyringing=yes
notifyhold=yes
limitonpeers=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
nat=no
context=school

[100]
type=friend
host=dynamic
dtmfmode=rfc2833
callerid=Sherry Phillips
secret=100
mailbox=100

; other extensions here as above

[trunk-out]
type=peer
host=172.22.9.3 ; this is voip gateway
port=5060
fromuser=+12085555555
dtmfmode=rfc2833
nat=yes ; testing quality

[trunk-in]
type=peer
host=172.22.9.3
port=5060
nat=yes ; required here!
reinvite=no ; required!
canreinvite=no ; required!
context=frombandwidth ; arbitrary name for context
dtmfmode=rfc2833[/code]

Extensions.conf:

[code][general]
static=yes
writeprotect=no

[globals]
TRUNK=SIP/trunk-out
HSPAGE=SIP/412&SIP/416&SIP/417&SIP/418&SIP/419&SIP/420&SIP/422&SIP/424&SIP/426&SIP/427&SIP/428&SIP/431&SIP/433&SIP/436&SIP/440&SIP/441&SIP/444&SIP/445&SIP/447&SIP/448&SIP/449
MSPAGE=SIP/301&SIP/302&SIP/303&SIP/304&SIP/305&SIP/306&SIP/325
TESTPAGE=SIP/423

[outgoing]

exten => 911,1,Dial(${TRUNK}/911)
exten => 9911,1,Dial(${TRUNK}/911)
exten => 9111,1,Dial(${TRUNK}/911)
exten => 9991,1,Dial(${TRUNK}/911)
exten => 99911,1,Dial(${TRUNK}/911)
exten => 999111,1,Dial(${TRUNK}/911)

exten => _91900XXXXXXX,1,Congestion()
exten => _1900XXXXXXX,1,Congestion()

exten => _XXXXXXX,1,Dial(${TRUNK}/+1208${EXTEN})
exten => _XXXXXXX,2,Congestion()
exten => _XXXXXXX,102,Congestion()

exten => _XXXXXXXXXX,1,Dial(${TRUNK}/+1${EXTEN})
exten => _XXXXXXXXXX,2,Congestion()
exten => _XXXXXXXXXX,102,Congestion()

exten => _XXXXXXXXXXX,1,Dial(${TRUNK}/+${EXTEN})
exten => _XXXXXXXXXXX,2,Congestion()
exten => _XXXXXXXXXXX,102,Congestion()

[frombandwidth]

exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(main,1)

exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(school,2,1)

exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(school,3,1)

exten => +12085555555,1,Wait(2)
exten => +12085555555,n,Goto(school,4,1)

exten => _+1208.,1,Wait(2)
exten => _+1208.,n,Goto(main,1)

exten => 101,1,Wait(2)
exten => 101,n,Dial(SIP/100,15,Ttr)
exten => 101,n,Dial(SIP/100&SIP/101,10,Ttr)
exten => 101,n,Voicemail(100,u)
exten => 101,n+101,Voicemail(100,b)

exten => main,1,Answer()
exten => main,n,Set(TIMEOUT(digit)=4)
exten => main,n,Set(TIMEOUT(response)=10)
exten => main,n,Background(wssd_greeting)
exten => main,n,Goto(1)

include => school
include => badext

[school]

exten => 1,1,Dial(SIP/100,15,Ttr)
exten => 1,n,Dial(SIP/100&SIP/101,10,Ttr)
exten => 1,n,Voicemail(100,u)
exten => 1,n+101,Voicemail(100,b)

exten => 2,1,Dial(SIP/200&SIP/206,15,Ttr)
exten => 2,n,Dial(SIP/200&SIP/206&SIP/209,15,Ttr)
exten => 2,n,Dial(SIP/200&SIP/206&SIP/209&SIP/205,10,Ttr)
exten => 2,n,Voicemail(200,u)
exten => 2,n+101,Voicemail(200,b)

exten => 3,1,Dial(SIP/300,20,Ttr)
exten => 3,n,Dial(SIP/300&SIP/305,10,Ttr)
exten => 3,n,Voicemail(300,u)
exten => 3,n+101,Voicemail(300,b)

exten => 4,1,Set(TIMEOUT(digit)=4)
exten => 4,n,Set(TIMEOUT(response)=10)
exten => 4,n,Background(high_school_greeting)
exten => 4,n,Goto(1)

exten => 106,1,Dial(SIP/106&SIP/108,20,Ttr)
exten => 106,n,Voicemail(106,u)
exten => 106,n+101,Voicemail(106,b)

exten => 108,1,Goto(school,106,1)

exten => 400,1,Dial(SIP/400&SIP/401,15,Ttr)
exten => 400,n,Dial(SIP/400&SIP/401&SIP/405,10,Ttr)
exten => 400,n,Voicemail(400,u)
exten => 400,n+101,Voicemail(400,b)

exten => 4999,1,SIPAddHeader(Call-Info: answer-after=0)
exten => 4999,n,Page(${HSPAGE})

exten => 3999,1,SIPAddHeader(Call-Info: answer-after=0)
exten => 3999,n,Page(${MSPAGE})

exten => 7999,1,Goto(ivr_menu,s,1)

exten => 8000,1,Playback(school_menu_joke)

exten => _3XX,1,Macro(dialMSExtension,${EXTEN})
exten => _XXX,1,Macro(staff,${EXTEN})

include => voicemail
include => badext
include => outgoing

[badext]

exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(frombandwidth,main,1)

exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup()

[voicemail]

exten => _50XXX,1,Wait(1)
exten => _50XXX,2,VoicemailMain(${EXTEN:2}) ; just ask for the password we’re already in their vmail
exten => _50XXX,3,Hangup()

exten => 50,1,VoicemailMain ; ask for everything, user (extension) and password - see voicemail.conf
exten => 51,1,MusicOnHold()

exten => _*XXX,1,Voicemail(${EXTEN:1},u)

[macro-staff]

exten => s,1,Dial(SIP/${ARG1},20,Tt)
exten => s,2,Voicemail(${ARG1},u) ; Unavailable message
exten => s,102,Voicemail(${ARG1},b) ; Busy message - Remember they can record Name, Busy, and Unavailable
exten => s,n,Hangup()

include => badext

[macro-dialMSExtension] ; after direct dialing MS extension, bounce to secretary

exten => s,1,Dial(SIP/${ARG1},20,Tt)
exten => s,2,Dial(SIP/300,10,Tt)
exten => s,3,Voicemail(${ARG1},u) ; Unavailable message
exten => s,102,Voicemail,(${ARG1},b) ; Busy message - Remember they can record Name, Busy, and Unavailable
exten => s,n,Hangup()

include => badext

[ivr_menu]
exten => s,1,Answer()
exten => s,n,Set(TIMEOUT(digit) = 8)
exten => s,n,Set(TIMEOUT(response) = 8)
exten => s,n,Background(what_to_do)
exten => s,n,Goto(s,1)

exten => 001,1,Record(wssd_greeting.ulaw)
exten => 001,n,Goto(ivr_menu,s,1)

exten => 002,1,Playback(wssd_greeting)
exten => 002,n,Goto(ivr_menu,s,1)

exten => 007,1,Record(high_school_greeting.ulaw)
exten => 007,n,Goto(ivr_menu,s,1)

exten => 008,1,Playback(high_school_greeting)
exten => 008,n,Goto(ivr_menu,s,1)

exten => 009,1,Record(middle_school_greeting.ulaw)
exten => 009,n,Goto(ivr_menu,s,1)

exten => 010,1,Playback(middle_school_greeting)
exten => 010,n,Goto(ivr_menu,s,1)

exten => 011,1,Record(elementary_school_greeting.ulaw)
exten => 011,n,Goto(ivr_menu,s,1)

exten => 012,1,Playback(elementary_school_greeting)
exten => 012,n,Goto(ivr_menu,s,1)

exten => 013,1,Record(what_to_do.ulaw)
exten => 013,n,Goto(ivr_menu,s,1)

exten => 014,1,Playback(what_to_do)
exten => 014,n,Goto(ivr_menu,s,1)

exten => i,1,Goto(ivr_menu,s,1)

exten => t,1,Goto(ivr_menu,s,1)[/code]

Hi

You dont seem to have defined any codecs anywhere, but to be honest most audio problems are hardware or bandwidth issues

Ian

Defined codecs? Is this what you mean:

disallow=all allow=ulaw

opps missed that.

what is the machine spec ?

Ian

Dual P4 3.2 GHz, 2GB, 80GB… Resource usage is very minimal.

Using Fedora 11 with KDE and Asterisk 1.4.26

Bandwidth issue possibly. I would change codecs to GSM (13k) rather than using the full blast ulaw (64k)

I have it that way because I think the provider requires it. Hmmm, I can’t find that documentation so maybe I imagined it. Provider is bandwidth.com.

Are the problems just external or are they internal calls as well?

you need to use a bandwidth checker such as myspeed as it does voip quality checks.

are you using dedicated connection for voice and internet traffic ?

Ian

Just external has problems. Internal is fantastic.

myspeed test:

Upstream jitter 0.1 ms Downstream jitter 24.7 ms Upstream packet loss 0.0 % Downstream packet loss 2.7 % Upstream packet order 100.0 % Downstream packet order - % Packet discards 0.0 % MOS 3.4

Using 4 T-1 lines for total 6mbps bandwidth. This serves 300 computers and 80 phones, 8 concurrent calls max.

Hi

well nearly 3% packet loss isnt a good start

VoIP test statistics

Jitter: you --> server: 4.1 ms
Jitter: server --> you: 13.9 ms
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: 0.0 %
Packet discards: 0.0 %
Packets out of order: 0.0 %
Estimated MOS score: 3.8

this is from a normal adsl line via a hardware filewall

I think you need to run mtr test to your service privder and see how that looks , but there are network issues

Ian

I have run myspeed test 10 or so times on different servers with 0% packet loss on all. 3% must have been a fluke.

However, the downstream jitter remains high (10 - 15 ms).

MTR test shows decent ping times and no packet loss at all over 200+ pings.

Here’s the worst one I have seen:

Upstream jitter 0.4 ms Downstream jitter 46.5 ms Upstream packet loss 0.0 % Downstream packet loss 0.5 % Upstream packet order 100.0 % Downstream packet order - % Packet discards 0.0 % MOS 3.4

I guess I will research causes of UDP packet jitter…

I tested GSM and the provider does not support it.

Hi

have you got the jitter buffer enabled ? doesnt look like it.

but if you had packet loss its not a “fluke” its means that at times you get it.

what are the 300 computers doing ?? as 8 calls would take no more than 640K

Ian

That packet loss happened the very first time I ran the test - could have been java applet loading delay or whatever. I will test periodically.

The computers are just student / teacher workstations. I seriously doubt average use is more than 2-3mbps.

How do I enable jitterbuffer in Asterisk? I am only familiar with zaptel jitterbuffer.

Oh, I see. This should work in sip.conf just like in zapata.conf?

[code]; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
; SIP channel. Defaults to “no”. An enabled jitterbuffer will
; be used only if the sending side can create and the receiving
; side can not accept jitter. The SIP channel can accept jitter,
; thus a jitterbuffer on the receive SIP side will be used only
; if it is forced and enabled.

; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
; channel. Defaults to “no”.

; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.

; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
; resynchronized. Useful to improve the quality of the voice, with
; big jumps in/broken timestamps, usually sent from exotic devices
; and programs. Defaults to 1000.

; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
; channel. Two implementations are currently available - “fixed”
; (with size always equals to jbmaxsize) and “adaptive” (with
; variable size, actually the new jb of IAX2). Defaults to fixed.

; jblog = no ; Enables jitterbuffer frame logging. Defaults to “no”.
[/code]