celliax: eigenbau GSM anbindung per Daten/Audiokabel

deflecter

Neuer User
Mitglied seit
11 Nov 2005
Beiträge
18
Punkte für Reaktionen
0
Punkte
0
Nach langem zögern habe ich mich nun doch mal damit befasst wie man Asterisk und GSM zusammenbringt. Neben den hier einschlägig und lang diskutierten Bluetooth Varianten habe ich dann doch die Lowcost Variante über Celliax gefunden.
Die spärlich vorhandenen Urteile fallen wahrlich nicht positiv aus. Bevor ich aber viel Geld für China GSM Gateways oder defekte bluetooth Handys in die Bucht werfe habe ich erstmal Inventur in meiner Bastelkiste gemacht und wollte mal sehen was man mit einer 0¤ Billiglösung so anfangen kann.Hier das Ergebnis für die interessierten Bastler

Celliax ist ein Asterisk Channel Treiber der es erlaubt per Datenkabel ein Handy zu steuern, und über Audiokabel und Soundkarte Gespräche vermitteln kann.Leider beschränken sich die Entwickler bei der Beschreibung immer nur auf Nokia und Motorola Handys. In meiner Bastelkiste fand sich aber nur viel Siemens Hardware mit Zubehör.

Also try and error, das kam dabei raus.
Alles auf eigene Gefahr! Technik Profis dürfen gerne schaltungstechnische Tipps dazugeben

Abei der Schaltpan meines momentanen celliax Siemens Daten/Audio/Ladekabels. Ich bin für Verbesserungen offen, bin halt kein guter Elektroniker. Nachabu auf eigene Gefahr! Steckerbelegung bezieht sich auf den alten dickeren Siemens Lumbergstecker !

Man nehme z.B.
-ein altes Siemens Handy M35/S35/ME45 (c25 geht wohl nicht weil es auf keine AT befehle reagiert)
-passendes Ladegerät
-passendes Datenkabel
-2 Audiokabel mit Klinkenstecker
-2 Audioübertrager, in meinem Fall musste eine defekte ISDN Karte ihr leben lassen

-Der Stecker des Datenkabels wird geöffnet.
-An PIN12-11 und PIN10-9 Leitungen für die Audioübertragung anlöten
-PIN 1 wird mit PIN8 verbunden, damit das Handy ein Headset erkennt und den Audioausgang freigibt
-An PIN 1 und PIN3 wird das Kabel vom Ladegerät entsprechend angeschlossen
-PIN2 dient als Ladegerätserkennung, also ggf wie beim Ladegerätstecker verbinden
-Audiokabel:
In der original Celliax Anleitung wird die Audioleitung mehr oder weniger direkt mit der Soundkarte verbunden. Das hat mir nicht gefallen- außerdem wenn man am Klinkenstecker GND vertauscht, dann stürzt das Handy unschön ab. Deswegen wollte ich lieber eine saubere Trennung. In Telefonen/anlagen/etc macht man sowas ja IMHO mit Übertragerspulen. Da keine in der Bastelkiste vorrätig, demontierte ich von einer defekten ISDN Karte den Eingangs-Transformer - Ein Bauteil das wie ein sehr sehr dicker IC aussieht, drin sind aber zwei Übertragerspulen. Perfekt. Hinweis, der Einsatz der Spulen beeinträchtigt aber auch die Audioqualität!

-Ladegerät: Ein Einsatz eines Ladegeräts kann nur empfohlen werden, da das original Siemens Datenkabel den Strom für die Pegelwandlung aus dem Handy entnimmt -->meiner Beobachtung nach wurden Handys mit eingestecktem Datenkabel extrem schneller leer- auch bei Inaktivität/ausgeschaltetem Computer.

Erster Test:
Man kann das Handy per AT befehle in jedem beliebigen Terminalprogramm ansprechen und steuern:
ATD0170123456789; baut eine Sprachverbidung zu 0170123456789 auf. Das ; darf nicht vergessen werden, sonst versucht das Handy eine Datenverbindung aufzubauen.
ATH0 unterbricht die Verbindung
Mit ATA kann man bei eingehendem Anruf das Handy abnehmen lassen.

Über die Klinkenstecker wird das ganze also mit der Soundkarte verbunden. Problematisch ist hier natürlich die Aussteuerung. Stellt man die Audioregler der Soundkarte so ein, das das Gespräch in optimaler Lautstärke durchgereicht wird kommt es i.d.R. immer zu starken Echos oder gar Rückkoplungspfeiffen.Ich erwäge in meinem eigentlichen Asterisk Rechner eine alte ungenutze zusätzliche Soundkarte einzubauen um Ein und Ausgang 100% zu trennen- mal sehen ob das was nützt.

