Asterisk CAPI Problem

pbx-user

Neuer User
Mitglied seit
25 Okt 2005
Beiträge
6
Punkte für Reaktionen
0
Punkte
0
Hallo zusammen,

ich habe ein Problem mit * und CAPI (Fritz Card 2.0 PCI). * zeigt einen ankommenden Anruf zwar an, reagiert aber nicht weiter darauf. Ich habe das trotz tagelangem Probieren nicht hinbekommen. Ich bin also auf die Experten hier im Forum angewiesen :roll:

Meine capi.conf sieht so aus:

Code:
;
; CAPI config
;
;

; general section

[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
;ulaw=yes        ;set this, if you live in u-law world instead of a-law

; interface sections ...

[ISDN1]          ;this example interface gets name 'ISDN1' and may be any
                 ;name not starting with 'g' or 'contr'.
;ntmode=yes      ;if isdn card operates in nt mode, set this to yes
isdnmode=msn     ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
                 ;when using NT-mode, ptp should be set in any case
incomingmsn=*    ;allow incoming calls to this list of MSNs/DIDs, * == any
;controller=0    ;ISDN4BSD default
;controller=7    ;ISDN4BSD USB default
controller=1     ;capi controller number to use
group=1          ;dialout group
;prefix=0        ;set a prefix to calling number on incoming calls
softdtmf=on      ;enable/disable software dtmf detection, recommended for AVM cards
relaxdtmf=on     ;in addition to softdtmf, you can use relaxed dtmf detection
accountcode=     ;Asterisk accountcode to use in CDRs
context=remote  ;context for incoming calls
holdtype=hold    ;when Asterisk puts the call on hold, ISDN HOLD will be used. If
                 ;set to 'local' (default value), no hold is done and Asterisk may
                 ;play MOH.
;immediate=yes   ;immediate start of pbx with extension 's' if no digits were
                 ;received on incoming call (no destination number yet)
;echosquelch=1   ;_VERY_PRIMITIVE_ echo suppression
;echocancel=yes  ;EICON DIVA SERVER (CAPI) echo cancelation
                 ;(possible values: 'no', 'yes', 'force', 'g164', 'g165')
echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers)
;echotail=64     ;echo cancel tail setting
;bridge=yes      ;native bridging (CAPI line interconnect) if available
;callgroup=1     ;Asterisk call group
;deflect=1234567 ;deflect incoming calls to 1234567 if all B channels are busy
devices=2        ;number of concurrent calls on this controller
                 ;(2 makes sense for single BRI, 30 for PRI)

modules.conf:

Code:
; Asterisk configuration file
;
; Module Loader configuration file
;

