SANGOMA

Asterisk FAQ

 

Installation /Compilation

  1. I am using Ubuntu and am getting the following error when I try to use ./Setup install " ./Setup: 1041: Syntax error"
  2. How do I install wanpipe-driver on trixbox ?
  3. Why does Zaptel not compile on some Redhat, CentOS and trixbox systems?
  4. How do I install Wanpipe under Ubuntu Server 8.04

Configuration

  1. What is proper timing configuration on Sangoma card when I am configuring my A102/A104/A108 with Telco, Channel Bank or/and traditional PBX ?
  2. How do I enable hardware DTMF support for Asterisk with my "d" model card ?
  3. How do I auto-start Zaptel after wanrouter start ( Wanpipe start up script ) ?
  4. Which PRI dial plan configuration works with Batelco Jordan with Siemens ESW switch type?
  5. How do I configure my T1/E1 card for fractional voice and data (in mix mode) ?
  6. Why do my FXS modules show up as FXO in Zaptel or FXO modules show up as FXS in Zaptel?
  7. How do I configure single port on  AFT series T1/E1 card in mixed Voice and data mode ( configuring single port for fractional voice and data ) ?
  8. What does "HARDHDLC" in zaptel.conf mean or why can't I make calls after upgrading to Zaptel-1.4.X and Wanpipe-3.2.X and re-using my old configs?
  9. How do I configure my Sangoma Hardware for a J1 line?
  10. How to have Asterisk stop when the Wanrouter stop script is ran?
  11. How do i configure MFC/R2 with Asterisk?
  12. How to configure the card for two b-channels transfer (TBCT) with Asterisk?
  13. How Do I Configure Redundent Systems On The Same T1/E1 Link?

Debuging 

  1. How do I perform physical layer (connection) debugging on AFT series cards ?
  2. How do I debug incoming and/or outgoing call issue on T1/E1 - PRI line ?
  3. I have an E1/PRI line, incoming calls are working but outgoing calls are not working what is wrong ?
  4. How do I debug echo issue with software echo cancellation ?
  5. How do I debug  DTMF recognition issue ?
  6. How to determine what port and channel number a call is using on an A500?
  7. How do I check if the telco is sending caller ID on a T1/E1 - PRI line?
  8. How do i stop my system from crashing on shutdown?
  9. Why am I unable to call out until I unplug and then plug in my analog lines?
  10. How can i stop "CT_C8_A clock behavior does not conform to the H.100 spec!" messages from printing in my system log?
  11. How do i fix "ZT_SPANCONFIG failed on span 1" or "zt_chanconfig failed channel 1"? 
  12. How do i fix "DAHDI_SPANCONFIG failed on span 1" or "dahdi_chanconfig failed channel 1"? 
  13. Why does my BT line have cross talk?

 Checking Driver Version / Hardware Type 

  1. How do I check if the card has on board hardware echo cancellation and it's running?
  2. Does the card have PMC or Dallas/Maxim framer?
  3. How do I check the card firmware ?


 

Telecommunication FAQ

  1. What is the difference between T1 and E1?
  2. What are the red, blue, and yellow alarms in a T1 system?
  3. What are the alarm indication signal (AIS), remote alarm indication (RAI), and distant multiframe alarm (DMA) in an E1 system?
  4. What are the differences between robbed-bit signaling (RBS), channel-associated signaling (CAS), and common-channel signaling (CCS)? 
  5. What is the difference between AMI, B8ZS, and HDB3?


 

 

Q. Why does Zaptel not compile on some RedHat, CentOs and Trixbox Systems? 

A. If you are getting these errors when compiling zaptel:

/usr/src/zaptel/zaptel.c:384: error: syntax error before "zone_lock"
/usr/src/zaptel/zaptel.c:384: warning: type defaults to `int' in declaration of `zone_lock'
/usr/src/zaptel/zaptel.c:384: error: incompatible types in initialization
/usr/src/zaptel/zaptel.c:384: error: initializer element is not constant

:
:

There is a typo in your kernel headers.
View a file called spinlock.h in your kernel source directory:

#>vi /lib/modules/$(uname -r)/build/include/linux/spinlock.h
look for this line:

