[asterisk-users] Channels configuration with DAHDI
Daniel Bareiro
daniel-listas at gmx.net
Sun May 24 14:53:41 CDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Tzafrir, Danny.
El jueves 21 de mayo del 2009 a las 06:55:14 -0300,
Tzafrir Cohen escribió:
>> > Mmmm... but I believe that it had done already in that order. In fact, I
>> > reviewed the existence of the module and it was in the directory. For that
>> > reasonI said that perhaps it was bug by the following thing:
>> >
>> > [May 20 20:49:07] WARNING[23599]: loader.c:359 load_dynamic_module:
>> > Error loading module 'chan_dadhi.so':
>> > /usr/lib/asterisk/modules/chan_dadhi.so: cannot open shared object file:
>> > ^^^^^^^^^^^^^
>> > No such file or directory
>> > [May 20 20:49:07] WARNING[23599]: loader.c:653 load_resource: Module
>> > 'chan_dadhi.so' could not be loaded.
>> >
>> > Apparently Asterisk is looking for the module using an incorrect name.
>> > Whatever happens, I compile Asterisk again but I got the same error
>> > message.
>> Now that I see the error with a little more of thoroughness, it seems
>> that when doing a copy/paste in the CLI, the name of the module was
>> incorrect and for that reason I got that error message :-). Now get a
>> different error:
>>
>> alderamin*CLI> module unload chan_dahdi.so
>> alderamin*CLI> module load chan_dahdi.so
>> [May 21 06:15:34] WARNING[25314]: chan_dahdi.c:1233 dahdi_open: Unable
>> to specify channel 2: No such device or address
>> [May 21 06:15:34] ERROR[25314]: chan_dahdi.c:7662 mkintf: Unable to open
>> channel 2: No such device or address
>> here = 0, tmp->channel = 2, channel = 2
>> [May 21 06:15:34] ERROR[25314]: chan_dahdi.c:11270 build_channels:
>> Unable to register channel '2'
>
> In your configuration channel 2 is the first one, so this could be just
> about anything related to accessing dahdi / zaptel .
>
> Do you use dahdi or zaptel?
>
> What is the output of:
>
> cat /proc/zaptel/*
>
>
> cat /proc/dahdi/*
# cat /proc/dahdi/*
Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
1 WCTDM/4/0 RED
2 WCTDM/4/1
3 WCTDM/4/2
4 WCTDM/4/3
After to run dahdi_cfg -vvv:
# cat /proc/dahdi/*
Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
1 WCTDM/4/0 FXSKS RED
2 WCTDM/4/1 FXOKS
3 WCTDM/4/2
4 WCTDM/4/3
Two doubts related to this:
* what means the word 'RED' associated to zero channel? I observed when
I connect the telephone line here, the word 'RED' disappears.
* I have the impression that the execution of this command is necessary
for the correct detection of the modules. This execution is made
automatically during bootstrapping of the operating system?
Then I test the following thing in the CLI:
alderamin*CLI> dahdi show channel
No such command 'dahdi show channel' (type 'help dahdi show' for other possible commands)
alderamin*CLI> module load chan_dahdi.so
== Parsing '/etc/asterisk/chan_dahdi.conf': Found
-- Registered channel 2, FXO Kewlstart signalling
[May 24 15:04:54] WARNING[5306]: chan_dahdi.c:4090 handle_alarms:
Detected alarm on channel 1: Red Alarm
-- Registered channel 1, FXS Kewlstart signalling
-- Automatically generated pseudo channel
== Parsing '/etc/asterisk/users.conf': Found
== Registered channel type 'DAHDI' (DAHDI Telephony Driver)
== Manager registered action DAHDITransfer
== Manager registered action ZapTransfer
== Manager registered action DAHDIHangup
== Manager registered action ZapHangup
== Manager registered action DAHDIDialOffHook
== Manager registered action ZapDialOffHook
== Manager registered action DAHDIDNDon
== Manager registered action ZapDNDon
== Manager registered action DAHDIDNDoff
== Manager registered action ZapDNDoff
== Manager registered action DAHDIShowChannels
== Manager registered action ZapShowChannels
== Manager registered action DAHDIRestart
== Manager registered action ZapRestart
Loaded chan_dahdi.so => (DAHDI Telephony)
alderamin*CLI>
alderamin*CLI>
alderamin*CLI>
alderamin*CLI> dahdi show channels
Chan Extension Context Language MOH Interpret
pseudo default default
1 incomming es default
2 phones es default
Good, now it seems that it would be working... but is there any form to
doing that this module is also automatically load when bootstrappiong of
the operating system? I was looking for in the configuration files of
example that are in /etc/asterisk but I did not find some reference.
After this, I was doing some tests of connection calling from an SIP
extension to the PSTN and this worked perfectly, but didn't get yet to
connect an extension SIP with a conventional analog telephone to each
other.
If you can give me some guide line (unnecessary configurations or
something that are lacking and could be useful) to know what to correct
in this aspect, it would be very useful. From an analog telephone I can
to call to a SIP extension, but from an SIP extension I cannot to call
to the analog telephone.
These are the configuration files that I am using:
- ----------------------------------------------------------------------
/etc/asterisk/sip.conf:
[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
mohinterpret=default
language=es
[authentication]
; DGB - 20090517
[200]
username=200
type=friend
secret=200
callerid=Daniel<200>
host=dynamic
nat=no
context=internal
mailbox=200 at voicemail
callgroup=1
pickupgroup=1
[201]
username=201
type=friend
secret=201
callerid=Hector<201>
host=dynamic
nat=no
context=internal
mailbox=201 at voicemail
callgroup=1
pickupgroup=1
- ----------------------------------------------------------------------
/etc/asterisk/sip.extensions.conf:
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp
IAXINFO=guest
username/password
TRUNK=Zap/G2
TRUNKMSD=1
[default]
; DGB - 20090517
[internal]
exten => _xxx,1,Dial(SIP/${EXTEN},15,tT)
exten => _xxx,2,VoiceMail(${EXTEN}@voicemail)
exten => _xxx,3,Playback(vm-goodbye)
exten => _xxx,4,Hangup
enten => 1010,1,Dial(DAHDI/2,15,Tr)
exten => 1010,n,Hangup
exten => *98,1,Answer
exten => *98,2,Wait(1)
exten => *98,3,VoiceMailMain(${CALLERID}@voicemail)
exten => *98,4,Hangup
exten => *600,1,Answer
exten => *600,2,Playback(demo-echotest)
exten => *600,3,Echo
exten => *600,4,Playback(demo-echodone)
exten => *600,5,Hangup
exten => _9.,1,Dial(DAHDI/1/${EXTEN:1})
exten => _9.,2,Hangup
include => phones
[phones]
include => internal
[incoming]
exten => s,1,Answer
exten => s,2,Playback(demo-echotest)
exten => s,3,Echo
exten => s,4,Playback(demo-echodone)
exten => s,5,Hangup
- ----------------------------------------------------------------------
/etc/asterisk/chan_dahdi.conf:
[trunkgroups]
[channels]
context=default
switchtype=national
signalling=fxo_ls
rxwink=300
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
; DGB - 20090518
; hardware channels
language=es
defaultzone=es
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echotraining=yes
inmediate=no
context=phones
signalling=fxo_ks
channel => 2 ; Telephone attached to port 2
context=incomming
signalling=fxs_ks ; Use FXS signalling for an FXS channel
channel => 1 ; PSTN attached to port 1
- ----------------------------------------------------------------------
Thanks for your reply.
Regards,
Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkoZpgAACgkQZpa/GxTmHTdhGACdGSqDAI5aaUPJ7nZ1fsEcK3FQ
3m8An1RQ/YrYg8YB/96RHgmS//xb+qVL
=S8Bh
-----END PGP SIGNATURE-----
More information about the asterisk-users
mailing list