[Asterisk-Users] chan_capi + mISDN + Fritz PTP
Ralf Schlatterbeck
ralf at zoo.priv.at
Thu Jun 2 00:09:52 MST 2005
I'm now up&running with
- mISDN with avmfritz driver for Fritz PCI card
- chan_capi from debian recompiled with a patch (see below)
- EuroISDN with Point-to-Point (ptp) mode (Austria)
- With Asterisk 1.0.7-BRIstuffed-0.2.0-RC7k from debian sarge
But am having some problems:
1) I needed to patch chan_capi.c from debian sarge (see below) to give
the new channel to asterisk in state AST_STATE_RING instead of
AST_STATE_DOWN. I just did the same for PTP as is done for PTM (point
to multipoint) in the code and it works (sort of) for me. If I leave
it in AST_STATE_DOWN, the call is never seen by asterisk and the
caller gets a failure indication.
Is this patch really necessary or am I missing something obvious in
my dialplan??
2) Callers *always* get a ringing indication -- even if the line is busy
and Asterisk thinks (and logs to call data record) a busy call:
From cdr-csv;
"","0650XXXXXXX","12","default","0650XXXXXXX","CAPI[contr1/12]/3","Zap/3-busy-145280440","Busy","","2005-06-01 21:53:43",,"2005-06-01 21:53:53",10,0,"BUSY","DOCUMENTATION"
From messages:
Jun 1 21:53:43 DEBUG[2694]: Driver for channel 'CAPI[contr1/12]/3' does not support indication 5, emulating it
Seems like asterisk tried to set the correct indication (busy) and
failed?? The result is that the caller gets a ringing indication
instead of busy.
Note, I even set up an extension that should *always* indicate busy
to the caller (see extensions.conf extension 13 below) -- I know that
Playtones needs an "accept" first but I don't want the caller to be
charged for my busy tone :-) But the Busy application should do the
right thing??
Maybe this has something to do with my patch in 1) ??
Or is something wrong with my capi.conf (see below)?
3) I'm getting the DID-Information from ISDN as an MSN-Number, in the
cdr-log above I dialled my own number with extension -12. In
capi.conf I have:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
[interfaces]
isdnmode=ptp
msn=0,11,16,23
incomingmsn=*
controller=1
softdtmf=1
accountcode=
context=default
mode=immediate
devices=2
Note that I need to specify all the extensions I use in the msn=
line, otherwise I cannot dial out with these extensions.
4) I'm not always getting DID-Information, even if the caller dialled an
extension. I can't confirm or reproduce this yet, the net-effect is
that these calls always end up in the default (s) extension.
Please don't tell me that PTP will not work with the Fritz card -- this
is only true for the closed-source Fritz driver.
Dialplan for incoming calls:
[extern]
exten => 0,1,Noop()
exten => 0,2,Noop(0)
exten => 0,3,Dial(${UNTEN})
exten => 0,4,Busy()
exten => 0,104,Busy()
exten => 11,1,Noop()
exten => 11,2,Noop(11)
exten => 11,3,Dial(${UNTEN})
exten => 11,4,Busy()
exten => 11,104,Busy()
exten => 13,1,Noop()
exten => 13,2,Noop(13)
exten => 13,3,Playtones(busy)
exten => 13,4,Busy()
exten => 13,104,Busy()
exten => s,1,Noop()
exten => s,2,Noop(s)
exten => s,3,Dial(${UNTEN})
exten => s,4,Busy()
exten => s,104,Busy()
[default]
include => extern
Patch for chan_capi.c:
--- asterisk-chan-capi-0.3.5/chan_capi.c 2005-05-17 13:29:28.000000000 +0200
+++ asterisk-chan-capi-0.3.5-modified/chan_capi.c 2005-06-02 08:38:32.000000000 +0200
@@ -2020,7 +2020,8 @@
ast_pthread_mutex_init(&(p->lock),NULL);
i->mypipe = p;
if (i->isdnmode) {
- p->c = capi_new(i,AST_STATE_DOWN);
+ p->c = capi_new(i,AST_STATE_RING);
+ //p->c = capi_new(i,AST_STATE_DOWN);
i->state = CAPI_STATE_DID;
} else {
p->c = capi_new(i,AST_STATE_RING);
--
Ralf Schlatterbeck
email: ralf at zoo.priv.at FAX: +43/2243/26465/23
More information about the asterisk-users
mailing list