#define DEFINE_RWLOCK(x) rw_lock_t x = RW__LOCK_UNLOCK

(it is around line 407)
and change it to:

#define DEFINE_RWLOCK(x) rwlock_t x = RW__LOCK_UNLOCK


then try to recompile Zaptel again.

 

 

From julian - 2/22/07 5:27 PM [Delete]

Ubuntu server 2.6.17-10

 I'm having problems running Setup.  It gives a syntax error :

./Setup: 1014: Syntax error: Bad substitution

 any ideas?

 FIX!!

 I needed to change the first line of the setup script to  #!/bin/bash and it worked. 


Q. Checking for the Framer type on AFT T1/E1 card

 

 

A.     You can configure a port for either T1 or E1.


Do wanrouterstart and check your system log (/var/log/messages) right after wanrouterstart.
If the card has PMC framer you will see following on the system log:

wanpipe1: Global EC Clock Port = 1

wanpipe1: AFT Data Mux Bit Map: 0x01234567

wanpipe1: Configuring PMC COMET-QUAD T1 FE

 

If the card has Maxim/Dallas Framer, you will see followingin the system log:

 

wanpipe1: Global EC Clock Port = 1

wanpipe1: Global E1 Front End configuration

wanpipe1: AFT Data Mux Bit Map: 0x01234567

wanpipe1: Configuring DSDS26521 E1 FE

 

You can also visit our hardware-matrix


 

Q. Which PRI dialplan configuration work with Batelco Jordan with Siemens ESW switch type?

    Following configuration works with Batelco Jordan
    pridialplan=unknown
    switchtype=euroisdn
   


 

 

 Q. I have an E1/PRI line, incoming calls are working but outgoing calls are not working, what is wrong?

Most E1 lines require LibPRI/Asterisk to specify the type of number dialed.  In Zapata.conf try playing around with the following value (remember to add this option before the channels are defined):
pridialplan= local                    (this value can also be unknown, private, national, and international)


 

 

Q. I am using Ubuntu and am getting the following error when I try to use ./Setup install; "./Setup: 1014: Syntax error"?

Ubuntu uses the Dash shell environment rather then a Bash style environment and the scripts need to be aware of this.  Open up the "Setup" script and change the first line from "#!/bin/sh" to "#!/bin/bash".  This will tell ubuntu to use the Bash shell rather then the default shell.

Below is a list of some of the different syntax errors that indicate this issue: 

-./Setup: 1293: Syntax error: "(" unexpected

-./Setup: 1041: Syntax error: Bad substitution


 

Q. Why do my FXS modules show up as FXO in Zaptel or FXO modules show up as FXS in Zaptel?

An FXS module is used to connect a telephone/fax/modem/CPE device to a computer so it needs to emulate the signaling used by a telco; this signaling is called FXO (kewl start or loop start).  While an FXO module is the exact opposite, it is used to connect a computer to a telco line so it needs to emulate the signaling of a normal phone; this signaling is called FXS (kewl stat or loop start).  So it is perfectly normal and actually correct that the signaling used by Zaptel is always the opposite of what the module is called.  If you are still worried that you have purchased or received the wrong module you can check exactly what type of module you have by running the "wanrouter hwprobe verbose" command from the Wanpipe drivers which displays all the Sangoma cards installed and the location of any FXO or FXS modules.  If there are any problems contact techdesk@sangoma.com with a brief description of the problem.


 

 Q. What does "HARDHDLC" in zaptel.conf mean or why can't I make callsafter upgrading to Zaptel-1.4.X and Wanpipe-3.2.X and re-using my oldconfigs?

As of Zaptel-1.4.X Digium has integrated the option for hardware HDLC framing into Zaptel so that it no longer needs to be patched.  As of Wanpipe-3.2.2 the driver install program will no longer patch Zaptel with our hardware HDLC patch, instead the configuration scripts "wancfg_zaptel" and "setup-sangoma" will now create zaptel.conf with the D-channel specified using "hardhdlc".  When zaptel.conf is parsed by Zaptel and it sees "hardhdlc=" Zaptel will NOT do HDLC framing on the D-channel stream, on the other hand if it sees "dhcan=" Zaptel will perform HDLC framing on the D-channel specified.

