No dial tone on FXS port

Hi all,

I seem to have an issue where I cannot get a dial tone through the FXS port on my Sangoma A200 card. The card has 2 fxs ports and 2 fxo ports, the fxo ports have two phone lines connected and are working fine and we would just like to get a old phone connected to the fxs port to make calls on occasionally.

Asterisk is detecting the card when i check on the CLI although whenever i lift the phone off the hook to try and dial there is zero information in the logs relating to dahdi.

I did create a dahdi extension giving it a random number of 3000 and assigned channel 1 to it (or port 1) but that doesnt seem to have done anything.

I have looked around on forums for hours but cannot find a post where the solution has worked for me so i would appreciate any suggestions.

Probably you already did, but have you checked that the MOLEX power cable is securely connected on the power connector on the card? In order for FXS ports to work correctly, you need to connect a power cable to the connector on the card. Also have you checked the DAHDI configuration? Asterisk might be detecting the card but you have to configure each port correctly as FXO or FXS, depending on the modules installed on your card.

Yes the power cable is connected I did see that as a solution on a few posts actually. In regards to the DAHDI config all I have configured are which ports are which so Asterisk knows.Below is how it looks in the GUI for FXS

None of the 2 FXS ports work or is one of them working but not the other?

None. FXO works fine we have two lines in use that work perfectly. The FXS lines just seem dead there is nothing from them at all, no tone, no static.

Have you double-checked that the module / card is not faulty?
If FXO module is working, you could try switching FXO module with FXS module, reconfigure the card and check, if you are willing and able to stop the server and fiddle with the card a little.

Well that would be the final check as the PBX is in production so it would be hassle to unplug the server and mess around with the card. Preferably I would want to check all config settings first so that I only need to bring the server down if it is really required. I would be surprised if the module is faulty as it is only a few months old.

Have you double checked all the DAHDI conf files? There are several of them, in several different directories. Did the FXS ports ever work and stopped working recently, or did they never work since the first time you installed the card?

I had a quick scan of them but I am not exactly sure what they should contain & what is right/wrong. Its the first time I have tried the FXS ports since i got the card so looks like they never worked.

Can you post the contents of all of them? You should have at least the following files, but probably more, or maybe less, depending on your specific environment. For clarity, I would suggest that you post the content of each file in a separate reply. It might also be useful if you provide the output of the command ls -al /etc/asterisk|grep dahdi so we can check which files you have.

/etc/dahdi/system.conf
/etc/asterisk/chan_dahdi_additional.conf
/etc/asterisk/chan_dahdi_channels_custom.conf
/etc/asterisk/chan_dahdi.conf
/etc/asterisk/chan_dahdi_general.conf
/etc/asterisk/chan_dahdi_groups.conf
/etc/asterisk/dahdi-channels.conf

Can’t seem to get that command to work in Asterisk CLI

Found it…

fxsks=3,4
echocanceller=oslec,3,4
fxoks=1,2
echocanceller=oslec,1,2
loadzone=uk
defaultzone=uk

;;;;;;[3000]
namedpickupgroup=
namedcallgroup=
accountcode=
callprogress=no
busycount=7
busydetect=no
echocancelwhenbridged=no
echotraining=800
echocancel=yes
signalling=fxo_ks
immediate=no
context=from-internal
callerid=Alarm <3000>
channel=>1

Nothing in it

