CELLIAX Channel
Support of CELLULAR Phones.
Credits:
Copyright (C)
Giovanni Maruzzelli (www.celliax.org)
Reworked for AsteriskWin32 by Patrick DERUEL
Features:
- Operate throught the headset port of the cellphone and the soundcard
- Control the cellphone via the serial port (optional datacable)
Hardware managed
A "base station" cellular phone is connected to the computer running Asterisk with:
- an audiocable (that brings the audio from the headset output of the cellphone handsfree connector to the mic input of the soundcard, and from the speaker output of the soundcard to the mic input of the handsfree connector of the cellphone)
- and a datacable (that brings AT or FBUS2 commands and messages back and forth from a serial port of the computer to the serial connector of the cellphone)
- bibi
Or with a
Bluetooth cellular phone connected to computer with a Bluetooth usb dongle (yes so cool :) ) providing
- audio (Voice Gateway)
- serial port ( for AT commands)
The audio is phisycally shared between the Skype client, chan_celliax and the cellphone because all of them use the same soundcard for input and output (but the mic and speaker are inverted between the cellphone and the Skype client by the audiocable. So, the Skype client sound output originally directed to the soundcard speaker output actually goes to the microphone input of the cellphone handsfree connector, and viceversa).
Usage with headset and microphone (for testing purposes)
- put "control_device_protocol=NO_SERIAL" in configuration
- celliax monitors the soundcard (for incoming sounds)
- a call is activated by an incoming "ring" noise on the soundcard (just yell in the mic)
- during a call, you can type the "dial" and "hangup" console commands to simulate the incoming DTMFs and hangups you would have from a real (cell)phone call. The "console" console command is useful if you use more than one celliax channel concurrently (requires more than one soundcard)
- during the call, incoming silence and DTMF tones are recognized through dsp.c analysis
- the caller's hangup is signaled by the "hangup" console command or by a period of continued silence
- if hangup is detected, or when an hang up command is generated by the dialplan (eg. "press # to hangup"), celliax close the call
Overview of the handling of an incoming phone call ("Answer")
- put "control_device_protocol="AT or FBUS2 in configuration
- celliax monitors both the soundcard (for incoming sounds) and the serial control device if available (for AT or FBUS2 messages)
- an incoming call is signaled on the serial control device ("RING" on AT cellphones, proprietary Nokia hex on FBUS2 cellphones)
- celliax wait for the caller id to be signaled on the serial control device
- the caller id arrives
- on Nokia 3310 and compatibles cellphones the incoming call is detected by the soundcard that detects the "ring" noise (so, no caller id)
- celliax picks up the call with serial commands to the cellphone
- during the call, incoming silence and DTMF tones are recognized through dsp.c analysis
- the caller's hangup is signaled by incoming serial messages or by a period of continued silence (when no serial control device is available)
- when remote party hangs up, or when an hang up command is generated by the dialplan (eg. "press # to hangup"), celliax hangs up the line with serial commands to the cellphone
Overview of the handling of an outgoing phone call ("Dial")
- put "control_device_protocol=" AT or FBUS2 in configuration
- celliax monitors both the soundcard (for incoming sounds) and the serial control device if available (for AT or FBUS2 messages)
- celliax place an outgoing call with serial commands to the cellphone
- the remote party's hangup is signaled by incoming serial messages or by a period of continued silence (when no serial control device is available)
- when remote party hangs up, or when an hang up command is generated by the celliax user, celliax hangs up the line with serial commands to the cellphone
Overview of the handling of an incoming Skype call ("skype2celliax" application)
- put "skype=yes" in configuration
- celliax monitors the Skype client for incoming Skype API messages
- when an incoming Skype call is signaled by the Skype client, if a phone call is already active on the celliax channel the Skype call is dropped with Skype API commands to the Skype client
- else (no phone call is active on the celliax channel) the Skype call is accepted and picked up with Skype API commands to the Skype client
- celliax sets the context to "skype" and activate an "INCOMING_RING" on the channel
- in the "skype" context on the dialplan (extensions.conf), following the "answer" there is the "skype2celliax" command, that makes an outgoing cellphone call to the configured phone number
- the Skype caller hangup is detected by incoming Skype API messages
- when the Skype caller hangs up, or the remote phone party hangs up, the Skype call is closed by Skype API messages and the celliax call is hanged up
Overview of the handling of an outgoing Skype call ("celliax2skype" application)
- put "skype=yes" in configuration
- celliax monitors the Skype client for incoming Skype API messages
- the application "celliax2skype" activates a Skype call to the desired Skype user by sending Skype API messages to the Skype client
- the Skype caller hangup is detected by incoming Skype API messages
- if the Skype caller hangs up the control comes back to the dialplan, "extensions.conf", and the celliax call goes on
- if the celliax user hangs up, the Skype call is closed by Skype API messages and the celliax call is hanged up
Overview of the handling of the Skype Contacts Directory ("celliax_skype_directory" application)
- put "skype=yes" in configuration
- celliax monitors the Skype client for incoming Skype API messages
- when the "celliax_skype_directory" application is encountered in the dialplan, "extensions.conf", the user is presented with an interactive dialog similar to the one presented by the "directory" application
- first the "celliax_skype_directory" application asks the Skype client the list of Skype contacts via Skype API messages
- second the "celliax_skype_directory" writes a configuration file, "skype_dir.conf" containing the Skype contacts names as displayed by the Skype client and the corresponding Skype user names
- for each Skype contact, "celliax_skype_directory" adds dinamically to the dialplan a corresponding extension in the "default" context
- the user is asked to insert the first three letter of the Skype contact he wants to call, as it is displayed in the Skype client
- after the user insert and confirm a Skype contact, the celliax call jumps to the extension that was dinamically added to the dialplan for that Skype contact
- at that extension there is a "celliax2skype" application that activates a call to the desired Skype contact
Special case: Usage for managing a cellphone without using a datacable
- connect the "base station" cellular phone to the soundcard through the audiocable
- put "control_device_protocol=NO_SERIAL" in configuration
- configure the cellphone to "automatically answer" incoming calls ("autoanswer" is an "handsfree" feature found in most cellular phones). With many cellphones you can configure the "autoanswer" feature only while the handsfree (or the audiocable) is connected to the cellphone.
- celliax will not make outgoing cellphone calls, but will answer incoming calls, and let you make outgoing Skype calls
Dialing parameters
Dial(CELLIAX/<interface_name>/<destination>)
Dial(CELLIAX/<input_device>/<destination>)
CELLIAX applications
chan_celliax provides an additional Asterisk applications:
- skype2celliax: Forwards an incoming Skype call to GSM number. (require the skype context)
Example:
[skype]
exten => s,1,Answer
exten => s,n,skype2celliax(12345678)
exten => s,n,Hangup
- celliax2skype: GSM to skype outgoing call
Example:
exten => s,1,Celliax2Skype(echo123) ;call the Skype Echo Test
- celliax_skype_directory: Skype Contacts Directory
Celliax_Skype_Directory(vm-context[|dial-context[|options]])
The Celliax channel with the directory of Skype Contacts from which they can search by name.
The list of names and corresponding extensions is retrieved from the "Skype client and put in the Celliax_Skype_Directory configuration file skype_dir.conf, that is written on the fly.
Corresponding extensions are added to the dialplan on the fly.
This applicaiton will immediate exit if one of the following DTMF digits are received and the extension to jump to exists:
0 - Jump to the 'o' extension, if it exists.
* - Jump to the 'a' extension, if it exists.
Parameters:
vm-context - This is the context within voicemail.conf to use for the Directory.
dial-context - This is the dialplan context to use when looking for an extension that the user has selected, or when jumping to the 'o' or 'a' extension.
Options:
f - Allow the caller to enter the first name of a user in the directory instead of using the last name.
Example:
exten => s,1,Celliax_Skype_Directory(default|default|f)
CONFIG FILE commands: celliax.conf
[interface_name]
- input_device:
audio input device, soundcard value
0 1 2 ...
- output_device
audio output device, soundcard value
0 1 2 ...
- control_device_protocol
NO_SERIAL
AT
FBUS
- control_device:
the serial port
/dev/ttyS0 for COM1
/dev/ttyS1 for COM2
...
- control_atdial_command:
for custom dial command
- autoanswer=yes
Automatically answer incoming calls, use in conjunction with NO_SERIAL
- skype=yes
activate skype, (require skype installed on the computer and a audiocable)
don't works with the bluetooth usb dongle voice gateway function.
- language:
Default language
- context:
Default context
- extension:
Default extension
repeat the section for your next device
[interface_name ...]