If you have recently upgraded your version of Wanpipe to Wanpipe-3.2.2 or newer then you need to run "wancfg_zaptel" or "setup-sangoma" after the driver install to create updated configuration files.   If you are feeling brave then feel free to simply change your zaptel.conf file manually:

  1. Open the file /etc/zaptel.conf with your favourite  text editor.
  2. Look for the line "dchan=24" or "dchan=16" and change it to "hardhdlc=24" or "hardhdlc=16".
  3. Save the file, exit the text editor, and run "ztcfg -vvv" to apply the new configuration.
NOTE: If you are having problems making a call on a PRI line and you have both incoming and outgoing frames when you run the command "pri intense debug span X" in Asterisk then check the D-channel using Wanpipe: "wanpipemon -i wXg1 -c trd" (where X is the port number of the Sangoma card). If you only see incoming frames then both the hardware and Zaptel are doing HDLC framing on the D-channel, disable software HDLC framing by following the instructions above.

 


How to determine what port and channel number a call is using on an A500?
    This depends on which driver version you are using, Wanpipe-3.3.6 or later Asterisk will tell you directly which port and channel is being used by which call, for Wanpipe-3.3.5 or earlier it is not as straight forward.

 

 

For Wanpipe-3.3.6 or newer:

Asterisk will display the following output for the show channels command:

 asterisk*CLI> show channels
Channel                             Location                      State   Application(Data)
WOOMERA/g2/5-88c1       200@from-internal:2   Up      Playback(demo-congrats)
WOOMERA/g1/1                100@misc:2                Up      Echo()
2 active channels
2 active calls

As you can see the woomera channel being used is specified by the following string "woomera/g1/1-XXXXXX".  The number after the "/" and before the "-" is the combined channel number the call is going through.  This number maps to the span number and channel using the following map:
span 1 channel 1 = 1
span 1 channel 2 = 2
span 2 channel 1 = 3
span 2 channel 2 = 4
span 3 channel 1 = 5
Now the span number in most cases is also the wanpipe number but if you want to be 100% sure or you are running any other Sangoma cards you will need to confirm which span belongs to which wanpipe.  In the /etc/wanpipe/wanpipeX.conf file you will find a value "TDMV_SPAN=Y" which is the span number attached to this wanpipe. 
....
IGNORE_FRONT_END = NO
TDMV_SPAN       = 1

[w1g1]
ACTIVE_CH       = ALL
....
EXAMPLE: If wanpipe2.conf has a TDMV_SPAN=3 then the Asterisk channels the calls would go across are "woomera/g1/5" and "woomera/g1/6".

For Wanpipe-3.3.5 or older:

Coming Soon 


 How to have Asterisk stop when the Wanrouter stop script is ran?

A relative unknown feature of the Wanpipe drivers is the pre-"wanrouter stop" stop script.  This is a file that can modified to run as a shell script (intelligent loops with variables) or to simply run Linux command prompt commands.  By default the file does not exist, there's nothing we need to stop with it but all you need to do to activate it is to create the file.

  1. Change directory to /etc/wanpipe/scripts using "cd /etc/wanpipe/scripts/".
  2. Create the file using the "touch" command, i.e.  "touch stop".
  3. Open the file using you favourite text editor and add anything you want the driver to do before it shuts itself down.
Now a common problem with some installs (PBX in a FLASH) does not by default have an Asterisk stop script to be run on reboot/shutdown.  This is a problem because it can cause Zaptel to panic when the Wanpipe drivers don't shutdown because they are in use (a safety feature).  Use the "stop" script to easily force an Asterisk shutdown before the Wanpipe drivers stop.
  1. Run "vim /etc/wanpipe/scripts/stop" to open up the "stop" script for editing.
  2. Hit the "INSERT" key on your keyboard to put Vim into "insert" mode.
  3. Add the following command to safely stop Asterisk "asterisk -rx 'stop now' ".
  4. Hit the "ESC" key on keyboard to exit "insert" mode.
  5. Save and exit Vim by hitting ":wq".
