login | register
04 Jul 2008 [05:16 UTC]

AussieVoIP

FreePBX, Trixbox and Australian Voice over IP Information

Similar PagesHistoryPrint

DM-AppendixE

Created by: Ben Sharif,Last modification on 08 May 2006 [23:18 UTC]

APPENDIX E (USERS’ SUGGESTIONS)

E.1 SUGGESTIONS FOR DIAL PLAN AND CONFIGURATION

E.1.1 Astratel on Asterisk@Home

Colin Swan submitted the following Astratel configuration on AAH.

General Settings
Outbound Caller ID: <8888xxxx>
Maximum Channels: 1

Outgoing Dial Rules
Dial Rules: (which tie in with his Outbound Routing method)

02+4XXXXXXX
02+6XXXXXXX
02+80XXXXXX
02+81XXXXXX
02+82XXXXXX
02+83XXXXXX
02+84XXXXXX
02+85XXXXXX
02+86XXXXXX
02+87XXXXXX
02+89XXXXXX
02+880XXXXX
02+881XXXXX
02+882XXXXX
02+883XXXXX
02+884XXXXX
02+885XXXXX
02+886XXXXX
02+887XXXXX
02+889XXXXX
02+8880XXXX
02+8881XXXX
02+8882XXXX
02+8883XXXX
02+8884XXXX
02+8885XXXX
02+8886XXXX
02+8887XXXX
02+8889XXXX
02+9XXXXXXX
0+NXXXXXXXX
0011+1NXXNXXXXXX
0011+44ZXXXXXXXXX
0011+49NXXXXXX.


Outbound Dial Prefix: (empty)

Outgoing Settings
Trunk Name: astratel

Peer Details:
authuser=8888xxxx
context=from-trunk
fromdomain=sip01.astrasip.com.au
fromuser=8888xxxx
host=sip01.astrasip.com.au
insecure=very
secret=xxxx
type=peer
username=8888xxxx


Incoming Settings
User Context: 8888xxxx

User Details:
context=from-trunk
insecure=very
secret=xxxx
type=user


Registration
Register String:8888xxxx:xxxx@sip01.astrasip.com.au/8888xxxx


E.1.2 Further .conf modifications by Colin

extensions_custom.conf
add…

; only for FWD

[from-fwd-custom] ; won’t work to ‘s’ extension for me.
exten => _X.,1,Wait(2) ; the following is so that any callers to my FWD
exten => _X.,2,Answer ; number will be “reminded‿ as to what my local
exten => _X.,3,Wait(1) ; time is, and then for good measure, they’ll have to
exten => _X.,4,SayUnixTime(,,IMp); provide the correct password before continuing
exten => _X.,5,DigitTimeout(5) ; to my “family‿ menu
exten => _X.,6,ResponseTimeout(10)
exten => _X.,7,Authenticate(****) ; change ‘****’ to your chosen digits
exten => _X.,8,Goto(aa_2,s,1)


; only for sixTel

[from-sixtel-custom]
exten => _X.,1,Goto(aa_2,s,1) ; won’t work to ‘s’ extension for me


; only if you want a “DISA‿ facility – point one of your IVR options to custom-disa,s,1

[custom-disa]
exten => s,1,Answer
exten => s,2,DigitTimeout(5)
exten => s,3,ResponseTimeout(10)
exten => s,4,Authenticate(****); change ‘****’ to your chosen DISA password
exten => s,5,DISA(no-password|from-internal)


iax.conf

[general]
externip= *.*.*.* ; ip address or hostname, DynDNS is OK
localnet=192.168.1.0/255.255.255.0 ; change to suit
bindport = 4569 ; Port to bind to (IAX is 4569)
bindaddr = 0.0.0.0 ; Address to bind to all addresses on machine
delayreject=yes
disallow=all
allow=ulaw ; allow desired codecs in preferred order
allow=alaw
allow=g729
allow=ilbc
allow=gsm
jitterbuffer=yes
mailboxdetail=yes

  1. include iax_additional.conf

