Illegal instruction bei chan_capi

ralf9

Neuer User
Mitglied seit
28 Aug 2005
Beiträge
59
Punkte für Reaktionen
1
Punkte
8
Hallo,

mir ist es bis jetzt noch nicht gelungen asterisk 1.0.9 mit chan_capi auf einem PC mit VIA EPIA PD6000 Mainbord und VIA Eden ESP processor zum laufen zu bekommen.
Ich habe Asterisk und chan_capi vom Quelltext selbst gebaut.

Auf meinem PC mit Suse 9.1 und AMD Athlon läuft es dagegen ohne Probleme.


Ich habe es unter Suse 9.1 mit chan_capi-0.5.4 und chan_capi-cm-0.6 versucht:

# asterisk -vvvvvgc
...
[chan_capi.so] => (Common ISDN API for Asterisk)
== Parsing '/etc/asterisk/capi.conf': Found
== Reading config for isdn1
Illegal instruction (core dumped)


hier ist die modules.conf
Code:
[modules]
autoload=yes
noload => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
load => chan_modem.so
load => chan_capi.so
noload => chan_alsa.so
[global]
chan_modem.so=yes
chan_capi.so=yes

und die capi.conf
Code:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de

[isdn1]
isdnmode=msn
incomingmsn=22
controller=1
group=1
softdtmf=off
accountcode=
context=default
devices=1
language=de

Hier sind die Daten der VIA Eden CPU:
Code:
# cat /proc/cpuinfo
processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 7
model name      : VIA Samuel 2
stepping        : 3
cpu MHz         : 601.504
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu de tsc msr cx8 mtrr pge mmx 3dnow
bogomips        : 1183.74

Gruß Ralf
 
Du weisst schon, das die Eden-Prozessoren nicht richtig den i686-Befehlssatz unterstützen, und Du dafür sorgen must, dass alles mit für die i586er Architektur kompiliert wird?
 
Hupe schrieb:
Du weisst schon, das die Eden-Prozessoren nicht richtig den i686-Befehlssatz unterstützen, und Du dafür sorgen must, dass alles mit für die i586er Architektur kompiliert wird?

Ich habe in "chan_capi-cm-0.6/Makefile"
"PROC=$(shell uname -m)" durch "PROC=i586" ersetzt.

Nun scheint chan_capi.so zu funktionieren, aber jetzt kommt die Fehlermeldung in res_sdsi.so:

# asterisk -vvvvvgc
...
> MWI
> CCNR
-- listening on contr1 CIPmask = 0x1fff03ff
== Registered channel type 'CAPI' (Common ISDN API Driver (cm-0.6) )
== Registered application 'capiCommand'
[res_adsi.so] => (ADSI Resource)
== Parsing '/etc/asterisk/adsi.conf': Found
Ungültiger Maschinenbefehl (core dumped)


Bedeuted dies, daß ich auch asterisk mit i585 neu compilieren muß?
Reicht es aus, wenn ich im Makefile proc=i586 ändere?
Muß ich auch make_build_h ändern?


bei make von chan_capi bekomme ich folgende Ausgabe:

Code:
/chan_capi-cm-0.6 # make
./create_config.sh "/usr/include"
Checking Asterisk version...
 * no 'struct ast_channel_tech', using old pvt
 * no 'ast_bridged_channel'
 * no 'ast_bridge_result'
 * ast_dsp_process() without 'needlock'
 * no 'struct ast_callerid'
 * found 'struct timeval delivery'
 * no 'transfercapability'
 * no 'ast_config_load'
 * no 'AST_CONTROL_HOLD'
 * no 'struct ast_custom_function'
config.h complete.
gcc -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -g  -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i586  -DASTERISKVERSION=\"\" -Wno-missing-prototypes -Wno-missing-declarations -DCRYPTO   -c -o chan_capi.o chan_capi.c
In file included from /usr/include/linux/kernelcapi.h:13,
                 from /usr/include/linux/capi.h:18,
                 from chan_capi20.h:28,
                 from chan_capi.c:48:
/usr/include/linux/list.h:604:2: warning: #warning "don't include kernel headers in userspace"
gcc -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -g  -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i586  -DASTERISKVERSION=\"\" -Wno-missing-prototypes -Wno-missing-declarations -DCRYPTO   -c -o c20msg.o c20msg.c
gcc -shared -Xlinker -x -o chan_capi.so chan_capi.o c20msg.o -lcapi20

Kann ich die warnung "don't include kernel headers in userspace" ignorieren?

Gruß Ralf
 
Natürlich musst Du das auch bei Asterisk machen. Da ist sogar extra wein Hinweis auf die Via-Prozessoren drin.

Code:
ifeq (${OSARCH},Linux)
PROC=$(shell uname -m)
else
ifeq (${OSARCH},FreeBSD)
PROC=$(shell uname -m)
endif
endif
# Pentium Pro Optimize
#PROC=i686

# Pentium & VIA processors optimize
#PROC=i586

#PROC=k6
#PROC=ppc

einfach vor dem #PROC=i586 das "#" entfernen!
 
Hupe schrieb:
Natürlich musst Du das auch bei Asterisk machen. Da ist sogar extra wein Hinweis auf die Via-Prozessoren drin.

einfach vor dem #PROC=i586 das "#" entfernen!

Danke, nun funktioniert es.

Allerdings funktioniert es nur mit chan_capi-0.5.4.
Bei chan_capi-cm-0.6 wird zwar der Anruf über die interne S0 angezeigt, aber "exten => 23,1,DISA,no-password|out_t-online" nicht ausgeführt.

extensions.conf
Code:
[general]
static=yes
writeprotect=no

[globals]
CONSOLE=Console/dsp				; Console interface for demo
TRUNKMSD=1					; MSD digits to strip (usually 1 or 0)

[default]
exten => 23,1,DISA,no-password|out_t-online

[out_t-online]
exten => _00.,1,busy
exten => _01.,1,busy
exten => _0900.,1,busy
include => all-other

exten => _XN.,1,SetCIDName(032223xxxxxx)
exten => _XN.,2,Dial(SIP/${EXTEN}@t-online,,tr)

[all-other]
;exten => _.,1,SetCIDName(032223xxxxxx)

capi.conf bei Verwendung von chan_capi-0.5.4
Code:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de
[interfaces]
msn=23
isdnmode=ptmp
incomingmsn=23
controller=1
group=1
softdtmf=0
accountcode=
context=default
echocancel=no
devices =1
language=de

capi.conf bei Verwendung von chan_capi-cm-0.6
Code:
[general]
nationalprefix=0
internationalprefix=00
rxgain=0.8
txgain=0.8
language=de
[isdn1]
isdnmode=msn
incomingmsn=23
controller=1
group=1
softdtmf=off
accountcode=
context=default
devices=1
language=de


Die CPU Auslastung bei einem Gespräch ist nicht sehr hoch:
Code:
 #top
...
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4504 root      15   0 39236 5812 3232 S  1.3  1.2   0:12.36 asterisk

Gruß Ralf
 
Kostenlos!

Zurzeit aktive Besucher

Statistik des Forums

Themen
248,538
Beiträge
2,293,774
Mitglieder
378,048
Neuestes Mitglied
jamesjonesjj10