Do a test shutdown when you can control the system in case you still have a problem, if you continue to have problems please contact Sangoma support at "techdesk@sangoma.com"

How do I install Wanpipe under Ubuntu Server 8.04

The stock installation of Ubuntu Server 8.04 is missing some compiler tools needed for the install of Wanpipe (and Zaptel).  Please use the following commands to download the correct packages:
apt-get -y install gcc
apt-get -y install g++
apt-get -y install make
apt-get -y install libncurses5-dev
apt-get -y install flex
apt-get -y install bison
apt-get -y install patch
apt-get -y install linux-source
apt-get -y install linux-headers-$(uname -r)
In addition Ubuntu does not use the same shell as other distro's so you need to change our shell specification in the  "Setup" script.  After downloading and untarring the Wanpipe source files:
-change directory into the wanpipe source files
-open up the file "Setup" using your favorite text editor
-change the first line that says "#! /bin/sh" to "#! /bin/bash"
-save the file and run "./Setup install" to start the installation of the drivers

 


How can i stop "CT_C8_A clock behavior does not conform to the H.100 spec!" messages from printing in my system log?

If you are seeing multiple H.100 errors in your system log then the hardware echo canceler does not have a good clock source. On our more recent drivers 3.3.12 and up the first port that starts up will be the clocking source. So if your wanpipe1 is not connected then please configure your card to only start the first port that connects. If you have an older driver then the timing source is the first physical port on the card. So if you are not using the first physical port then please follow the steps below to set another port as a timing source.

Please note that only one port can act as timing source for HWEC in a particular AFT102/104/108 card, in other words you can only set HWEC_CLCKSRC = YES for only one port for a card! 

To change the clock simply edit your /etc/wanpipe/wanpipeX.conf file, x being the wanpipe number and then add the line "HWEC_CLKSRC = YES" as shown below. Next stop Asterisk and run "Wanrouter restart" to apply the changes and then start Asterisk up and the H.100 errors will be gone.

TTL             = 255
IGNORE_FRONT_END = NO
TDMV_SPAN       = 1
TDMV_DCHAN      = 24
TDMV_HW_DTMF    = YES
HWEC_CLKSRC     = YES

To verify the change has taken effect check your system log (/var/log/messages) for the following output :

wanpipe1: Configuring DS DS26521 T1 FE
wanpipe1:    Port 1,B8ZS,ESF,0db
wanpipe1:    Clk Normal:0, Channels: FFFFFFFF
wanpipe1:    Rx Sensitivity Gain 36dB (default).
wanpipe1: Front end successful
wanpipe1: Front End Interface Ready 0x00000000
wanpipe1: Register EC interface wanec1 (usage 1, max ec chans 32)!
wanpipe1: Global EC Clock Port = 1
wanpipe1: Configuring Device   :wanpipe1  FrmVr=34
wanpipe1:    Global MTU     = 1500



Why am I unable to call out until I unplug and then plug in my analog lines?

Asterisk 1.6

To fix this you just need to run "dahdi_cfg -fvvvv" after our card is started. If you have a typical setup and everything is auto starting then edit "/etc/wanpipe/scripts/start" and then change "dahdi_cfg -v" to "dahdi_cfg -fvvvv". Once this change is done everything will be fixed the next time you restart our card or the server.

Asterisk 1.4.22

If you are using an A200 with Zaptel and Asterisk 1.4.22 then there is a known issue with outbound calls. The reason you are not able to call out is because Asterisk 1.4.22 has a new feature which detects if a analog line is plugged in or not, but this feature only works with Dahdi. So to fix the issue you can do one of the following.

1) Downgrade to Asterisk 1.4.21 or earlier, you can find the Asterisk source at http://downloads.digium.com/pub/asterisk/releases/

2) Upgrade to Dahdi which you can find instructions at http://wiki.sangoma.com/wanpipe-linux-asterisk-dahdi

3) You can edit the Asterisk 1.4.22 source code; simply open the file "channels/chan_dahdi.c" in the asterisk source and make the changes below and recompile Asterisk.

-----------------
#ifdef DAHDI_CHECK_HOOKSTATE
                                        return 0;
#else
                                        return 1;
-----------------

