chan_capi.c: Unable to listen on contr1

joerg.schi

Neuer User
Mitglied seit
24 Mrz 2007
Beiträge
5
Punkte für Reaktionen
0
Punkte
1
Hallo,

ich kämpfe seit Tagen damit, dass sich chan_capi mit einer Error_Meldung meldet.

ERROR[8691] chan_capi.c: Unable to listen on contr1 (error=0x100f)

Das Kuriose: manchmal (aber sehr selten) startet Asterisk mit chan_capi und dann kann ich auch über ISDN rein und raus telefonieren. Dabei wurde an den config's nicht geändert und es hat scheinbar auch nichts mit einem Reboot zu tun. Die Ausgabev von capiinfo hab ich gecheckt, die gleichen 1:1 den ansonsten im Forum geposteten, auch pon funktioniert und aktiviert ppp0 !

Zwischendurch kam ich mal auf die Idee, die mISDn Treiber zu blacklisten --> es hat aber keine Änderung gebracht.

Hat irgendjemand einen Tipp für mich, ich hab einfach keine Idee mehr.

Mein System: Kubuntu 6.06, Astreisk 1.4.2 (hab 1.4.0 und 1.4.1 davor auch probiert), chan_capi_head (auch hier begann ich mit 1.0.0), AVM Fitz PCI Card.

lsmod | grep capi -->

Code:
root@server-main:~# lsmod |grep capi
capi                   18496  8
capifs                  6024  2 capi
kernelcapi             48288  2 fcpci,capi
root@server-main:~#

Die etwas ausführlicher Info beim Starten von Asterisk (chan_capi Block) -->

Code:
  == Parsing '/etc/asterisk/capi.conf': Found
    -- Registering at CAPI (blocksize=160 maxlogicalchannels)
  == This box has 1 capi controller(s).
    -- CAPI/contr1 supports DTMF
    -- CAPI/contr1 supports supplementary services
       > supplementary services : 0x000003ff
       >  HOLD/RETRIEVE TERMINAL-PORTABILITY ECT 3PTY CF CD MCID CCBS MWI CCNR
    -- CAPI/contr1 private options=0x01000001
    -- capi D ISDN1#00 (449520:capi-in) contr=1 devs=2 EC=0,opt=4,tail=0
    -- capi B ISDN1#01 (449520:capi-in) contr=1 devs=2 EC=0,opt=4,tail=0
    -- capi B ISDN1#02 (449520:capi-in) contr=1 devs=2 EC=0,opt=4,tail=0
    -- Registering at CAPI (blocksize=160 maxlogicalchannels)
[Mar 22 20:52:14] ERROR[8691]: chan_capi.c:5758 cc_post_init_capi: Unable to listen on contr1 (error=0x100f)
  == Registered channel type 'CAPI' (Common ISDN API Driver ($Revision: 431 $))
  == Registered application 'capiCommand'
chan_capi.so => (Common ISDN API Driver ($Revision: 431 $))

und auch noch die capi.conf

Code:
; CAPI config
;
; general section