[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=yes
busycount=3
usecallerid=no
callwaiting=yes
usecallingpres=yes
threewaycalling=no
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=no
faxdetect=no
rxgain=0.0
txgain=0.0

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

Nothing in it

signalling=fxs_ks
context=from-analog
group=0
channel=>3

signalling=fxs_ks
context=from-analog
group=1
channel=>4

signalling=fxo_ks
context=from-analog
group=2
channel=>1

signalling=fxo_ks
context=from-analog
group=0
channel=>2

Doesnt exist

Another file I have is

/etc/asterisk/chan_dahdi.conf.bak

[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=yes
busycount=3
usecallerid=no
callwaiting=yes
usecallingpres=yes
threewaycalling=no
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=no
faxdetect=no
rxgain=0.0
txgain=0.0

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

Just realized this is just a backup file…

The command should be as following

ls -al /etc/asterisk|grep dahdi

In any case, I think I know where your problem might reside. You have one of your FXS ports in the same group of one of your FXO ports

/etc/asterisk/chan_dahdi_groups.conf

signalling=fxs_ks
context=from-analog
group=0
channel=>3

signalling=fxs_ks
context=from-analog
group=1
channel=>4

signalling=fxo_ks
context=from-analog
group=2
channel=>1

signalling=fxo_ks
context=from-analog
group=0
channel=>2

There are some changes that should be done there, not only for the FXS ports but also for the FXO ports, but assuming that the FXO ports are behaving exactly like you want, you should change group=0 to group=3 for channel 2. Since it seems you are using DAHDI module in FreePBX, you should make that change in the FreePBX web console, if the DAHDI module is set to allow writing to the conf files. It will ask you to reload DAHDI, besides reloading FreePBX. Once you reloaded both, make sure to check the group definition again. Something that confuses me is that your screen capture shows group 0 for both FXS ports, but the conf file shows group 2 for port 1 and group 0 for port 2, so maybe you have not enabled DAHDI module to enable writing conf files. In any case, I prefer to edit those files manually by hand and disable DAHDI module, because it has been known to cause troubles in the past, not sure if it is still the case, but in your particular situation given that what the module shows is not what you have on your conf files, either the module has its wiriting ability disabled, or the module is misbehaving. If in fact the module is configured to disable writing of the conf files, you can go and safely modify the files manually, as they won’t be changed automatically by FreePBX. In my case, I just installed the module so it generates all the mandatory conf files, created a backup of the files and then just completely deleted the module. After the module was deleted, I renamed the files with the expected names and never touched them again. I have a Sangoma B600 card, which is a fixed 4FXO+1FXS card, but the basics are the same.

Okay i’ll have to change the grouping a bit later on when the pbx isnt in use as I know you have to reload asterisk & dahdi. When i make the change i’ll check the web gui says the same as the .conf file and if it doesn’t it looks like the best thing to do would be to do as you say and remove the module and work with the config files only.

One thing I have noticed myself just now is it says fxo_ks signalling for both channel 1 & 2, however channel 1 & 2 are supposed to be the FXS ports so why would their signalling be fxo_ks? Same thing for channels 3 & 4 why is their signalling type fxs_ks?

Still cannot complete this command i just get this back;

No such command ‘ls -al /etc/asterisk|grep dahdi’ (type ‘core show help ls -al’ for other possible commands)

That is a linux command but you are running it inside the Asterisk console, that is why it fails. You must be run it on the linux prompt. Just exit the Asterisk console and type the command on the linux prompt.

I know it sounds counter-intuitive, but the signalling name is the opposite of the port type, so for an FXS port, the signalling is fxo_ks and for an FXO port, the signalling is fxs_ks, so don’t worry, the signalling is correct.

Stupid me…Here is what i get

-rw-rw-r–. 1 asterisk asterisk 909 Aug 10 12:40 chan_dahdi_additional.conf
-rw-rw-r-- 1 asterisk asterisk 0 Jan 30 2017 chan_dahdi_channels_custom.conf
-rw-rw-r-- 1 asterisk asterisk 1346 Aug 10 12:40 chan_dahdi.conf
-rw-rw-r-- 1 asterisk asterisk 1346 Aug 10 11:50 chan_dahdi.conf.bak
-rw-rw-r–. 1 asterisk asterisk 766 Feb 27 2011 chan_dahdi.conf.old
-rw-rw-r-- 1 asterisk asterisk 664 Aug 10 12:40 chan_dahdi_general.conf
-rw-rw-r-- 1 asterisk asterisk 0 Jan 30 2017 chan_dahdi_general_custom.conf
-rw-rw-r-- 1 asterisk asterisk 895 Aug 10 12:40 chan_dahdi_groups.conf
-rw-rw-r–. 1 asterisk asterisk 0 Jan 1 2012 dahdi-channels.conf