Change the "0" to a "1"

-----------------
#ifdef DAHDI_CHECK_HOOKSTATE
                                       & nbsp;return 1;
#else
                                        return 1;
-----------------

   

How Do I Configure Redundent Systems On The Same T1/E1 Link?

With our cards we have a feature called Tx Tri State and this will allow you to disable and enable the Tx on our cards on the fly. So once you have setup heart beat between the two boxes you can simply use this feature to enable the backup system if the main system goes down. For more information about how to disable and enabel this please go to http://wiki.sangoma.com/wanpipe-txtristate and this will have all the details you need. Remember the fail over setup is done with another 3rd party application such as heartbeat, this is just how to enable and disable our cards Tx. So you would need to build this into some sort of script that will run at the time of a fail over. 


How do i fix "ZT_SPANCONFIG failed on span 1" or "zt_chanconfig failed channel 1"? 

  • First run "wancfg_zaptel" or "setup-sangoma" on trixbox to insure your configuration is correct because this can be a configuration issue.

 

  • Second reason could be there is an error when wanpipe starts. To get the error simply open your /var/log/messages and it will be printed in there. If you need help finding the error or decoding it just simply send the entire /var/log/messages file right after the issue occurs to techdesk@sangoma.com

 

  • If there is no errors with the wanpipe start up then ZTDUMMY or another TDM card could be taking span 1. So to check this simply run "cat /proc/zaptel/1" and insure the output has WP in it to indicate it is wanpipe as shown below. Now if another TDM card is in the system then please go to "Sample Configuration of Sangoma card with another TDM Card" and follow the steps there.

[root@localhost ~]# cat /proc/zaptel/1
Span 1: WPT1/0 "wanpipe1 card 0" (MASTER) B8ZS/ESF
           1 WPT1/0/1
           2 WPT1/0/2
           3 WPT1/0/3
           4 WPT1/0/4


If ZTDUMMY is loaded then you can simply insure asterisk is stopped by running " asterisk -rx "stop now" ", "wanrouter stop" and then run "/etc/init.d/zaptel stop". Once this is complete then run "ls /proc/zaptel" and insure there is no output and then run "wanrouter start", "ztcfg -vv" and "asterisk" and then test everything to insure it is working. To insure the zaptel start script does not run again just run "chmod -x /etc/init.d/zaptel" and this will disable the script but not remove it incase you need it in the future.

 


How do i fix "DAHDI_SPANCONFIG failed on span 1" or "dahdi_chanconfig failed channel 1"? 

  • First run "wancfg_dahdi" or "setup-sangoma" on trixbox to insure your configuration is correct because this can be a configuration issue.

 

  • Second reason could be there is an error when wanpipe starts. To get the error simply open your /var/log/messages and it will be printed in there. If you need help finding the error or decoding it just simply send the entire /var/log/messages file right after the issue occurs to techdesk@sangoma.com

 

  • If there is no errors with the wanpipe start up then DAHDIDUMMY or another TDM card could be taking span 1. So to check this simply run "cat /proc/dahdi/1" and insure the output has WP in it to indicate it is wanpipe as shown below. Now if another TDM card is in the system then please go to "Sample Configuration of Sangoma card with another TDM Card" and follow the steps there.

[root@localhost ~]# cat /proc/dahdi/1
Span 1: WPT1/0 "wanpipe1 card 0" (MASTER) B8ZS/ESF
           1 WPT1/0/1
           2 WPT1/0/2
           3 WPT1/0/3
           4 WPT1/0/4


If DAHDIDUMMY is loaded then you can simply insure asterisk is stopped by running " asterisk -rx "stop now" ", "wanrouter stop" and then run "/etc/init.d/dahdi stop". Once this is complete then run "ls /proc/dahdi" and insure there is no output and then run "wanrouter start", "dahdi_cfg -vv" and "asterisk" and then test everything to insure it is working. To insure the dahdi start script does not run again just run "chmod -x /etc/init.d/dahdi" and this will disable the script but not remove it incase you need it in the future.

 


Why does my BT line have cross talk?