[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8       ;linear receive gain (1.0 = no change)
txgain=0.8       ;linear transmit gain (1.0 = no change)
language=de      ;set default language
alaw=yes
;ulaw=yes        ;set this, if you live in u-law world instead of a-law

;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.


; interface sections ...

[ISDN1]          ;this example interface gets name 'ISDN1' and may be any
                 ;name not starting with 'g' or 'contr'.
                 ;Use one interface section for each isdn port!
;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, 'DID' should be set in any case
incomingmsn=449520    ;allow incoming calls to this list of MSNs/DIDs, * = any
;defaultcid=123  ;set a default caller id to that interface for dial-out,
                 ;this caller id will be used when dial option 'd' is set.
;controller=0    ;ISDN4BSD default
;controller=7    ;ISDN4BSD USB default
controller=1     ;capi controller number of this interface/port
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
faxdetect=off    ;enable faxdetection and redirection to EXTEN 'fax' for incoming and/or
                 ;outgoing calls. (default='off', possible values: 'incoming','outgoing','both')
accountcode=     ;PBX accountcode to use in CDRs
;amaflags=default;AMA flags for CDR ('default', 'omit', 'billing', or 'documentation')
context=capi-in  ;context for incoming calls
;holdtype=hold   ;when the PBX puts the call on hold, ISDN HOLD will be used. If
                 ;set to 'local' (default value), no hold is done and the PBX may
                 ;play MOH.
;immediate=yes    ;DID: immediate start of pbx with extension 's' if no digits were
                 ;     received on incoming call (no destination number yet)
                 ;MSN: start pbx on CONNECT_IND and don't wait for SETUP/SENDING-COMPLETE.
                 ;     info like REDIRECTINGNUMBER may be lost, but this is necessary for
                 ;     drivers/pbx/telco which does not send SETUP or SENDING-COMPLETE.
;echosquelch=1   ;_VERY_PRIMITIVE_ echo suppression
;echocancel=yes  ;EICON DIVA SERVER (CAPI) echo cancelation (yes=g165)
                 ;(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 (default=0 for maximum)
;echocancelnlp=1 ;activate non-linear-processing; this improves echo cancel ratio, but might
                 ;incorporate variable gain in the signal path.
;bridge=yes      ;native bridging (CAPI line interconnect) if available
;callgroup=1     ;PBX call group
;pickupgroup=1   ;PBX pickup group (which call groups are we allowed to pickup)
;language=de     ;set language for this device (overwrites default language)
;disallow=all    ;RTP codec selection (valid with Eicon DIVA Server only)
;allow=all       ;RTP codec selection (valid with Eicon DIVA Server only)
devices=2        ;number of concurrent calls (b-channels) on this controller
                 ;(2 makes sense for single BRI, 30/23 for PRI/T1)
;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
;qsig=on         ;enable use of Q.SIG extensions.


Danke
Jörg
 
Hallo Jörg,

bei mir sieht das etwas anders aus.
Code:
 [chan_capi.so] => (Common ISDN API for Asterisk)
  == Parsing '/etc/asterisk/capi.conf': Found
    -- Registering at CAPI (blocksize=160)
  == This box has 2 capi controller(s).
    -- CAPI/contr1 supports DTMF
    -- CAPI/contr1 supports supplementary services
       > supplementary services : 0x000003ff
       >  HOLD/RETRIEVE TERMINAL-PORTABILITY ECT 3PTY CF CD MCID CCBS MWI CCNR
    -- CAPI/contr1 private options=0x01000001
    -- CAPI/contr2 supports DTMF
    -- CAPI/contr2 supports supplementary services
       > supplementary services : 0x00000033
       >  HOLD/RETRIEVE TERMINAL-PORTABILITY CF CD
    -- CAPI/contr2 private options=0x00000000
    -- capi D ISDN1#00 (*:Extern) contr=1 devs=2 EC=0,opt=4,tail=0
    -- capi B ISDN1#01 (*:Extern) contr=1 devs=2 EC=0,opt=4,tail=0
    -- capi B ISDN1#02 (*:Extern) contr=1 devs=2 EC=0,opt=4,tail=0
    -- capi D ISDN2#00 (*:Extern) contr=2 devs=2 EC=0,opt=4,tail=0
    -- capi B ISDN2#01 (*:Extern) contr=2 devs=2 EC=0,opt=4,tail=0
    -- capi B ISDN2#02 (*:Extern) contr=2 devs=2 EC=0,opt=4,tail=0
    -- listening on contr1 CIPmask = 0x1fff03ff
    -- listening on contr2 CIPmask = 0x1fff03ff
  == Registered channel type 'CAPI' (Common ISDN API Driver (1.0.0))
  == Registered application 'capiCommand'

Ich habe zwar auch 2 Controller aber die Fritzkarte sieht gleich aus. Was mich wundert ist folgende Zeile bei dir.

Code:
== Registered channel type 'CAPI' (Common ISDN API Driver ($Revision: 431 $))
  == Registered application 'capiCommand'
chan_capi.so => (Common ISDN API Driver ($Revision: 431 $))

Irgendwie fehlt der Versionshinweis bzw. sieht er sehr komisch aus.
Steckt die Karte evtl. nich richtig drin ? Oder hat evtl sogar eine Macke ?
Kommt immer die selbe Fehlermeldung ? Evtl einfach nochmal source Pakete neu runterladen und übersetzen ? Evtl hat sich hier ein Fehler eingeschlichen ?


Gruss,

auch Jörg
 
Hallo Jörg :)

danke für deine Hinweise. Da die ISDN Karte ganz normal funktioniert (z.B. kann ich eine PPP-Verbindung aufbauen) glaube ich nicht an Hardware-Probleme.

Ich hab jetzt einen ganz blöden Verdacht (eigentlich weiß ich es schon, komme aber erst am Wochenende zum ausgiebigen Testen).

Warum auch immer, es laufen mehrere Prozesse von Asterisk. Ich nehme an, dass ich mir zuwenig Gedanken um das script in init.d gemacht habe. Ich hab da einfach eines aus den bei Asterisk mitgelieferten Beispielen rausgenommen und das es scheinbar Asterisk gestartet hat war's an der Stelle gut ! Der Start scheint ja noch zu gehen, aber beim stop wird Asterisk nicht wirklich tot gemacht ! Dann ein "asterisk -vvvvvvc" , ........ Dazu kommt noch das Verhalten von safe_asterisk, welches ich mir bisher auch noch nicht angeschaut habe.

Peinlich, aber ich gehe der Sache jetzt nach und teile hier mit, wenn es läuft oder aber ich doch noch Hilfe brauche.

Einen wirklichen Fehler habe ich zwischenzeitlich auch gefunden --> das Unterverzeichnis "var/run/asterisk" war auch nicht da. Warum das "make install" nicht mit einrichtet ???? Aber dafür gibt's ja Google bzw. das gute Forum hier !

Gruß Jörg
 
Hallo zusammen,

ich bekomme auch den gleichen Fehler beim Asterisk :
chan_capi.c: Unable to listen on contr1 (error=0x100f)
Habt ihr das Problem schon gefixt. ich habe folgende Versionen installiert :
asterisk-1.4.1
chan-capi-trunk
AVM PCI karte
Suse 10.0 Linux 2.6.13-15

Gruß,praba
 
Ok bin nun auch geplagt davon. Komischerweise aber nicht immer und CAPI scheint zu funktionieren also evtl ein Timingproblem ?

Wenn ich Asterisk so starte geht es meistens.
/usr/sbin/asterisk -pvvvv >> /var/log/Asterisk.log &

Wenn ich asterisk aber so starte klappt CAPI nie.
asterisk -vvvvcg



Gruss,

Jörg
 
Hallo,

nein, für mich ist das Problem noch nicht gefixt. Ich kann leider immer noch nicht die capi nutzen. Meine Vermutung, dass isch "versehentlich" mehrere Instanzen von asterisk gestartet hatte und das die Wurzel des Übels war, hat sich so nicht bestätigt.

Nochmal zur Klarstellung: bei euch läuft die capi Schnittstelle auch, d.h. capiinifo bringt ein plausibles Resultat ?

Gruß Jörg
 
Bei mir klappt es immer noch nicht, mein capiinfo gibt folgendes, ich habe kein vergleich wie es wirklich sein soll, könnt ihr bitte mir dabei helfen?
Danke


Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.11-07 (49.23)
Serial Number: 1000001
BChannels: 2
Global Options: 0x00000039
internal controller supported
DTMF supported
Supplementary Services supported
channel allocation supported (leased lines)
B1 protocols support: 0x4000011f
64 kbit/s with HDLC framing
64 kbit/s bit-transparent operation
V.110 asynconous operation with start/stop byte framing
V.110 synconous operation with HDLC framing
T.30 modem for fax group 3
Modem asyncronous operation with start/stop byte framing
B2 protocols support: 0x00000b1b
ISO 7776 (X.75 SLP)
Transparent
LAPD with Q.921 for D channel X.25 (SAPI 16)
T.30 for fax group 3
ISO 7776 (X.75 SLP) with V.42bis compression
V.120 asyncronous mode
V.120 bit-transparent mode
B3 protocols support: 0x800000bf
Transparent
T.90NL, T.70NL, T.90
ISO 8208 (X.25 DTE-DTE)
X.25 DCE
T.30 for fax group 3
T.30 for fax group 3 with extensions
Modem

0100
0200
39000000
1f010040
1b0b0000
bf000080
00000000 00000000 00000000 00000000 00000000 00000000
01000001 00020000 00000000 00000000 00000000

Supplementary services support: 0x000003ff
Hold / Retrieve
Terminal Portability
ECT
3PTY
Call Forwarding
Call Deflection
MCID
CCBS
 
Hallo zusammen.
Es scheint dass der AVM Treiber einen Bug hat.
Ich habe versucht das im chan-capi nun zu umgehen.
Die neue HEAD version (trunk version 443) koennte nun helfen.

Armin
 
mit der trunk version 443 klappt es auch nicht bei mir, wenn ich genug Zeit kriege werde ich mal debuggen.
Danke
Praba
 
Also bei mir zeigt capiinfo immer ein einwandfreies resultat. Es liegt also an chan-capi und mit rev.443 is das Problem weg!

capiinfo ergibt bei mir :
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.11-07 (49.23)
Serial Number: 1000001
BChannels: 2
Global Options: 0x00000039
internal controller supported
DTMF supported
Supplementary Services supported
channel allocation supported (leased lines)
B1 protocols support: 0x4000011f
64 kbit/s with HDLC framing
64 kbit/s bit-transparent operation
V.110 asynconous operation with start/stop byte framing
V.110 synconous operation with HDLC framing
T.30 modem for fax group 3
Modem asyncronous operation with start/stop byte framing
B2 protocols support: 0x00000b1b
ISO 7776 (X.75 SLP)
Transparent
LAPD with Q.921 for D channel X.25 (SAPI 16)
T.30 for fax group 3
ISO 7776 (X.75 SLP) with V.42bis compression
V.120 asyncronous mode
V.120 bit-transparent mode
B3 protocols support: 0x800000bf
Transparent
T.90NL, T.70NL, T.90
ISO 8208 (X.25 DTE-DTE)
X.25 DCE
T.30 for fax group 3
T.30 for fax group 3 with extensions
Modem

0100
0200
39000000
1f010040
1b0b0000
bf000080
00000000 00000000 00000000 00000000 00000000 00000000
01000001 00020000 00000000 00000000 00000000

Supplementary services support: 0x000003ff
Hold / Retrieve
Terminal Portability
ECT
3PTY
Call Forwarding
Call Deflection
MCID
CCBS
 
Zuletzt bearbeitet:
Hallo an alle und vor allem Danke an Armin,

irgendwie war ich von den Neuigkeiten hier abgenabelt (Urlaub und auch keine Mailinfo) --> heute mal wieder geschaut, ob's in Sachen chan_capi was Neues gibt, und siehe da : chan_capi-1.0.1.tar.gz !

Es scheint, ob' wie von Armin geschildert, eine Verbesserung gegeben hat (hab mal in den Quellcode geschaut, da gibt es an der relevanten Stelle tatsächlich eine Änderung).

Leider kann ich jetzt nicht mehr viele Versuche machen, die Family schläft und klingeln stört ! Aber das was ich mir getraut habe, funktioniert. Ich bin zuvor hergegangen, und habe alles neu compiliert.

Wär echt super, wenn das Problem aus der Welt geschafft wäre (wer auch immer es verursacht hat). Ich teste spätestens am Wochenende nochmal intensiv und berichte hier.

Gruß
Jörg
 
Danke für die Infos!
mit aktueller chan-capi-trunk version kommt der obiger Fehler nicht mehr, in 443 version wurde chan_capi.c doch upgedatet.
Ich habe folgendes vor :
festnetzanruf von Handy -> fritzbox->isdn->asterisk ->voip/festnetz->ausland festnetz or handy mit call by call
oder
festnetzanruf von Handy ->fritzbox ->voip->asterisk ->voip-> fritzbox -> voip/festnetz->ausland festnetz or handy mit call by call

Wobei bei der ersten möglichkeit das folgendes Problem zu lösen ist :
Mit asterisk kann man nur nach aussen anrufen, da fritzbox und asterisk benutzen die gleiche port 5060. Beim Fritbox kann man eventuell durch Umkonfiguration die ports ändern, aber ungern, da es nach jedem reboot von fritzbox neu konfiguriert werden muss.
Wie weit die zweite Möglichkeit funktioniert, werde ich wochenende ausprobieren.
 
Hallo,

seit zwei Tagen versuche ich per chan_api auf den S0-Bus der FritzBox zuzugreifen, leider klappt dies nicht und ich erhalte folgende Fehlermeldung:

VERBOSE[2287] config.c: == Parsing '/etc/asterisk/capi.conf': [2012-12-10 23:12:31] VERBOSE[2287] config.c: == Found
[2012-12-10 23:12:31] VERBOSE[2287] chan_capi_utils.c: -- capi D ISDN1#00 (*:isdn-in) contr=1 devs=2 EC=0,opt=4,tail=0
[2012-12-10 23:12:31] VERBOSE[2287] chan_capi_utils.c: -- capi B ISDN1#01 (*:isdn-in) contr=1 devs=2 EC=0,opt=4,tail=0
[2012-12-10 23:12:31] VERBOSE[2287] chan_capi_utils.c: -- capi B ISDN1#02 (*:isdn-in) contr=1 devs=2 EC=0,opt=4,tail=0
[2012-12-10 23:12:33] ERROR[2287] chan_capi.c: Unable to listen on contr1 (error=0x100f)
[2012-12-10 23:12:33] NOTICE[2287] chan_capi.c: Unused contr2
[2012-12-10 23:12:33] NOTICE[2287] chan_capi.c: Unused contr3
[2012-12-10 23:12:33] NOTICE[2287] chan_capi.c: Unused contr4
[2012-12-10 23:12:33] NOTICE[2287] chan_capi.c: Unused contr5
[2012-12-10 23:12:33] VERBOSE[2287] pbx.c: == Registered application 'capicommand'
[2012-12-10 23:12:33] VERBOSE[2287] loader.c: chan_capi.so => (Common ISDN API Driver (1.1.6))
[2012-12-10 23:12:33] NOTICE[2321] chan_capi.c: Started CAPI device thread for CAPI Appl-ID 6.

Als Grundlage verwende ich die FreePBX Distro mit Asterisk 10.10, libcapi20 für FritzBox ver. 0.6. Die Ausgabe von capiinfo ist in Ordnung und /dev/capi20 wird nach dem Start auch angelegt.

Vielleicht kann jemand weiter helfen.

Danke!
 
Mit der aktuellen libcapi 3.0.7 von http://www.tabos.org arbeitet chan_capi 1.1.6 zusammen. Die libcapi kompiliert ohne jegliche Änderung der Quellen. In der capi20.conf muss nun angegeben werden welches Treibermodul geladen werden soll. Bei der Fritz!Box lautet nun der Eintrag
REMOTE fritzbox IP Port
.
 
Kostenlos!

Statistik des Forums

Themen
248,471
Beiträge
2,292,186
Mitglieder
377,915
Neuestes Mitglied
wakibippi