[asterisk-users] clone X100p+dahdi dial out works only after receiving call

Michael Higgins linux at evolone.org
Sat Feb 28 13:24:53 CST 2009


So, tweaking configs, rebuilding this and that... restarting, twiddling, it works (yeah!), but fails on re-boot to work at all. Consistently, though.

I believe it comes down to this: I can call out only *after* I've received a call.

So, cold boot. Then:

  modprobe dahdi
  modprobe wctc4xxp
  modprobe wcfxo

dahdi: Telephony Interface Registered on major 196
dahdi: Version: 2.1.0.3
dahdi_transcode: Loaded.
ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
Found a Wildcard FXO: Wildcard X100P

 cat /proc/dahdi/1 
Span 1: WCFXO/0 "Wildcard X100P Board 1" (MASTER) 

	   1 WCFXO/0/0 

Looks good so far. I think. Don't really know what the strings represent entirely.

 # /etc/init.d/dahdi start
 * Starting DAHDI ...                                                    


Start asterisk:
sudo -u asterisk asterisk -cvvv

*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC4   Fra Codi Options  LBO
Wildcard X100P Board 1                   OK      0      0      0      CAS Unk  YEL      0 db (CSU)/0-133 feet (DSX-1)

*CLI> dahdi show channel 1
Channel: 1
File Descriptor: 10
Span: 1
Extension: 
Dialing: no
Context: from-pstn
Caller ID: 
Calling TON: 0
Caller ID name: 
Mailbox: none
Destroy: 0
InAlarm: 0
Signalling Type: FXS Kewlstart
Radio: 0
Owner: <None>
Real: <None>
Callwait: <None>
Threeway: <None>
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: no
Busy Detection: no
TDD: no
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
DND: no
Echo Cancellation:
        1 taps
        (unless TDM bridged) currently OFF
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Hookstate (FXS only): Onhook

So, all is good. First test is to see if I can originate a call from CLI:

*CLI> originate DAHDI/1/5034735882 extension linphone
*CLI> [Feb 28 10:59:48] NOTICE[2401]: channel.c:3316 __ast_request_and_dial: Unable to request channel DAHDI/1/5034735882

So, by chance, instead of ripping my hair for a bit, just to be sure it's still working *at all*, I call myself:

starting simple switch on 'DAHDI/1-1'
[Feb 28 11:00:49] NOTICE[2458]: chan_dahdi.c:7125 ss_thread: Got event 18 (Ring Begin)...
  == Starting DAHDI/1-1 at from-pstn,s,1 failed so falling back to exten 's'
  == Starting DAHDI/1-1 at from-pstn,s,1 still failed so falling back to context 'default'
    -- Executing [s at default:1] Verbose("DAHDI/1-1", "1|dumb answering machine") in new stack
1|dumb answering machine
    -- Executing [s at default:2] Answer("DAHDI/1-1", "") in new stack
    -- Executing [s at default:3] Playback("DAHDI/1-1", "transfer,skip") in new stack
    -- <DAHDI/1-1> Playing 'transfer.gsm' (language 'en')
    -- Executing [s at default:4] Dial("DAHDI/1-1", "SIP/mykhyggz at 192.168.0.100,20,rt") in new stack
  == Using SIP RTP CoS mark 5
    -- Called mykhyggz at 192.168.0.100
    -- SIP/192.168.0.100-0827a188 is ringing
    -- SIP/192.168.0.100-0827a188 answered DAHDI/1-1
  == Spawn extension (default, s, 4) exited non-zero on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'

And I get my call... with success.

Now, I try to call out, originate at CLI again:

*CLI> originate DAHDI/1/5034735882 extension linphone
  == Starting DAHDI/1-1 at default,linphone,1 failed so falling back to exten 's'
    -- Executing [s at default:1] Verbose("DAHDI/1-1", "1|dumb answering machine") in new stack
