Fehler beim Wählen / eingenhende Rufe

Toonk

Neuer User
Mitglied seit
25 Okt 2004
Beiträge
18
Punkte für Reaktionen
0
Punkte
1
Abgetrennt von chan_capi vs. chan_capi_cm
Ein neuer Thread ist hier angebracht, da die Frage nichts mit dem ursprünglichen Thema zu tun hat. rollo
==============================================

Hallo,

installiert ist: Asterisk 1.2.0 Beta1 mit chan_capi 0.6 CVS, Primux 1 S2M mit Capitreiber
3.5.3698 auf SuSE 10

Bei dem Versuch von einem Sip Teilnehmer rauszuwählen kommt folgende Meldung:

-- Registered SIP '298' at 172.16.2.240 port 10464 expires 3600
Nov 9 08:54:43 WARNING[5998]: pbx.c:1647 pbx_extension_helper: No application '' for extension (default, 0299, 1)
== Spawn extension (default, 0299, 1) exited non-zero on 'SIP/298-e124'

Bei eingehenden Rufen:
keine Reaktion auf der Console, im Capi debug erscheint aber:

-- CONNECT_IND (PLCI=0x101,DID=298,CID=299,CIP=0x4,CONTROLLER=0x1)
== ISDN1: Interface cleanup PLCI=0x101

Somit scheint der Ruf bis zum Asterisk zu kommen.

