Help in setting up TDM410P

Get help with installing and running AsteriskNOW.

Moderators: Moderator, Support

Help in setting up TDM410P

Postby creek16 » Mon Feb 13, 2012 3:44 am

Hi guys, newbie here.

I'm using AsteriskNow 1.8 and I want to configure a Wildcard TDM410P (2FXO, 2FXS) but I can't seem to get it work with the outgoing calls, everytime I try to call a number outside it say's "All circuits are busy now.".

Calls from extension to extension are working. All outbound calls doesn't seem to work.

I've already setup the ff:
Dahdi trunk in port 3.
Outbound Route using the Dahdi trunk in port 3 where the dial pattern is included.
Extensions for sip phones and analog FXS port 1 and 2.

Here's some dahdi config to give you an overview.

Code: Select all
root@pbx:~$ lsdahdi
### Span  1: WCTDM/0 "Wildcard TDM410P" (MASTER)
  1 FXS        FXOKS       (In use) (EC: MG2 - INACTIVE) 
  2 FXS        FXOKS       (In use) (EC: MG2 - INACTIVE) 
  3 FXO        FXSKS       (EC: MG2 - INACTIVE)  RED
  4 FXO        FXSKS       (EC: MG2 - INACTIVE)  RED


Code: Select all

root@pbx:~$ sudo dahdi_scan
[1]
active = yes
alarms = ok
description = Wildcard TDM410P
name = WCTDM/0
manufacturer = Digium
device type = Wildcard TDM410P
location = PCI Bus 02 Slot 11
basechan = 1
totchans = 4
irq = 201
type = analog
port=1, FXS
port=2, FXS
port=3, FXO
port=4, FXO



Code: Select all
root@pbx:~$ sudo dahdi.cfg -vvv
DAHDI Tools Version 2.5.0.2

DAHDI Version: 2.5.0.2
Echo Canceller(s): HWEC, MG2

Configuration

=====================

Channel Map:

Channel 01: FXO Kewlstart (Default) (Echo Canceller: mg2) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Echo Canceller: mg2) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceller: mg2) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceller: mg2) (Slaves: 04)

4 channels to configure

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2



What else I'm missing? Any help is highly appreciated. Thanks in advance! :D
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Mon Feb 13, 2012 6:24 am

What does your /etc/asterisk/chan_dahdi.conf file, and any includes, look like?

From the Asterisk CLI, what is the output of 'dahdi show channels'?
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby malcolmd » Mon Feb 13, 2012 8:15 am

Please contact Digium support directly for assistance in setting up Digium telephony cards.

http://www.digium.com/support
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 2192
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Help in setting up TDM410P

Postby creek16 » Mon Feb 13, 2012 7:02 pm

dalenoll wrote:What does your /etc/asterisk/chan_dahdi.conf file, and any includes, look like?

From the Asterisk CLI, what is the output of 'dahdi show channels'?


Hi dale, thanks for the reply.

This is my /etc/asterisk/chan_dahdi.conf

Code: Select all

; Copied from DAHDI Module of FreePBX

[general]

#include chan_dahdi_general.conf

[channels]

; 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



and this is my dahdi show channels output

Code: Select all

Chan Extension  Context         Language   MOH Interpret        Blocked    State     
pseudo            default                    default                         In Service
      1            from-internal              default                         In Service
      2            from-internal              default                         In Service



I assume that the analog interface card is working right? Since fxs and fxo ports are detected and calls from extension to extension are working using two fxs port. Did I miss something from trunk, outbound route and extension configuration?
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Mon Feb 13, 2012 7:08 pm

malcolmd wrote:Please contact Digium support directly for assistance in setting up Digium telephony cards.

http://www.digium.com/support


Thanks will do that at the same time.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Wed Feb 15, 2012 7:50 pm

Any updates?
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Wed Feb 15, 2012 10:17 pm

Have you contacted Digium support?

In chan_dahdi.conf file, there were several other files 'included'. I would like to see them as well.

Also, the verbose (3) output from the cli when a call is attempted will be helpfull.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Thu Feb 16, 2012 8:37 pm

