[asterisk-users] [UK SPECIFIC] DAHDI and a OpenVox Card

Dunc dunc at lemonia.org
Sun May 24 06:36:26 CDT 2009


>> Hi Tiago,
>>
>> I have an OpenVox A400P11, it shows up like this...
>>
>> eddie ~ # lsdahdi
>> ### Span  1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
>>   1 FXS        FXSKS       (EC: MG2)  RED
>>   2 FXO        FXOLS       (EC: MG2)
>> Use of uninitialized value in string eq at
>> /usr/lib64/perl5/site_perl/5.8.8/Dahdi/Chans.pm line 221.
>>   3 unknown
>> Use of uninitialized value in string eq at
>> /usr/lib64/perl5/site_perl/5.8.8/Dahdi/Chans.pm line 221.
>>   4 unknown
>> eddie ~ #
>>
>>
>> I'm pretty sure that the RED alarm is a bad thing. While googling about
>> this error from the asterisk console....
>>
>> *CLI> [May 23 18:14:02] NOTICE[4469]: chan_dahdi.c:8164
>> handle_init_event: Alarm cleared on channel 1
>> [May 23 18:14:03] WARNING[4469]: chan_dahdi.c:4664 handle_alarms:
>> Detected alarm on channel 1: Red Alarm
>>
>>
>> I discovered this thread on the mailing list, and so signed up and
>> mailed in with the same subject. It didn't link them together though it
>> seems, so here's a URL
>>
>> http://www.mail-archive.com/asterisk-users@lists.digium.com/msg223429.html
>>
>>
>> If you read this specific post, and the last few before....
>>
>> http://www.mail-archive.com/asterisk-users@lists.digium.com/msg223523.html
> 
> 
> How is your configuration? Please post here.
> 
> At first I thought you were using a A1200P, this card (which is very
> good) gave some headache some weeks ago, because it wasn't working
> properly with dahdi. I didn't have a chance to test it again. It's
> because for this card you need a module from Openvox.
> 
> The A400P card that they made is a clone of the TDM and should work
> fine with DAHDI. For this card you shouldn't need any module from
> Openvox.

Hi,

My config is mostly out-of-the-box apart from where I've needed to tweak 
things. This is my first attempt with Asterisk though, but I've been 
playing on and off for a couple of weeks now.

I'm pretty sure that I've got DAHDI set up correctly as you can see in 
lsdahdi above. Channel 1 connects to my PSTN and Channel 2 has an 
analogue phone connected. I can definitely make calls with the analogue 
phone connected straight into the PSTN to answer your question below.

I'd still like to know what the RED alarm means if anyone can tell me 
though...


I have also definitely got my wctdm loaded in UK mode....

eddie etc # dmesg | grep -i fx
Module 0: Installed -- AUTO FXO (UK mode)
Module 1: Installed -- AUTO FXS/DPO

Here is my dahdi/system.conf

# Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
fxsks=1
echocanceller=mg2,1
fxols=2
echocanceller=mg2,2
# channel 3, WCTDM/4/2, no module.
# channel 4, WCTDM/4/3, no module.

# Global data

loadzone	= uk
defaultzone	= uk



Ok, on to asterisk.

The tweaks I have made to the defaults are:-

chan_dahdi.conf
---------------
cidsignalling=v23
sendcalleridafter = 2

And I have #included an extra file like this.....

#include /etc/asterisk/dahdi-channels.conf

.... which contains....

eddie asterisk # cat /etc/asterisk/dahdi-channels.conf
; Autogenerated by /usr/sbin/dahdi_genconf on Sat May 23 14:19:49 2009 
-- do not hand edit
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is 
intended
; to be #include-d by /etc/asterisk/chan_dahdi.conf that will include 
the global settings
;

; Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
;;; line="1 WCTDM/4/0"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

;;; line="2 WCTDM/4/1"
signalling=fxo_ls
callerid="Channel 2" <4002>
mailbox=4002
group=5
context=from-internal
channel => 2
callerid=
mailbox=
group=
context=default


sip.conf
--------
I have #included my own file in sip.conf too, it looks like this....

eddie asterisk # cat /etc/asterisk/sip_dunc.conf
[deskphone]
host=dynamic
type=friend
context=from-sip
callerid=Desk Phone <202>
mailbox=202 at default
secret=deskphonesecret


extensions.conf
---------------
And the same for extensions.conf......

eddie asterisk # cat /etc/asterisk/extensions_dunc.conf
[from-sip]
exten => 07875123456,1,Dial(DAHDI/1/07875123456,20)