indications.conf
change…
country=au ; default is "us"


rtp.conf
change…
rtpend=10100 ; was 20000. 10,000 ports seems like overkill


sip.conf

[general]
port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ;Address to bind to all addresses on machine
disallow=all
allow=ulaw ; allow desired codecs in preferred order
allow=alaw
allow=g729
allow=ilbc
allow=gsm
context = from-trunk ; Send unknown SIP callers to this context
callerid = Unknown

  1. include sip_nat.conf
  2. include sip_additional.conf

sip_nat.conf
add…
nat=yes
externip= *.*.*.* ; ip address or hostname – even DynDNS is OK
localnet=192.168.1.0/255.255.255.0 ; change to suit


E.2 MEETME – TELECONFERENCING WITHOUT ZAPTEL CARD

Ovidiu Motz, an Asterisk user from Canada sent me the following feedback that I think is appropriate to include in this guide.

<quote>

Regarding Chapter 15 (MeetMe - Teleconference), if you're still looking for a solution to have MeetMe without a Zaptel card, please have a look at the following link:

http://www.voip-info.org/wiki-Asterisk+timer+ztdummy

All I had to do to get it going is outlined in this section:

  1. cd /usr/src/zaptel
    • READ /usr/src/zaptel/README.udev and follow the steps
    • Check modules on: /etc/sysconfig/zaptel. If you have no digium hardware comment out all modeules except ztdummy.
  2. make linux26
  3. make install
  4. Reboot to make udev changes take effect
  5. modprobe zaptel
  6. modprobe ztdummy

Best regards,

Ovidiu Motz

<\quote>

Note: I have not tried this solution as I do have a zaptel device, however anyone who have tried this method is welcome to provide feedbacks.

E.3 MULTIPLE TDM400P INSTALLATION

Neilmc, a participant I the Whirlpool Forum provided the following feedback on the use of multiple TDM400P Digium cards.

<quote>
There are plenty of forum posts (on WP and elsewhere) + various how-to and guides that say don't use more than one if you want a reliable system with no audio problems.

I'm sure that on the old Digium site they had a caution not to use more than one TDM or TE card (That's changed, they now brag about 1 box running 5 quad span TE cards).

This machine is now working in a busy environment (medical centre) nicely, sometimes under full Zap call load. It has 5 x FXO & 5 x FXS on 3 cards. CPU is under 10% pretty much all the time.

I asked them to be very fussy about audio quality and let me know if they have any echo, pops, clicks, distortion etc.

So far everyone is saying that it's perfectly fine, not a bad call yet.

There is good reason behind the old advice not to do it though. Lots of people have had grief.

Make sure you don't grab any old motherboard that is lying about (esp if it isn't PCI 2.2 compliant) Even though minimum system specs aren't high don't go for a bottom of the range elcrapo brand motherboard. There is a list of some incompatible motherboards on the Digium site, but no doubt there will be others that have problems.

Choose a board that has plenty of PCI slots (5 or so). Make sure that it has plenty of control over IRQ in CMOS. eg the ASUS P5P-800 I used could use APIC to assign IRQ or you could manually assign an IRQ to a particular PCI slot.

Be very sure that each Digium card is not sharing an IRQ with anything else.

Disable any onboard devices you don't need inc. serial, parallel & USB ports.

It may not be a problem, but to minimise chances of problems disable Hyperthreading if it is supported on your CPU. Use 32 bit OS rather than 64 bit.

Use plenty of RAM. You don't want a PABX to be thrashing about with a swap file. I used 1GB of decent quality RAM which is definitely far more than the system needs. (It's using about 230MB at the moment), but 1GB of RAM doesn't really cost much any more.

Check that your hard drives are running in DMA mode (or use SCSI drives). Sometimes they default to PIO, which might cause problems if there is a sudden burst of disk activity.

Sometimes APIC can cause you grief. You might be able to tweak your kernel, but you might get what you need by turning it off.

Have a read through