[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been initialized
; (just after the logger has been initialized) can be loaded using 'preload'. This
; will frequently be needed if you wish to map all module configuration files into
; Realtime storage, since the Realtime driver will need to be loaded before the
; modules using those configuration files are initialized.
;
; An example of loading ODBC support would be:
;preload => res_odbc.so
;preload => res_config_odbc.so
;
; If you want, load the GTK console right away.
; Don't load the KDE console since
; it's not as sophisticated right now.
;
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
;
; Intercom application is obsoleted by
; chan_oss.  Don't load it.
;
noload => app_intercom.so
;
; Explicitly load the chan_modem.so early on to be sure
; it loads before any of the chan_modem_* 's afte rit
;
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
load => res_musiconhold.so
;
; Load either OSS or ALSA, not both
; By default, load OSS only (automatically) and do not load ALSA
;
noload => chan_alsa.so
;noload => chan_oss.so
;
; Module names listed in "global" section will have symbols globally
; exported to modules loaded after them.
;
load => chan_capi.so
load => res_features.so
[global]
chan_modem.so=yes
chan_capi.so=yes

Wenn ich * mit asterisk -vvvvvvvvvgcf starte und capi debug einschalte, kommt bei einem Anruf auf der MSN 22 folgende Ausgabe. Der Anrufende hört aber nur ein Freizeichen, der * nimmt nicht ab:


Code:
*CLI> CONNECT_IND ID=002 #0x0aeb LEN=0037
  Controller/PLCI/NCCI            = 0x101
  CIPValue                        = 0x10
  CalledPartyNumber               = <80>22
  CallingPartyNumber              = <01 80 2a 2a>10
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <80 90 a3>
  LLC                             = default
  HLC                             = <91 81>
  AdditionalInfo                  = default

    -- CONNECT_IND (PLCI=0x101,DID=22,CID=**10,CIP=0x10,CONTROLLER=0x1)
       > ISDN1: msn='*' DNID='22' MSN
  == ISDN1: Incoming call '**10' -> '22'
INFO_IND ID=002 #0x0aec LEN=0018
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x70
  InfoElement                     = <80>22

INFO_RESP ID=002 #0x0aec LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CALLED PARTY NUMBER
       > ISDN1: INFO_IND DID digits not used in this state.
INFO_IND ID=002 #0x0aed LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP ID=002 #0x0aed LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CHANNEL IDENTIFICATION 89
INFO_IND ID=002 #0x0af0 LEN=0018
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x70
  InfoElement                     = <80>22

INFO_RESP ID=002 #0x0af0 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CALLED PARTY NUMBER
       > ISDN1: INFO_IND DID digits not used in this state.
INFO_IND ID=002 #0x0af1 LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP ID=002 #0x0af1 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CHANNEL IDENTIFICATION 89
DISCONNECT_IND ID=002 #0x0af2 LEN=0014
  Controller/PLCI/NCCI            = 0x101
  Reason                          = 0x0

DISCONNECT_RESP ID=002 #0x0af2 LEN=0012
  Controller/PLCI/NCCI            = 0x101

  == ISDN1: CAPI Hangingup
  == ISDN1: Interface cleanup PLCI=0x101

Ist die modem.conf eigentlich bei dieser Konfiguration relevant? Ich poste Sie zur Sicherheit auch mal:

Code:
;
; isdn4linux
;
; Configuration file
;
[interfaces]
;
; By default, incoming calls should come in on the "remote" context
;
context=remote
;
; Modem Drivers to load
;
;driver=aopen   ; modem by AOpen
driver=i4l      ; isdn4linux - an alternative to i4l is to use chan_capi
;driver=chan_capi
;
; Default language
;
language=de
;
; We can optionally override the auto detection.  This is necessary
; particularly if asterisk does not know about our kind of modem.
;
type=autodetect
;type=aopen
;
; We can strip a given number of digits on outgoing dialing, so, for example
; you can have it dial "8871042" when given "98871042".
;
;stripmsd=0
;
; Type of dialing
;
dialtype=tone
;dialtype=pulse
;
; Mode selection.  "Immediate" means that as soon as you dial, you're connected
; and the line is considered up.  "Ring" means we wait until the ring cadence
; occurs at least once.  "Answer" means we wait until the other end picks up.
;
;mode=answer
;mode=ring
mode=immediate
;
; List all devices we can use.
;
;device => /dev/ttyS3
;
; ISDN example (using i4l)
;
msn=22
device => /dev/ttyI0
device => /dev/ttyI1

;===============
; More complex ISDN example
;
; A single device which listens to 3 MSNs
; the wildcard '*' can be used when all MSN's should be accepted.
; (The incoming number can be used to go directly into the extension
; with the matching number. I.e. if MSN 33 is called, (context,33)
; will tried first, than (context,s) and finally (default,s).
;
;msn=50780020
;incomingmsn=50780020,50780021,50780022
;device => /dev/ttyI2
;
; If set, only these numbers are allowed to be set as A number
; when making an outbound call. callerid is used to set A
; number.
;outgoingmsn=50780023,50780024
;

; Set DTMF-detection/generation mode to:
;  asterisk: Let Asterisk do inband detection (default)
;  i4l:      Use the inband detection made by ISDN4Linux
;  none:     Don't detect inband DTMF
;  both:     Transmit using both in-band and out of band (generation only)
;
; You may specify either one mode, or the detection/generation mode
; individually separated by a '/'.
;
;dtmfmode=i4l
;dtmfmode=asterisk                      ; Detect using Asterisk
;dtmfmode=both          ; Detect using Asterisk, generate w/ both
; two other devices, which are in group '1' and are used when an
; outgoing dial used: exten => s,1,Dial,Modem/g1:1234|60|r
; (we do not need more outgoing devices, since ISDN2 has only 2 channels.)
; Lines can be in more than one group (0-63); comma separated list.
;
group=1         ; group=1,2,3,9-12
;msn=50780023
;device => /dev/ttyI3
;device => /dev/ttyI4

Vielen Dank für eure Hilfe!

Viele Grüße

Sebastian
 
Deine Anlage scheint kein SENDING-COMPLETE/PROGESS zu schicken. Versuchs mal mit dem Aktivieren von 'immediate=yes' in der capi.conf.
(hier brauchst du eventuell eine neue chan_capi Version aus dem CVS)

Armin
 
Hi Armin,

vielen Dank für deine Antwort.

ich habe 'immediate=yes' eingestellt, das Verhalten ist allerdings gleich geblieben. Die Version von chan_capi ist die aktuelle 0.6.

Hast du noch eine Idee? Ich weiß wirklich nicht weiter.
 
Guten Morgen,

noch ein paar Infos:

der * hängt am S0-Bus einer T Concept XI321 Anlage. Die chan_capi ist nicht aus dem CVS, sondern ich habe es von SF heruntergeladen. Ich hoffe das hilft um mir bei diesem Problem zu helfen.

Danke nochmals.

Viele Grüße

Sebastian
 
Habe irgendwie das gleiche Problem

ich kann mit asterisk über capi raustelefonieren, bei einem ankommenden ruf aber erscheint in asterisk nur folgendes :

*CLI> == ISDN1: Incoming call '61' -> '942'

mehr passiert dann nicht.
 
Re: Habe irgendwie das gleiche Problem

Besserso schrieb:
ich kann mit asterisk über capi raustelefonieren, bei einem ankommenden ruf aber erscheint in asterisk nur folgendes :

*CLI> == ISDN1: Incoming call '61' -> '942'

mehr passiert dann nicht.

Tja, ist vielleicht ein Fehler in der Konfiguration.
 
bin schon alles 3x durch... finde aber keinen fehler...
capi.conf :
Code:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8


[ISDN1]

isdnmode=msn
incomingmsn=*
controller=1
group=1
;prefix=0
softdtmf=on
relaxdtmf=on
accountcode=
context=from-isdn
holdtype=hold
immediate=yes
devices=2

extension.conf
Code:
#include ivr.conf
#include intern.conf

[general]
static=yes
writeprotect=yes

[globals]
wt = 10
rufgruppe1=SIP/88&Sip/89

[default]
include => from-isdn
include => to-isdn

[from-isdn]

exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Set(LANGUAGE()=de)
exten => s,4,goto(ivr,s,1)

capi debug :
Code:
*CLI> CONNECT_IND ID=001 #0x0876 LEN=0030
  Controller/PLCI/NCCI            = 0x101
  CIPValue                        = 0x1
  CalledPartyNumber               = default
  CallingPartyNumber              = <01 81>61
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <80 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo                  = default

    -- CONNECT_IND (PLCI=0x101,DID=,CID=61,CIP=0x1,CONTROLLER=0x1)
  == ISDN1: Incoming call '61' -> ''
INFO_IND ID=001 #0x0877 LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP ID=001 #0x0877 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CHANNEL IDENTIFICATION 89
INFO_IND ID=001 #0x0878 LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP ID=001 #0x0878 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CHANNEL IDENTIFICATION 89
DISCONNECT_IND ID=001 #0x0879 LEN=0014
  Controller/PLCI/NCCI            = 0x101
  Reason                          = 0x0

DISCONNECT_RESP ID=001 #0x0879 LEN=0012
  Controller/PLCI/NCCI            = 0x101

  == ISDN1: CAPI Hangingup
  == ISDN1: Interface cleanup PLCI=0x101

übersehe ich da irgendwie den fehler ?
 
Das immediate=yes funktioniert nur in der neuen CVS version. Mit dem release 0.6 hat immediate=yes bei MSN keinen Einfluss.

Armin
 
aber auch wenn ich das direkt mit einer MSN mache komme ich zum gleichen resultat.

edit :
mit der CVS version funtktionierts.... wunderbar !
 
Wenn Du was mit einer MSN machst?
Nochmal: Wenn die Anlage kein SENDING_COMPLETE sendet, muss immediate=yes verwendet werden, dies geht aber nur mit chan_capi-cm aus dem CVS (was bald zu 0.6.1 wird). Die aktuelle 0.6 kann das noch nicht.

Armin
 
Hi Armin,

ich habe nun die aktuelle Version aus dem CVS installiert. Es funktioniert auch, aber nur fast:

Ich bekomme jetzt folgenden Output:

*CLI> == ISDN1: Incoming call '**10' -> '22'
Oct 27 15:33:22 ERROR[2704]: chan_capi.c:2098 start_pbx_on_match: ISDN1: did not find exten for '22', ignoring call.
== ISDN1: CAPI Hangingup

Was findet er denn da nicht die in capi.conf eingetragene Extension (context=demo) ist doch vorhanden.

Danke für deinen tollen Support hier!

Viele Grüße

Sebastian
 
Im angebenen context (hier wohl demo), wird keine extension 22 gefunden.
Wie sieht denn der context 'demo' in der extensions.conf aus?

Armin
 
Für mich sieht das ganze wie folgt aus:
Deine capi.conf sendet den Call an die Extension '22' im Context 'from-isdn', die allerdings in Deiner Config nicht zu finden ist. Und die Extension 's' scheint hier - aus welchen Gründen auch immer - nicht zu greifen.
Da ich das in der täglichen Praxis schon des öfteren gesehen habe, habe ich mir zur Angewohnheit gemacht, die Extension 's' durch etwas zu ersetzen, dass alle ankommenden MSNs matched. Also sowas wie beispielsweise '_X.', was für alle Ziffernfolgen Gültigkeit hat, die mit einer Ziffer von 0 bis 9 anfangen und mindestens zwei Ziffern lang sind.
Ich würde den Context daher wie folgt aufbauen:

Code:
[from-isdn]
exten => _X.,1,Answer()
exten => _X.,2,Wait(1)
exten => _X.,3,Set(LANGUAGE()=de)
exten => _X.,4,Goto(ivr,s,1)

Das sollte übrigens auch ohne 'immediate=yes' funktionieren.

Wenn Du auf Deiner Anlage Durchwahlen aus einem festen Pool verwendest, beispielsweise die Nummern 20 bis 29, kannst Du das Ganze auch mit '_2X' anstatt '_X.' lösen.
 
Hast Du mal auf das Datum des letzes Postings geschaut?

jo
 
Ja, aber zu spät. ;-)
 
Kostenlos!

Statistik des Forums

Themen
249,052
Beiträge
2,309,534
Mitglieder
378,850
Neuestes Mitglied
IchBinEsDoch