Die Capi.conf:
Code:
[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=DID     ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
                 ;when using NT-mode, 'DID' should be set in any case
incomingmsn=*    ;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 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=capi-in  ;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   ;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
                 ;(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
devices=30        ;number of concurrent calls on this controller
                 ;(2 makes sense for single BRI, 30 for PRI)

Die extensions.conf:
Code:
exten => _0.,1Dial(CAPI/ISDN1/${EXTEN})
exten => _0.,2,Congestion

; ISDN-Kanal schalten über 0 

[sip]
exten => _0.,1Dial(CAPI/ISDN1/${EXTEN})
exten => _0.,2,Congestion

exten => 220,1,Dial(SIP/220,45)
exten => 220,2,Hangup

exten => 267,1,Dial(SIP/267,45)
exten => 267,2,Hangup

exten => 298,1,Dial(SIP/298,45)
exten => 298,2,Hangup

exten => 299,1,Dial(SIP/299,45)
exten => 299,2,Hangup

[capi-in]
exten => 220,1,Dial(SIP/220,45)
exten => 220,2,Hangup

exten => 267,1,Dial(SIP/267,45)
exten => 267,2,Hangup

exten => 298,1,Dial(SIP/298,45)
exten => 298,2,Hangup

exten => 299,1,Dial(SIP/299,45)
exten => 299,2,Hangup

Wo liegt denn hier der Fehler?

Gruß

Toonk
 
Also, das mit den ausgehenden gesprächen könnte an dem fehlenden Komma liegen:
exten => _0.,1Dial(CAPI/ISDN1/${EXTEN})

Außerdem würde ich wenigstens eine Default-MSN in der capi.conf festlegen!

Außerdem würde ich mal den ISDN-Mode auf "msn" stellen.
 
Hallo,

das Komma hat es gebracht rauswählen geht jetzt.
Aber
wenn eine Verbindung dann zustande kommt, gibt es einen segmentation fault.

-- Called ISDN1/299
-- CAPI/ISDN1/299-0 answered SIP/298-e2e6
Segmentation fault (core dumped)


Da die Karte eine S2M Karte ist , also für einen Primär Mutilplexanschluss
ist die Anschlussart DID oder auch Point To Point (Anlagenanschluß) genannt. Warum soll ich dann den ISDN-MODE auf MSN stellen?

Gruß

Toonk
 
Toonk schrieb:
Da die Karte eine S2M Karte ist , also für einen Primär Mutilplexanschluss
ist die Anschlussart DID oder auch Point To Point (Anlagenanschluß) genannt. Warum soll ich dann den ISDN-MODE auf MSN stellen?
Toonk

Hätte ich das gewusst, dann hätte ich das nicht vorgeschlagen. Besitzer von Primär-Multiplexanschlüssen sind hier eher selten. Ein PTMP-Anschluss also eher üblich. Da ich die Karte nicht kannte, und die das nicht benannt hast, bin ich einfach mal vom Standardfall ausgegangen.
 
Bezueglich des segfaults, kannst Du ein verbose log level 5 mit 'capi debug' erzeugen? Ein backtrace aus dem coredump waere auch sehr hilfreich.

Armin
 
Hallo,

anbei die gewünschten Infos.

Zuerst ein eingehender Versuch, worauf Asterisk nicht reagiert, dann der Ausgehende mit dem Absturz:

Code:
Asterisk Ready.
*CLI> capi debug
CAPI Debugging Enabled
*CLI> set verbose 5
Verbosity is at least 5
*CLI> CONNECT_IND ID=001 #0x8000 LEN=0044
  Controller/PLCI/NCCI            = 0x101
  CIPValue                        = 0x4
  CalledPartyNumber               = <81>298
  CallingPartyNumber              = <01 81>299
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <90 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo
   BChannelinformation            = <00 00>
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default

    -- CONNECT_IND (PLCI=0x101,DID=298,CID=299,CIP=0x4,CONTROLLER=0x1)
       > ISDN1: msn='*' DNID='298' DID
  == ISDN1: Incoming call '299' -> '298'
DISCONNECT_IND ID=001 #0x8001 LEN=0014
  Controller/PLCI/NCCI            = 0x101
  Reason                          = 0x3490

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

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

    -- Executing Dial("SIP/298-f1d8", "CAPI/ISDN1/299") in new stack
       > data = ISDN1/299
Segmentation fault (core dumped)
ASTERISK:~ #
und das Backtrace:
Code:
#0  0x4015d58c in memcpy () from /lib/tls/libc.so.6
No symbol table info available.
#1  0x40465ec2 in capi_handle_msg (CMSG=0x405072b8) at chan_capi.c:2651
        NCCI = 136246770
        PLCI = 257
        wCmd = 33920
        wMsgNum = 32770
        wInfo = <value optimized out>
        i = (struct ast_capi_pvt *) 0x81ee8e8
        __PRETTY_FUNCTION__ = "capi_handle_msg"
#2  0x40467119 in do_monitor (data=0x0) at chan_capi.c:4057
        Info = 0
        monCMSG = {ApplId = 1, Command = 134 '\206', Subcommand = 130 '\202',
  Messagenumber = 32770, adr = {adrController = 65793, adrPLCI = 65793,
    adrNCCI = 65793}, AdditionalInfo = CAPI_COMPOSE, B1configuration = 0x0,
  B1protocol = 0, B2configuration = 0x0, B2protocol = 0,
  B3configuration = 0x0, B3protocol = 0, BC = 0x0, BChannelinformation = 0x0,
  BProtocol = CAPI_COMPOSE, CalledPartyNumber = 0x0,
  CalledPartySubaddress = 0x0, CallingPartyNumber = 0x0,
  CallingPartySubaddress = 0x0, CIPmask = 0, CIPmask2 = 0, CIPValue = 0,
  Class = 0, ConnectedNumber = 0x0, ConnectedSubaddress = 0x0,
  Data32 = 1078596024, Data64 = 18446744073709551615, DataHandle = 0,
  DataLength = 160, FacilityConfirmationParameter = 0x0,
---Type <return> to continue, or q <return> to quit---
  Facilitydataarray = 0x0, FacilityIndicationParameter = 0x0,
  FacilityRequestParameter = 0x0, FacilityResponseParameters = 0x0,
  FacilitySelector = 0, Flags = 0, Function = 0, Globalconfiguration = 0x0,
  HLC = 0x0, Info = 0, InfoElement = 0x0, InfoMask = 0, InfoNumber = 0,
  Keypadfacility = 0x0, LLC = 0x0, ManuData = 0x0, ManuID = 0, NCPI = 0x0,
  Reason = 0, Reason_B3 = 0, Reject = 0,
  Useruserdata = 0x404a11b8 '' <repeats 160 times>,
  SendingComplete = 0x16 <Address 0x16 out of bounds>,
  Data = 0x6 <Address 0x6 out of bounds>, l = 1078555286, p = 1078595592,
  par = 0x0, m = 0x0, buf = '\0' <repeats 179 times>}
#3  0x40033297 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#4  0x401b037e in clone () from /lib/tls/libc.so.6
No symbol table info available.
#5  0x40507bb0 in ?? ()
No symbol table info available.

Besten Dank für die Mühe in voraus.

Gruß

Toonk
 
Da passt etwas nicht zusammen. Laut dem Backtrace kommen Daten an, aber im verbose log besteht noch gar keine Verbindung!?

Armin
 
Sorry stimmt,

hier noch mal die Daten aus einem neuen Test:

Code:
Asterisk Ready.
*CLI> set verbose 5
Verbosity is at least 5
*CLI>     -- Executing Dial("SIP/298-69b9", "CAPI/ISDN1/299") in new stack
    -- Called ISDN1/299
    -- CAPI/ISDN1/299-0 answered SIP/298-69b9
Segmentation fault (core dumped)
ASTERISK:~ #

und passend dazu der core dump:
Code:
#0  0x4015d58c in memcpy () from /lib/tls/libc.so.6
No symbol table info available.
#1  0x40465ec2 in capi_handle_msg (CMSG=0x405072b8) at chan_capi.c:2651
        NCCI = 136246850
        PLCI = 257
        wCmd = 33920
        wMsgNum = 32770
        wInfo = <value optimized out>
        i = (struct ast_capi_pvt *) 0x81ee938
        __PRETTY_FUNCTION__ = "capi_handle_msg"
#2  0x40467119 in do_monitor (data=0x0) at chan_capi.c:4057
        Info = 0
        monCMSG = {ApplId = 1, Command = 134 '\206', Subcommand = 130 '\202',
  Messagenumber = 32770, adr = {adrController = 65793, adrPLCI = 65793,
    adrNCCI = 65793}, AdditionalInfo = CAPI_COMPOSE, B1configuration = 0x0,
  B1protocol = 0, B2configuration = 0x0, B2protocol = 0,
  B3configuration = 0x0, B3protocol = 0, BC = 0x0, BChannelinformation = 0x0,
  BProtocol = CAPI_COMPOSE, CalledPartyNumber = 0x0,
  CalledPartySubaddress = 0x0, CallingPartyNumber = 0x0,
  CallingPartySubaddress = 0x0, CIPmask = 0, CIPmask2 = 0, CIPValue = 0,
  Class = 0, ConnectedNumber = 0x0, ConnectedSubaddress = 0x0,
  Data32 = 1078596024, Data64 = 18446744073709551615, DataHandle = 0,
  DataLength = 160, FacilityConfirmationParameter = 0x0,
---Type <return> to continue, or q <return> to quit---
  Facilitydataarray = 0x0, FacilityIndicationParameter = 0x0,
  FacilityRequestParameter = 0x0, FacilityResponseParameters = 0x0,
  FacilitySelector = 0, Flags = 0, Function = 0, Globalconfiguration = 0x0,
  HLC = 0x0, Info = 0, InfoElement = 0x0, InfoMask = 0, InfoNumber = 0,
  Keypadfacility = 0x0, LLC = 0x0, ManuData = 0x0, ManuID = 0, NCPI = 0x0,
  Reason = 0, Reason_B3 = 0, Reject = 0,
  Useruserdata = 0x404a11b8 '' <repeats 160 times>,
  SendingComplete = 0x16 <Address 0x16 out of bounds>,
  Data = 0x6 <Address 0x6 out of bounds>, l = 1078555286, p = 1078595592,
  par = 0x0, m = 0x0, buf = '\0' <repeats 179 times>}
#3  0x40033297 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#4  0x401b037e in clone () from /lib/tls/libc.so.6
No symbol table info available.
#5  0x40507bb0 in ?? ()
No symbol table info available.
(gdb)

Gruß

Toonk
 
jetzt fehlt aber das 'capi debug' im verbose log.

Armin
 
Hi,

grrr das gibt's doch gar nicht, also nochmal sauber von vorne:

verbose Log mit 1. eingehender Call ohne Reaktion von Asterisk 2. ausgehender Call mit Absturz:

Code:
Asterisk Ready.
*CLI> capi debug
CAPI Debugging Enabled
*CLI> set verbose 5
Verbosity is at least 5
*CLI> CONNECT_IND ID=001 #0x8000 LEN=0044
  Controller/PLCI/NCCI            = 0x101
  CIPValue                        = 0x4
  CalledPartyNumber               = <81>298
  CallingPartyNumber              = <01 81>299
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <90 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo
   BChannelinformation            = <00 00>
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default

    -- CONNECT_IND (PLCI=0x101,DID=298,CID=299,CIP=0x4,CONTROLLER=0x1)
       > ISDN1: msn='*' DNID='298' DID
  == ISDN1: Incoming call '299' -> '298'
DISCONNECT_IND ID=001 #0x8001 LEN=0014
  Controller/PLCI/NCCI            = 0x101
  Reason                          = 0x3490

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

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

    -- Executing Dial("SIP/298-34eb", "CAPI/ISDN1/299") in new stack
       > data = ISDN1/299
Segmentation fault (core dumped)
ASTERISK:~ #

und das dazugehörige Backtrace:
Code:
(gdb) bt full
#0  0x4015bdc3 in strlen () from /lib/tls/libc.so.6
No symbol table info available.
#1  0x401303d8 in vfprintf () from /lib/tls/libc.so.6
No symbol table info available.
#2  0x4047017f in capiINT2ULAW () from /usr/lib/asterisk/modules/chan_capi.so
No symbol table info available.
#3  0x00000003 in ?? ()
No symbol table info available.
#4  0x00000000 in ?? ()
No symbol table info available.
#5  0x00000000 in ?? ()
No symbol table info available.
#6  0x00000000 in ?? ()
No symbol table info available.
#7  0x40153323 in _IO_default_xsputn_internal () from /lib/tls/libc.so.6
No symbol table info available.
Previous frame inner to this frame (corrupt stack?)
(gdb)
leider stürzt Asterisk jetzt immer ab, bevor die Gegenstelle klingelt. Der Effekt war auch vorher schon ein paar mal.

Gruß

Toonk
 
Also beim ankommenden Ruf fehlen CAPI messages. Nach dem CONNECT_IND muessen noch mehr Indications kommen, ohne diese wird der Ruf nicht an Asterisk geleitet. Es sieht so aus, als ob der ISDN-Treiber deiner Karte nicht komplett CAPI 2.0 kompatibel ist.
Abgehend ist leider nichts zu erkennen, denn noch bevor ueberhaupt chan_capi etwas macht (das verbose log hat hier ja erst eine Zeile), kommt schon der seg-fault. Und auch der backtrace passt nicht so ganz, den z.B. das capiINT2ULAW wird erst bei einer bestehenden Verbindung (datenuebertragung) verwendet.
Sorry, aber mal abgesehen davon, dass es ein seg-fault gibt, denke ich dein ISDN-Treiber ist nicht verwendbar.

Armin
 
Wollte eigentlich einen anderen Thread aufmachen, aber da ich evtl. das gleiche Problem habe poste ich es mal hier rein. Falls es stört, kann ein Mod ja vielleicht mein Posting löschen, damit der Thread nicht ver**** wird.

Mein Asterisk hängt testweise hinter unserer TK-Anlage. Leider habe ich jetzt dass Problem, dass kein Anruf über ISDN an eine Nebenstelle weitergeroutet wird.
Ausgehende Rufe funktionieren jedoch Problemlos.
verwendet:
chan_capi: 0.6
AVM Fritz PCI

CLI Ausgabe mit Capi debug:

Code:
CONNECT_IND ID=001 #0x0004 LEN=0031
  Controller/PLCI/NCCI            = 0x101
  CIPValue                        = 0x1
  CalledPartyNumber               = default
  CallingPartyNumber              = <01 81>111
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <80 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo                  = default

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

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

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

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

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

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

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



capi.conf

Code:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8

[ISDN1]          
isdnmode=msn
incomingmsn=*
controller=1
group=1
softdtmf=on
relaxdtmf=on
accountcode=
context=capi-in
holdtype=hold

echocancelold=yes
devices=2


Auszug extensions.conf

Code:
[capi-in]
exten => s,1,Answer
exten => s,2,Wait(1) 
exten => s,3,Dial(SIP/456)
 
@Pitfall: ein eigener Thread waere schon besser...

Anyway: die Anlage sendet wohl kein Sending-Complete. Benutzte chan_capi-cm CVS HEAD und stelle in der capi.conf 'immediate=yes'

Armin
 
Kostenlos!

Statistik des Forums

Themen
248,521
Beiträge
2,293,422
Mitglieder
378,024
Neuestes Mitglied
marcusreed