http://www.asteriskguru.com/tutorials/pci_irq_apic_tdm_ticks_te410p_te405p_noise.html

If you have all of the driver stuff loading properly and still have audio problems.

Use recent zaptel drivers (unless you become aware of an issue with them).

  • Make sure that the driver loads with the module option opermode=AUSTRALIA.

  • Run fxotune -i 4 (usually from /usr/src/zaptel) It will create a file /etc/fxotune.conf with settings for your cards based on tests with your lines (takes about 5 minutes per FXO port).

  • You will have to stop Asterisk before running fxotune.

  • Have /usr/src/zaptel/fxotune -s run at startup to have the card set. Apparently the values in the conf file are often zero if you have the modules in the correct opermode. ( have one module at the office where the first value is 10 rather than zero. I'll try fxotune again and see if it changes at all).

I just put /usr/src/zaptel/fxotune -s at the bottom of /etc/rc.d/rc.local in A@H 2.6 and it loaded okay. You need it to run after the drivers load but before asterisk starts.

  • Check /var/log/messages after bootup. Each FXO port should have loaded with AUSTRALIA mode. If it is FCC mode then the card is set for North American lines.

  • Each FXS port should have an entry for boosting ringer.

If fxotune is loading settings okay you should see a line saying something like after all of the other init stuff.

kernel: — Setting echo registers:
kernel: — Set echo registers successfully

If you have 4 FXO ports, you should see this 4 times.

<\quote>


E.4 ELIMINATING ECHO PROBLEMS IN SPA-3000

The following feedback was provided by Tony, another participant in the Whirlpool Forum.

Echo in the SPA-3000 is a common problem. In reality, most of the time the SPA-3000 isn't causing the echo, it's just making it more noticeable. This is due to the fact that the SPA-3000 passes calls from the PSTN to the LINE1 by converting it to VoIP internally and then back to analogue. This process does not produce any echo, however is can add about 30ms of latency to the call. This added latency can make echo that was previously unnoticed suddenly become annoying. A pure digital system has no echo (the TX and RX path are 100% separated). It's the interaction of the Digital and Analogue that cause problems.

This may help getting rid of that pesky echo on your Sipura SPA-3000 PSTN line:

1. Make sure you are running the latest firmware (3.1.7) and you have everything back to factory defaults or at least undo all the previous tweaking.

2. Switch *off* all echo can in all your devices. There are 6 places in the sipura to switch off echo can.

  • PSTN Line -> "Echo Canc Enable",
  • "Echo Canc Adaptive Enable",
  • "Echo Supp Enable" and
  • Line 1 -> "Echo Canc Enable",
  • "Echo Canc Adaptive Enable",
  • "Echo Supp Enable".

The idea is that we want to hear how bad the echo is with different configs.

3. Unplug everything from your phone line except the SPA-3000. This includes all the extension cables even with nothing connected to them. These can cause impedance problems which lead to echo.

4. Set the Impedance on your lines.

  • PSTN -> "Port Impedance" = 220+820
    120nF as a starting point.
    *Regional -> FXS Port Impedance = "220+820
    115nF" as a starting point.

5. In the PSTN tab set the following:

  • "Tip/Ring Voltage Adjust: = 3.1V" and
  • "Operational Loop Current Min = 16mA".

Doesn't seem to affect echo, but I believe that these are the correct numbers for Australia.

6. Turn down the jitter buffers!

  • "PSTN -> Network Jitter Level: = low",
  • "PSTN -> Jitter Buffer Adjustment: = disable".

This reduces the delay across your SPA-3000.

  • "LINE1 -> Network Jitter Level: = low",
  • "LINE1 -> Jitter Buffer Adjustment: = up and down".

If you are using a poor quality VoIP service as well as the PSTN then you could change the
  • "LINE1 -> Network Jitter Level: = medium".

7. Set the preferred codec for the PSTN to be g711a and lock it in.

  • "PSTN -> Preferred Codec = g711a",
  • "PSTN -> Use Pref Codec Only = yes".

Obviously adjust this if you’re accessing your PSTN line via VoIP from a remote network. Set the LINE1 to allow g711a as well as whatever else your prefer.

  • "LINE1 -> Use Pref Codec Only = no".

The g711a is fast to encode and decode. Using this codec again reduces your latency and may make the echo less obvious or easier to catch with the echo canceller.

8. Power cycle the SPA-3000 (pull the power plug). Believe it or not, this sometimes fixes the problem. Especially after you have changed the physical phone wiring.

9. Make some test calls. The telco test number 1800801920 is a good one to start with. It has a recorded voice telling you your local phone number. While it's talking, talk back and work out how much echo you are getting. Talk loud, talk soft.

10. Look at what you have got. If you can hear an echo then the problem could be that your probably sending to much power down the line. This is probably reflecting back somewhere as an echo. If you’re close to the exchange and have good wires then this is probably the case. You need to crank back on the power. Go to PSTN -> "SPA To PSTN Gain" and turn it down. Be aware that at some point if you turn it down to much, the SPA sorts does a double negative and turns it way up. I believe the range of this variable is about -127 -> 127 (from my testing). Turn it down, down, down, down until the person can still hear you but reduced echo.

Note: if you enable "Echo Supp Enable" then you will negate these parameters. It seems that the Sipura echo suppression is actually just an automatic gain control. It's really annoying - leave it off.

11. Make a test call to someone with a known good phone out via the SPA's PSTN line or get someone to call in to the PSTN line. Best if its just a boring old Telstra phone hard wired to a socket on the wall. Don't call a mobile!

If the remote party is hearing echo, it could be that your phone is so loud that it's feeding back into the microphone. Turn down the PSTN To SPA Gain until you can comfortable hear the person, no more. If the remote user can still hear echo, try using a different phone plugged into the SPA. Go for the basics first, a cruddy old Telstra phone is what I use for testing. If this solves the problem you may have a bad phone or an impedance miss match between your phone and the SPA.

  • Try changing the Regional -> FXS Port Impedance to "600".
  • Try changing the FXO port impedance to "600" or "global".

If this doesn't help, change it back. The impedance will only affect what the *remote* party hears, it won't help echo you are hearing.

12. After you have the echo down to a reasonable level, go back into the "PSTN" tab and switch on the "Echo Can Enable = yes". Check to see if the echo has improved. If the echo is tolerable at this level, leave the adaptive echo canceller off. You should have the echo level down to a level that can be stomped on by the echo canceller. If you are using a sip device to talk through your PSTN line, you should probably do all the echo cancellation at that device and leave it switched off in the SPA.

The adaptive echo canceller is a lot more aggressive but also can cancel out some of the incoming conversation. In particular if you’re calling in a loud environment then the voice going down the line from your end can trick the echo canceller to start canning some of the real conversation. It makes the incoming party sound a bit scratchy. Leave it off unless you really need it.

The "Echo Supp Enable" switches on automatic gain controls. This means the Sipura will be constantly turning up and down the volume of the call for you and the remote party to try and keep the sound levels at a "good" level. Sipura's definition of good may not suit your situation. The constant variation of the volume annoys me so I recommend leaving it "off".

13. Test call. Talk loud, talk soft. Is your conversation clear at both ends? Should be a lot better. If echo re-appears, at a later date, remember to try power cycling the SPA before you tweak with anything. It may also be at the other end of the call.

In the end it basically boils down to this:

If you are hearing the echo, the real problem is at the *other* end of the connection. In a normal phone conversation, the latency is so low that you don't notice it. Your brain automatically tunes out to its own voice when you’re talking (as long as the delay between talking and hearing isn't to long). When you insert the SPA, the delay is increased and sometimes the echo can become noticeable.