dalenoll wrote:Have you contacted Digium support?

In chan_dahdi.conf file, there were several other files 'included'. I would like to see them as well.

Also, the verbose (3) output from the cli when a call is attempted will be helpfull.




Digium? Not yet.

chan_dahdi_general.conf and chan_dahdi_groups.conf is both empty.

chan_dahdi_additional.conf
Code: Select all

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

;;;;;;[901]
signalling=fxo_ks
pickupgroup=
mailbox=901@default
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <901>
busydetect=no
busycount=7
accountcode=
channel=>1

;;;;;;[902]
signalling=fxo_ks
pickupgroup=
mailbox=902@default
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <902>
busydetect=no
busycount=7
accountcode=
channel=>2




Ssorry newbie here. Can you tell me how to get those verbose (3) output? If you don't mind.

BTW I've noticed that in my Module Admin, DAHDi Config status is not installed (locally available) does it affect why outside calls can't be made while internal is working?
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Fri Feb 17, 2012 6:22 am

The chan_dahdi_additional.conf file only has the FXS ports defined, there is nothing in there for the two FXO ports.

The 'DAHDI Config' module is an optional module for FreePBX that I have never used. It may allow you to configure the FXO ports. You will have to try it.

To get CLI output, you can connect to Asterisk with the command asterisk -rvvv. Then watch the screen as the call is attempted. Then copy/paste that output.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Sun Feb 19, 2012 11:31 pm

Alright, then what's our workaround here? how will I define the two FXO ports? maybe this is the reason why outside call is not working?
dalenoll wrote:The chan_dahdi_additional.conf file only has the FXS ports defined, there is nothing in there for the two FXO ports.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Tue Feb 21, 2012 5:49 pm

Since the FXS channels were defined in the chan_dahdi_additional.conf file, that means they were defined with FreePBX. You should probably leave that alone or your changes may be removed by FreePBX. Hence the warning.

If you make changes to the chan_dahdi.conf file, you should be OK, but keep a backup copy just in case.

Setting up FXO is similar to FXS, the key differences will be the signalling, the context, the group and of course the channel numbers.

Signalling should be: fxs_ks
For context, try from-pstn
For Group, add a line: group = 0
For channel, you will want: 2,3
The rest of the settings should work as is.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Sun Feb 26, 2012 11:51 pm

Great! after defining FXO ports into chan_dahdi.conf file. Outside calls are now working.

many thanks dale!

Now I'll be dealing with inbound calls.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Tue Feb 28, 2012 8:09 pm

Hi there, need help again in configuring inbound route.

Based from my understanding in order to received a call from outside all I need is to create an inbound route which will accept any and set the destination (Eg. to Extension)

Is there something else? how come It's not working.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Wed Feb 29, 2012 6:02 am