1|dumb answering machine
    -- Executing [s at default:2] Answer("DAHDI/1-1", "") in new stack
    -- Executing [s at default:3] Playback("DAHDI/1-1", "transfer,skip") in new stack
    -- <DAHDI/1-1> Playing 'transfer.gsm' (language 'en')
*CLI>     -- Executing [s at default:4] Dial("DAHDI/1-1", "SIP/mykhyggz at 192.168.0.100,20,rt") in new stack
  == Using SIP RTP CoS mark 5
    -- Called mykhyggz at 192.168.0.100
    -- SIP/192.168.0.100-0827a700 is ringing
    -- SIP/192.168.0.100-0827a700 answered DAHDI/1-1
  == Spawn extension (default, s, 4) exited non-zero on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'


So, obviously it works... sort of. I'm assuming that, since I don't really *know* what I'm doing, someone else who *does* can probably point out the missing or incorrect part of my configuration.

(Meanwhile, I'll see about IRQ status... seems a possible culprit, now that I think about it more.)

Anyway, here's the bits of:
./chan_dahdi.conf
./dahdi-channels.conf
./extensions.conf

[trunkgroups]
[channels]
#include /etc/asterisk/dahdi-channels.conf
signalling=fxs_ks
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=no
echocancelwhenbridged=no
group=1
callgroup=1
pickupgroup=1
immediate=yes
ringtimeout=8000
signalling=fxs_ks
callerid=asreceived

group=0
context=from-pstn
channel => 1

[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp				
IAXINFO=guest					
TRUNK=DAHDI/g1					
TRUNKMSD=0

[default]
exten => 1205,1,Wait(2)
exten => 1205,2,Record(/tmp/asterisk-recording:gsm)
exten => 1205,3,Hangup
exten => s,1,Verbose(1|dumb answering machine) 
exten => s,n,Answer() 
exten => s,n,Playback(transfer,skip)		
exten => s,n,Dial(SIP/mykhyggz at 192.168.0.100,20,rt) 
exten => s,n,BackGround(asterisk-recording)
exten => s,n,Voicemail(6666 at default) 
exten => s,n,Playback(tt-weasels) 
exten => s,n,Hangup() 
exten => 4567,1,Dial(SIP/mykhyggz at 192.168.0.100,20,rt)
exten => _X.,1,Dial(DAHDI/1/${EXTEN})
exten => 3456,1,Dial(SIP/linphone,20,rt)
exten => 6666,1,Voicemail(6666 at default) 
exten => 6666,n,Hangup() 

Also, 

*CLI> dahdi restart
 Destroying channels and reloading DAHDI configuration.
       > Initial softhangup of all DAHDI channels complete.
       > Final softhangup of all DAHDI channels complete.
  == Unregistered channel 1
  == Parsing '/etc/asterisk/chan_dahdi.conf':   == Found
  == Parsing '/etc/asterisk/dahdi-channels.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
    -- Reconfigured channel 1, FXS Kewlstart signalling

but, after a cold boot and restart:

 dahdi restart
 Destroying channels and reloading DAHDI configuration.
  == Unregistered channel -2
  == Unregistered channel 1
  == Parsing '/etc/asterisk/chan_dahdi.conf':   == Found
  == Parsing '/etc/asterisk/dahdi-channels.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
    -- Reconfigured channel 1, FXS Kewlstart signalling
*CLI> 


What the heck is channel -2, I wonder?

. . .

Finally... do I *really* need to cold boot in order to re-init this card successfully? Or is there some known sure way to get it initialized truly 'from scratch'? It seems *so* wrong to boot unless I've rebuilt the kernel.

Thanks for any help or suggestions to fix this problem.

Cheers,

-- 
 |\  /|        |   |          ~ ~  
 | \/ |        |---|          `|` ?
 |    |ichael  |   |iggins    \^ /
 michael.higgins[at]evolone[dot]org



More information about the asterisk-users mailing list