The only way you can counter this is to reduce the latency (jitter buffer) and/or reduce the gains so the echo volume is reduced below the level that it is noticed. At this point, the SPA-3000 echo canceller should be able to kill off the rest.


E.5 IMMEDIATE ANSWER OF PSTN CALLS

By default, calls will be answered after about 3 rings thus allowing time for Asterisk to detect the CID. Some users may want the PSTN calls to be answered by Asterisk immediately especially if there is a common phone connected in parallel and to avoid someone answering the call using the parallel phone.

To do this you need to change one setting in the zapata.conf file. By default the setting is set to:

immediate=no


To force Asterisk to answer immediately, change the line to read:

immediate=yes


If you are not using Fax, it is also a good idea to disable fax extension in your General setting.

This may or may not work satisfactorily as Asterisk needs a couple of rings to detect CID.


E.6 RAID 1 and ASTERISK@HOME 2.6

A feedback from kwon@ac1.dyndns.org who have been struggling with RAID1 and AAH 2.6 and after a few installs and reinstalls is able to provide the following solution.

Install Summary:

1. Install a@h v2.6 using the command "linux askmethod" with raid1 & minimal package install. After the install, reboot.

Note: don't forget to disable SELinux (nano /etc/selinux/config)

2. Follow the release notes:
  • mkdir /var/aah_load (must use this directory)
  • cp asteriskathome-1.5.tar.gz /var/aah_load
  • cd /var/aah_load
  • tar xvfz asteriskathome-1.5.tar.gz
  • ./install.sh
  • Reboot