Inbound calls are placed into the context that is assigned to the channel in chan_dadhi.conf (or one of it's included files). my experience with FreePBX is that the context is 'from-pstn', but that may be different.

If you set console verbosity to 3 and attempt an inbound call, that may give us a clue as to what is happening. I suspect there is a context problem.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Fri Mar 02, 2012 2:50 am

nbound calls are placed into the context that is assigned to the channel in chan_dadhi.conf (or one of it's included files). my experience with FreePBX is that the context is 'from-pstn', but that may be different.

If you set console verbosity to 3 and attempt an inbound call, that may give us a clue as to what is happening. I suspect there is a context problem.


which context? fxo channel or fxs?

another thing, how come the free pbx only allows 5 ip phones simultaneously connected? is there a way to by pass that limit? or I just missed something?
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Fri Mar 02, 2012 6:11 am

In inbound call from the PSTN will arrive on the FXO ports you defined in DAHDI. The context that you set is where the call will start processing.

I am not aware of any 5 call limit in FreePBX. What are you seeing that makes you believe there is a limit?
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Mon Mar 05, 2012 12:31 am

so the "from-pstn" value on the context of fxo port in dahdi is ok?

Then what's the problem? Do you have any suggestion on how I can copy&paste the verbose 3 logs? I can't run it on web access. It must be on the server itself.

There is a bar indicator in free pbx web configuration for ip Phones Online, where it indicates the number of online ip phones over 5. In my setup there are 4 ip phones online. (Eg. 4/5 - shown in the ip phones online status) so basically I can only have 5 ip phones online.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Mon Mar 05, 2012 4:15 am


There is a bar indicator in free pbx web configuration for ip Phones Online, where it indicates the number of online ip phones over 5. In my setup there are 4 ip phones online. (Eg. 4/5 - shown in the ip phones online status) so basically I can only have 5 ip phones online.



Sorry forget about that limit.

Found out that the over value indicates the total number of sip extension.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Mon Mar 05, 2012 6:18 am

You could try setting the context to be 'from-dahdi'.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Mon Mar 05, 2012 8:29 pm

You could try setting the context to be 'from-dahdi'.


With this in my chan_dahdi.conf, still the defined destination which is the extension is not receiving any call. But you can hear from the caller side that the number is ringing.
Code: Select all

; Copied from DAHDI Module of FreePBX

[general]

#include chan_dahdi_general.conf

[channels]


;;;;;;[Port 3]
signalling=fxs_ks
pickupgroup=
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
busydetect=no
busycount=7
accountcode=
channel=>3
group = 0
context = from-dahdi

;;;;;;[Port 4]
signalling=fxs_ks
pickupgroup=
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
busydetect=no
busycount=7
accountcode=
channel=>4
group = 0
context = from-dahdi

; 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

creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Wed Mar 07, 2012 4:57 am

Seems that your not OL today. well anyway I'll check tom. Thanks dale
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Wed Mar 07, 2012 6:08 am

Sorry, I must have missed your previous posting.

Looking at the chan_dahdi.conf, notice you have a context=from-internal before the channel and then context=from-dahdi after the channel. This is the same for both ports.

This config file is a bit... odd, not yours per say, but in general the way it works. When the parser reads through the file and sees a 'channel' parameter, is assigns the current settings to that channel. In other words, when it hits your 'channel =>' parameter, the context is 'from-internal'.

I would remove the 'context=from-internal' from both ports and move the 'channel=>' to the last parameter for each port. (To be 100% honest, I would probably combine the two because all the parameters are the same and just have a 'channel=>3,4')

Code: Select all
;;;;;;[Port 3 and 4]
signalling=fxs_ks
pickupgroup=
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
callprogress=no
callgroup=
busydetect=no
busycount=7
accountcode=
group = 0
context = from-dahdi
channel=>3,4
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Wed Mar 07, 2012 11:40 pm

Whew! That's it!

Sorry for being careless not seeing that double context. Thanks for being a big help dale.

Great! Now I have my outgoing and incoming working.

Next is the call routing.

for the mean time I'll do some reading about the call routing whenever an extension is dialed from outside caller.

If you don't mind I might ask you again about this matter. Thanks in advance
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Wed Mar 07, 2012 11:45 pm

Hi dale,

For me to begin with, Any idea on the process of call routing based on the local dialed from the caller?

I am pertaining to a telephone system which when you call the number the operator will answer and asking you to dial the local and then forwards you to the dialed local. Any info's or ideas how does that work on asterisk?
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Thu Mar 08, 2012 7:50 am

Assuming that when you say 'operator' you are actually referring to an Auto-Attendant (aka IVR).

As you are using FreePBX, there are couple of steps.
One - Setup the IVR for what I call 'Dial-Thru'
two - deposit the calls in the IVR

Here are some hints.

Though there is an IVR module for FreePBX, I have found it difficult to setup a thru-dial using it. The reason is you have to define every possible extension as an IVR option. Anything beyond a couple gets to be problematic. Therefore I always do AAs with thru-dial using custom code. You can setup a basic AA in the file /etc/asterisk/extensions_custom.conf.

The basic flow is...

Answer call (answer())
Play menu audio (background())
get user input(waitexten())

Define extensions for background() and waitent() to jump to.
Use a pattern for the thru-dial. For example, the pattern _3XX will match any three digits starting with 3

There are lots of examples around on how to do auto attendant. In fact the Asterisk book, 3rd edition, describes an AA with a thru-dial.

To get calls to your custom code, you will need the 'Custom Applications' module installed in FreePBX.
Then create a 'Customer Destination' (under the tools menu).
Then setup an inbound route with the destination of the customer destination you defined. Define the DID as an unused number in your internal dialplan
Then create a 'ZAP channel DID', setting the DID for both incoming channels to the DID you defined above. Please make note of the message at the top of the 'ZAP channel DID' window. There is probably a requirement for what your context for your inbound channels (chan_dahdi.conf).

I am purposefully leaving out some of the details so you have a chance to explore and learn more about the system. I like to think of it as helping you learn how to fish.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Thu Mar 08, 2012 9:58 pm

Yeah I know and Sorry for those unexplored questions, Thanks Dale.

Using IVR free-pbx Module

Upon doing what you've suggested, I manage to get it working.

Any call is passed to the IVR where the IVR allows the caller to dial extension and redirected it to the desired extension.
(That's working fine)

But my problem which I cannot figure out is when I try to config a system recording to announcement.

When I used the built-In system recordings it works fine I can hear the recording.

When I tried to record using Free-PBX System recording and configured it to the IVR announcement which is my operator, It does not play the recording but you can type the desired extension and gets redirected to it.

Must be having problem with the recording. If I looked into cli using asterisk -rvvv, It seems okay indicated there "playing custom/TestRecord.slin" with no error. Same with using the built-it system recordings. but the difference is the when using the built-in It plays the recording, but when using the recorded one it does not play.

BTW I've checked the my custom recorded sound by downloading it. I can hear it clear.

I guess I'm having problem with asterisk not recognizing the custom recorded sound?
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby dalenoll » Fri Mar 09, 2012 5:42 pm

I am not sure because we have built an IVR using the system recording function of FreePBX. (I haven't, but one of my techs did and it appears to have worked) I am sure it has been done with FreePBX 2.8 and 2.9. What version are you running?

When you say you 'downloaded' the file, did you do that through the web interface or did you go to the Linux shell and transfer from the command line?

Can you do a
Code: Select all
ls -al /var/lib/asterisk/sounds/custom
?

Is you file there?

Can you post the CLI output of several lines before and after the Background() call in the IVR?
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help in setting up TDM410P

Postby creek16 » Sun Mar 11, 2012 8:00 pm

I am running Free PBX 2.8.
I am not sure because we have built an IVR using the system recording function of FreePBX. (I haven't, but one of my techs did and it appears to have worked) I am sure it has been done with FreePBX 2.8 and 2.9. What version are you running?


yes I have downloaded it through web.
When you say you 'downloaded' the file, did you do that through the web interface or did you go to the Linux shell and transfer from the command line?



Yeah the file exist.
Can you do a
CODE: SELECT ALL
ls -al /var/lib/asterisk/sounds/custom
?

Is you file there?


Code: Select all
> ls -al /var/lib/asterisk/sounds/custom
total 1756
drwxrwxr-x 2 asterisk asterisk    4096 Mar  9 11:22 .
drwxrwxr-x 9 asterisk asterisk   40960 Sep 14  2010 ..
-rw-rw-r-- 1 asterisk asterisk 1469470 Mar  9 10:06 RecordTest.wav
-rw--w---- 1 asterisk asterisk   98348 Mar  9 11:22 dsfsdf.wav
-rw--w---- 1 asterisk asterisk  163884 Mar  9 09:50 test.wav


I used as an example the RecordTest.wav, It is recorded through Free PBX System Recording.
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am

Re: Help in setting up TDM410P

Postby creek16 » Mon Mar 12, 2012 3:18 am

hmm, Upon testing other workarounds in order to make IVR module work.

I've decided to just use a recording software following the required asterisk format and codec then upload to asterisk, I've managed to get it worked.

Still wondering why system recording from free PBX modules is not working.

Well anyway thanks a lot for your help in this matter. It is highly appreciated.

Many thanks dale,
creek16
Newsterisk
 
Posts: 41
Joined: Mon Jan 09, 2012 2:20 am


Return to AsteriskNOW Support

Who is online

Users browsing this forum: No registered users and 2 guests