Da ich Windowsnutzer bin:
Mit dem auf der Celliax Live CD enthaltenen Pakets wird unter Cygwin Asterisk installiert.
Nach dem Anpassen der celliax.conf für Siemens Handys kann man celliax starten.

Code:
celliax.conf
; Celliax Asterisk Driver 
; 
; Configuration file 
; lines beginning with semicolon (";") are ignored (commented out)
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; The first interface (named nicephone)
[nicephone] 
;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; general settings, valid on all platforms
;
; 
; Default language 
; 
language=en 
; 
; Default context (is overridden with @context syntax) 
; 
context=default 
; 
; Default extension (in extensions.conf) where incoming calls land
; 
extension=s 
; 
;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; Debugging settings, valid globally for all interfaces on all platforms
;
; the debug values are global for all the interfaces.
;
; default is no celliax debugging output, you **have** to activate debugging here to obtain debugging from celliax
;
; To see the debugging output you have to "set debug 100" from the Asterisk CLI or launch
; Asterisk with -ddddddddddd option, and have the logger.conf file activating debug info for console and messages
;
; You can activate each of the following separately, but you can't disactivate. Eg: debug_at=no does not subtract debug_at from debug_all
; debug_all activate all possible debugging info
;
;debug_all=yes
debug_at=yes
;debug_fbus2=yes
;debug_serial=yes
;debug_pbx=yes
;debug_sound=yes
;debug_locks=yes
;debug_skype=yes
;debug_call=yes


; skype is not yet supported, but will come back in the future
skype=no 

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; serial settings, valid for all platforms
;
;control_device_protocol can be AT or FBUS2 or NO_SERIAL (with NO_SERIAL the speed and name of the port are ignored)
control_device_protocol=at

;speed of the serial port
control_device_speed=19200

;name of the serial port device
;control_device_name=/dev/ttyACM0 ; this is a Motorola phone, recognized as a modem by Linux
control_device_name=/dev/ttyS0 ; this is the COM10 on windows
;control_device_name=/dev/ttyUSB0 ; this is the first USB serial port in Linux

;watch the soundcard for noise (ring), because the serial port do not tell us about incoming calls (eg 3310nokia), NO_SERIAL protocol watch for acoustic ring in any case
need_acoustic_ring=0

;audio noise threshold beyond which we declare there is a ring (512 is default, put it to 1024 or 2048 if you have false positive), ignored if not watching for ring
dsp_silence_threshold=1024

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; audio boost settings, valid for all platforms, to compensate for different soundcard/phone input/output signal levels
; tweak it if you get horrible (or not hearable) sound
;
;boost can be positive or negative (-40 to +40) in db
;experiment to find which values are best for your soundcard
;playback_boost=-30 ; for usb audio cm-108 on motorola c650
;capture_boost=-15 ; for usb audio cm-108 on motorola c650
playback_boost=10 ; for integrated mobo audio for motorola c650
capture_boost=-5 ; for integrated mobo audio for motorola c650

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; alsa settings, ignored in windows
;
;alsa internal settings, if in doubt, leave them alone ;-)
;to check and do the audio fine tuning, use microphone and headset directly connected to the soundcard, is easier and cheaper
;period_size, default to 160, if you hear a scratchy background noise, increase it to 170 and check if is better
alsa_period_size=170
;alsa_periods_in_buffer, if you get too many XRUNs, or if you get noise after EAGAINs, increase it (it will increase your alsa latency, but is nothing. The real latency is introduced by the round trip of audio from cellphone to cellphone)
alsa_periods_in_buffer=4

;names of the sound devices in linux
;if you don't use skype on this interface (eg don't need to share the audio device with other applications while celliax is running), use the plughw:n devices (plughw:0 is the first, plughw:1 is the second soundcard, etc). They have the best latency
;if you use skype on this interface use the default:n devices (default:0 is the first, default:1 is the second soundcard, etc). They have worst latency, but you can share them
alsa_capture_device_name=plughw:0
alsa_playback_device_name=plughw:0

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; window multimedia settings, ignored in linux
;
;names of the sound devices in windows, this is the first soundcard, the second would be 1
winmm_capture_device_name=0
winmm_playback_device_name=0

;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
; at "modem" commands settings for this interface (if controldevice_protocol is not AT they are ignored)
;
at_dial_pre_number=ATD ;AT+CKPD="EEE  ;what the modem is expecting in the part of the dial command before the number to be dialed (eg: ATD)
at_dial_post_number=\;             ;what the modem is expecting in the part of the dial command after the number to be dialed (eg: ;)
at_dial_expect=OK                  ;what the modem will answer after succesful execution of the dial command