3. Now Asterisk from source:
  • cd /usr/src/
  • ./rebuildastsrc.sh
  • Reboot
  • rebuild_zaptel
  • reboot
  • genzaptelconf -v (-v is optional
  • reboot

Note: At this point, if you have a Digium TDM11B, you should be able to dial out from ZAP/1 using ZAP/g0.

4. install-pdf, netconfig, etc.

Note: Some of the directories permissions in /var/lib/asterisk/sounds must be changed to 755 as well.


E.7 REBUILD ZAPTEL DRIVER (USERS’ SUGGESTIONS)

E.7.1 As experienced by marner – a Whirlpool Forum participant.

On his Dell box, marner had to do the following to rebuild the driver and for it to work.

Log in as root and issue the following command:

cd /usr/src/kernels/2.6.9-34.EL-smp-i 686/include/linux
wget http://nerdvittles.com/aah27/spinlock.h


The rest of the procedure is as per earlier chapter Rebuilding Zaptel Driver

E.7.2 As suggested by Rob Thomas (the FreePBX guru)

Rob’s suggestion is to edit the file
/usr/src/kernels/2.6.9-34.EL-i686/include/linux/spinlock.h
and change 'rw_lock_t' on line 407 to 'rwlock_t'

Once that is done, do the following:

rebuild-zaptel


That seems to be a lot easier.


E.8 ZAPTEL CARD CONFIGURATION FOR AUSTRALIA

Submitted by Stephen Gleeson – Technical Manager for Community Information Strategies Australia Inc (CISA).
http://gleesos.wordpress.com/2006/02/08/voip-with-asterisk/

Stephen has attached samples of Zapata configuration files – with correct settings for Australia – loop start.

zaptel.conf

  1. Autogenerated by /usr/local/sbin/genzaptelconf — do not hand edit
  2. Zaptel Configuration File
  3. This file is parsed by the Zaptel Configurator, ztcfg

  1. It must be in the module loading order


  1. Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"
  2. Update for regional - ls - loopstart au - zone
fxols=1
fxsls=2
fxsls=3
fxsls=4

  1. Global data

loadzone = au
defaultzone = au


zapata_addiotional.conf

;;;;;;[230]
signalling=fxo_ls
record_out=Adhoc
record_in=Adhoc
mailbox=230@device
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callerid=device <230>
busydetect=no
busycount=7
channel=>1


zapata.conf
;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-pstn
signalling=fxs_ls
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
  1. include zapata-auto.conf

;Include AMP configs
  1. include zapata_additional.conf



back to content

bitweaver

Powered by

  • Powered by bitweaver
  • Powered by Smarty
  • Powered by Adodb
  • Powered by MySQL
back to content

Site Navigation

back to content
Powered by bitweaver