[from-internal]
exten => 07875123456,1,Dial(DAHDI/1/07875123456,20)

[from-pstn]
exten => s,1,Dial(DAHDI/2/,20)

N.B. I've changed my mobile number above but I can assure you I've 
checked that they all match :-)




OK. Time to make some calls.

If I try to dial out from either my IP phone or the analogue one, this 
happens (running with asterisk -vvvvc)....



*CLI>     -- Starting simple switch on 'DAHDI/2-1'
     -- Executing [07875123456 at from-internal:1] Dial("DAHDI/2-1", 
"DAHDI/1/07875123456,20") in new stack
[May 24 12:06:57] WARNING[3968]: app_dial.c:1518 dial_exec_full: Unable 
to create channel of type 'DAHDI' (cause 0 - Unknown)
   == Everyone is busy/congested at this time (1:0/0/1)
     -- Auto fallthrough, channel 'DAHDI/2-1' status is 'CHANUNAVAIL'
     -- Hungup 'DAHDI/2-1'

*CLI>

and

*CLI>   == Using SIP RTP CoS mark 5
     -- Executing [07875123456 at from-sip:1] 
Dial("SIP/deskphone-008c70f8", "DAHDI/1/07875123456,20") in new stack
[May 24 12:07:37] WARNING[3970]: app_dial.c:1518 dial_exec_full: Unable 
to create channel of type 'DAHDI' (cause 0 - Unknown)
   == Everyone is busy/congested at this time (1:0/0/1)
     -- Auto fallthrough, channel 'SIP/deskphone-008c70f8' status is 
'CHANUNAVAIL'

*CLI>

(again I have changed the number)

It seems it can't use the line to dial out for some reason.



OK then on to incoming.

As far as I know my extensions.conf is correct to send an incoming call 
to my analogue phone, and it does ring, but I can never actually get it 
to connect.

*CLI> [May 24 12:18:38] NOTICE[3788]: chan_dahdi.c:8164 
handle_init_event: Alarm cleared on channel 1
     -- Starting simple switch on 'DAHDI/1-1'
[May 24 12:18:39] NOTICE[3841]: chan_dahdi.c:7505 ss_thread: Got event 
18 (Ring Begin)...
[May 24 12:18:39] NOTICE[3841]: chan_dahdi.c:7505 ss_thread: Got event 2 
(Ring/Answered)...
[May 24 12:18:40] NOTICE[3841]: chan_dahdi.c:7505 ss_thread: Got event 4 
(Alarm)...
     -- Executing [s at from-pstn:1] Dial("DAHDI/1-1", "DAHDI/2/,20") in 
new stack
     -- Called 2/
     -- DAHDI/2-1 is ringing
     -- DAHDI/2-1 is ringing
     -- DAHDI/2-1 is ringing
     -- DAHDI/2-1 answered DAHDI/1-1
     -- Native bridging DAHDI/1-1 and DAHDI/2-1

