Celliax with FreePBX on Opensuse installation

Hello ,I want to share with 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 but without Skype.

Sure I have some inconsistencies here.Correct me please :-)

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 SVN

# make

I encountered one problem during compilation

gcc -shared -Xlinker -x -o chan_celliax.so chan_celliax.o celliax_spandsp.o celliax_libcsv.o -lasound -lm -ldl -lX11
/usr/lib/gcc/i586-suse-linux/4.1.2/../../../../i586-suse-linux/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make[1]: *** [chan_celliax.so] Error 1
make[1]: Leaving directory `/usr/src/celliax/asterisk-1.2.XX/channels'
make: *** [subdirs] Error 1

I found somewhere some quick fix for that error.

# ln -s /usr/X11R6/lib/lib* /lib

I dont know if this is problem particular of Opensuse or in Celliax sources.
This error indicates to mising path to X11 libraries.
Compiling of Asterisk 1.2 and 1.4 from asterisk.org going smoothly without this error.

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.
Grazie to Giovanni for this great project !

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks for posting this

Thanks for posting this GreekMan.

I have the same error message on Trixbox 2.2, which is CentOS and includes FreePBX, so your notes *will* be helpful later. Great!

Unfortunately the ln symbolic link 'quick fix' didn't fix the -lX11 error for me.

However, at least I know someone has had and solved a similar problem ... and I still have a little hair left :)

if you dont need skype you

if you dont need skype you just delete -lX11 from the channels/Makefile

sorry for this mess and for wasting your time... when released the sources will be in a easier to use state. Is a promise!

great GreekMan!!!!

great GreekMan!!!!

Excelent,this I could not

Excelent,this I could not understand before,
Because I had both
#undef CELLIAX_SKYPE and
#undef WANT_SKYPE_X11, but compilation complained about X11 error.

I removed as you suggested in ./channels/Makefile this -lX11
and voila ! :-)

I am not programmer ,but I like digging all of kind sources :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.