How to install Celliax with FreePBX in Opensuse

by Greekman

I want to share my experience of setting up Motorola C350 on Celliax with Opensuse 10.1/10.2

I had working Asterisk on the production machine,then,I wanted just to add Celliax.

Install Asterisk from repository (1.2.5) ,xorg-x11-devel,alsa-devel
Install FreePBX (www.freepbx.org)

# smart install xorg-x11-devel alsa-devel asterisk
************************************

COMPILE CELLIAX FROM SVN

# make

After compiling finish without errors ,copy Celliax module to Asterisk modules directory

# cp ./channels/chan_celliax.so /usr/lib/asterisk/modules
And not to forget to copy celliax.conf to /etc/asterisk directory.

Change in celliax.conf

control_device_protocol=AT
control_device_name=/dev/ttyACM0

*************************
FREEPBX

I assume FreePBX is already installed,but there are just few things to change.

Script /usr/sbin/amportal is a part of FreePBX,it's task to start/restart asterisk
We need to modify it,otherwise Asterisk will fail to start,giving errors about device permissions
when accesing sound devices and USB port to mobile phone.

insert following lines in amportal script after following lines:
-------------------------
chown_asterisk() {
echo SETTING FILE PERMISSIONS

chown -R asterisk:asterisk /dev/snd/*
chown -R asterisk:asterisk /dev/ttyACM0
-------------------------

this will set CORRECT permissions each time amportal is started

Now start from root console
# amportal start

***************************

For setup with FreePBX a Celliax trunk make this:

Add Custom Trunk ->
in Custom Dial String : Celliax/nicephone:$OUTNUM$

In Outbound Routes add route with following parametres:
Dial Patterns 9|.
Trunk sequence Celliax/nicephone:$OUTNUM$

Incoming calls from Celliax
Here are two examples I tried while testing:

To add in the end of extensions.conf

[mobile]
exten => s,1,Wait,1 ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n,Dial(SIP/200) ;Transfer to another extension
exten => s,n,Hangup ; Hang them up

And set in celliax.conf context [mobile]

Or other example is to set in celliax.conf context [from-trunk]
Which is in fact the default incoming trunk context from FreePBX
In this case don't forget in FreePBX Inbound routes to set a fallover destination.

I hope this information may help someone.

Greekman