...at this point my analogue phone stops ringing because I've picked it 
up, but the incoming call (I'm ringing the house from my mobile) just 
keeps ringing until I reach NTL(well Virgin now) voicemail.

Then I hangup my analogue phone and this happens

  == Spawn extension (from-pstn, s, 1) exited non-zero on 'DAHDI/1-1'
     -- Hungup 'DAHDI/1-1'


If I then try ringing in again, it's worse, this happens:-

*CLI> [May 24 12:22:13] NOTICE[3788]: chan_dahdi.c:8164 
handle_init_event: Alarm cleared on channel 1
     -- Starting simple switch on 'DAHDI/1-1'
[May 24 12:22:13] ERROR[3856]: callerid.c:562 callerid_feed: No start 
bit found in fsk data.
[May 24 12:22:13] WARNING[3856]: chan_dahdi.c:7545 ss_thread: CallerID 
feed failed: Success
[May 24 12:22:13] WARNING[3856]: chan_dahdi.c:7649 ss_thread: CallerID 
returned with error on channel 'DAHDI/1-1'
     -- Executing [s at from-pstn:1] Dial("DAHDI/1-1", "DAHDI/2/,20") in 
new stack
     -- Called 2/
     -- DAHDI/2-1 is ringing
     -- DAHDI/2-1 is ringing
     -- DAHDI/2-1 is ringing
[May 24 12:22:15] WARNING[3856]: chan_dahdi.c:4664 handle_alarms: 
Detected alarm on channel 1: Red Alarm
     -- Hungup 'DAHDI/2-1'
   == Spawn extension (from-pstn, s, 1) exited non-zero on 'DAHDI/1-1'
     -- Hungup 'DAHDI/1-1'

please not that I didn't pick up the analogue phone there, it just rang 
once and then seemed to hang itself up. The incoming call on my mobile 
again just kept on ringing. When I hangup my mobile, this happens....

CLI> [May 24 12:22:22] NOTICE[3788]: chan_dahdi.c:8164 
handle_init_event: Alarm cleared on channel 1
[May 24 12:22:24] WARNING[3788]: chan_dahdi.c:4664 handle_alarms: 
Detected alarm on channel 1: Red Alarm


I restarted asterisk and the first time, it didn't even notice the 
incoming call, but after that seems to be quite consistent in the first 
symptom above.

Just for the record I thought I'd direct incoming calls at my IP phone 
and see what happens there. Here's the change to my context.

[from-pstn]
;exten => s,1,Dial(DAHDI/2/,20)
exten => s,1,Dial(SIP/deskphone,20)


The deskphone rang once and then hung itself up to leave the incoming 
call still ringing. Here's the logs

*CLI> [May 24 12:28:16] NOTICE[3995]: chan_dahdi.c:8164 
handle_init_event: Alarm cleared on channel 1
     -- Starting simple switch on 'DAHDI/1-1'
[May 24 12:28:16] NOTICE[4026]: chan_dahdi.c:7505 ss_thread: Got event 
18 (Ring Begin)...
[May 24 12:28:17] NOTICE[4026]: chan_dahdi.c:7505 ss_thread: Got event 2 
(Ring/Answered)...
[May 24 12:28:17] NOTICE[4026]: chan_dahdi.c:7505 ss_thread: Got event 
17 (Polarity Reversal)...
     -- Executing [s at from-pstn:1] Dial("DAHDI/1-1", "SIP/deskphone,20") 
in new stack
   == Using SIP RTP CoS mark 5
     -- Called deskphone
     -- SIP/deskphone-008c86f8 is ringing
[May 24 12:28:18] WARNING[4026]: chan_dahdi.c:4664 handle_alarms: 
Detected alarm on channel 1: Red Alarm
   == Spawn extension (from-pstn, s, 1) exited non-zero on 'DAHDI/1-1'
     -- Hungup 'DAHDI/1-1'
[May 24 12:28:23] NOTICE[3995]: chan_dahdi.c:8164 handle_init_event: 
Alarm cleared on channel 1
[May 24 12:28:24] WARNING[3995]: chan_dahdi.c:4664 handle_alarms: 
Detected alarm on channel 1: Red Alarm

*CLI>

The next time I dialled in, asterisk never noticed the incoming call. 
And then the time after, it behaved like my first symptom on the 
analogue phone, i.e. it rang the deskphone no problems but when I picked 
it up, the incoming call kept ringing.


Right, sorry for such a massive post, but I couldn't spot any patterns 
so thought I'd better be extremely verbose. Hopefully someone can help 
me narrow down my search and then we can get to gory details.

I think we can assume I've got a cable that works now (please correct me 
if I'm wrong anyone) so hopefully the stuff below is irrelevant now.


Thanks in advance to anyone who makes it to here :-)  and I hope someone 
can point me in the right direction.


Cheers,

Dunc



> 
> 
>> it seems that a 2-pin cable from the wall socket to the card is
>> required. Now, I was warned about cables and did my best to get the one
>> that sounded right, however mine definitely has 4 pins.
>>
>>
>> So my 2 questions are
>>
>> 1) What are the pinouts for the 2 pin cable, and I'll make my own for
>> now (For bonus points, unless the wires are crossed over, what possible
>> difference could it make when the TDM card only has 2 pins anyway?)
>>
>> 2) Is this the correct cable for NTL too?
> 
> 
> This line that you're using, can you use a regular analog phone to
> make call through it?
> 
> I don't have any server running in UK, only USA and Latin America...
> But I'll assume the cabling is the same... If so you should have a
> connector like this:
> 
> http://img.zdnet.com/techDirectory/RJ11.GIF
> 
> Test your line with a regular phone. Make sure it works fine. Also
> make sure not to connect the PSTN line on the FXS card, you can 'burn'
> your FXS doing that.
> 
> 
>> I think I should find out definite answers to the above before I worry
>> any further about the card and Asterisk :-)
> 
> I agree... =)
> 
> 
>> Thanks for getting back to me, hope you can help.
> 
> No prob, I hope too!
> 
> 
> Cheers!
> 
> 




More information about the asterisk-users mailing list