at_hangup=ATH0            ;command to hangup the current call
at_hangup_expect=OK                ;what the modem will answer after succesful execution of the hangup command

at_answer=ATA                      ;command to answer an incoming call
at_answer_expect=OK                ;what the modem will answer after succesful execution of the answer command


;pause right after serial port opening, before any command is sent, in usecs (1million usec= 1sec)
at_initial_pause=1000000
;custom commands to be sent after the initial pause and before the "built in" initialization commands, and what the modem is expected to send as reply
;the first empty string stop the preinit sending

at_preinit_1=atcucu                ; nonsense entry, just to show the preinit
at_preinit_1_expect=ERROR
at_preinit_2=
at_preinit_2_expect=
at_preinit_3=
at_preinit_3_expect=
at_preinit_4=
at_preinit_4_expect=
at_preinit_5=
at_preinit_5_expect=

;pause right after the custom preinit commands, before any "built in" command is sent, in usecs (1million usec= 1sec)
at_after_preinit_pause=1000000
;custom commands to be sent after the "built in" initialization commands, and what the modem is expected to send as reply
;the first empty string stop the postinit sending
at_postinit_1=atcucu ; nonsense entry, just to show the postinit
at_postinit_1_expect=ERROR
at_postinit_2=   ;AT+CKPD="EEE" ;send three "end" buttonpress, to have the phone in a sane state, ready to dialing with furter CKPDs ***THIS IS IMPORTANT, needed on c650***
at_postinit_2_expect=; OK
at_postinit_3=
at_postinit_3_expect=
at_postinit_4=
at_postinit_4_expect=
at_postinit_5=
at_postinit_5_expect=

at_query_battchg=AT+CBC           ;what command to query the battery status, and what the modem is expected to send as reply
at_query_battchg_expect=OK
at_query_signal=AT+CSQ            ;what command to query the  signal status, and what the modem is expected to send as reply
at_query_signal_expect=OK

;the modem will send us the following messages to signal that the visual indicators on the phone has changed because of events (without us to ask for them), loosely based on ETSI standard (see CIND/CIEV/CMER in ETSI). Variable by manufacturer and phone model

at_indicator_noservice_string   =+CIEV: 2,0 ; no service
at_indicator_nosignal_string    =+CIEV: 5,0 ; no signal
at_indicator_lowsignal_string   =+CIEV: 5,1 ; low signal
at_indicator_lowbattchg_string  =+CIEV: 0,1 ; low battery
at_indicator_nobattchg_string   =+CIEV: 0,0 ; no battery battery
at_indicator_callactive_string  =+CIEV: 3,1 ; call is up

at_indicator_nocallactive_string           =+CIEV: 3,0; call is down
at_indicator_nocallsetup_string            =+CIEV: 6,0; call is no more in process
at_indicator_callsetupincoming_string      =+CIEV: 6,1; call incoming is in process
at_indicator_callsetupoutgoing_string      =+CIEV: 6,2; call outgoing is in process
at_indicator_callsetupremoteringing_string =+CIEV: 6,3; remote party is ringing because of our call outgoing 

;call processing unsolicited messages, proprietary for each phone manufacturer
at_call_idle     =+MCST: 1   ;the modem will send us the following mesage to signal that the line is idle (eg. after an outgoing call has failed, or after hangup)
at_call_incoming =+MCST: 2   ;the modem will send us the following mesage to signal that there is an incoming voice call
at_call_active   =+MCST: 3   ;the modem will send us the following mesage to signal that there is an active call (eg. the remote party has answered us, or we answered them)
at_call_failed   =+MCST: 65  ;the modem will send us the following mesage to signal that our outgoing call has failed
at_call_calling  =+MCST: 64  ;the modem will send us the following mesage to signal that our outgoing call is in the calling phase


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Leider sind die Entwickler etwas sehr rauf ihre eigenen Handys fixiert, so werden ettliche AT befehle an das Handy gesendet, die das S35 (noch) nicht kennt -->eine Reihe von Fehlermeldungen sind zu lesen, die aber bei näherem hinsehen nicht weiter tragisch sind:

