Newbie config question for TDM800P

I was able to get FreePBX installed and it is able to see the TDM800P card:

[root@voip ~]# service dahdi status

Span 1: WCTDM/0 “Wildcard TDM800P” (MASTER)

1 FXO FXSKS (EC: OSLEC - INACTIVE)
2 FXO FXSKS (EC: OSLEC - INACTIVE) RED
3 FXO FXSKS (EC: OSLEC - INACTIVE) RED
4 FXO FXSKS (EC: OSLEC - INACTIVE) RED
5 unknown Reserved
6 unknown Reserved
7 unknown Reserved
8 unknown Reserved

I am brand new with this so my first goal is modest: I want to be able to call the POTS line jacked into port 1 and have PBX answer it and then terminate it with a SIT tone. I will worry about adding VoIP phones et al later.

The first step I took was adding a DAHDI channel: (I would post pictures but that is disallowed for new users.)

Channel: 1
Description: TDM800P - Channel 1
DID: 8001

I then clicked the “Submit Changes” button followed by clicking the “Apply Config” button at the top. Next, I added an “Incoming Route” by populating:

Description: TDM800P - Channel 1
DID Number: 8001

Leaving all other options at default, I scrolled all the way down to the bottom and choose “Terminate Call” + “Play SIT Tone”. This was saved with the “Submit Changes” / “Apply Config” combo.

When I call the POTS line it just rings, rings and rings. Clearly, there is more work to be done.

:smiley:

I used these two wiki articles:

wiki.freepbx.org/display/F2/DAHDI+(Analog)+Channel+DIDs
wiki.freepbx.org/display/F2/Inbound+Routed+User+Guide

and I have been watching the Schmooze videos:

schmoozecom.com/video/

without much success . Any thoughts as what I am missing would be very much appreciated.

Thanks!

From the cli:

dahdi_genconf to set up the necessary files (/etc/dahdi/system.conf and /etc/asterisk/dahdi-channels.conf) and then from the asterisk CLI (asterisk -vvvr) “dahdi restart” and you should have working channels.

You can also do it from the FreePBX Dahdi modules, but I am so used to the CLI and it is faster.

Greg

Thank you for the reply. I issued the commands you listed and it worked! At the same time it is also frustrating.

As you can see below, my DID number of 8001 survived and the call was terminated with SIT. Apologies for asking to have my hand held here, but do you know why this worked and the GUI failed? Is this a typical behavior?

== Channel ‘DAHDI/1-1’ jumping out of macro ‘from-dahdi-1’
– Executing [8001@from-trunk:1] Set(“DAHDI/1-1”, “__FROM_DID=8001”) in new stack
– Executing [8001@from-trunk:2] Gosub(“DAHDI/1-1”, “app-blacklist-check,s,1()”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“DAHDI/1-1”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:2] Set(“DAHDI/1-1”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“DAHDI/1-1”, “”) in new stack
– Executing [8001@from-trunk:3] Set(“DAHDI/1-1”, “CDR(did)=8001”) in new stack
– Executing [8001@from-trunk:4] ExecIf(“DAHDI/1-1”, “1 ?Set(CALLERID(name)=)”) in new stack
– Executing [8001@from-trunk:5] Set(“DAHDI/1-1”, “CHANNEL(musicclass)=default”) in new stack
– Executing [8001@from-trunk:6] Set(“DAHDI/1-1”, “__MOHCLASS=default”) in new stack
[2014-10-19 13:48:14] WARNING[27053][C-00000000]: func_channel.c:569 func_channel_read: Unknown or unavailable item requested: ‘reversecharge’
– Executing [8001@from-trunk:7] GotoIf(“DAHDI/1-1”, “0?macro-hangupcall”) in new stack
[2014-10-19 13:48:14] WARNING[27053][C-00000000]: func_callerid.c:910 callerpres_read: CALLERPRES is deprecated. Use CALLERID(name-pres) or CALLERID(num-pres) instead.
– Executing [8001@from-trunk:8] Set(“DAHDI/1-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [8001@from-trunk:9] Set(“DAHDI/1-1”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [8001@from-trunk:10] Goto(“DAHDI/1-1”, “app-blackhole,zapateller,1”) in new stack
– Goto (app-blackhole,zapateller,1)
– Executing [zapateller@app-blackhole:1] NoOp(“DAHDI/1-1”, “Blackhole Dest: Play SIT Tone”) in new stack
– Executing [zapateller@app-blackhole:2] Answer(“DAHDI/1-1”, “”) in new stack
– Executing [zapateller@app-blackhole:3] Zapateller(“DAHDI/1-1”, “”) in new stack
– Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘UNKNOWN’
– Hanging up on ‘DAHDI/1-1’
– Hungup 'DAHDI/1-1’
voip*CLI>

Are you talking about the FreePBX GUI for DAHDI? If that is the case, I have to cop to the plea of I never use it - Way back when I started with trixbox (don’t laugh - it was good for a while there) there was no auto-configuration and you had to write the files by hand - I was forced to learn that way, and then when dahdi came along and they included the auto-configuration script (dahdi_genconf) I just started using that.

One other thing - depending on the Distro you are using, it may include OSLEC - the Open Source Line Echo Canceller - by default dahdi_genconf uses mg2 as the default echo canceller, but OSLEC (Now - didn’t used to be) seems to be a better echo canceller.

So, if you are not getting echo, don’t worry about it - if you are, look at the file /etc/dahdi/system.conf and where you see mg2 replace it with oslec and then restart dahdi (or the box) and see if it’s better.

Greg

I am using an out-of-the-box-fresh-install of FreePBX 12.0.1rc35. I did notice on the dashboard of UI that it was complaining that it did not own the dahdi config file after I manually ran those command from the CLI.

However. That said.

There are two buttons in the DAHDi configure menu to either reload the DAHDi module or restart DAHDi and Asterisk. I am inclined to do another fresh install just to see if that is what would resolve the issue as well.

Thanks again for the help Greg.

Don’t reload - fixing this is easier than that. As far as the permissions, from the CLI do an “amportal chown” and see if this clears the error - if not, search the forums for your problem with Dahdi not owning the files - I know I read it somewhere here and there is a solution in the posting.

As for getting the commercial module working, that is a Schmooze module and they have very reasonable rates for assistance - I have recommended them several times and everyone that has used them have been pleased with the results.

Greg