In some cases the BT to RJ11 connectors are not setup correctly so cross talk occurs. The best idea is to purchase a BT to RJ11 connector such as the one below which only gives you the two pins so you know it is done correctly. Now the one in the picture below is available at http://www.maplin.co.uk/. If you are still receiving cross talk after this then go to http://wiki.sangoma.com/SangomaTechSupport#analog and send all the information there into techdesk@sangoma.com.

 

bt-rj11.png


How do I check if the telco is sending caller ID on a T1/E1 - PRI line? 

 

On a PRI line the caller ID comes into Asterisk through the Q931 signaling. So in Asterisk you can enable debugging which will show you the Q931 messages coming in and out of the system.

To do this follow the steps below:

1) Go into the Asterisk CLI using the command "asterisk -r" 

2) Then run the command "pri intense debug span X" (X being the span number)

3) Place a call into the system which should have caller ID on it, then run the command "pri no debug span X" (X being the span number) and hangup the call. 

4) Then look up in the output for the SETUP message, below is a sample of what it should look like. Now the "Calling Number" is the caller ID that you are looking for, so below the CID number is "098765432", also you can see the CID name is "Sangoma09876". Next you can even see the "Called Number" which is the number the external phone has dialed, in this case you can see it is "555".

 

< Protocol Discriminator: Q.931 (8)  len=54
< Call Ref: len= 2 (reference 2/0x2) (Originator)
< Message type: SETUP (5)
< [04 03 80 90 a2]
< Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer capability: Speech (0)
<                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
<                                User information layer 1: u-Law (34)
< [18 03 a1 83 88]
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit  PRI  Spare: 0  Preferred  Dchan: 0
<                        ChanSel: Reserved
<                       Ext: 1  Coding: 0  Number Specified  Channel Type: 3
<                       Ext: 1  Channel: 8 ]
< [1e 02 80 83]
< Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  0: 0  Location: User (0)
<                               Ext: 1  Progress Description: Calling equipment is non-ISDN. (3) ]
< [28 0d b1 53 61 6e 67 6f 6d 61 30 39 38 37 36]
< Display (len=13) Charset: 31 [ Sangoma09876 ]
< [6c 0c 21 80 30 39 38 37 36 35 34 33 32 31]
< Calling Number (len=14) [ Ext: 0  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
<                           Presentation: Presentation permitted, user number not screened (0)  '0987654321' ]
< [70 04 a1 35 35 35]
< Called Number (len= 6) [ Ext: 1  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '555' ]

 

 

5) If you do see the CID then start configuring your dial plan to receive it. If you need help with this then please click here to go to the VOIP-info's page on caller ID. If you do not see the CID then contact your telco and tell them you are looking at the SETUP message that they are sending and there is no CID.

Also please note that there is no configuration in our drivers for caller ID, this is because the signaling is all done by Zaptel/Libpri/Aserisk.

 


How do I configure the card for 2 B-channels transfer (TBCT) with Asterisk?

If incoming calls are bridged on the same PRI line, there is no need for Asterisk to keep this call up. When TBCT feature is enabled, Asterisk releases two b-channels and remote end switch take care of the calls.

This feature is only supported with DMS 100 and 5WE switch type (with Asterisk/LibPRI/Zaptel version 1.4).

To enable this feature, customer needs to set the following two parameters in /etc/asterisk/zapata.conf

facilityenable = yes

transfer = yes

Comments

From clockwise - 9/28/09 4:23 AM

I'd realy like to know that, too...

Even though it seems like FE_NETWORK_SYNC is somehow special to a B700 and therefore the "right" choice when configuring one, I'm still not sure as it's not documented anywhere...

Feedback would be greatly appreciated!

Thanks in advance, Manuel

From wildindn - 7/10/09 8:25 AM

What is the difference between FE_NETWORK_SYNC an RM_NETWORK_SYNC as stated in the configure wanpipe.

From EddyJhon - 11/19/09 2:25 AM

Nice informative post. Must University | Education Diploma

From EddyJhon - 11/19/09 2:21 AM

To insure the dahdi start script does not run again just run "chmod -x /etc/init.d/dahdi" and this will disable the script but not remove it incase you need it in the future. Get degree | PhD history | Computer Science school

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 10/8/09 10:16 AM