Code:
WARNING[764]: chan_celliax.c:4686 serial_config_AT: [660008 ][WARNING    4686 ][nicephone ][-1, 0, 0, 0] atcucu does not get ERROR from the phone. Continuing.
WARNING[764]: chan_celliax.c:4751 serial_config_AT: [660008 ][WARNING    4751 ][nicephone ][-1, 0, 0, 0] AT+mode=0 does not get OK from the phone. If it is NOT Motorola, no problem.
WARNING[764]: chan_celliax.c:4825 serial_config_AT: [660008 ][WARNING    4825 ][nicephone ][-1, 0, 0, 0] AT+CLAC failed, continue
WARNING[764]: chan_celliax.c:4831 serial_config_AT: [660008 ][WARNING    4831 ][nicephone ][-1, 0, 0, 0] AT+CNMI=3,1,0,0,0 failed, continue
WARNING[764]: chan_celliax.c:4851 serial_config_AT: [660008 ][WARNING    4851 ][nicephone ][-1, 0, 0, 0] AT+CMER=? failed, continue
WARNING[764]: chan_celliax.c:4856 serial_config_AT: [660008 ][WARNING    4856 ][nicephone ][-1, 0, 0, 0] AT+CMER=? failed, continue
WARNING[764]: chan_celliax.c:4864 serial_config_AT: [660008 ][WARNING    4864 ][nicephone ][-1, 0, 0, 0] AT+CIND=? failed, continue
WARNING[764]: chan_celliax.c:4870 serial_config_AT: [660008 ][WARNING    4870 ][nicephone ][-1, 0, 0, 0] AT*ECAM=? failed, continue
WARNING[764]: chan_celliax.c:4875 serial_config_AT: [660008 ][WARNING    4875 ][nicephone ][-1, 0, 0, 0] AT*ECAM=1 failed, continue
WARNING[764]: chan_celliax.c:4881 serial_config_AT: [660008 ][WARNING    4881 ][nicephone ][-1, 0, 0, 0] AT+CLCC=0 failed, continue
WARNING[764]: chan_celliax.c:4894 serial_config_AT: [660008 ][WARNING    4894 ][nicephone ][-1, 0, 0, 0] AT+MCST=1 does not get OK from the phone. If it is NOT Motorola, no problem.
WARNING[764]: chan_celliax.c:4905 serial_config_AT: [660008 ][WARNING    4905 ][nicephone ][-1, 0, 0, 0] atcucu does not get ERROR from the phone. Continuing.

Ansonsten funktioniert Celliax eigentlich schon, Anrufe werden wie eingestellt angenommen und können z.B. auf einen SIP Account weitergeleitet werden.
Die Latenzen sind allerdings schon deutlich. Getestet wurde ein Gespräch ISDN->Genion Nummer(Handy)->Soundkarte->Asterisk(celliax)->Fritzbox(SIP)->Analogtelefon und umgekehrt.
Ein Gespräch ist aber IMHO doch gut möglich.

Vorläufiges Fazit:
Für den Geschäftseinsatz wohl nicht zu empfehlen, für den privaten Bastler der alle Teile vorrätig hat ist die 0¤ Variante schon (eingesschränkt) benutzbar. Allerdings habe ich bisher nur kurze Testgespräche geführt. Mal sehen wie alltagstauglich as ganze ist.

Würde mich freuen hier von anderen Celliax testern zu lesen und hier auszutauschen.
Gruß Deflecter
Anbei ein Schaltplan meines momentanen Celliax Siemens Daten/Audiokabels, für verbesserungen bin ich offen. Bin halt kein guter Elektroniker.
 

Anhänge

  • CelliaxSiemensDatenkabelLow.png
    CelliaxSiemensDatenkabelLow.png
    28 KB · Aufrufe: 286
Zuletzt bearbeitet:
sehr schöne Doku
 
Um das nochmals klarzustellen, Gesprächsqualitätsfetischisten haben an dieser Lösung keine große Freude-zumindest mit meinem Audiokabel. Ich denke es liegt an den Eigenschaften der ISDN Übertragerspulen, die halt wohl nicht für Highend Audio ausgelegt sind ;-). Momentan kommt da also ehr Badezimmerfeeling auf. Aber um sich zu verständigen reicht es mir.

Evtl werde ich mal statt der Übertragerspulen einen simplen aufbau mit Kondesatoren versuchen. Das sollte doch auch gehen und wenigstens eine ausreichende "Galvanische trennung" gewährleisten, damit das Handy nicht versehentlich per GND Kurzschluss abstürzt.

Alle Hobbyekektroniker aufgepasst, wie würdet ihr den Siemens Headset Aus/Eingang mt der Soundkarte verbinden?Welche Werte sind da zu empfehlen?
 
Hallo :)
Habe es auch schon mit BT versucht bin aber sehr unzufrieden damit gewesen...
deswegen würde ich lieber das auch über kabel versuchen.
Weis einer vielleicht von euch welches Handy sich dafür sehr gut eignet und mit welcher Hardware ich eine Rumgelöte überflüssig macht?
 

Zurzeit aktive Besucher

Statistik des Forums

Themen
244,868
Beiträge
2,219,771
Mitglieder
371,585
Neuestes Mitglied
PauSchmitz
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.