Revision
15046
Author
gmaruzz
Date
2009-10-02 08:17:39 -0500 (Fri, 02 Oct 2009)

Log Message

gsmopen: internals renaming to gsmopen

Modified Paths

Diff

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/Makefile (15045 => 15046)


--- freeswitch/branches/gmaruzz/mod_gsmopen/Makefile	2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/Makefile	2009-10-02 13:17:39 UTC (rev 15046)
@@ -1,6 +1,6 @@
-MODNAME=mod_celliax
-SVNDEF := -D'CELLIAX_SVN_VERSION="$(shell svnversion -n .)"'
+MODNAME=mod_gsmopen
+SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
 LOCAL_CFLAGS += $(SVNDEF)
 LOCAL_LDFLAGS=-lX11 -lasound
-LOCAL_OBJS=celliax_protocol.o
+LOCAL_OBJS=gsmopen_protocol.o
 include ../../../../build/modmake.rules

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/README (15045 => 15046)


--- freeswitch/branches/gmaruzz/mod_gsmopen/README	2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/README	2009-10-02 13:17:39 UTC (rev 15046)
@@ -1,4 +1,4 @@
-Celliax, GSM Endpoint and Trunk
+GSMopen, GSM Endpoint and Trunk
 
 This is just a prototype.
 
@@ -8,7 +8,7 @@
 
 Is not getting its configuration from the configuration file, it's all hardcoded but it needs the configuration file.
 
-Copy celliax.conf.xml in /usr/local/freeswitch/conf/autoload_configs/
+Copy gsmopen.conf.xml in /usr/local/freeswitch/conf/autoload_configs/
 
 You must have the device on serial port /dev/ttyACM0 and the audio as second soundcard plughw:1 (if you do not have a first soundcard, just modprobe snd-dummy before to connect the usb thingy).
 
@@ -25,7 +25,7 @@
 All documentation on compiling, using, configuring, 
 tricks and tweaks, possible problems at: 
 
-http://wiki.freeswitch.org/wiki/Celliax_GSM_Endpoint_and_Trunk
+http://wiki.freeswitch.org/wiki/GSMopen_GSM_Endpoint_and_Trunk
 
 Enjoy
 

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml (15045 => 15046)


--- freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml	2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml	2009-10-02 13:17:39 UTC (rev 15046)
@@ -1,214 +1,20 @@
-<configuration name="celliax.conf" description="Skypiax Configuration">
+<configuration name="gsmopen.conf" description="GSMopen Configuration">
   <global_settings>
     <param name="debug" value="8"/>
-    <xparam name="codec-master" value="us"/>
     <param name="dialplan" value="XML"/>
-    <xparam name="context" value="default"/>
-    <xparam name="codec-prefs" value="gsm,ulaw"/>
-    <xparam name="codec-rates" value="8000,16000"/>
+    <param name="context" value="default"/>
     <param name="hold-music" value="$${moh_uri}"/>
     <param name="destination" value="9999"/>
   </global_settings>
-  <!-- one entry here per celliax interface -->
+  <!-- one entry here per gsmopen interface -->
   <per_interface_settings>
     <interface id="1" name="interface1">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
 	<param name="context" value="default"/>
-	<param name="X11-display" value=":101"/>
-	<param name="tcp_cli_port" value="15556"/>
-	<param name="tcp_srv_port" value="15557"/>
-	<param name="celliax_user" value="skypiax1"/>
     	<param name="destination" value="5000"/>
     </interface>
     <!-- following interfaces are commented out!
-    <interface id="2" name="interface2">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":102"/>
-	<param name="tcp_cli_port" value="15558"/>
-	<param name="tcp_srv_port" value="15559"/>
-	<param name="celliax_user" value="skypiax1"/>
-    	<param name="destination" value="9999"/>
-    </interface>
-    <interface id="3" name="interface3">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":103"/>
-	<param name="tcp_cli_port" value="15560"/>
-	<param name="tcp_srv_port" value="15561"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="4" name="interface4">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":104"/>
-	<param name="tcp_cli_port" value="15562"/>
-	<param name="tcp_srv_port" value="15563"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="5" name="interface5">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":105"/>
-	<param name="tcp_cli_port" value="15564"/>
-	<param name="tcp_srv_port" value="15565"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-    <interface id="6" name="interface6">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":106"/>
-	<param name="tcp_cli_port" value="15566"/>
-	<param name="tcp_srv_port" value="15567"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-    <interface id="7" name="interface7">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":107"/>
-	<param name="tcp_cli_port" value="15568"/>
-	<param name="tcp_srv_port" value="15569"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="8" name="interface8">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":108"/>
-	<param name="tcp_cli_port" value="15570"/>
-	<param name="tcp_srv_port" value="15571"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="9" name="interface9">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":109"/>
-	<param name="tcp_cli_port" value="15572"/>
-	<param name="tcp_srv_port" value="15573"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="10" name="interface10">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":110"/>
-	<param name="tcp_cli_port" value="15574"/>
-	<param name="tcp_srv_port" value="15575"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="11" name="interface11">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":111"/>
-	<param name="tcp_cli_port" value="15576"/>
-	<param name="tcp_srv_port" value="15577"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="12" name="interface12">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":112"/>
-	<param name="tcp_cli_port" value="15578"/>
-	<param name="tcp_srv_port" value="15579"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="13" name="interface13">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":113"/>
-	<param name="tcp_cli_port" value="15580"/>
-	<param name="tcp_srv_port" value="15581"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="14" name="interface14">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":114"/>
-	<param name="tcp_cli_port" value="15582"/>
-	<param name="tcp_srv_port" value="15583"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="15" name="interface15">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":115"/>
-	<param name="tcp_cli_port" value="15584"/>
-	<param name="tcp_srv_port" value="15585"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="16" name="interface16">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":116"/>
-	<param name="tcp_cli_port" value="15586"/>
-	<param name="tcp_srv_port" value="15587"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="17" name="interface17">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":117"/>
-	<param name="tcp_cli_port" value="15588"/>
-	<param name="tcp_srv_port" value="15589"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="18" name="interface18">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":118"/>
-	<param name="tcp_cli_port" value="15590"/>
-	<param name="tcp_srv_port" value="15591"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="19" name="interface19">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":119"/>
-	<param name="tcp_cli_port" value="15592"/>
-	<param name="tcp_srv_port" value="15593"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="20" name="interface20">
-	<param name="hold-music" value="$${moh_uri}"/>
-	<param name="dialplan" value="XML"/>
-	<param name="context" value="default"/>
-	<param name="X11-display" value=":120"/>
-	<param name="tcp_cli_port" value="15594"/>
-	<param name="tcp_srv_port" value="15595"/>
-	<param name="celliax_user" value="skypiax1"/>
-    </interface>
     -->
   </per_interface_settings>
 </configuration>

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h (15045 => 15046)


--- freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h	2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h	2009-10-02 13:17:39 UTC (rev 15046)
@@ -21,7 +21,7 @@
  * Portions created by the Initial Developer are Copyright (C)
  * the Initial Developer. All Rights Reserved.
  *
- * This module (mod_celliax) has been contributed by:
+ * This module (mod_gsmopen) has been contributed by:
  *
  * Giovanni Maruzzelli (gmaruzz@gmail.com)
  *
@@ -30,11 +30,11 @@
  *
  *
  *
- * mod_celliax.c -- GSM compatible Endpoint Module
+ * mod_gsmopen.c -- GSM compatible Endpoint Module
  *
  */
 
-#define MY_EVENT_INCOMING_SMS "celliax::incoming_sms"
+#define MY_EVENT_INCOMING_SMS "gsmopen::incoming_sms"
 
 #undef GIOVA48
 
@@ -46,13 +46,13 @@
 
 
 #ifndef GIOVA48
-#define     CELLIAX_FRAME_SIZE   160
+#define     GSMOPEN_FRAME_SIZE   160
 #else //GIOVA48
-#define     CELLIAX_FRAME_SIZE   960
+#define     GSMOPEN_FRAME_SIZE   960
 #endif //GIOVA48
-#define     SAMPLERATE_CELLIAX   8000
+#define     SAMPLERATE_GSMOPEN   8000
 
-#define CELLIAX_ALSA
+#define GSMOPEN_ALSA
 #include <switch.h>
 #include <switch_version.h>
 #include <termios.h>
@@ -60,11 +60,11 @@
 #include <iconv.h>
 #include <libteletone.h>
 
-#ifdef CELLIAX_ALSA
+#ifdef GSMOPEN_ALSA
 #define ALSA_PCM_NEW_HW_PARAMS_API
 #define ALSA_PCM_NEW_SW_PARAMS_API
 #include <alsa/asoundlib.h>
-#endif /* CELLIAX_ALSA */
+#endif /* GSMOPEN_ALSA */
 
 
 #ifndef WIN32
@@ -91,12 +91,12 @@
 //FIXME FIXME FIXME #define AT_MESG_MAX_LINES 256   /* 256 lines, so it can contains the results of AT+CLAC, that gives all the AT commands the phone supports */
 #define AT_MESG_MAX_LINES 20	/* 256 lines, so it can contains the results of AT+CLAC, that gives all the AT commands the phone supports */
 
-//#define SAMPLERATE_CELLIAX 16000
-//#define SAMPLES_PER_FRAME SAMPLERATE_CELLIAX/50
+//#define SAMPLERATE_GSMOPEN 16000
+//#define SAMPLES_PER_FRAME SAMPLERATE_GSMOPEN/50
 
-#ifndef CELLIAX_SVN_VERSION
-#define CELLIAX_SVN_VERSION SWITCH_VERSION_REVISION
-#endif /* CELLIAX_SVN_VERSION */
+#ifndef GSMOPEN_SVN_VERSION
+#define GSMOPEN_SVN_VERSION SWITCH_VERSION_REVISION
+#endif /* GSMOPEN_SVN_VERSION */
 
 typedef enum {
 	TFLAG_IO = (1 << 0),
@@ -114,40 +114,40 @@
 	GFLAG_MY_CODEC_PREFS = (1 << 0)
 } GFLAGS;
 
-#define DEBUGA_CELLIAX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "CELLIAX_SVN_VERSION "[%p|%-7lx][DEBUG_CELLIAX  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "CELLIAX_SVN_VERSION "[%p|%-7lx][DEBUG_CALL  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_PBX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "CELLIAX_SVN_VERSION "[%p|%-7lx][DEBUG_PBX  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define ERRORA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, 		"rev "CELLIAX_SVN_VERSION "[%p|%-7lx][ERRORA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define WARNINGA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, 		"rev "CELLIAX_SVN_VERSION "[%p|%-7lx][WARNINGA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define NOTICA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, 		"rev "CELLIAX_SVN_VERSION "[%p|%-7lx][NOTICA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
+#define DEBUGA_GSMOPEN(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "GSMOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_GSMOPEN  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
+#define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "GSMOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_CALL  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
+#define DEBUGA_PBX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, 		"rev "GSMOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_PBX  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
+#define ERRORA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, 		"rev "GSMOPEN_SVN_VERSION "[%p|%-7lx][ERRORA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
+#define WARNINGA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, 		"rev "GSMOPEN_SVN_VERSION "[%p|%-7lx][WARNINGA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
+#define NOTICA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, 		"rev "GSMOPEN_SVN_VERSION "[%p|%-7lx][NOTICA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
 
-#define CELLIAX_P_LOG NULL, (unsigned long)55, __LINE__, tech_pvt ? tech_pvt->name ? tech_pvt->name : "none" : "none", -1, tech_pvt ? tech_pvt->interface_state : -1, tech_pvt ? tech_pvt->phone_callflow : -1
+#define GSMOPEN_P_LOG NULL, (unsigned long)55, __LINE__, tech_pvt ? tech_pvt->name ? tech_pvt->name : "none" : "none", -1, tech_pvt ? tech_pvt->interface_state : -1, tech_pvt ? tech_pvt->phone_callflow : -1
 
 /*********************************/
-#define CELLIAX_CAUSE_NORMAL		1
-#define CELLIAX_CAUSE_FAILURE		2
-#define CELLIAX_CAUSE_NO_ANSWER		3
+#define GSMOPEN_CAUSE_NORMAL		1
+#define GSMOPEN_CAUSE_FAILURE		2
+#define GSMOPEN_CAUSE_NO_ANSWER		3
 /*********************************/
-#define CELLIAX_FRAME_DTMF		1
+#define GSMOPEN_FRAME_DTMF		1
 /*********************************/
-#define CELLIAX_CONTROL_RINGING		1
-#define CELLIAX_CONTROL_ANSWER		2
-#define CELLIAX_CONTROL_HANGUP		3
-#define CELLIAX_CONTROL_BUSY		4
+#define GSMOPEN_CONTROL_RINGING		1
+#define GSMOPEN_CONTROL_ANSWER		2
+#define GSMOPEN_CONTROL_HANGUP		3
+#define GSMOPEN_CONTROL_BUSY		4
 
 /*********************************/
-#define		CELLIAX_STATE_IDLE				0
-#define		CELLIAX_STATE_DOWN				1
-#define		CELLIAX_STATE_RING				2
-#define		CELLIAX_STATE_DIALING				3
-#define		CELLIAX_STATE_BUSY				4
-#define		CELLIAX_STATE_UP				5
-#define		CELLIAX_STATE_RINGING				6
-#define		CELLIAX_STATE_PRERING				7
-#define		CELLIAX_STATE_ERROR_DOUBLE_CALL			8
-#define		CELLIAX_STATE_SELECTED				9
-#define 	CELLIAX_STATE_HANGUP_REQUESTED			10
-#define		CELLIAX_STATE_PREANSWER				11
+#define		GSMOPEN_STATE_IDLE				0
+#define		GSMOPEN_STATE_DOWN				1
+#define		GSMOPEN_STATE_RING				2
+#define		GSMOPEN_STATE_DIALING				3
+#define		GSMOPEN_STATE_BUSY				4
+#define		GSMOPEN_STATE_UP				5
+#define		GSMOPEN_STATE_RINGING				6
+#define		GSMOPEN_STATE_PRERING				7
+#define		GSMOPEN_STATE_ERROR_DOUBLE_CALL			8
+#define		GSMOPEN_STATE_SELECTED				9
+#define 	GSMOPEN_STATE_HANGUP_REQUESTED			10
+#define		GSMOPEN_STATE_PREANSWER				11
 /*********************************/
 /* call flow from the device */
 #define 	CALLFLOW_CALL_IDLE				0
@@ -185,11 +185,11 @@
 #define 	AT_OK   0
 #define 	AT_ERROR   1
 
-#define CELLIAX_MAX_INTERFACES 64
+#define GSMOPEN_MAX_INTERFACES 64
 
 #ifndef WIN32
-struct CelliaxHandles {
-	Window celliax_win;
+struct GSMopenHandles {
+	Window gsmopen_win;
 	Display *disp;
 	Window win;
 	int currentuserhandle;
@@ -198,7 +198,7 @@
 };
 #else //WIN32
 
-struct CelliaxHandles {
+struct GSMopenHandles {
 	HWND win32_hInit_MainWindowHandle;
 	HWND win32_hGlobal_GSMAPIWindowHandle;
 	HINSTANCE win32_hInit_ProcessHandle;
@@ -253,38 +253,38 @@
 	int tcp_cli_port;
 	int tcp_srv_port;
 #endif
-	struct CelliaxHandles CelliaxHandles;
+	struct GSMopenHandles GSMopenHandles;
 
 	int interface_state;		/*!< \brief 'state' of the interface (channel) */
 	char language[80];			/*!< \brief default Asterisk dialplan language for this interface */
 	char exten[80];				/*!< \brief default Asterisk dialplan extension for this interface */
-	int celliax_sound_rate;		/*!< \brief rate of the sound device, in Hz, eg: 8000 */
+	int gsmopen_sound_rate;		/*!< \brief rate of the sound device, in Hz, eg: 8000 */
 	char callid_name[50];
 	char callid_number[50];
 	double playback_boost;
 	double capture_boost;
 	int stripmsd;
-	char celliax_call_id[512];
-	int celliax_call_ongoing;
-	char celliax_friends[4096];
-	char celliax_fullname[512];
-	char celliax_displayname[512];
-	int phone_callflow;			/*!< \brief 'callflow' of the celliax interface (as opposed to phone interface) */
-	int celliax;				/*!< \brief config flag, bool, GSM support on this interface (0 if false, -1 if true) */
+	char gsmopen_call_id[512];
+	int gsmopen_call_ongoing;
+	char gsmopen_friends[4096];
+	char gsmopen_fullname[512];
+	char gsmopen_displayname[512];
+	int phone_callflow;			/*!< \brief 'callflow' of the gsmopen interface (as opposed to phone interface) */
+	int gsmopen;				/*!< \brief config flag, bool, GSM support on this interface (0 if false, -1 if true) */
 	int control_to_send;
 #ifdef WIN32
 	switch_file_t *audiopipe[2];
-	switch_file_t *audiocelliaxpipe[2];
-	switch_file_t *celliax_sound_capt_fd;	/*!< \brief file descriptor for sound capture dev */
+	switch_file_t *audiogsmopenpipe[2];
+	switch_file_t *gsmopen_sound_capt_fd;	/*!< \brief file descriptor for sound capture dev */
 #else							/* WIN32 */
 	int audiopipe[2];
-	int audiocelliaxpipe[2];
-	int celliax_sound_capt_fd;	/*!< \brief file descriptor for sound capture dev */
+	int audiogsmopenpipe[2];
+	int gsmopen_sound_capt_fd;	/*!< \brief file descriptor for sound capture dev */
 #endif							/* WIN32 */
 	switch_thread_t *tcp_srv_thread;
 	switch_thread_t *tcp_cli_thread;
-	switch_thread_t *celliax_signaling_thread;
-	switch_thread_t *celliax_api_thread;
+	switch_thread_t *gsmopen_signaling_thread;
+	switch_thread_t *gsmopen_api_thread;
 	//short audiobuf[SAMPLES_PER_FRAME];
 	//int audiobuf_is_loaded;
 
@@ -296,15 +296,15 @@
 	//int phonebook_last_entry;
 	//int phonebook_number_lenght;
 	//int phonebook_text_lenght;
-	int celliax_dir_entry_extension_prefix;
-	char celliax_user[256];
-	char celliax_password[256];
+	int gsmopen_dir_entry_extension_prefix;
+	char gsmopen_user[256];
+	char gsmopen_password[256];
 	char destination[256];
 	struct timeval answer_time;
 
 	struct timeval transfer_time;
 	char transfer_callid_number[50];
-	char celliax_transfer_call_id[512];
+	char gsmopen_transfer_call_id[512];
 	int running;
 	unsigned long ib_calls;
 	unsigned long ob_calls;
@@ -389,9 +389,9 @@
 
 	char at_cmgw[16];
 	int no_ucs2;
-	time_t celliax_serial_sync_period;
+	time_t gsmopen_serial_sync_period;
 
-	time_t celliax_serial_synced_timestamp;
+	time_t gsmopen_serial_synced_timestamp;
 	struct s_result line_array;
 
 
@@ -420,7 +420,7 @@
 
 	struct timeval ringtime;
 	ciapa_t *owner;
-#ifdef CELLIAX_ALSA
+#ifdef GSMOPEN_ALSA
 	snd_pcm_t *alsac;			/*!< \brief handle of the ALSA capture audio device */
 	snd_pcm_t *alsap;			/*!< \brief handle of the ALSA playback audio device */
 	char alsacname[50];			/*!< \brief name of the ALSA capture audio device */
@@ -432,7 +432,7 @@
 	int alsa_capture_is_mono;
 	int alsa_play_is_mono;
 	struct pollfd pfd;
-#endif							// CELLIAX_ALSA
+#endif							// GSMOPEN_ALSA
 
 	time_t audio_play_reset_timestamp;
 	int audio_play_reset_period;
@@ -446,120 +446,120 @@
 
 typedef struct private_object private_t;
 
-void *SWITCH_THREAD_FUNC celliax_api_thread_func(switch_thread_t *thread, void *obj);
-int celliax_audio_read(private_t * tech_pvt);
-int celliax_audio_init(private_t * tech_pvt);
-int celliax_signaling_read(private_t * tech_pvt);
+void *SWITCH_THREAD_FUNC gsmopen_api_thread_func(switch_thread_t *thread, void *obj);
+int gsmopen_audio_read(private_t * tech_pvt);
+int gsmopen_audio_init(private_t * tech_pvt);
+int gsmopen_signaling_read(private_t * tech_pvt);
 
-int celliax_call(private_t * tech_pvt, char *idest, int timeout);
-int celliax_senddigit(private_t * tech_pvt, char digit);
+int gsmopen_call(private_t * tech_pvt, char *idest, int timeout);
+int gsmopen_senddigit(private_t * tech_pvt, char digit);
 
-void *celliax_do_tcp_srv_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_tcp_srv_thread(switch_thread_t *thread, void *obj);
+void *gsmopen_do_tcp_srv_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC gsmopen_do_tcp_srv_thread(switch_thread_t *thread, void *obj);
 
-void *celliax_do_tcp_cli_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_tcp_cli_thread(switch_thread_t *thread, void *obj);
+void *gsmopen_do_tcp_cli_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC gsmopen_do_tcp_cli_thread(switch_thread_t *thread, void *obj);
 
-void *celliax_do_celliaxapi_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_celliaxapi_thread(switch_thread_t *thread, void *obj);
+void *gsmopen_do_gsmopenapi_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC gsmopen_do_gsmopenapi_thread(switch_thread_t *thread, void *obj);
 int dtmf_received(private_t * tech_pvt, char *value);
 int start_audio_threads(private_t * tech_pvt);
 int new_inbound_channel(private_t * tech_pvt);
 int outbound_channel_answered(private_t * tech_pvt);
-//int celliax_signaling_write(private_t * tech_pvt, char *msg_to_celliax);
+//int gsmopen_signaling_write(private_t * tech_pvt, char *msg_to_gsmopen);
 #if defined(WIN32) && !defined(__CYGWIN__)
-int celliax_pipe_read(switch_file_t *pipe, short *buf, int howmany);
-int celliax_pipe_write(switch_file_t *pipe, short *buf, int howmany);
+int gsmopen_pipe_read(switch_file_t *pipe, short *buf, int howmany);
+int gsmopen_pipe_write(switch_file_t *pipe, short *buf, int howmany);
 /* Visual C do not have strsep ? */
 char *strsep(char **stringp, const char *delim);
 #else
-int celliax_pipe_read(int pipe, short *buf, int howmany);
-int celliax_pipe_write(int pipe, short *buf, int howmany);
+int gsmopen_pipe_read(int pipe, short *buf, int howmany);
+int gsmopen_pipe_write(int pipe, short *buf, int howmany);
 #endif /* WIN32 */
-int celliax_close_socket(unsigned int fd);
-private_t *find_available_celliax_interface_rr(private_t * tech_pvt_calling);
+int gsmopen_close_socket(unsigned int fd);
+private_t *find_available_gsmopen_interface_rr(private_t * tech_pvt_calling);
 int remote_party_is_ringing(private_t * tech_pvt);
 int remote_party_is_early_media(private_t * tech_pvt);
-//int celliax_answer(private_t * tech_pvt, char *id, char *value);
-int celliax_transfer(private_t * tech_pvt, char *id, char *value);
-int celliax_socket_create_and_bind(private_t * tech_pvt, int *which_port);
+//int gsmopen_answer(private_t * tech_pvt, char *id, char *value);
+int gsmopen_transfer(private_t * tech_pvt, char *id, char *value);
+int gsmopen_socket_create_and_bind(private_t * tech_pvt, int *which_port);
 
 
 
 
 
-void *celliax_do_controldev_thread(void *data);
-int celliax_serial_init(private_t * tech_pvt, speed_t controldevice_speed);
-int celliax_serial_monitor(private_t * tech_pvt);
-int celliax_serial_sync(private_t * tech_pvt);
-int celliax_serial_sync_AT(private_t * tech_pvt);
-int celliax_serial_config(private_t * tech_pvt);
-int celliax_serial_config_AT(private_t * tech_pvt);
+void *gsmopen_do_controldev_thread(void *data);
+int gsmopen_serial_init(private_t * tech_pvt, speed_t controldevice_speed);
+int gsmopen_serial_monitor(private_t * tech_pvt);
+int gsmopen_serial_sync(private_t * tech_pvt);
+int gsmopen_serial_sync_AT(private_t * tech_pvt);
+int gsmopen_serial_config(private_t * tech_pvt);
+int gsmopen_serial_config_AT(private_t * tech_pvt);
 
-#define celliax_serial_write_AT_expect(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 1, 2)
-#define celliax_serial_write_AT_expect_noexpcr(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 0, 2)
-#define celliax_serial_write_AT_expect_noexpcr_tout(P, D, S, T) celliax_serial_write_AT_expect1(P, D, S, 0, T)
+#define gsmopen_serial_write_AT_expect(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 2)
+#define gsmopen_serial_write_AT_expect_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 2)
+#define gsmopen_serial_write_AT_expect_noexpcr_tout(P, D, S, T) gsmopen_serial_write_AT_expect1(P, D, S, 0, T)
 // 20.5 sec timeout, used for querying the SIM and sending SMSs
-#define celliax_serial_write_AT_expect_longtime(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 1, 20)
-#define celliax_serial_write_AT_expect_longtime_noexpcr(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 0, 20)
-int celliax_serial_write_AT(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_nocr(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_ack(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_noack(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds);
-int celliax_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds);
-int celliax_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf);
-int celliax_serial_read(private_t * tech_pvt);
+#define gsmopen_serial_write_AT_expect_longtime(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 20)
+#define gsmopen_serial_write_AT_expect_longtime_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 20)
+int gsmopen_serial_write_AT(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_nocr(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_ack(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_noack(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds);
+int gsmopen_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds);
+int gsmopen_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf);
+int gsmopen_serial_read(private_t * tech_pvt);
 #ifdef NOTDEF
-int celliax_serial_getstatus(private_t * tech_pvt);
-int celliax_serial_hangup(private_t * tech_pvt);
-int celliax_serial_answer(private_t * tech_pvt);
-int celliax_serial_answer_AT(private_t * tech_pvt);
-int celliax_serial_hangup_AT(private_t * tech_pvt);
-int celliax_serial_call_AT(private_t * tech_pvt, char *dstr);
-int celliax_serial_getstatus_AT(private_t * tech_pvt);
+int gsmopen_serial_getstatus(private_t * tech_pvt);
+int gsmopen_serial_hangup(private_t * tech_pvt);
+int gsmopen_serial_answer(private_t * tech_pvt);
+int gsmopen_serial_answer_AT(private_t * tech_pvt);
+int gsmopen_serial_hangup_AT(private_t * tech_pvt);
+int gsmopen_serial_call_AT(private_t * tech_pvt, char *dstr);
+int gsmopen_serial_getstatus_AT(private_t * tech_pvt);
 #endif // NOTDEF
 #define RESULT_FAILURE 0
 #define RESULT_SUCCESS 1
 int utf_to_ucs2(private_t * tech_pvt, char *utf_in, size_t inbytesleft, char *ucs2_out, size_t outbytesleft);
 int ucs2_to_utf8(private_t * tech_pvt, char *ucs2_in, char *utf8_out, size_t outbytesleft);
-//#define PUSHA_UNLOCKA(x)    pthread_cleanup_push(celliax_unlocka_log, (void *) x);
+//#define PUSHA_UNLOCKA(x)    pthread_cleanup_push(gsmopen_unlocka_log, (void *) x);
 //#define POPPA_UNLOCKA(x)    pthread_cleanup_pop(0);
 
-#define PUSHA_UNLOCKA(x)    if(option_debug > 100) ERRORA("PUSHA_UNLOCKA: %p\n", CELLIAX_P_LOG, (void *)x);
-#define POPPA_UNLOCKA(x)    if(option_debug > 100) ERRORA("POPPA_UNLOCKA: %p\n", CELLIAX_P_LOG, (void *)x);
-//#define LOKKA(x)    if(option_debug > 100) ERRORA("LOKKA: %p\n", CELLIAX_P_LOG, (void *)x);
+#define PUSHA_UNLOCKA(x)    if(option_debug > 100) ERRORA("PUSHA_UNLOCKA: %p\n", GSMOPEN_P_LOG, (void *)x);
+#define POPPA_UNLOCKA(x)    if(option_debug > 100) ERRORA("POPPA_UNLOCKA: %p\n", GSMOPEN_P_LOG, (void *)x);
+//#define LOKKA(x)    if(option_debug > 100) ERRORA("LOKKA: %p\n", GSMOPEN_P_LOG, (void *)x);
 #define LOKKA(x)    switch_mutex_lock(x);
 #define UNLOCKA(x)  switch_mutex_unlock(x);
-//#define UNLOCKA(x)    if(option_debug > 100) ERRORA("UNLOCKA: %p\n", CELLIAX_P_LOG, (void *)x);
+//#define UNLOCKA(x)    if(option_debug > 100) ERRORA("UNLOCKA: %p\n", GSMOPEN_P_LOG, (void *)x);
 
-#define celliax_queue_control(x, y) ERRORA("celliax_queue_control: %p, %d\n", CELLIAX_P_LOG, (void *)x, y);
+#define gsmopen_queue_control(x, y) ERRORA("gsmopen_queue_control: %p, %d\n", GSMOPEN_P_LOG, (void *)x, y);
 
-#define ast_setstate(x, y) ERRORA("ast_setstate: %p, %d\n", CELLIAX_P_LOG, (void *)x, y);
+#define ast_setstate(x, y) ERRORA("ast_setstate: %p, %d\n", GSMOPEN_P_LOG, (void *)x, y);
 
-int celliax_serial_read(private_t * tech_pvt);
-int celliax_answer(private_t * tech_pvt);
-int celliax_serial_answer(private_t * tech_pvt);
-int celliax_serial_answer_AT(private_t * tech_pvt);
-int celliax_serial_hangup(private_t * tech_pvt);
-int celliax_serial_hangup_AT(private_t * tech_pvt);
-int celliax_hangup(private_t * tech_pvt);
-int celliax_serial_call(private_t * tech_pvt, char *dstr);
-int celliax_serial_call_AT(private_t * tech_pvt, char *dstr);
-int celliax_sendsms(private_t * tech_pvt, char *dest, char *text);
+int gsmopen_serial_read(private_t * tech_pvt);
+int gsmopen_answer(private_t * tech_pvt);
+int gsmopen_serial_answer(private_t * tech_pvt);
+int gsmopen_serial_answer_AT(private_t * tech_pvt);
+int gsmopen_serial_hangup(private_t * tech_pvt);
+int gsmopen_serial_hangup_AT(private_t * tech_pvt);
+int gsmopen_hangup(private_t * tech_pvt);
+int gsmopen_serial_call(private_t * tech_pvt, char *dstr);
+int gsmopen_serial_call_AT(private_t * tech_pvt, char *dstr);
+int gsmopen_sendsms(private_t * tech_pvt, char *dest, char *text);
 
-#ifdef CELLIAX_ALSA
+#ifdef GSMOPEN_ALSA
 int alsa_init(private_t * tech_pvt);
 int alsa_shutdown(private_t * tech_pvt);
 snd_pcm_t *alsa_open_dev(private_t * tech_pvt, snd_pcm_stream_t stream);
 int alsa_write(private_t * tech_pvt, short *data, int datalen);
 int alsa_read(private_t * tech_pvt, short *data, int datalen);
 
-#endif /* CELLIAX_ALSA */
+#endif /* GSMOPEN_ALSA */
 
 
-void celliax_store_boost(char *s, double *boost);
-int celliax_sound_boost(void *data, int samples_num, double boost);
+void gsmopen_store_boost(char *s, double *boost);
+int gsmopen_sound_boost(void *data, int samples_num, double boost);
 int sms_incoming(private_t * tech_pvt, char *value);
-int celliax_ring(private_t * tech_pvt);
+int gsmopen_ring(private_t * tech_pvt);

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c (15045 => 15046)


--- freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c	2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c	2009-10-02 13:17:39 UTC (rev 15046)
@@ -1,27 +1,27 @@
-#include "celliax.h"
+#include "gsmopen.h"
 
 #ifdef ASTERISK
-#define celliax_sleep usleep
-#define celliax_strncpy strncpy
+#define gsmopen_sleep usleep
+#define gsmopen_strncpy strncpy
 #define tech_pvt p
-extern int celliax_debug;
-extern char *celliax_console_active;
+extern int gsmopen_debug;
+extern char *gsmopen_console_active;
 #else /* FREESWITCH */
-#define celliax_sleep switch_sleep
-#define celliax_strncpy switch_copy_string
-extern switch_memory_pool_t *celliax_module_pool;
-extern switch_endpoint_interface_t *celliax_endpoint_interface;
+#define gsmopen_sleep switch_sleep
+#define gsmopen_strncpy switch_copy_string
+extern switch_memory_pool_t *gsmopen_module_pool;
+extern switch_endpoint_interface_t *gsmopen_endpoint_interface;
 #endif /* ASTERISK */
-//int samplerate_celliax = SAMPLERATE_CELLIAX;
+//int samplerate_gsmopen = SAMPLERATE_GSMOPEN;
 
 extern int running;
-int celliax_dir_entry_extension = 1;
+int gsmopen_dir_entry_extension = 1;
 
 int option_debug = 100;
 
 
 
-int celliax_serial_init(private_t * tech_pvt, speed_t controldevice_speed)
+int gsmopen_serial_init(private_t * tech_pvt, speed_t controldevice_speed)
 {
 	int fd;
 	int rt;
@@ -40,14 +40,14 @@
 #endif /* __CYGWIN__ */
 	fd = open(tech_pvt->controldevice_name, O_RDWR | O_NOCTTY | O_NONBLOCK);
 	if (fd == -1) {
-		DEBUGA_CELLIAX("serial error: %s\n", CELLIAX_P_LOG, strerror(errno));
+		DEBUGA_GSMOPEN("serial error: %s\n", GSMOPEN_P_LOG, strerror(errno));
 		tech_pvt->controldevfd = fd;
 		return -1;
 	}
 /*  flush it */
 	rt = tcflush(fd, TCIFLUSH);
 	if (rt == -1) {
-		ERRORA("serial error: %s", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("serial error: %s", GSMOPEN_P_LOG, strerror(errno));
 	}
 /*  attributes */
 	tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL;
@@ -60,19 +60,19 @@
 /*  set controldevice_speed */
 	rt = cfsetispeed(&tp, tech_pvt->controldevice_speed);
 	if (rt == -1) {
-		ERRORA("serial error: %s, speed was: %d", CELLIAX_P_LOG, strerror(errno), tech_pvt->controldevice_speed);
+		ERRORA("serial error: %s, speed was: %d", GSMOPEN_P_LOG, strerror(errno), tech_pvt->controldevice_speed);
 	}
 	rt = cfsetospeed(&tp, tech_pvt->controldevice_speed);
 	if (rt == -1) {
-		ERRORA("serial error: %s", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("serial error: %s", GSMOPEN_P_LOG, strerror(errno));
 	}
 /*  set port attributes */
 	if (tcsetattr(fd, TCSADRAIN, &tp) == -1) {
-		ERRORA("serial error: %s", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("serial error: %s", GSMOPEN_P_LOG, strerror(errno));
 	}
 	rt = tcsetattr(fd, TCSANOW, &tp);
 	if (rt == -1) {
-		ERRORA("serial error: %s", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("serial error: %s", GSMOPEN_P_LOG, strerror(errno));
 	}
 	unsigned int status = 0;
 #ifndef __CYGWIN__
@@ -93,69 +93,69 @@
 	ioctl(fd, TIOCMSET, &status);
 #endif /* __CYGWIN__ */
 	tech_pvt->controldevfd = fd;
-	DEBUGA_CELLIAX("Syncing Serial\n", CELLIAX_P_LOG);
-	rt = celliax_serial_sync(tech_pvt);
+	DEBUGA_GSMOPEN("Syncing Serial\n", GSMOPEN_P_LOG);
+	rt = gsmopen_serial_sync(tech_pvt);
 	if (rt == -1) {
-		ERRORA("Serial init error\n", CELLIAX_P_LOG);
+		ERRORA("Serial init error\n", GSMOPEN_P_LOG);
 		return -1;
 	}
 	return (fd);
 }
 
-int celliax_serial_read(private_t * tech_pvt)
+int gsmopen_serial_read(private_t * tech_pvt)
 {
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT)
-		return celliax_serial_read_AT(tech_pvt, 0, 100000, 0, NULL, 1);	// a 10th of a second timeout
-#ifdef CELLIAX_FBUS2
+		return gsmopen_serial_read_AT(tech_pvt, 0, 100000, 0, NULL, 1);	// a 10th of a second timeout
+#ifdef GSMOPEN_FBUS2
 	if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
-		return celliax_serial_read_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
+		return gsmopen_serial_read_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
 	if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
-		return celliax_serial_read_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
+		return gsmopen_serial_read_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
 	return -1;
 }
 
 
-int celliax_serial_sync(private_t * tech_pvt)
+int gsmopen_serial_sync(private_t * tech_pvt)
 {
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT)
-		return celliax_serial_sync_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
+		return gsmopen_serial_sync_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
 	if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
-		return celliax_serial_sync_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
+		return gsmopen_serial_sync_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
 	if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
-		return celliax_serial_sync_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
+		return gsmopen_serial_sync_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
 
 	return -1;
 }
 
-int celliax_serial_config(private_t * tech_pvt)
+int gsmopen_serial_config(private_t * tech_pvt)
 {
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT)
-		return celliax_serial_config_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
+		return gsmopen_serial_config_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
 	if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
-		return celliax_serial_config_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
+		return gsmopen_serial_config_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
 	if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
-		return celliax_serial_config_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
+		return gsmopen_serial_config_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
 	return -1;
 }
 
-int celliax_serial_config_AT(private_t * tech_pvt)
+int gsmopen_serial_config_AT(private_t * tech_pvt)
 {
 	int res;
 
 /* initial_pause? */
 	if (tech_pvt->at_initial_pause) {
-		DEBUGA_CELLIAX("sleeping for %d usec\n", CELLIAX_P_LOG, tech_pvt->at_initial_pause);
+		DEBUGA_GSMOPEN("sleeping for %d usec\n", GSMOPEN_P_LOG, tech_pvt->at_initial_pause);
 		usleep(tech_pvt->at_initial_pause);
 	}
 
@@ -163,45 +163,45 @@
 	while (1) {
 
 		if (strlen(tech_pvt->at_preinit_1)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_1, tech_pvt->at_preinit_1_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_1, tech_pvt->at_preinit_1_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_preinit_1, tech_pvt->at_preinit_1_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_preinit_1, tech_pvt->at_preinit_1_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_preinit_2)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_2, tech_pvt->at_preinit_2_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_2, tech_pvt->at_preinit_2_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_preinit_2, tech_pvt->at_preinit_2_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_preinit_2, tech_pvt->at_preinit_2_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_preinit_3)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_3, tech_pvt->at_preinit_3_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_3, tech_pvt->at_preinit_3_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_preinit_3, tech_pvt->at_preinit_3_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_preinit_3, tech_pvt->at_preinit_3_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_preinit_4)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_4, tech_pvt->at_preinit_4_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_4, tech_pvt->at_preinit_4_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_preinit_4, tech_pvt->at_preinit_4_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_preinit_4, tech_pvt->at_preinit_4_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_preinit_5)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_5, tech_pvt->at_preinit_5_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_5, tech_pvt->at_preinit_5_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_preinit_5, tech_pvt->at_preinit_5_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_preinit_5, tech_pvt->at_preinit_5_expect);
 			}
 		} else {
 			break;
@@ -212,40 +212,40 @@
 
 /* after_preinit_pause? */
 	if (tech_pvt->at_after_preinit_pause) {
-		DEBUGA_CELLIAX("sleeping for %d usec\n", CELLIAX_P_LOG, tech_pvt->at_after_preinit_pause);
+		DEBUGA_GSMOPEN("sleeping for %d usec\n", GSMOPEN_P_LOG, tech_pvt->at_after_preinit_pause);
 		usleep(tech_pvt->at_after_preinit_pause);
 	}
 
 	/* phone, brother, art you alive? */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT");
 	if (res) {
-		ERRORA("no response to AT\n", CELLIAX_P_LOG);
+		ERRORA("no response to AT\n", GSMOPEN_P_LOG);
 		return -1;
 	}
 	/* for motorola, bring it back to "normal" mode if it happens to be in another mode */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+mode=0");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+mode=0");
 	if (res) {
-		DEBUGA_CELLIAX("AT+mode=0 does not get OK from the phone. If it is NOT Motorola," " no problem.\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+mode=0 does not get OK from the phone. If it is NOT Motorola," " no problem.\n", GSMOPEN_P_LOG);
 	}
 	usleep(50000);
 	/* for motorola end */
 
 	/* reset AT configuration to phone default */
-	res = celliax_serial_write_AT_ack(tech_pvt, "ATZ");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "ATZ");
 	if (res) {
-		DEBUGA_CELLIAX("ATZ failed\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("ATZ failed\n", GSMOPEN_P_LOG);
 	}
 
 	/* disable AT command echo */
-	res = celliax_serial_write_AT_ack(tech_pvt, "ATE0");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "ATE0");
 	if (res) {
-		DEBUGA_CELLIAX("ATE0 failed\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("ATE0 failed\n", GSMOPEN_P_LOG);
 	}
 
 	/* disable extended error reporting */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMEE=0");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMEE=0");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CMEE failed\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CMEE failed\n", GSMOPEN_P_LOG);
 	}
 
 	/* various phone manufacturer identifier */
@@ -254,135 +254,135 @@
 	for (i = 0; i < 10; i++) {
 		memset(at_command, 0, sizeof(at_command));
 		sprintf(at_command, "ATI%d", i);
-		res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+		res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
 		if (res) {
-			DEBUGA_CELLIAX("ATI%d command failed, continue\n", CELLIAX_P_LOG, i);
+			DEBUGA_GSMOPEN("ATI%d command failed, continue\n", GSMOPEN_P_LOG, i);
 		}
 	}
 
 	/* phone manufacturer */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CGMI");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CGMI");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CGMI failed\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CGMI failed\n", GSMOPEN_P_LOG);
 	}
 
 	/* phone model */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CGMM");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CGMM");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CGMM failed\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CGMM failed\n", GSMOPEN_P_LOG);
 	}
 
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CGSN");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CGSN");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CGSN failed\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CGSN failed\n", GSMOPEN_P_LOG);
 	}
 
 /* this take a lot of time to complete on devices with slow serial link (eg.: 9600bps) */
 	/* signal incoming SMS with a +CMTI unsolicited msg */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CNMI=3,1,0,0,0");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CNMI=3,1,0,0,0");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CNMI=3,1,0,0,0 failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CNMI=3,1,0,0,0 failed, continue\n", GSMOPEN_P_LOG);
 		tech_pvt->sms_cnmi_not_supported = 1;
-		tech_pvt->celliax_serial_sync_period = 30;
+		tech_pvt->gsmopen_serial_sync_period = 30;
 	}
 	/* what is the Message Center address (number) to which the SMS has to be sent? */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCA?");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCA?");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CSCA? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CSCA? failed, continue\n", GSMOPEN_P_LOG);
 	}
 	/* what is the Message Format of SMSs? */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMGF?");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMGF?");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CMGF? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CMGF? failed, continue\n", GSMOPEN_P_LOG);
 	}
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMGF=1");	//TODO: support phones that only accept pdu mode
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMGF=1");	//TODO: support phones that only accept pdu mode
 	if (res) {
-		ERRORA("Error setting SMS sending mode to TEXT on the cellphone\n", CELLIAX_P_LOG);
+		ERRORA("Error setting SMS sending mode to TEXT on the cellphone\n", GSMOPEN_P_LOG);
 		return RESULT_FAILURE;
 	}
 	/* what is the Charset of SMSs? */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS?");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCS?");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CSCS? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CSCS? failed, continue\n", GSMOPEN_P_LOG);
 	}
 
 	tech_pvt->no_ucs2 = 0;
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
 	if (res) {
-		WARNINGA("AT+CSCS=\"UCS2\" (set TE messages to ucs2)  do not got OK from the phone, let's try with 'GSM'\n", CELLIAX_P_LOG);
+		WARNINGA("AT+CSCS=\"UCS2\" (set TE messages to ucs2)  do not got OK from the phone, let's try with 'GSM'\n", GSMOPEN_P_LOG);
 		tech_pvt->no_ucs2 = 1;
 	}
 
 	if (tech_pvt->no_ucs2) {
-		res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"GSM\"");
+		res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"GSM\"");
 		if (res) {
-			WARNINGA("AT+CSCS=\"GSM\" (set TE messages to GSM)  do not got OK from the phone\n", CELLIAX_P_LOG);
+			WARNINGA("AT+CSCS=\"GSM\" (set TE messages to GSM)  do not got OK from the phone\n", GSMOPEN_P_LOG);
 		}
-		//res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,16"); //"flash", class 0  sms 7 bit
-		res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,0");	//normal, 7 bit message
+		//res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,16"); //"flash", class 0  sms 7 bit
+		res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,0");	//normal, 7 bit message
 		if (res) {
-			WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", CELLIAX_P_LOG);
+			WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", GSMOPEN_P_LOG);
 		}
 	} else {
-		//res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,20"); //"flash", class 0 sms 16 bit unicode
-		res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,8");	//unicode, 16 bit message
+		//res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,20"); //"flash", class 0 sms 16 bit unicode
+		res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,8");	//unicode, 16 bit message
 		if (res) {
-			WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", CELLIAX_P_LOG);
+			WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", GSMOPEN_P_LOG);
 		}
 	}
 
 	/* is the unsolicited reporting of mobile equipment event supported? */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMER=?");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMER=?");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CMER=? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CMER=? failed, continue\n", GSMOPEN_P_LOG);
 	}
 	/* request unsolicited reporting of mobile equipment indicators' events, to be screened by categories reported by +CIND=? */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMER=3,0,0,1");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMER=3,0,0,1");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CMER=? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CMER=? failed, continue\n", GSMOPEN_P_LOG);
 	}
 
 	/* is the solicited reporting of mobile equipment indications supported? */
 
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CIND=?");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CIND=?");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CIND=? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CIND=? failed, continue\n", GSMOPEN_P_LOG);
 	}
 
 	/* is the unsolicited reporting of call monitoring supported? sony-ericsson specific */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT*ECAM=?");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT*ECAM=?");
 	if (res) {
-		DEBUGA_CELLIAX("AT*ECAM=? failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT*ECAM=? failed, continue\n", GSMOPEN_P_LOG);
 	}
 	/* enable the unsolicited reporting of call monitoring. sony-ericsson specific */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT*ECAM=1");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT*ECAM=1");
 	if (res) {
-		DEBUGA_CELLIAX("AT*ECAM=1 failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT*ECAM=1 failed, continue\n", GSMOPEN_P_LOG);
 		tech_pvt->at_has_ecam = 0;
 	} else {
 		tech_pvt->at_has_ecam = 1;
 	}
 
 	/* disable unsolicited signaling of call list */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CLCC=0");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CLCC=0");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CLCC=0 failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CLCC=0 failed, continue\n", GSMOPEN_P_LOG);
 		tech_pvt->at_has_clcc = 0;
 	} else {
 		tech_pvt->at_has_clcc = 1;
 	}
 
 	/* give unsolicited caller id when incoming call */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+CLIP=1");
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CLIP=1");
 	if (res) {
-		DEBUGA_CELLIAX("AT+CLIP failed, continue\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+CLIP failed, continue\n", GSMOPEN_P_LOG);
 	}
 	/* for motorola */
-	res = celliax_serial_write_AT_ack(tech_pvt, "AT+MCST=1");	/* motorola call control codes
+	res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+MCST=1");	/* motorola call control codes
 																   (to know when call is disconnected (they
 																   don't give you "no carrier") */
 	if (res) {
-		DEBUGA_CELLIAX("AT+MCST=1 does not get OK from the phone. If it is NOT Motorola," " no problem.\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("AT+MCST=1 does not get OK from the phone. If it is NOT Motorola," " no problem.\n", GSMOPEN_P_LOG);
 	}
 	/* for motorola end */
 
@@ -390,45 +390,45 @@
 	while (1) {
 
 		if (strlen(tech_pvt->at_postinit_1)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_1, tech_pvt->at_postinit_1_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_1, tech_pvt->at_postinit_1_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_postinit_1, tech_pvt->at_postinit_1_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_postinit_1, tech_pvt->at_postinit_1_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_postinit_2)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_2, tech_pvt->at_postinit_2_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_2, tech_pvt->at_postinit_2_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_postinit_2, tech_pvt->at_postinit_2_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_postinit_2, tech_pvt->at_postinit_2_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_postinit_3)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_3, tech_pvt->at_postinit_3_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_3, tech_pvt->at_postinit_3_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_postinit_3, tech_pvt->at_postinit_3_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_postinit_3, tech_pvt->at_postinit_3_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_postinit_4)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_4, tech_pvt->at_postinit_4_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_4, tech_pvt->at_postinit_4_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_postinit_4, tech_pvt->at_postinit_4_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_postinit_4, tech_pvt->at_postinit_4_expect);
 			}
 		} else {
 			break;
 		}
 
 		if (strlen(tech_pvt->at_postinit_5)) {
-			res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_5, tech_pvt->at_postinit_5_expect);
+			res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_5, tech_pvt->at_postinit_5_expect);
 			if (res) {
-				DEBUGA_CELLIAX("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG, tech_pvt->at_postinit_5, tech_pvt->at_postinit_5_expect);
+				DEBUGA_GSMOPEN("%s does not get %s from the phone. Continuing.\n", GSMOPEN_P_LOG, tech_pvt->at_postinit_5, tech_pvt->at_postinit_5_expect);
 			}
 		} else {
 			break;
@@ -441,13 +441,13 @@
 }
 
 
-int celliax_serial_sync_AT(private_t * tech_pvt)
+int gsmopen_serial_sync_AT(private_t * tech_pvt)
 {
 	usleep(10000);				/* 10msec */
-	time(&tech_pvt->celliax_serial_synced_timestamp);
+	time(&tech_pvt->gsmopen_serial_synced_timestamp);
 	return 0;
 }
-int celliax_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf)
+int gsmopen_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf)
 {
 	int select_err=1;
 	int res;
@@ -466,7 +466,7 @@
 	FD_ZERO(&read_fds);
 	FD_SET(tech_pvt->controldevfd, &read_fds);
 
-	//NOTICA (" INSIDE this celliax_serial_device %s \n", CELLIAX_P_LOG, tech_pvt->controldevice_name);
+	//NOTICA (" INSIDE this gsmopen_serial_device %s \n", GSMOPEN_P_LOG, tech_pvt->controldevice_name);
 	tmp_answer_ptr = tmp_answer;
 	memset(tmp_answer, 0, sizeof(char) * AT_BUFSIZ);
 
@@ -482,21 +482,21 @@
 
 		if (read_count == 0) {
 			ERRORA
-				("read 0 bytes!!! Nenormalno! Marking this celliax_serial_device %s as dead, andif it is owned by a channel, hanging up. Maybe the phone is stuck, switched off, power down or battery exhausted\n",
-				 CELLIAX_P_LOG, tech_pvt->controldevice_name);
+				("read 0 bytes!!! Nenormalno! Marking this gsmopen_serial_device %s as dead, andif it is owned by a channel, hanging up. Maybe the phone is stuck, switched off, power down or battery exhausted\n",
+				 GSMOPEN_P_LOG, tech_pvt->controldevice_name);
 			tech_pvt->controldev_dead = 1;
 			close(tech_pvt->controldevfd);
 			UNLOCKA(tech_pvt->controldev_lock);
 			if (tech_pvt->owner) {
-				tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
-				celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+				tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
+				gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 			}
 			return -1;
 		}
 
 		if (option_debug > 90) {
-			//DEBUGA_CELLIAX("1 read %d bytes, --|%s|--\n", CELLIAX_P_LOG, read_count, tmp_answer_ptr);
-			//DEBUGA_CELLIAX("2 read %d bytes, --|%s|--\n", CELLIAX_P_LOG, read_count, tmp_answer);
+			//DEBUGA_GSMOPEN("1 read %d bytes, --|%s|--\n", GSMOPEN_P_LOG, read_count, tmp_answer_ptr);
+			//DEBUGA_GSMOPEN("2 read %d bytes, --|%s|--\n", GSMOPEN_P_LOG, read_count, tmp_answer);
 		}
 		tmp_answer_ptr = tmp_answer_ptr + read_count;
 
@@ -511,7 +511,7 @@
 			if (strlen(token_ptr) > AT_MESG_MAX_LENGTH) {
 				WARNINGA
 					("AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n",
-					 CELLIAX_P_LOG, token_ptr, tech_pvt->line_array.result[la_counter]);
+					 GSMOPEN_P_LOG, token_ptr, tech_pvt->line_array.result[la_counter]);
 			}
 			la_counter++;
 			while ((token_ptr = strtok(NULL, "\n\r"))) {
@@ -520,7 +520,7 @@
 				if (strlen(token_ptr) > AT_MESG_MAX_LENGTH) {
 					WARNINGA
 						("AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n",
-						 CELLIAX_P_LOG, token_ptr, tech_pvt->line_array.result[la_counter]);
+						 GSMOPEN_P_LOG, token_ptr, tech_pvt->line_array.result[la_counter]);
 				}
 				la_counter++;
 			}
@@ -529,9 +529,9 @@
 		}
 
 		if (expected_string && !expect_crlf) {
-			DEBUGA_CELLIAX
+			DEBUGA_GSMOPEN
 				("last_line_ptr=|%s|, expected_string=|%s|, expect_crlf=%d, memcmp(last_line_ptr, expected_string, strlen(expected_string)) = %d\n",
-				 CELLIAX_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr, expected_string, strlen(expected_string)));
+				 GSMOPEN_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr, expected_string, strlen(expected_string)));
 		}
 
 		if (expected_string && !expect_crlf && !memcmp(last_line_ptr, expected_string, strlen(expected_string))
@@ -548,7 +548,7 @@
 		/* let's list the complete lines read so far, without re-listing the lines that has yet been listed */
 		if (option_debug > 1) {
 			for (i = la_read; i < la_counter; i++)
-				DEBUGA_CELLIAX("Read line %d: |%s|\n", CELLIAX_P_LOG, i, tech_pvt->line_array.result[i]);
+				DEBUGA_GSMOPEN("Read line %d: |%s|\n", GSMOPEN_P_LOG, i, tech_pvt->line_array.result[i]);
 		}
 
 		/* let's interpret the complete lines read so far (WITHOUT looking for OK, ERROR, and EXPECTED_STRING), without re-interpreting the lines that has been yet interpreted, so we're sure we don't miss anything */
@@ -559,9 +559,9 @@
 				gettimeofday(&(tech_pvt->ringtime), NULL);
 				/* give CALLID (+CLIP) a chance, wait for the next RING before answering */
 				if (tech_pvt->phone_callflow == CALLFLOW_INCOMING_RING) {
-					/* we're at the second ring, set the interface state, will be answered by celliax_do_monitor */
-					DEBUGA_CELLIAX("|%s| got second RING\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-					tech_pvt->interface_state = CELLIAX_STATE_RING;
+					/* we're at the second ring, set the interface state, will be answered by gsmopen_do_monitor */
+					DEBUGA_GSMOPEN("|%s| got second RING\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+					tech_pvt->interface_state = GSMOPEN_STATE_RING;
 				} else {
 					/* we're at the first ring, so there is no CALLID yet thus clean the previous one 
 					   just in case we don't receive the caller identification in this new call */
@@ -570,14 +570,14 @@
 					/* only send AT+CLCC? if the device previously reported its support */
 					if (tech_pvt->at_has_clcc != 0) {
 						/* we're at the first ring, try to get CALLID (with +CLCC) */
-						DEBUGA_CELLIAX("|%s| got first RING, sending AT+CLCC?\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-						res = celliax_serial_write_AT_noack(tech_pvt, "AT+CLCC?");
+						DEBUGA_GSMOPEN("|%s| got first RING, sending AT+CLCC?\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+						res = gsmopen_serial_write_AT_noack(tech_pvt, "AT+CLCC?");
 						if (res) {
-							ERRORA("AT+CLCC? (call list) was not correctly sent to the phone\n", CELLIAX_P_LOG);
+							ERRORA("AT+CLCC? (call list) was not correctly sent to the phone\n", GSMOPEN_P_LOG);
 						}
 					} else {
-						DEBUGA_CELLIAX("|%s| got first RING, but not sending AT+CLCC? as this device "
-									   "seems not to support\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+						DEBUGA_GSMOPEN("|%s| got first RING, but not sending AT+CLCC? as this device "
+									   "seems not to support\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 					}
 				}
 				tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
@@ -612,7 +612,7 @@
 				}
 
 				tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
-				DEBUGA_CELLIAX("|%s| CLCC CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
+				DEBUGA_GSMOPEN("|%s| CLCC CALLID: name is %s, number is %s\n", GSMOPEN_P_LOG,
 							   tech_pvt->line_array.result[i],
 							   tech_pvt->callid_name[0] ? tech_pvt->callid_name : "not available",
 							   tech_pvt->callid_number[0] ? tech_pvt->callid_number : "not available");
@@ -646,15 +646,15 @@
 					}
 				}
 
-				if (tech_pvt->interface_state != CELLIAX_STATE_RING) {
+				if (tech_pvt->interface_state != GSMOPEN_STATE_RING) {
 					gettimeofday(&(tech_pvt->call_incoming_time), NULL);
-					DEBUGA_CELLIAX("CELLIAX_STATE_RING call_incoming_time.tv_sec=%ld\n", CELLIAX_P_LOG, tech_pvt->call_incoming_time.tv_sec);
+					DEBUGA_GSMOPEN("GSMOPEN_STATE_RING call_incoming_time.tv_sec=%ld\n", GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec);
 
 				}
 
-				tech_pvt->interface_state = CELLIAX_STATE_RING;
+				tech_pvt->interface_state = GSMOPEN_STATE_RING;
 				tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
-				DEBUGA_CELLIAX("|%s| CLIP INCOMING CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
+				DEBUGA_GSMOPEN("|%s| CLIP INCOMING CALLID: name is %s, number is %s\n", GSMOPEN_P_LOG,
 							   tech_pvt->line_array.result[i],
 							   (strlen(tech_pvt->callid_name) && tech_pvt->callid_name[0] != 1) ? tech_pvt->callid_name : "not available",
 							   strlen(tech_pvt->callid_number) ? tech_pvt->callid_number : "not available");
@@ -666,58 +666,58 @@
 				if (!strlen(tech_pvt->callid_name) && tech_pvt->callid_name[0] != 1) {
 					strncpy(tech_pvt->callid_name, tech_pvt->callid_number, sizeof(tech_pvt->callid_name));
 					//strncpy(tech_pvt->callid_name, tech_pvt->callid_number, sizeof(tech_pvt->callid_name)) ;
-					snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name), "Celliax: %s", tech_pvt->callid_number);
+					snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name), "GSMopen: %s", tech_pvt->callid_number);
 				}
 
-				DEBUGA_CELLIAX("|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n", CELLIAX_P_LOG,
+				DEBUGA_GSMOPEN("|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n", GSMOPEN_P_LOG,
 							   tech_pvt->line_array.result[i], tech_pvt->callid_name, tech_pvt->callid_number);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], "BUSY") == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_LINEBUSY;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_LINEBUSY\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					ast_setstate(tech_pvt->owner, CELLIAX_STATE_BUSY);
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_BUSY);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_LINEBUSY\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					ast_setstate(tech_pvt->owner, GSMOPEN_STATE_BUSY);
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_BUSY);
 				} else {
-					ERRORA("Why BUSY now?\n", CELLIAX_P_LOG);
+					ERRORA("Why BUSY now?\n", GSMOPEN_P_LOG);
 				}
 			}
 			if ((strcmp(tech_pvt->line_array.result[i], "NO ANSWER") == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_NOANSWER;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_NOANSWER\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					tech_pvt->owner->hangupcause = CELLIAX_CAUSE_NO_ANSWER;
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_NOANSWER\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_NO_ANSWER;
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 				} else {
-					ERRORA("Why NO ANSWER now?\n", CELLIAX_P_LOG);
+					ERRORA("Why NO ANSWER now?\n", GSMOPEN_P_LOG);
 				}
 			}
 			if ((strcmp(tech_pvt->line_array.result[i], "NO CARRIER") == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_NOCARRIER;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_NOCARRIER\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN) {
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_NOCARRIER\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN) {
 					//cicopet
 					switch_core_session_t *session = NULL;
 					switch_channel_t *channel = NULL;
 
-tech_pvt->interface_state = CELLIAX_STATE_DOWN;
+tech_pvt->interface_state = GSMOPEN_STATE_DOWN;
 
 					session = switch_core_session_locate(tech_pvt->session_uuid_str);
 					if(session){
 						channel = switch_core_session_get_channel(session);
-						//celliax_hangup(tech_pvt);
+						//gsmopen_hangup(tech_pvt);
 						switch_core_session_rwunlock(session);
 						switch_channel_hangup(channel, 0);
 					}
 					//
-					//tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
-					//celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+					//tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
+					//gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 				} else {
-					ERRORA("Why NO CARRIER now?\n", CELLIAX_P_LOG);
+					ERRORA("Why NO CARRIER now?\n", GSMOPEN_P_LOG);
 				}
 			}
 
@@ -728,27 +728,27 @@
 
 				err = sscanf(&tech_pvt->line_array.result[i][6], "%d,%d", &power_supply, &battery_strenght);
 				if (err < 2) {
-					DEBUGA_CELLIAX("|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 					err = sscanf(&tech_pvt->line_array.result[i][5], "%d,%d", &power_supply, &battery_strenght);
-					DEBUGA_CELLIAX("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
+					DEBUGA_GSMOPEN("|%s| +CBC: Powered by %s, battery strenght=%d\n", GSMOPEN_P_LOG,
 								   tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
 
 				}
 
 				if (err < 2) {
-					DEBUGA_CELLIAX("|%s| is not formatted as: |+CBC:xx,yy| giving up\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| is not formatted as: |+CBC:xx,yy| giving up\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				}
 
 				else {
 					if (option_debug > 1)
-						DEBUGA_CELLIAX("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
+						DEBUGA_GSMOPEN("|%s| +CBC: Powered by %s, battery strenght=%d\n", GSMOPEN_P_LOG,
 									   tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
 					if (!power_supply) {
 						if (battery_strenght < 10) {
-							ERRORA("|%s| BATTERY ALMOST EXHAUSTED\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							ERRORA("|%s| BATTERY ALMOST EXHAUSTED\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						} else if (battery_strenght < 20) {
-							WARNINGA("|%s| BATTERY LOW\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							WARNINGA("|%s| BATTERY LOW\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 						}
 
@@ -764,16 +764,16 @@
 
 				err = sscanf(&tech_pvt->line_array.result[i][6], "%d,%d", &signal_quality, &ber);
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i], signal_quality, ber);
+					DEBUGA_GSMOPEN("|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i], signal_quality, ber);
 				if (err < 2) {
-					ERRORA("|%s| is not formatted as: |+CSQ: xx,yy|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| is not formatted as: |+CSQ: xx,yy|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				} else {
 					if (signal_quality < 11 || signal_quality == 99) {
 						WARNINGA
 							("|%s| CELLPHONE GETS ALMOST NO SIGNAL, consider to move it or additional antenna\n",
-							 CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							 GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 					} else if (signal_quality < 15) {
-						WARNINGA("|%s| CELLPHONE GETS SIGNAL LOW\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+						WARNINGA("|%s| CELLPHONE GETS SIGNAL LOW\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 					}
 
@@ -784,9 +784,9 @@
 				int err;
 
 				err = sscanf(&tech_pvt->line_array.result[i][7], "%s", tech_pvt->at_cmgw);
-				DEBUGA_CELLIAX("|%s| +CMGW: %s\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i], tech_pvt->at_cmgw);
+				DEBUGA_GSMOPEN("|%s| +CMGW: %s\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i], tech_pvt->at_cmgw);
 				if (err < 1) {
-					ERRORA("|%s| is not formatted as: |+CMGW: xxxx|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| is not formatted as: |+CMGW: xxxx|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				}
 
 			}
@@ -795,12 +795,12 @@
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_call_idle) == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_IDLE\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					DEBUGA_CELLIAX("just received a remote HANGUP\n", CELLIAX_P_LOG);
-					tech_pvt->owner->hangupcause = CELLIAX_CAUSE_NORMAL;
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
-					DEBUGA_CELLIAX("just sent CELLIAX_CONTROL_HANGUP\n", CELLIAX_P_LOG);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_IDLE\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					DEBUGA_GSMOPEN("just received a remote HANGUP\n", GSMOPEN_P_LOG);
+					tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_NORMAL;
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
+					DEBUGA_GSMOPEN("just sent GSMOPEN_CONTROL_HANGUP\n", GSMOPEN_P_LOG);
 				}
 			}
 
@@ -809,60 +809,60 @@
 				//char list_command[64];
 
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_INCOMING\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_INCOMING\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 				if (tech_pvt->phone_callflow != CALLFLOW_CALL_INCOMING && tech_pvt->phone_callflow != CALLFLOW_INCOMING_RING) {
 					//mark the time of CALLFLOW_CALL_INCOMING
 					gettimeofday(&(tech_pvt->call_incoming_time), NULL);
 					tech_pvt->phone_callflow = CALLFLOW_CALL_INCOMING;
-					DEBUGA_CELLIAX("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n", CELLIAX_P_LOG, tech_pvt->call_incoming_time.tv_sec);
+					DEBUGA_GSMOPEN("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n", GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec);
 
 				}
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_call_active) == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_ACTIVE;
-				DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_ACTIVE\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+				DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_ACTIVE\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 				if (tech_pvt->interface_state == CALLFLOW_CALL_DIALING || tech_pvt->interface_state == CALLFLOW_STATUS_EARLYMEDIA) {
-					DEBUGA_PBX("just received a remote ANSWER\n", CELLIAX_P_LOG);
-					if (tech_pvt->phone_callflow == CELLIAX_STATE_UP) {
-						//celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_RINGING);
-						DEBUGA_PBX("just sent CELLIAX_CONTROL_RINGING\n", CELLIAX_P_LOG);
-						DEBUGA_PBX("going to send CELLIAX_CONTROL_ANSWER\n", CELLIAX_P_LOG);
-						//celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_ANSWER);
+					DEBUGA_PBX("just received a remote ANSWER\n", GSMOPEN_P_LOG);
+					if (tech_pvt->phone_callflow == GSMOPEN_STATE_UP) {
+						//gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_RINGING);
+						DEBUGA_PBX("just sent GSMOPEN_CONTROL_RINGING\n", GSMOPEN_P_LOG);
+						DEBUGA_PBX("going to send GSMOPEN_CONTROL_ANSWER\n", GSMOPEN_P_LOG);
+						//gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_ANSWER);
 						tech_pvt->interface_state = CALLFLOW_CALL_REMOTEANSWER;
-						DEBUGA_PBX("just sent CELLIAX_CONTROL_ANSWER\n", CELLIAX_P_LOG);
+						DEBUGA_PBX("just sent GSMOPEN_CONTROL_ANSWER\n", GSMOPEN_P_LOG);
 					}
 				} else {
 				}
-				//tech_pvt->interface_state = CELLIAX_STATE_UP;
-				//DEBUGA_PBX("just interface_state UP\n", CELLIAX_P_LOG);
+				//tech_pvt->interface_state = GSMOPEN_STATE_UP;
+				//DEBUGA_PBX("just interface_state UP\n", GSMOPEN_P_LOG);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_call_calling) == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_DIALING;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_DIALING\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_DIALING\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_call_failed) == 0)) {
 				tech_pvt->phone_callflow = CALLFLOW_CALL_FAILED;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_FAILED\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_FAILED\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 				}
 			}
 
 			if ((strncmp(tech_pvt->line_array.result[i], "+CSCA:", 6) == 0)) {	//TODO SMS FIXME in config!
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| +CSCA: Message Center Address!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CSCA: Message Center Address!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strncmp(tech_pvt->line_array.result[i], "+CMGF:", 6) == 0)) {	//TODO SMS FIXME in config!
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| +CMGF: Message Format!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMGF: Message Format!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strncmp(tech_pvt->line_array.result[i], "+CMTI:", 6) == 0)) {	//TODO SMS FIXME in config!
@@ -871,13 +871,13 @@
 
 				//FIXME all the following commands in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +CMTI: Incoming SMS!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMTI: Incoming SMS!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 				err = sscanf(&tech_pvt->line_array.result[i][12], "%d", &pos);
 				if (err < 1) {
-					ERRORA("|%s| is not formatted as: |+CMTI: \"MT\",xx|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| is not formatted as: |+CMTI: \"MT\",xx|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				} else {
-					DEBUGA_CELLIAX("|%s| +CMTI: Incoming SMS in position: %d!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i], pos);
+					DEBUGA_GSMOPEN("|%s| +CMTI: Incoming SMS in position: %d!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i], pos);
 					tech_pvt->unread_sms_msg_id = pos;
 					usleep(1000);
 
@@ -885,9 +885,9 @@
 						char at_command[256];
 
 						if (tech_pvt->no_ucs2 == 0) {
-							res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
+							res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
 							if (res) {
-								ERRORA("AT+CSCS=\"UCS2\" (set TE messages to ucs2)  do not got OK from the phone, continuing\n", CELLIAX_P_LOG);
+								ERRORA("AT+CSCS=\"UCS2\" (set TE messages to ucs2)  do not got OK from the phone, continuing\n", GSMOPEN_P_LOG);
 								//memset(tech_pvt->sms_message, 0, sizeof(tech_pvt->sms_message));
 							}
 						}
@@ -897,25 +897,25 @@
 						memset(tech_pvt->sms_message, 0, sizeof(tech_pvt->sms_message));
 
 						tech_pvt->reading_sms_msg = 1;
-						res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+						res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
 						tech_pvt->reading_sms_msg = 0;
 						if (res) {
-							ERRORA("AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n", CELLIAX_P_LOG, at_command);
+							ERRORA("AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n", GSMOPEN_P_LOG, at_command);
 						}
-						res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"GSM\"");
+						res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"GSM\"");
 						if (res) {
-							ERRORA("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n", CELLIAX_P_LOG);
+							ERRORA("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n", GSMOPEN_P_LOG);
 						}
 						memset(at_command, 0, sizeof(at_command));
 						sprintf(at_command, "AT+CMGD=%d", tech_pvt->unread_sms_msg_id);	/* delete the message */
 						tech_pvt->unread_sms_msg_id = 0;
-						res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+						res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
 						if (res) {
-							ERRORA("AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n", CELLIAX_P_LOG, at_command);
+							ERRORA("AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n", GSMOPEN_P_LOG, at_command);
 						}
 
 						if (strlen(tech_pvt->sms_message)) {
-							//FIXME manager_event(EVENT_FLAG_SYSTEM, "CELLIAXincomingsms",
+							//FIXME manager_event(EVENT_FLAG_SYSTEM, "GSMOPENincomingsms",
 							//FIXME "Interface: %s\r\nSMS_Message: %s\r\n", tech_pvt->name,
 							//FIXME tech_pvt->sms_message);
 
@@ -927,7 +927,7 @@
 								char *arg1[] = { tech_pvt->sms_receiving_program, (char *) NULL };
 								int i;
 
-								DEBUGA_CELLIAX("incoming SMS message:>>>%s<<<\n", CELLIAX_P_LOG, tech_pvt->sms_message);
+								DEBUGA_GSMOPEN("incoming SMS message:>>>%s<<<\n", GSMOPEN_P_LOG, tech_pvt->sms_message);
 								res=pipe(fd1);
 								pid1 = fork();
 
@@ -942,7 +942,7 @@
 									if (err) {
 										ERRORA
 											("'sms_receiving_program' is set in config file to '%s', and it gave us back this error: %d, (%s). SMS received was:---%s---\n",
-											 CELLIAX_P_LOG, tech_pvt->sms_receiving_program, err, strerror(errno), tech_pvt->sms_message);
+											 GSMOPEN_P_LOG, tech_pvt->sms_receiving_program, err, strerror(errno), tech_pvt->sms_message);
 									}
 									close(fd1[0]);	// close output pipe side
 								}
@@ -956,15 +956,15 @@
 							} else {
 								ERRORA
 									("got SMS incoming message, but 'sms_receiving_program' is not set in config file. SMS received was:---%s---\n",
-									 CELLIAX_P_LOG, tech_pvt->sms_message);
+									 GSMOPEN_P_LOG, tech_pvt->sms_message);
 							}
 						}
 #if 1							//is this one needed? maybe it can interrupt an incoming call that is just to announce itself
-						if (tech_pvt->phone_callflow == CALLFLOW_CALL_IDLE && tech_pvt->interface_state == CELLIAX_STATE_DOWN && tech_pvt->owner == NULL) {
+						if (tech_pvt->phone_callflow == CALLFLOW_CALL_IDLE && tech_pvt->interface_state == GSMOPEN_STATE_DOWN && tech_pvt->owner == NULL) {
 							/* we're not in a call, neither calling */
-							res = celliax_serial_write_AT_ack(tech_pvt, "AT+CKPD=\"EEE\"");
+							res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CKPD=\"EEE\"");
 							if (res) {
-								ERRORA("AT+CKPD=\"EEE\" (cellphone screen back to user) do not got OK from the phone\n", CELLIAX_P_LOG);
+								ERRORA("AT+CKPD=\"EEE\" (cellphone screen back to user) do not got OK from the phone\n", GSMOPEN_P_LOG);
 							}
 						}
 #endif
@@ -979,35 +979,35 @@
 				//int unread_msg_id=0;
 
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +MMGL: Listing Motorola SMSs!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +MMGL: Listing Motorola SMSs!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 				err = sscanf(&tech_pvt->line_array.result[i][7], "%d", &tech_pvt->unread_sms_msg_id);
 				if (err < 1) {
-					ERRORA("|%s| is not formatted as: |+MMGL: xx|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| is not formatted as: |+MMGL: xx|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				}
 			}
 			if ((strncmp(tech_pvt->line_array.result[i], "+CMGL:", 6) == 0)) {	//TODO  SMS FIXME in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +CMGL: Listing SMSs!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMGL: Listing SMSs!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 			if ((strncmp(tech_pvt->line_array.result[i], "+MMGR:", 6) == 0)) {	//TODO MOTOROLA SMS FIXME in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +MMGR: Reading Motorola SMS!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +MMGR: Reading Motorola SMS!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				if (tech_pvt->reading_sms_msg)
 					tech_pvt->reading_sms_msg++;
 			}
 			if ((strncmp(tech_pvt->line_array.result[i], "+CMGR: \"STO U", 13) == 0)) {	//TODO  SMS FIXME in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +CMGR: Reading stored UNSENT SMS!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMGR: Reading stored UNSENT SMS!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			} else if ((strncmp(tech_pvt->line_array.result[i], "+CMGR: \"STO S", 13) == 0)) {	//TODO  SMS FIXME in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +CMGR: Reading stored SENT SMS!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMGR: Reading stored SENT SMS!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			} else if ((strncmp(tech_pvt->line_array.result[i], "+CMGR: \"REC R", 13) == 0)) {	//TODO  SMS FIXME in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +CMGR: Reading received READ SMS!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMGR: Reading received READ SMS!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			} else if ((strncmp(tech_pvt->line_array.result[i], "+CMGR: \"REC U", 13) == 0)) {	//TODO  SMS FIXME in config!
 				if (option_debug)
-					DEBUGA_CELLIAX("|%s| +CMGR: Reading received UNREAD SMS!\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| +CMGR: Reading received UNREAD SMS!\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				if (tech_pvt->reading_sms_msg)
 					tech_pvt->reading_sms_msg++;
 			}
@@ -1015,34 +1015,34 @@
 			if ((strcmp(tech_pvt->line_array.result[i], "+MCST: 17") == 0)) {	/* motorola call processing unsolicited messages */
 				tech_pvt->phone_callflow = CALLFLOW_CALL_INFLUX;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_INFLUX\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_INFLUX\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], "+MCST: 68") == 0)) {	/* motorola call processing unsolicited messages */
 				tech_pvt->phone_callflow = CALLFLOW_CALL_NOSERVICE;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_NOSERVICE\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_NOSERVICE\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 				}
 			}
 			if ((strcmp(tech_pvt->line_array.result[i], "+MCST: 70") == 0)) {	/* motorola call processing unsolicited messages */
 				tech_pvt->phone_callflow = CALLFLOW_CALL_OUTGOINGRESTRICTED;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 				}
 			}
 			if ((strcmp(tech_pvt->line_array.result[i], "+MCST: 72") == 0)) {	/* motorola call processing unsolicited messages */
 				tech_pvt->phone_callflow = CALLFLOW_CALL_SECURITYFAIL;
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| CALLFLOW_CALL_SECURITYFAIL\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
-				if (tech_pvt->interface_state != CELLIAX_STATE_DOWN && tech_pvt->owner) {
-					tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
-					celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+					DEBUGA_GSMOPEN("|%s| CALLFLOW_CALL_SECURITYFAIL\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
+				if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN && tech_pvt->owner) {
+					tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
+					gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 				}
 			}
 
@@ -1052,7 +1052,7 @@
 					int err, first_entry, last_entry, number_lenght, text_lenght;
 
 					if (option_debug)
-						DEBUGA_CELLIAX("phonebook struct: |%s|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+						DEBUGA_GSMOPEN("phonebook struct: |%s|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 					err = sscanf(&tech_pvt->line_array.result[i][8], "%d-%d),%d,%d", &first_entry, &last_entry, &number_lenght, &text_lenght);
 					if (err < 4) {
@@ -1063,13 +1063,13 @@
 					if (err < 4) {
 						ERRORA
 							("phonebook struct: |%s| is nor formatted as: |+CPBR: (1-750),40,14| neither as: |+CPBR: 1-750,40,14|\n",
-							 CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							 GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 					} else {
 
 						if (option_debug)
-							DEBUGA_CELLIAX
+							DEBUGA_GSMOPEN
 								("First entry: %d, last entry: %d, phone number max lenght: %d, text max lenght: %d\n",
-								 CELLIAX_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
+								 GSMOPEN_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
 						tech_pvt->phonebook_first_entry = first_entry;
 						tech_pvt->phonebook_last_entry = last_entry;
 						tech_pvt->phonebook_number_lenght = number_lenght;
@@ -1085,30 +1085,30 @@
 						char entry_text[256];
 
 						if (option_debug)
-							DEBUGA_CELLIAX("phonebook entry: |%s|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("phonebook entry: |%s|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 						err =
 							sscanf(&tech_pvt->line_array.result[i][7], "%d,\"%255[0-9+]\",%d,\"%255[^\"]\"", &entry_id, entry_number, &entry_type, entry_text);
 						if (err < 4) {
 							ERRORA
 								("err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\"+39025458068\",145,\"ciao a tutti\"|\n",
-								 CELLIAX_P_LOG, err, tech_pvt->line_array.result[i]);
+								 GSMOPEN_P_LOG, err, tech_pvt->line_array.result[i]);
 						} else {
 							//TODO: sanitize entry_text
 							if (option_debug)
-								DEBUGA_CELLIAX("Number: %s, Text: %s, Type: %d\n", CELLIAX_P_LOG, entry_number, entry_text, entry_type);
+								DEBUGA_GSMOPEN("Number: %s, Text: %s, Type: %d\n", GSMOPEN_P_LOG, entry_number, entry_text, entry_type);
 							/* write entry in phonebook file */
 							if (tech_pvt->phonebook_writing_fp) {
-								celliax_dir_entry_extension++;
+								gsmopen_dir_entry_extension++;
 
 								fprintf(tech_pvt->phonebook_writing_fp,
 										"%s  => ,%sSKO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromcell=%s|phonebook_entry_owner=%s\n",
 										entry_number, entry_text, "no",
-										tech_pvt->celliax_dir_entry_extension_prefix, "2", celliax_dir_entry_extension, "yes", "not_specified");
+										tech_pvt->gsmopen_dir_entry_extension_prefix, "2", gsmopen_dir_entry_extension, "yes", "not_specified");
 								fprintf(tech_pvt->phonebook_writing_fp,
 										"%s  => ,%sDO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromcell=%s|phonebook_entry_owner=%s\n",
 										entry_number, entry_text, "no",
-										tech_pvt->celliax_dir_entry_extension_prefix, "3", celliax_dir_entry_extension, "yes", "not_specified");
+										tech_pvt->gsmopen_dir_entry_extension_prefix, "3", gsmopen_dir_entry_extension, "yes", "not_specified");
 							}
 						}
 
@@ -1121,34 +1121,34 @@
 						char entry_text[256] = "";
 
 						if (option_debug)
-							DEBUGA_CELLIAX("phonebook entry: |%s|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("phonebook entry: |%s|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 						err =
 							sscanf(&tech_pvt->line_array.result[i][7], "%d,\"%255[0-9+]\",%d,\"%255[^\"]\"", &entry_id, entry_number, &entry_type, entry_text);
 						if (err < 1) {	//we match only on the progressive id, maybe the remote party has not sent its number, and/or there is no corresponding text entry in the phone directory
 							ERRORA
 								("err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\"+39025458068\",145,\"ciao a tutti\"|\n",
-								 CELLIAX_P_LOG, err, tech_pvt->line_array.result[i]);
+								 GSMOPEN_P_LOG, err, tech_pvt->line_array.result[i]);
 						} else {
 							//TODO: sanitize entry_text
 
 							if (option_debug)
-								DEBUGA_CELLIAX("Number: %s, Text: %s, Type: %d\n", CELLIAX_P_LOG, entry_number, entry_text, entry_type);
+								DEBUGA_GSMOPEN("Number: %s, Text: %s, Type: %d\n", GSMOPEN_P_LOG, entry_number, entry_text, entry_type);
 							memset(tech_pvt->callid_name, 0, sizeof(tech_pvt->callid_name));
 							memset(tech_pvt->callid_number, 0, sizeof(tech_pvt->callid_number));
 							strncpy(tech_pvt->callid_name, entry_text, sizeof(tech_pvt->callid_name));
 							strncpy(tech_pvt->callid_number, entry_number, sizeof(tech_pvt->callid_number));
 							if (option_debug)
-								DEBUGA_CELLIAX("incoming callid: Text: %s, Number: %s\n", CELLIAX_P_LOG, tech_pvt->callid_name, tech_pvt->callid_number);
+								DEBUGA_GSMOPEN("incoming callid: Text: %s, Number: %s\n", GSMOPEN_P_LOG, tech_pvt->callid_name, tech_pvt->callid_number);
 
-							DEBUGA_CELLIAX("|%s| CPBR INCOMING CALLID: name is %s, number is %s\n",
-										   CELLIAX_P_LOG, tech_pvt->line_array.result[i],
+							DEBUGA_GSMOPEN("|%s| CPBR INCOMING CALLID: name is %s, number is %s\n",
+										   GSMOPEN_P_LOG, tech_pvt->line_array.result[i],
 										   tech_pvt->callid_name[0] != 1 ? tech_pvt->callid_name : "not available",
 										   tech_pvt->callid_number[0] ? tech_pvt->callid_number : "not available");
 
 							/* mark the time of RING */
 							gettimeofday(&(tech_pvt->ringtime), NULL);
-							tech_pvt->interface_state = CELLIAX_STATE_RING;
+							tech_pvt->interface_state = GSMOPEN_STATE_RING;
 							tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
 
 						}
@@ -1156,7 +1156,7 @@
 					}
 
 					else {
-						DEBUGA_CELLIAX("phonebook entry: |%s|\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+						DEBUGA_GSMOPEN("phonebook entry: |%s|\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 
 					}
 				}
@@ -1172,66 +1172,66 @@
 					switch (ccstatus) {
 					case 0:
 						if (tech_pvt->owner) {
-							ast_setstate(tech_pvt->owner, CELLIAX_STATE_DOWN);
-							tech_pvt->owner->hangupcause = CELLIAX_CAUSE_NORMAL;
-							celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+							ast_setstate(tech_pvt->owner, GSMOPEN_STATE_DOWN);
+							tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_NORMAL;
+							gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 						}
 						tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
-						tech_pvt->interface_state = CELLIAX_STATE_DOWN;
+						tech_pvt->interface_state = GSMOPEN_STATE_DOWN;
 						if (option_debug > 1)
-							DEBUGA_CELLIAX("|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 1:
 						if (option_debug > 1)
-							DEBUGA_CELLIAX("|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 2:
 						if (tech_pvt->owner) {
-							ast_setstate(tech_pvt->owner, CELLIAX_STATE_DIALING);
+							ast_setstate(tech_pvt->owner, GSMOPEN_STATE_DIALING);
 						}
 						tech_pvt->interface_state = CALLFLOW_CALL_DIALING;
 						if (option_debug > 1)
-							DEBUGA_CELLIAX("|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 3:
 						if (tech_pvt->owner) {
-							ast_setstate(tech_pvt->owner, CELLIAX_STATE_UP);
-							celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_ANSWER);
+							ast_setstate(tech_pvt->owner, GSMOPEN_STATE_UP);
+							gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_ANSWER);
 						}
 						tech_pvt->phone_callflow = CALLFLOW_CALL_ACTIVE;
-						tech_pvt->interface_state = CELLIAX_STATE_UP;
+						tech_pvt->interface_state = GSMOPEN_STATE_UP;
 						if (option_debug > 1)
-							DEBUGA_CELLIAX("|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 4:
 						if (option_debug > 1)
-							DEBUGA_CELLIAX
-								("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN
+								("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 5:
 						if (option_debug > 1)
-							DEBUGA_CELLIAX
-								("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN
+								("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 6:
 						if (option_debug > 1)
-							DEBUGA_CELLIAX
-								("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN
+								("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					case 7:
 						if (tech_pvt->owner) {
-							ast_setstate(tech_pvt->owner, CELLIAX_STATE_BUSY);
-							celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_BUSY);
+							ast_setstate(tech_pvt->owner, GSMOPEN_STATE_BUSY);
+							gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_BUSY);
 						}
 						tech_pvt->phone_callflow = CALLFLOW_CALL_LINEBUSY;
-						tech_pvt->interface_state = CELLIAX_STATE_BUSY;
+						tech_pvt->interface_state = GSMOPEN_STATE_BUSY;
 						if (option_debug > 1)
-							DEBUGA_CELLIAX("|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+							DEBUGA_GSMOPEN("|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 						break;
 					}
 				} else {
 					if (option_debug > 1)
-						DEBUGA_CELLIAX("|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+						DEBUGA_GSMOPEN("|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 				}
 
 			}
@@ -1239,58 +1239,58 @@
 			/* at_indicator_* are unsolicited messages sent by the phone to signal us that some of its visual indicators on its screen has changed, based on CIND CMER ETSI docs */
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_noservice_string) == 0)) {
 				if (option_debug > 1)
-					ERRORA("|%s| at_indicator_noservice_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| at_indicator_noservice_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_nosignal_string) == 0)) {
 				if (option_debug > 1)
-					ERRORA("|%s| at_indicator_nosignal_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| at_indicator_nosignal_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_lowsignal_string) == 0)) {
 				if (option_debug > 1)
-					WARNINGA("|%s| at_indicator_lowsignal_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					WARNINGA("|%s| at_indicator_lowsignal_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_lowbattchg_string) == 0)) {
 				if (option_debug > 1)
-					WARNINGA("|%s| at_indicator_lowbattchg_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					WARNINGA("|%s| at_indicator_lowbattchg_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_nobattchg_string) == 0)) {
 				if (option_debug > 1)
-					ERRORA("|%s| at_indicator_nobattchg_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					ERRORA("|%s| at_indicator_nobattchg_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_callactive_string) == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| at_indicator_callactive_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| at_indicator_callactive_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_nocallactive_string) == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| at_indicator_nocallactive_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| at_indicator_nocallactive_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_nocallsetup_string) == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| at_indicator_nocallsetup_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| at_indicator_nocallsetup_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_callsetupincoming_string) == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| at_indicator_callsetupincoming_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| at_indicator_callsetupincoming_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_callsetupoutgoing_string) == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| at_indicator_callsetupoutgoing_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| at_indicator_callsetupoutgoing_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 			if ((strcmp(tech_pvt->line_array.result[i], tech_pvt->at_indicator_callsetupremoteringing_string)
 				 == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("|%s| at_indicator_callsetupremoteringing_string\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+					DEBUGA_GSMOPEN("|%s| at_indicator_callsetupremoteringing_string\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 			}
 
 		}
@@ -1301,19 +1301,19 @@
 				if ((strncmp(tech_pvt->line_array.result[i], expected_string, strlen(expected_string))
 					 == 0)) {
 					if (option_debug > 1)
-						DEBUGA_CELLIAX("|%s| got what EXPECTED\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+						DEBUGA_GSMOPEN("|%s| got what EXPECTED\n", GSMOPEN_P_LOG, tech_pvt->line_array.result[i]);
 					at_ack = AT_OK;
 				}
 			} else {
 				if ((strcmp(tech_pvt->line_array.result[i], "OK") == 0)) {
 					if (option_debug > 1)
-						DEBUGA_CELLIAX("got OK\n", CELLIAX_P_LOG);
+						DEBUGA_GSMOPEN("got OK\n", GSMOPEN_P_LOG);
 					at_ack = AT_OK;
 				}
 			}
 			if ((strcmp(tech_pvt->line_array.result[i], "ERROR") == 0)) {
 				if (option_debug > 1)
-					DEBUGA_CELLIAX("got ERROR\n", CELLIAX_P_LOG);
+					DEBUGA_GSMOPEN("got ERROR\n", GSMOPEN_P_LOG);
 				at_ack = AT_ERROR;
 			}
 
@@ -1338,17 +1338,17 @@
 						if (tech_pvt->line_array.result[i][c] == ',' && tech_pvt->line_array.result[i][c - 1] != '\\' && inside_quote == 0) {
 							if (inside_comma) {
 								inside_comma = 0;
-								//NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
+								//NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", GSMOPEN_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
 							} else {
 								inside_comma = 1;
-								//NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
+								//NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", GSMOPEN_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
 							}
 						}
 						if (tech_pvt->line_array.result[i][c] == '"' && tech_pvt->line_array.result[i][c - 1] != '\\') {
 							if (inside_quote) {
 								inside_quote = 0;
-								//ERRORA("END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
-								DEBUGA_CELLIAX("%d content=%s\n", CELLIAX_P_LOG, which_field, content);
+								//ERRORA("END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", GSMOPEN_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
+								DEBUGA_GSMOPEN("%d content=%s\n", GSMOPEN_P_LOG, which_field, content);
 
 								strncat(tech_pvt->sms_message, "---", ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
 								strncat(tech_pvt->sms_message, content, ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
@@ -1374,12 +1374,12 @@
 								} else if(which_field==2){
 									strncpy(tech_pvt->sms_date, content2, sizeof(tech_pvt->sms_date));
 								} else if(which_field > 2){
-								WARNINGA("WHY which_field is > 2 ? (which_field is %d)\n", CELLIAX_P_LOG, which_field);
+								WARNINGA("WHY which_field is > 2 ? (which_field is %d)\n", GSMOPEN_P_LOG, which_field);
 								}
 								which_field++;
 							} else {
 								inside_quote = 1;
-								//WARNINGA("START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
+								//WARNINGA("START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", GSMOPEN_P_LOG, inside_comma, inside_quote, &tech_pvt->line_array.result[i][c]);
 							}
 						}
 						if (inside_quote && tech_pvt->line_array.result[i][c] != '"') {
@@ -1392,14 +1392,14 @@
 					}
 				}				//it was the +CMGR answer from the cellphone
 				else {
-					DEBUGA_CELLIAX("body=%s\n", CELLIAX_P_LOG, sms_body);
+					DEBUGA_GSMOPEN("body=%s\n", GSMOPEN_P_LOG, sms_body);
 					strncat(tech_pvt->sms_message, "---", ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
 					strncat(tech_pvt->sms_message, tech_pvt->line_array.result[i], ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
 					strncat(tech_pvt->sms_message, "|||", ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
 
 					memset(sms_body, '\0', sizeof(sms_body));
 					err = ucs2_to_utf8(tech_pvt, tech_pvt->line_array.result[i], sms_body, sizeof(sms_body));
-					DEBUGA_CELLIAX("body=%s\n", CELLIAX_P_LOG, sms_body);
+					DEBUGA_GSMOPEN("body=%s\n", GSMOPEN_P_LOG, sms_body);
 					strncpy(tech_pvt->sms_body, sms_body, sizeof(tech_pvt->sms_body));
 
 					strncat(tech_pvt->sms_message, "---", ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
@@ -1407,7 +1407,7 @@
 						strncat(tech_pvt->sms_message, sms_body, ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
 					strncat(tech_pvt->sms_message, "|||", ((sizeof(tech_pvt->sms_message) - strlen(tech_pvt->sms_message)) - 1));
 
-					DEBUGA_CELLIAX("sms_message=%s\n", CELLIAX_P_LOG, tech_pvt->sms_message);
+					DEBUGA_GSMOPEN("sms_message=%s\n", GSMOPEN_P_LOG, tech_pvt->sms_message);
 				}				//it was the UCS2 from cellphone
 
 			}					//we were reading the SMS
@@ -1420,7 +1420,7 @@
 			break;
 
 		if (la_counter > AT_MESG_MAX_LINES) {
-			ERRORA("Too many lines in result (>%d). Stopping reader.\n", CELLIAX_P_LOG, AT_MESG_MAX_LINES);
+			ERRORA("Too many lines in result (>%d). Stopping reader.\n", GSMOPEN_P_LOG, AT_MESG_MAX_LINES);
 			at_ack = AT_ERROR;
 			break;
 		}
@@ -1429,11 +1429,11 @@
 	UNLOCKA(tech_pvt->controldev_lock);
 	POPPA_UNLOCKA(tech_pvt->controldev_lock);
 	if (select_err == -1) {
-		ERRORA("select returned -1 on %s, setting controldev_dead, error was: %s\n", CELLIAX_P_LOG, tech_pvt->controldevice_name, strerror(errno));
+		ERRORA("select returned -1 on %s, setting controldev_dead, error was: %s\n", GSMOPEN_P_LOG, tech_pvt->controldevice_name, strerror(errno));
 		tech_pvt->controldev_dead = 1;
 		close(tech_pvt->controldevfd);
 		if (tech_pvt->owner)
-			celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
+			gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
 		return -1;
 	}
 
@@ -1442,31 +1442,31 @@
 		struct timeval call_incoming_timeout;
 		gettimeofday(&call_incoming_timeout, NULL);
 		call_incoming_timeout.tv_sec -= 3;
-		DEBUGA_CELLIAX
+		DEBUGA_GSMOPEN
 			("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
-			 CELLIAX_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
+			 GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
 		if (call_incoming_timeout.tv_sec > tech_pvt->call_incoming_time.tv_sec) {
 
 			tech_pvt->call_incoming_time.tv_sec = 0;
 			tech_pvt->call_incoming_time.tv_usec = 0;
-			DEBUGA_CELLIAX
+			DEBUGA_GSMOPEN
 				("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
-				 CELLIAX_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
-			res = celliax_serial_write_AT_ack(tech_pvt, "AT+CPBS=RC");
+				 GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
+			res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CPBS=RC");
 			if (res) {
-				ERRORA("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n", CELLIAX_P_LOG);
+				ERRORA("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n", GSMOPEN_P_LOG);
 			}
 			tech_pvt->phonebook_querying = 1;
-			res = celliax_serial_write_AT_ack(tech_pvt, "AT+CPBR=?");
+			res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CPBR=?");
 			if (res) {
-				ERRORA("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n", CELLIAX_P_LOG);
+				ERRORA("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n", GSMOPEN_P_LOG);
 			}
 			tech_pvt->phonebook_querying = 0;
 			sprintf(list_command, "AT+CPBR=%d,%d", tech_pvt->phonebook_first_entry, tech_pvt->phonebook_last_entry);
 			tech_pvt->phonebook_listing_received_calls = 1;
-			res = celliax_serial_write_AT_expect_longtime(tech_pvt, list_command, "OK");
+			res = gsmopen_serial_write_AT_expect_longtime(tech_pvt, list_command, "OK");
 			if (res) {
-				WARNINGA("AT+CPBR=%d,%d failed, continue\n", CELLIAX_P_LOG, tech_pvt->phonebook_first_entry, tech_pvt->phonebook_last_entry);
+				WARNINGA("AT+CPBR=%d,%d failed, continue\n", GSMOPEN_P_LOG, tech_pvt->phonebook_first_entry, tech_pvt->phonebook_last_entry);
 			}
 			tech_pvt->phonebook_listing_received_calls = 0;
 		}
@@ -1476,29 +1476,29 @@
 		struct timeval call_incoming_timeout;
 		gettimeofday(&call_incoming_timeout, NULL);
 		call_incoming_timeout.tv_sec -= 10;
-		DEBUGA_CELLIAX
+		DEBUGA_GSMOPEN
 			("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
-			 CELLIAX_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
+			 GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
 		if (call_incoming_timeout.tv_sec > tech_pvt->ringtime.tv_sec) {
-			ERRORA("Ringing stopped and I have not answered. Why?\n", CELLIAX_P_LOG);
-			DEBUGA_CELLIAX
+			ERRORA("Ringing stopped and I have not answered. Why?\n", GSMOPEN_P_LOG);
+			DEBUGA_GSMOPEN
 				("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
-				 CELLIAX_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
+				 GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
 			if (tech_pvt->owner) {
-				celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_HANGUP);
-				tech_pvt->owner->hangupcause = CELLIAX_CAUSE_FAILURE;
+				gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_HANGUP);
+				tech_pvt->owner->hangupcause = GSMOPEN_CAUSE_FAILURE;
 			}
 		}
 	}
 	tech_pvt->line_array.elemcount = la_counter;
-	//NOTICA (" OUTSIDE this celliax_serial_device %s \n", CELLIAX_P_LOG, tech_pvt->controldevice_name);
+	//NOTICA (" OUTSIDE this gsmopen_serial_device %s \n", GSMOPEN_P_LOG, tech_pvt->controldevice_name);
 	if (look_for_ack)
 		return at_ack;
 	else
 		return 0;
 }
 
-int celliax_serial_write_AT(private_t * tech_pvt, const char *data)
+int gsmopen_serial_write_AT(private_t * tech_pvt, const char *data)
 {
 	int howmany;
 	int i;
@@ -1511,57 +1511,57 @@
 		res = write(tech_pvt->controldevfd, &data[i], 1);
 
 		if (res != 1) {
-			DEBUGA_CELLIAX("Error sending (%.1s): %d (%s)\n", CELLIAX_P_LOG, &data[i], res, strerror(errno));
+			DEBUGA_GSMOPEN("Error sending (%.1s): %d (%s)\n", GSMOPEN_P_LOG, &data[i], res, strerror(errno));
 			usleep(100000);
 			for (count = 0; count < 10; count++) {
 				res = write(tech_pvt->controldevfd, &data[i], 1);
 				if (res == 1) {
-					DEBUGA_CELLIAX("Successfully RE-sent (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count, res, strerror(errno));
+					DEBUGA_GSMOPEN("Successfully RE-sent (%.1s): %d %d (%s)\n", GSMOPEN_P_LOG, &data[i], count, res, strerror(errno));
 					break;
 				} else
-					DEBUGA_CELLIAX("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count, res, strerror(errno));
+					DEBUGA_GSMOPEN("Error RE-sending (%.1s): %d %d (%s)\n", GSMOPEN_P_LOG, &data[i], count, res, strerror(errno));
 				usleep(100000);
 
 			}
 			if (res != 1) {
-				ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count, res, strerror(errno));
+				ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", GSMOPEN_P_LOG, &data[i], count, res, strerror(errno));
 				return -1;
 			}
 		}
 		if (option_debug > 1)
-			DEBUGA_CELLIAX("sent data... (%.1s)\n", CELLIAX_P_LOG, &data[i]);
+			DEBUGA_GSMOPEN("sent data... (%.1s)\n", GSMOPEN_P_LOG, &data[i]);
 		usleep(1000);			/* release the cpu */
 	}
 
 	res = write(tech_pvt->controldevfd, "\r", 1);
 
 	if (res != 1) {
-		DEBUGA_CELLIAX("Error sending (carriage return): %d (%s)\n", CELLIAX_P_LOG, res, strerror(errno));
+		DEBUGA_GSMOPEN("Error sending (carriage return): %d (%s)\n", GSMOPEN_P_LOG, res, strerror(errno));
 		usleep(100000);
 		for (count = 0; count < 10; count++) {
 			res = write(tech_pvt->controldevfd, "\r", 1);
 
 			if (res == 1) {
-				DEBUGA_CELLIAX("Successfully RE-sent carriage return: %d %d (%s)\n", CELLIAX_P_LOG, count, res, strerror(errno));
+				DEBUGA_GSMOPEN("Successfully RE-sent carriage return: %d %d (%s)\n", GSMOPEN_P_LOG, count, res, strerror(errno));
 				break;
 			} else
-				DEBUGA_CELLIAX("Error RE-sending (carriage return): %d %d (%s)\n", CELLIAX_P_LOG, count, res, strerror(errno));
+				DEBUGA_GSMOPEN("Error RE-sending (carriage return): %d %d (%s)\n", GSMOPEN_P_LOG, count, res, strerror(errno));
 			usleep(100000);
 
 		}
 		if (res != 1) {
-			ERRORA("Error RE-sending (carriage return): %d %d (%s)\n", CELLIAX_P_LOG, count, res, strerror(errno));
+			ERRORA("Error RE-sending (carriage return): %d %d (%s)\n", GSMOPEN_P_LOG, count, res, strerror(errno));
 			return -1;
 		}
 	}
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("sent (carriage return)\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("sent (carriage return)\n", GSMOPEN_P_LOG);
 	usleep(1000);				/* release the cpu */
 
 	return howmany;
 }
 
-int celliax_serial_write_AT_nocr(private_t * tech_pvt, const char *data)
+int gsmopen_serial_write_AT_nocr(private_t * tech_pvt, const char *data)
 {
 	int howmany;
 	int i;
@@ -1574,24 +1574,24 @@
 		res = write(tech_pvt->controldevfd, &data[i], 1);
 
 		if (res != 1) {
-			DEBUGA_CELLIAX("Error sending (%.1s): %d (%s)\n", CELLIAX_P_LOG, &data[i], res, strerror(errno));
+			DEBUGA_GSMOPEN("Error sending (%.1s): %d (%s)\n", GSMOPEN_P_LOG, &data[i], res, strerror(errno));
 			usleep(100000);
 			for (count = 0; count < 10; count++) {
 				res = write(tech_pvt->controldevfd, &data[i], 1);
 				if (res == 1)
 					break;
 				else
-					DEBUGA_CELLIAX("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count, res, strerror(errno));
+					DEBUGA_GSMOPEN("Error RE-sending (%.1s): %d %d (%s)\n", GSMOPEN_P_LOG, &data[i], count, res, strerror(errno));
 				usleep(100000);
 
 			}
 			if (res != 1) {
-				ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count, res, strerror(errno));
+				ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", GSMOPEN_P_LOG, &data[i], count, res, strerror(errno));
 				return -1;
 			}
 		}
 		if (option_debug > 1)
-			DEBUGA_CELLIAX("sent data... (%.1s)\n", CELLIAX_P_LOG, &data[i]);
+			DEBUGA_GSMOPEN("sent data... (%.1s)\n", GSMOPEN_P_LOG, &data[i]);
 		usleep(1000);			/* release the cpu */
 	}
 
@@ -1600,17 +1600,17 @@
 	return howmany;
 }
 
-int celliax_serial_write_AT_noack(private_t * tech_pvt, const char *data)
+int gsmopen_serial_write_AT_noack(private_t * tech_pvt, const char *data)
 {
 
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("celliax_serial_write_AT_noack: %s\n", CELLIAX_P_LOG, data);
+		DEBUGA_GSMOPEN("gsmopen_serial_write_AT_noack: %s\n", GSMOPEN_P_LOG, data);
 
 	PUSHA_UNLOCKA(tech_pvt->controldev_lock);
 	LOKKA(tech_pvt->controldev_lock);
-	if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
+	if (gsmopen_serial_write_AT(tech_pvt, data) != strlen(data)) {
 
-		ERRORA("Error sending data... (%s)\n", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("Error sending data... (%s)\n", GSMOPEN_P_LOG, strerror(errno));
 		UNLOCKA(tech_pvt->controldev_lock);
 		return -1;
 	}
@@ -1620,21 +1620,21 @@
 	return 0;
 }
 
-int celliax_serial_write_AT_ack(private_t * tech_pvt, const char *data)
+int gsmopen_serial_write_AT_ack(private_t * tech_pvt, const char *data)
 {
 	int at_result = AT_ERROR;
 
 	PUSHA_UNLOCKA(tech_pvt->controldev_lock);
 	LOKKA(tech_pvt->controldev_lock);
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("sending: %s\n", CELLIAX_P_LOG, data);
-	if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
-		ERRORA("Error sending data... (%s) \n", CELLIAX_P_LOG, strerror(errno));
+		DEBUGA_GSMOPEN("sending: %s\n", GSMOPEN_P_LOG, data);
+	if (gsmopen_serial_write_AT(tech_pvt, data) != strlen(data)) {
+		ERRORA("Error sending data... (%s) \n", GSMOPEN_P_LOG, strerror(errno));
 		UNLOCKA(tech_pvt->controldev_lock);
 		return -1;
 	}
 
-	at_result = celliax_serial_read_AT(tech_pvt, 1, 500000, 2, NULL, 1);	// 2.5 sec timeout
+	at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, 2, NULL, 1);	// 2.5 sec timeout
 	UNLOCKA(tech_pvt->controldev_lock);
 	POPPA_UNLOCKA(tech_pvt->controldev_lock);
 
@@ -1642,21 +1642,21 @@
 
 }
 
-int celliax_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data)
+int gsmopen_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data)
 {
 	int at_result = AT_ERROR;
 
 	PUSHA_UNLOCKA(tech_pvt->controldev_lock);
 	LOKKA(tech_pvt->controldev_lock);
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("sending: %s\n", CELLIAX_P_LOG, data);
-	if (celliax_serial_write_AT_nocr(tech_pvt, data) != strlen(data)) {
-		ERRORA("Error sending data... (%s) \n", CELLIAX_P_LOG, strerror(errno));
+		DEBUGA_GSMOPEN("sending: %s\n", GSMOPEN_P_LOG, data);
+	if (gsmopen_serial_write_AT_nocr(tech_pvt, data) != strlen(data)) {
+		ERRORA("Error sending data... (%s) \n", GSMOPEN_P_LOG, strerror(errno));
 		UNLOCKA(tech_pvt->controldev_lock);
 		return -1;
 	}
 
-	at_result = celliax_serial_read_AT(tech_pvt, 1, 500000, 20, NULL, 1);	// 20.5 sec timeout
+	at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, 20, NULL, 1);	// 20.5 sec timeout
 	UNLOCKA(tech_pvt->controldev_lock);
 	POPPA_UNLOCKA(tech_pvt->controldev_lock);
 
@@ -1664,21 +1664,21 @@
 
 }
 
-int celliax_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds)
+int gsmopen_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds)
 {
 	int at_result = AT_ERROR;
 
 	PUSHA_UNLOCKA(tech_pvt->controldev_lock);
 	LOKKA(tech_pvt->controldev_lock);
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("sending: %s, expecting: %s\n", CELLIAX_P_LOG, data, expected_string);
-	if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
-		ERRORA("Error sending data... (%s) \n", CELLIAX_P_LOG, strerror(errno));
+		DEBUGA_GSMOPEN("sending: %s, expecting: %s\n", GSMOPEN_P_LOG, data, expected_string);
+	if (gsmopen_serial_write_AT(tech_pvt, data) != strlen(data)) {
+		ERRORA("Error sending data... (%s) \n", GSMOPEN_P_LOG, strerror(errno));
 		UNLOCKA(tech_pvt->controldev_lock);
 		return -1;
 	}
 
-	at_result = celliax_serial_read_AT(tech_pvt, 1, 500000, seconds, expected_string, expect_crlf);	// 20.5 sec timeout, used for querying the SIM and sending SMSs
+	at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, seconds, expected_string, expect_crlf);	// 20.5 sec timeout, used for querying the SIM and sending SMSs
 	UNLOCKA(tech_pvt->controldev_lock);
 	POPPA_UNLOCKA(tech_pvt->controldev_lock);
 
@@ -1686,16 +1686,16 @@
 
 }
 
-int celliax_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds)
+int gsmopen_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds)
 {
 	int at_result = AT_ERROR;
 
 	PUSHA_UNLOCKA(tech_pvt->controldev_lock);
 	LOKKA(tech_pvt->controldev_lock);
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("expecting: %s\n", CELLIAX_P_LOG, expected_string);
+		DEBUGA_GSMOPEN("expecting: %s\n", GSMOPEN_P_LOG, expected_string);
 
-	at_result = celliax_serial_read_AT(tech_pvt, 1, 500000, seconds, expected_string, expect_crlf);	// 20.5 sec timeout, used for querying the SIM and sending SMSs
+	at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, seconds, expected_string, expect_crlf);	// 20.5 sec timeout, used for querying the SIM and sending SMSs
 	UNLOCKA(tech_pvt->controldev_lock);
 	POPPA_UNLOCKA(tech_pvt->controldev_lock);
 
@@ -1703,123 +1703,123 @@
 
 }
 
-int celliax_serial_answer(private_t * tech_pvt)
+int gsmopen_serial_answer(private_t * tech_pvt)
 {
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT)
-		return celliax_serial_answer_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
+		return gsmopen_serial_answer_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
 	if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
-		return celliax_serial_answer_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
+		return gsmopen_serial_answer_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
 	if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
-		return celliax_serial_answer_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
+		return gsmopen_serial_answer_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
 	return -1;
 }
 
 
-int celliax_serial_answer_AT(private_t * tech_pvt)
+int gsmopen_serial_answer_AT(private_t * tech_pvt)
 {
 	int res;
 
-	res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_answer, tech_pvt->at_answer_expect);
+	res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_answer, tech_pvt->at_answer_expect);
 	if (res) {
-		DEBUGA_CELLIAX
+		DEBUGA_GSMOPEN
 			("at_answer command failed, command used: %s, expecting: %s, trying with AT+CKPD=\"S\"\n",
-			 CELLIAX_P_LOG, tech_pvt->at_answer, tech_pvt->at_answer_expect);
+			 GSMOPEN_P_LOG, tech_pvt->at_answer, tech_pvt->at_answer_expect);
 
-		res = celliax_serial_write_AT_ack(tech_pvt, "AT+CKPD=\"S\"");
+		res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CKPD=\"S\"");
 		if (res) {
-			ERRORA("at_answer command failed, command used: 'AT+CKPD=\"S\"', giving up\n", CELLIAX_P_LOG);
+			ERRORA("at_answer command failed, command used: 'AT+CKPD=\"S\"', giving up\n", GSMOPEN_P_LOG);
 			return -1;
 		}
 	}
-	//tech_pvt->interface_state = CELLIAX_STATE_UP;
+	//tech_pvt->interface_state = GSMOPEN_STATE_UP;
 	//tech_pvt->phone_callflow = CALLFLOW_CALL_ACTIVE;
-	DEBUGA_CELLIAX("AT: call answered\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("AT: call answered\n", GSMOPEN_P_LOG);
 	return 0;
 }
 
-int celliax_serial_hangup(private_t * tech_pvt)
+int gsmopen_serial_hangup(private_t * tech_pvt)
 {
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT)
-		return celliax_serial_hangup_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
+		return gsmopen_serial_hangup_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
 	if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
-		return celliax_serial_hangup_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
+		return gsmopen_serial_hangup_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
 	if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
-		return celliax_serial_hangup_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
+		return gsmopen_serial_hangup_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
 	return -1;
 }
 
 
-int celliax_serial_hangup_AT(private_t * tech_pvt)
+int gsmopen_serial_hangup_AT(private_t * tech_pvt)
 {
 	int res;
 
-	if (tech_pvt->interface_state != CELLIAX_STATE_DOWN) {
-		res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_hangup, tech_pvt->at_hangup_expect);
+	if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN) {
+		res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt->at_hangup, tech_pvt->at_hangup_expect);
 		if (res) {
-			DEBUGA_CELLIAX("at_hangup command failed, command used: %s, trying to use AT+CKPD=\"EEE\"\n", CELLIAX_P_LOG, tech_pvt->at_hangup);
-			res = celliax_serial_write_AT_ack(tech_pvt, "AT+CKPD=\"EEE\"");
+			DEBUGA_GSMOPEN("at_hangup command failed, command used: %s, trying to use AT+CKPD=\"EEE\"\n", GSMOPEN_P_LOG, tech_pvt->at_hangup);
+			res = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CKPD=\"EEE\"");
 			if (res) {
-				ERRORA("at_hangup command failed, command used: 'AT+CKPD=\"EEE\"'\n", CELLIAX_P_LOG);
+				ERRORA("at_hangup command failed, command used: 'AT+CKPD=\"EEE\"'\n", GSMOPEN_P_LOG);
 				return -1;
 			}
 		}
 	}
-	tech_pvt->interface_state = CELLIAX_STATE_DOWN;
+	tech_pvt->interface_state = GSMOPEN_STATE_DOWN;
 	tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
 	return 0;
 }
 
 
-int celliax_serial_call(private_t * tech_pvt, char *dstr)
+int gsmopen_serial_call(private_t * tech_pvt, char *dstr)
 {
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT)
-		return celliax_serial_call_AT(tech_pvt, dstr);
-#ifdef CELLIAX_FBUS2
+		return gsmopen_serial_call_AT(tech_pvt, dstr);
+#ifdef GSMOPEN_FBUS2
 	if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
-		return celliax_serial_call_FBUS2(tech_pvt, dstr);
-#endif /* CELLIAX_FBUS2 */
+		return gsmopen_serial_call_FBUS2(tech_pvt, dstr);
+#endif /* GSMOPEN_FBUS2 */
 	if (tech_pvt->controldevprotocol == PROTOCOL_NO_SERIAL)
 		return 0;
-#ifdef CELLIAX_CVM
+#ifdef GSMOPEN_CVM
 	if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
-		return celliax_serial_call_CVM_BUSMAIL(tech_pvt, dstr);
-#endif /* CELLIAX_CVM */
+		return gsmopen_serial_call_CVM_BUSMAIL(tech_pvt, dstr);
+#endif /* GSMOPEN_CVM */
 	return -1;
 }
 
-int celliax_serial_call_AT(private_t * tech_pvt, char *dstr)
+int gsmopen_serial_call_AT(private_t * tech_pvt, char *dstr)
 {
 	int res;
 	char at_command[256];
 
 	if (option_debug)
-		DEBUGA_PBX("Dialing %s\n", CELLIAX_P_LOG, dstr);
+		DEBUGA_PBX("Dialing %s\n", GSMOPEN_P_LOG, dstr);
 	memset(at_command, 0, sizeof(at_command));
 	tech_pvt->phone_callflow = CALLFLOW_CALL_DIALING;
-	tech_pvt->interface_state = CELLIAX_STATE_DIALING;
+	tech_pvt->interface_state = GSMOPEN_STATE_DIALING;
 	//ast_uri_decode(dstr);
 /*
   size_t fixdstr = strspn(dstr, AST_DIGIT_ANYDIG);
   if (fixdstr == 0) {
     ERRORA("dial command failed because of invalid dial number. dial string was: %s\n",
-           CELLIAX_P_LOG, dstr);
+           GSMOPEN_P_LOG, dstr);
     return -1;
   }
 */
 	//dstr[fixdstr] = '\0';
 	sprintf(at_command, "%s%s%s", tech_pvt->at_dial_pre_number, dstr, tech_pvt->at_dial_post_number);
-	DEBUGA_PBX("Dialstring %s\n", CELLIAX_P_LOG, at_command);
-	res = celliax_serial_write_AT_expect(tech_pvt, at_command, tech_pvt->at_dial_expect);
+	DEBUGA_PBX("Dialstring %s\n", GSMOPEN_P_LOG, at_command);
+	res = gsmopen_serial_write_AT_expect(tech_pvt, at_command, tech_pvt->at_dial_expect);
 	if (res) {
-		ERRORA("dial command failed, dial string was: %s\n", CELLIAX_P_LOG, at_command);
+		ERRORA("dial command failed, dial string was: %s\n", GSMOPEN_P_LOG, at_command);
 		return -1;
 	}
 	// jet - early audio
@@ -1845,7 +1845,7 @@
 
 	memset(converted, '\0', sizeof(converted));
 
-	DEBUGA_CELLIAX("ucs2_in=%s\n", CELLIAX_P_LOG, ucs2_in);
+	DEBUGA_GSMOPEN("ucs2_in=%s\n", GSMOPEN_P_LOG, ucs2_in);
 	/* cicopet */
 	for (c = 0; c < strlen(ucs2_in); c++) {
 		sprintf(stringa, "0x%c%c", ucs2_in[c], ucs2_in[c + 1]);
@@ -1860,21 +1860,21 @@
 
 	iconv_format = iconv_open("UTF8", "UCS-2BE");
 	if (iconv_format == (iconv_t) - 1) {
-		ERRORA("error: %s\n", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno));
 		return -1;
 	}
 
 	inbytesleft = i;
 	iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
 	if (iconv_res == (size_t) -1) {
-		DEBUGA_CELLIAX("ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
-					   CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
-		DEBUGA_CELLIAX("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
+		DEBUGA_GSMOPEN("ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
+					   GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+		DEBUGA_GSMOPEN("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno);
 		return -1;
 	}
-	DEBUGA_CELLIAX
+	DEBUGA_GSMOPEN
 		("iconv_res=%d,  in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
-		 CELLIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+		 GSMOPEN_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
 	iconv_close(iconv_format);
 
 	return 0;
@@ -1899,32 +1899,32 @@
 
 	iconv_format = iconv_open("UCS-2BE", "UTF8");
 	if (iconv_format == (iconv_t) - 1) {
-		ERRORA("error: %s\n", CELLIAX_P_LOG, strerror(errno));
+		ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno));
 		return -1;
 	}
 	outbytesleft = 16000;
 
-	DEBUGA_CELLIAX("in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
-				   CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
+	DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
+				   GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
 	iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
 	if (iconv_res == (size_t) -1) {
-		ERRORA("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
+		ERRORA("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno);
 		return -1;
 	}
-	DEBUGA_CELLIAX
+	DEBUGA_GSMOPEN
 		("iconv_res=%d,  in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
-		 CELLIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
+		 GSMOPEN_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
 	iconv_close(iconv_format);
 
 	for (i = 0; i < 16000 - outbytesleft; i++) {
 		memset(stringa, '\0', sizeof(stringa));
 		memset(stringa2, '\0', sizeof(stringa2));
 		sprintf(stringa, "%02X", converted[i]);
-		DEBUGA_CELLIAX("character is |%02X|\n", CELLIAX_P_LOG, converted[i]);
+		DEBUGA_GSMOPEN("character is |%02X|\n", GSMOPEN_P_LOG, converted[i]);
 		stringa2[0] = stringa[strlen(stringa) - 2];
 		stringa2[1] = stringa[strlen(stringa) - 1];
 		strncat(ucs2_out, stringa2, ((outbytesleft - strlen(ucs2_out)) - 1));	//add the received line to the buffer
-		DEBUGA_CELLIAX("stringa=%s, stringa2=%s, ucs2_out=%s\n", CELLIAX_P_LOG, stringa, stringa2, ucs2_out);
+		DEBUGA_GSMOPEN("stringa=%s, stringa2=%s, ucs2_out=%s\n", GSMOPEN_P_LOG, stringa, stringa2, ucs2_out);
 	}
 	return 0;
 }
@@ -1932,62 +1932,62 @@
 
 /*! \brief  Answer incoming call,
  * Part of PBX interface */
-int celliax_answer(private_t * tech_pvt)
+int gsmopen_answer(private_t * tech_pvt)
 {
 	int res;
 
 	if (option_debug) {
-		DEBUGA_PBX("ENTERING FUNC\n", CELLIAX_P_LOG);
+		DEBUGA_PBX("ENTERING FUNC\n", GSMOPEN_P_LOG);
 	}
 	/* do something to actually answer the call, if needed (eg. pick up the phone) */
 	if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL) {
-		if (celliax_serial_answer(tech_pvt)) {
-			ERRORA("celliax_answer FAILED\n", CELLIAX_P_LOG);
+		if (gsmopen_serial_answer(tech_pvt)) {
+			ERRORA("gsmopen_answer FAILED\n", GSMOPEN_P_LOG);
 			if (option_debug) {
-				DEBUGA_PBX("EXITING FUNC\n", CELLIAX_P_LOG);
+				DEBUGA_PBX("EXITING FUNC\n", GSMOPEN_P_LOG);
 			}
 			return -1;
 		}
 	}
-	tech_pvt->interface_state = CELLIAX_STATE_UP;
+	tech_pvt->interface_state = GSMOPEN_STATE_UP;
 	tech_pvt->phone_callflow = CALLFLOW_CALL_ACTIVE;
 
-	while (tech_pvt->interface_state == CELLIAX_STATE_RING) {
+	while (tech_pvt->interface_state == GSMOPEN_STATE_RING) {
 		usleep(10000);			//10msec
 	}
-	if (tech_pvt->interface_state != CELLIAX_STATE_UP) {
-		ERRORA("call answering failed\n", CELLIAX_P_LOG);
+	if (tech_pvt->interface_state != GSMOPEN_STATE_UP) {
+		ERRORA("call answering failed\n", GSMOPEN_P_LOG);
 		res = -1;
 	} else {
 		if (option_debug)
-			DEBUGA_PBX("call answered\n", CELLIAX_P_LOG);
+			DEBUGA_PBX("call answered\n", GSMOPEN_P_LOG);
 		res = 0;
-#ifdef CELLIAX_PORTAUDIO
+#ifdef GSMOPEN_PORTAUDIO
 		speex_echo_state_reset(tech_pvt->stream->echo_state);
-#endif // CELLIAX_PORTAUDIO
+#endif // GSMOPEN_PORTAUDIO
 
 		new_inbound_channel(tech_pvt);
 		if (tech_pvt->owner) {
-			DEBUGA_PBX("going to send CELLIAX_STATE_UP\n", CELLIAX_P_LOG);
-			ast_setstate(tech_pvt->owner, CELLIAX_STATE_UP);
-			//ast_queue_control(tech_pvt->owner, CELLIAX_CONTROL_ANSWER);
-			//celliax_queue_control(tech_pvt->owner, CELLIAX_CONTROL_ANSWER);
-			DEBUGA_PBX("just sent CELLIAX_STATE_UP\n", CELLIAX_P_LOG);
+			DEBUGA_PBX("going to send GSMOPEN_STATE_UP\n", GSMOPEN_P_LOG);
+			ast_setstate(tech_pvt->owner, GSMOPEN_STATE_UP);
+			//ast_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_ANSWER);
+			//gsmopen_queue_control(tech_pvt->owner, GSMOPEN_CONTROL_ANSWER);
+			DEBUGA_PBX("just sent GSMOPEN_STATE_UP\n", GSMOPEN_P_LOG);
 		}
 	}
 	if (option_debug) {
-		DEBUGA_PBX("EXITING FUNC\n", CELLIAX_P_LOG);
+		DEBUGA_PBX("EXITING FUNC\n", GSMOPEN_P_LOG);
 	}
 	return res;
 }
-int celliax_ring(private_t * tech_pvt)
+int gsmopen_ring(private_t * tech_pvt)
 {
 	int res=0;
 	switch_core_session_t *session = NULL;
 	switch_channel_t *channel = NULL;
 
 	if (option_debug) {
-		DEBUGA_PBX("ENTERING FUNC\n", CELLIAX_P_LOG);
+		DEBUGA_PBX("ENTERING FUNC\n", GSMOPEN_P_LOG);
 	}
 
 	session = switch_core_session_locate(tech_pvt->session_uuid_str);
@@ -2008,88 +2008,88 @@
 		if(channel){
 			switch_channel_mark_ring_ready(channel);
 		} else {
-			ERRORA("no session\n", CELLIAX_P_LOG);
+			ERRORA("no session\n", GSMOPEN_P_LOG);
 		}
 		switch_core_session_rwunlock(session);
 	} else {
-		ERRORA("no session\n", CELLIAX_P_LOG);
+		ERRORA("no session\n", GSMOPEN_P_LOG);
 
 	}
 
 
 	if (option_debug) {
-		DEBUGA_PBX("EXITING FUNC\n", CELLIAX_P_LOG);
+		DEBUGA_PBX("EXITING FUNC\n", GSMOPEN_P_LOG);
 	}
 	return res;
 }
 
 
-/*! \brief  Hangup celliax call
+/*! \brief  Hangup gsmopen call
  * Part of PBX interface, called from ast_hangup */
 
-int celliax_hangup(private_t * tech_pvt)
+int gsmopen_hangup(private_t * tech_pvt)
 {
 
-	/* if there is not celliax pvt why we are here ? */
+	/* if there is not gsmopen pvt why we are here ? */
 	if (!tech_pvt) {
-		ERRORA("Asked to hangup channel not connected\n", CELLIAX_P_LOG);
+		ERRORA("Asked to hangup channel not connected\n", GSMOPEN_P_LOG);
 		return 0;
 	}
 
-	DEBUGA_CELLIAX("ENTERING FUNC\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("ENTERING FUNC\n", GSMOPEN_P_LOG);
 
 
 	if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL) {
-		if (tech_pvt->interface_state != CELLIAX_STATE_DOWN) {
+		if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN) {
 			/* actually hangup through the serial port */
 			if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL) {
 				int res;
-				res = celliax_serial_hangup(tech_pvt);
+				res = gsmopen_serial_hangup(tech_pvt);
 				if (res) {
-					ERRORA("celliax_serial_hangup error: %d\n", CELLIAX_P_LOG, res);
+					ERRORA("gsmopen_serial_hangup error: %d\n", GSMOPEN_P_LOG, res);
 					if (option_debug) {
-						DEBUGA_PBX("EXITING FUNC\n", CELLIAX_P_LOG);
+						DEBUGA_PBX("EXITING FUNC\n", GSMOPEN_P_LOG);
 					}
 					return -1;
 				}
 			}
 
-			while (tech_pvt->interface_state != CELLIAX_STATE_DOWN) {
+			while (tech_pvt->interface_state != GSMOPEN_STATE_DOWN) {
 				usleep(10000);	//10msec
 			}
-			if (tech_pvt->interface_state != CELLIAX_STATE_DOWN) {
-				ERRORA("call hangup failed\n", CELLIAX_P_LOG);
+			if (tech_pvt->interface_state != GSMOPEN_STATE_DOWN) {
+				ERRORA("call hangup failed\n", GSMOPEN_P_LOG);
 				return -1;
 			} else {
-				DEBUGA_CELLIAX("call hungup\n", CELLIAX_P_LOG);
+				DEBUGA_GSMOPEN("call hungup\n", GSMOPEN_P_LOG);
 			}
 		}
 	} else {
-		tech_pvt->interface_state = CELLIAX_STATE_DOWN;
+		tech_pvt->interface_state = GSMOPEN_STATE_DOWN;
 		tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
 	}
 
 	switch_set_flag(tech_pvt, TFLAG_HANGUP);
 	if (option_debug) {
-		DEBUGA_PBX("EXITING FUNC\n", CELLIAX_P_LOG);
+		DEBUGA_PBX("EXITING FUNC\n", GSMOPEN_P_LOG);
 	}
 	return 0;
 }
 
 
 
-#define CELLIAX_ALSA
-#ifdef CELLIAX_ALSA
+#define GSMOPEN_ALSA
+#ifdef GSMOPEN_ALSA
 /*! \brief ALSA pcm format, according to endianess  */
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-snd_pcm_format_t celliax_format = SND_PCM_FORMAT_S16_LE;
+snd_pcm_format_t gsmopen_format = SND_PCM_FORMAT_S16_LE;
 #else
-snd_pcm_format_t celliax_format = SND_PCM_FORMAT_S16_BE;
+snd_pcm_format_t gsmopen_format = SND_PCM_FORMAT_S16_BE;
 #endif
 
 /*!
  * \brief Initialize the ALSA soundcard channels (capture AND playback) used by one interface (a multichannel soundcard can be used by multiple interfaces) 
- * \param p the celliax_pvt of the interface
+ * \param p the gsmopen_pvt of the interface
  *
  * This function call alsa_open_dev to initialize the ALSA soundcard for each channel (capture AND playback) used by one interface (a multichannel soundcard can be used by multiple interfaces). Called by sound_init
  *
@@ -2099,18 +2099,18 @@
 {
 	tech_pvt->alsac = alsa_open_dev(tech_pvt, SND_PCM_STREAM_CAPTURE);
 	if (!tech_pvt->alsac) {
-		ERRORA("Failed opening ALSA capture device: %s\n", CELLIAX_P_LOG, tech_pvt->alsacname);
+		ERRORA("Failed opening ALSA capture device: %s\n", GSMOPEN_P_LOG, tech_pvt->alsacname);
 		if (alsa_shutdown(tech_pvt)) {
-			ERRORA("alsa_shutdown failed\n", CELLIAX_P_LOG);
+			ERRORA("alsa_shutdown failed\n", GSMOPEN_P_LOG);
 			return -1;
 		}
 		return -1;
 	}
 	tech_pvt->alsap = alsa_open_dev(tech_pvt, SND_PCM_STREAM_PLAYBACK);
 	if (!tech_pvt->alsap) {
-		ERRORA("Failed opening ALSA playback device: %s\n", CELLIAX_P_LOG, tech_pvt->alsapname);
+		ERRORA("Failed opening ALSA playback device: %s\n", GSMOPEN_P_LOG, tech_pvt->alsapname);
 		if (alsa_shutdown(tech_pvt)) {
-			ERRORA("alsa_shutdown failed\n", CELLIAX_P_LOG);
+			ERRORA("alsa_shutdown failed\n", GSMOPEN_P_LOG);
 			return -1;
 		}
 		return -1;
@@ -2123,7 +2123,7 @@
 
 /*!
  * \brief Shutdown the ALSA soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces) 
- * \param p the celliax_pvt of the interface
+ * \param p the gsmopen_pvt of the interface
  *
  * This function shutdown the ALSA soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). Called by sound_init
  *
@@ -2138,12 +2138,12 @@
 	if (tech_pvt->alsap) {
 		err = snd_pcm_drop(tech_pvt->alsap);
 		if (err < 0) {
-			ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", CELLIAX_P_LOG, tech_pvt->alsapname, snd_strerror(err));
+			ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", GSMOPEN_P_LOG, tech_pvt->alsapname, snd_strerror(err));
 			return -1;
 		}
 		err = snd_pcm_close(tech_pvt->alsap);
 		if (err < 0) {
-			ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", CELLIAX_P_LOG, tech_pvt->alsapname, snd_strerror(err));
+			ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", GSMOPEN_P_LOG, tech_pvt->alsapname, snd_strerror(err));
 			return -1;
 		}
 		tech_pvt->alsap = NULL;
@@ -2151,12 +2151,12 @@
 	if (tech_pvt->alsac) {
 		err = snd_pcm_drop(tech_pvt->alsac);
 		if (err < 0) {
-			ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", CELLIAX_P_LOG, tech_pvt->alsacname, snd_strerror(err));
+			ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", GSMOPEN_P_LOG, tech_pvt->alsacname, snd_strerror(err));
 			return -1;
 		}
 		err = snd_pcm_close(tech_pvt->alsac);
 		if (err < 0) {
-			ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", CELLIAX_P_LOG, tech_pvt->alsacname, snd_strerror(err));
+			ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", GSMOPEN_P_LOG, tech_pvt->alsacname, snd_strerror(err));
 			return -1;
 		}
 		tech_pvt->alsac = NULL;
@@ -2167,7 +2167,7 @@
 
 /*!
  * \brief Setup and open the ALSA device (capture OR playback) 
- * \param p the celliax_pvt of the interface
+ * \param p the gsmopen_pvt of the interface
  * \param stream the ALSA capture/playback definition
  *
  * This function setup and open the ALSA device (capture OR playback). Called by alsa_init
@@ -2206,53 +2206,53 @@
 	if (err < 0) {
 		ERRORA
 			("snd_pcm_open failed with error '%s' on device '%s', if you are using a plughw:n device please change it to be a default:n device (so to allow it to be shared with other concurrent programs), or maybe you are using an ALSA voicemodem and slmodemd"
-			 " is running?\n", CELLIAX_P_LOG, snd_strerror(err), stream == SND_PCM_STREAM_CAPTURE ? tech_pvt->alsacname : tech_pvt->alsapname);
+			 " is running?\n", GSMOPEN_P_LOG, snd_strerror(err), stream == SND_PCM_STREAM_CAPTURE ? tech_pvt->alsacname : tech_pvt->alsapname);
 		return NULL;
 	}
 
 	snd_pcm_info_alloca(&info);
 
 	if ((err = snd_pcm_info(handle, info)) < 0) {
-		ERRORA("info error: %s", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("info error: %s", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 
 	err = snd_pcm_nonblock(handle, 1);
 	if (err < 0) {
-		ERRORA("nonblock setting error: %s", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("nonblock setting error: %s", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 
 	err = snd_pcm_hw_params_any(handle, params);
 	if (err < 0) {
-		ERRORA("Broken configuration for this PCM, no configurations available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Broken configuration for this PCM, no configurations available: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 
 	err = snd_pcm_hw_params_set_access(handle, params, SND_PCM_ACCESS_RW_INTERLEAVED);
 	if (err < 0) {
-		ERRORA("Access type not available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Access type not available: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
-	err = snd_pcm_hw_params_set_format(handle, params, celliax_format);
+	err = snd_pcm_hw_params_set_format(handle, params, gsmopen_format);
 	if (err < 0) {
-		ERRORA("Sample format non available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Sample format non available: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 	err = snd_pcm_hw_params_set_channels(handle, params, 1);
 	if (err < 0) {
-		DEBUGA_CELLIAX("Channels count set failed: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		DEBUGA_GSMOPEN("Channels count set failed: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 	}
 #if 1
 	unsigned int chan_num;
 	err = snd_pcm_hw_params_get_channels(params, &chan_num);
 	if (err < 0) {
-		ERRORA("Channels count non available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Channels count non available: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 	if (chan_num < 1 || chan_num > 2) {
-		ERRORA("Channels count MUST BE 1 or 2, it is: %d\n", CELLIAX_P_LOG, chan_num);
-		ERRORA("Channels count MUST BE 1 or 2, it is: %d on %s %s\n", CELLIAX_P_LOG, chan_num, tech_pvt->alsapname, tech_pvt->alsacname);
+		ERRORA("Channels count MUST BE 1 or 2, it is: %d\n", GSMOPEN_P_LOG, chan_num);
+		ERRORA("Channels count MUST BE 1 or 2, it is: %d on %s %s\n", GSMOPEN_P_LOG, chan_num, tech_pvt->alsapname, tech_pvt->alsacname);
 		return NULL;
 	} else {
 		if (chan_num == 1) {
@@ -2273,22 +2273,22 @@
 #endif
 
 #if 1
-	rate = tech_pvt->celliax_sound_rate;
+	rate = tech_pvt->gsmopen_sound_rate;
 	err = snd_pcm_hw_params_set_rate_near(handle, params, &rate, 0);
-	if ((float) tech_pvt->celliax_sound_rate * 1.05 < rate || (float) tech_pvt->celliax_sound_rate * 0.95 > rate) {
-		WARNINGA("Rate is not accurate (requested = %iHz, got = %iHz)\n", CELLIAX_P_LOG, tech_pvt->celliax_sound_rate, rate);
+	if ((float) tech_pvt->gsmopen_sound_rate * 1.05 < rate || (float) tech_pvt->gsmopen_sound_rate * 0.95 > rate) {
+		WARNINGA("Rate is not accurate (requested = %iHz, got = %iHz)\n", GSMOPEN_P_LOG, tech_pvt->gsmopen_sound_rate, rate);
 	}
 
 	if (err < 0) {
-		ERRORA("Error setting rate: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error setting rate: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
-	tech_pvt->celliax_sound_rate = rate;
+	tech_pvt->gsmopen_sound_rate = rate;
 
 	err = snd_pcm_hw_params_set_period_size_near(handle, params, &period_size, 0);
 
 	if (err < 0) {
-		ERRORA("Error setting period_size: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error setting period_size: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 
@@ -2299,21 +2299,21 @@
 	err = snd_pcm_hw_params_set_buffer_size_near(handle, params, &tech_pvt->alsa_buffer_size);
 
 	if (err < 0) {
-		ERRORA("Error setting buffer_size: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error setting buffer_size: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 #endif
 
 	err = snd_pcm_hw_params(handle, params);
 	if (err < 0) {
-		ERRORA("Unable to install hw params: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Unable to install hw params: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 
 	snd_pcm_hw_params_get_period_size(params, &chunk_size, 0);
 	snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
 	if (chunk_size == buffer_size) {
-		ERRORA("Can't use period equal to buffer size (%lu == %lu)\n", CELLIAX_P_LOG, chunk_size, buffer_size);
+		ERRORA("Can't use period equal to buffer size (%lu == %lu)\n", GSMOPEN_P_LOG, chunk_size, buffer_size);
 		return NULL;
 	}
 
@@ -2326,13 +2326,13 @@
 	   0);
 
 	   if (err < 0) {
-	   ERRORA("Error setting slep_min: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+	   ERRORA("Error setting slep_min: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 	   }
 	 */
 	n = chunk_size;
 	err = snd_pcm_sw_params_set_avail_min(handle, swparams, n);
 	if (err < 0) {
-		ERRORA("Error setting avail_min: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error setting avail_min: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 	}
 	if (stream == SND_PCM_STREAM_CAPTURE) {
 		start_delay = 1;
@@ -2348,7 +2348,7 @@
 		start_threshold = n;
 	err = snd_pcm_sw_params_set_start_threshold(handle, swparams, start_threshold);
 	if (err < 0) {
-		ERRORA("Error setting start_threshold: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error setting start_threshold: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 	}
 
 	if (stop_delay <= 0)
@@ -2363,33 +2363,33 @@
 	err = snd_pcm_sw_params_set_stop_threshold(handle, swparams, stop_threshold);
 
 	if (err < 0) {
-		ERRORA("Error setting stop_threshold: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error setting stop_threshold: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 	}
 
 	if (snd_pcm_sw_params(handle, swparams) < 0) {
-		ERRORA("Error installing software parameters: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Error installing software parameters: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 	}
 
 	err = snd_pcm_poll_descriptors_count(handle);
 	if (err <= 0) {
-		ERRORA("Unable to get a poll descriptors count, error is %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("Unable to get a poll descriptors count, error is %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
 
 	if (err != 1) {				//number of poll descriptors
-		DEBUGA_CELLIAX("Can't handle more than one device\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("Can't handle more than one device\n", GSMOPEN_P_LOG);
 		return NULL;
 	}
 
 	err = snd_pcm_poll_descriptors(handle, &tech_pvt->pfd, err);
 	if (err != 1) {
-		ERRORA("snd_pcm_poll_descriptors failed, %s\n", CELLIAX_P_LOG, snd_strerror(err));
+		ERRORA("snd_pcm_poll_descriptors failed, %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		return NULL;
 	}
-	DEBUGA_CELLIAX("Acquired fd %d from the poll descriptor\n", CELLIAX_P_LOG, tech_pvt->pfd.fd);
+	DEBUGA_GSMOPEN("Acquired fd %d from the poll descriptor\n", GSMOPEN_P_LOG, tech_pvt->pfd.fd);
 
 	if (stream == SND_PCM_STREAM_CAPTURE) {
-		tech_pvt->celliax_sound_capt_fd = tech_pvt->pfd.fd;
+		tech_pvt->gsmopen_sound_capt_fd = tech_pvt->pfd.fd;
 	}
 
 	state = snd_pcm_state(handle);
@@ -2398,68 +2398,68 @@
 		if (state != SND_PCM_STATE_PREPARED) {
 			err = snd_pcm_prepare(handle);
 			if (err) {
-				ERRORA("snd_pcm_prepare failed, %s\n", CELLIAX_P_LOG, snd_strerror(err));
+				ERRORA("snd_pcm_prepare failed, %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 				return NULL;
 			}
-			DEBUGA_CELLIAX("prepared!\n", CELLIAX_P_LOG);
+			DEBUGA_GSMOPEN("prepared!\n", GSMOPEN_P_LOG);
 		}
 		if (stream == SND_PCM_STREAM_CAPTURE) {
 			err = snd_pcm_start(handle);
 			if (err) {
-				ERRORA("snd_pcm_start failed, %s\n", CELLIAX_P_LOG, snd_strerror(err));
+				ERRORA("snd_pcm_start failed, %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 				return NULL;
 			}
-			DEBUGA_CELLIAX("started!\n", CELLIAX_P_LOG);
+			DEBUGA_GSMOPEN("started!\n", GSMOPEN_P_LOG);
 		}
 	}
 	if (option_debug > 1) {
 		snd_output_t *output = NULL;
 		err = snd_output_stdio_attach(&output, stdout, 0);
 		if (err < 0) {
-			ERRORA("snd_output_stdio_attach failed: %s\n", CELLIAX_P_LOG, snd_strerror(err));
+			ERRORA("snd_output_stdio_attach failed: %s\n", GSMOPEN_P_LOG, snd_strerror(err));
 		}
 		snd_pcm_dump(handle, output);
 	}
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("ALSA handle = %ld\n", CELLIAX_P_LOG, (long int) handle);
+		DEBUGA_GSMOPEN("ALSA handle = %ld\n", GSMOPEN_P_LOG, (long int) handle);
 	return handle;
 
 }
 
 /*! \brief Write audio frames to interface */
-#endif /* CELLIAX_ALSA */
+#endif /* GSMOPEN_ALSA */
 
-int celliax_call(private_t * tech_pvt, char *rdest, int timeout)
+int gsmopen_call(private_t * tech_pvt, char *rdest, int timeout)
 {
 
-	//celliax_sleep(5000);
-	DEBUGA_CELLIAX("Calling GSM, rdest is: %s\n", CELLIAX_P_LOG, rdest);
-	//celliax_signaling_write(tech_pvt, "SET AGC OFF");
-	//celliax_sleep(10000);
-	//celliax_signaling_write(tech_pvt, "SET AEC OFF");
-	//celliax_sleep(10000);
+	//gsmopen_sleep(5000);
+	DEBUGA_GSMOPEN("Calling GSM, rdest is: %s\n", GSMOPEN_P_LOG, rdest);
+	//gsmopen_signaling_write(tech_pvt, "SET AGC OFF");
+	//gsmopen_sleep(10000);
+	//gsmopen_signaling_write(tech_pvt, "SET AEC OFF");
+	//gsmopen_sleep(10000);
 
-	celliax_serial_call(tech_pvt, rdest);
-	//ERRORA("failed to communicate with GSM client, now exit\n", CELLIAX_P_LOG);
+	gsmopen_serial_call(tech_pvt, rdest);
+	//ERRORA("failed to communicate with GSM client, now exit\n", GSMOPEN_P_LOG);
 	//return -1;
 	//}
 	return 0;
 }
 
 
-int celliax_senddigit(private_t * tech_pvt, char digit)
+int gsmopen_senddigit(private_t * tech_pvt, char digit)
 {
 
-	DEBUGA_CELLIAX("DIGIT received: %c\n", CELLIAX_P_LOG, digit);
+	DEBUGA_GSMOPEN("DIGIT received: %c\n", GSMOPEN_P_LOG, digit);
 	if (tech_pvt->controldevprotocol == PROTOCOL_AT && tech_pvt->at_send_dtmf[0]) {
 		int res = 0;
 		char at_command[256];
 
 		memset(at_command, '\0', 256);
 		sprintf(at_command, "%s=\"%c\"", tech_pvt->at_send_dtmf, digit);
-		res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+		res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
 		if (res) {
-			ERRORA("senddigit command failed, command used: '%s=\"%c\"', giving up\n", CELLIAX_P_LOG, tech_pvt->at_send_dtmf, digit);
+			ERRORA("senddigit command failed, command used: '%s=\"%c\"', giving up\n", GSMOPEN_P_LOG, tech_pvt->at_send_dtmf, digit);
 		}
 	}
 
@@ -2482,10 +2482,10 @@
 	snd_pcm_sframes_t delayp1;
 	snd_pcm_sframes_t delayp2;
 
-	//ERRORA("data=%p, datalen=%d\n", CELLIAX_P_LOG, (void *)data, datalen);
+	//ERRORA("data=%p, datalen=%d\n", GSMOPEN_P_LOG, (void *)data, datalen);
 	/* We have to digest the frame in 160-byte portions */
 	if (datalen > sizeof(sizbuf) - sizpos) {
-		ERRORA("Frame too large\n", CELLIAX_P_LOG);
+		ERRORA("Frame too large\n", GSMOPEN_P_LOG);
 		res = -1;
 	} else {
 		memcpy(sizbuf + sizpos, data, datalen);
@@ -2498,25 +2498,25 @@
 		if (state == SND_PCM_STATE_XRUN) {
 			int i;
 
-			DEBUGA_CELLIAX
-				("You've got an ALSA write XRUN in the past (celliax can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file\n",
-				 CELLIAX_P_LOG, tech_pvt->alsa_periods_in_buffer);
+			DEBUGA_GSMOPEN
+				("You've got an ALSA write XRUN in the past (gsmopen can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file\n",
+				 GSMOPEN_P_LOG, tech_pvt->alsa_periods_in_buffer);
 			res = snd_pcm_prepare(tech_pvt->alsap);
 			if (res) {
-				ERRORA("audio play prepare failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
+				ERRORA("audio play prepare failed: %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 			} else {
-				res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
+				res = snd_pcm_format_set_silence(gsmopen_format, silencebuf, len / 2);
 				if (res < 0) {
-					DEBUGA_CELLIAX("Silence error %s\n", CELLIAX_P_LOG, snd_strerror(res));
+					DEBUGA_GSMOPEN("Silence error %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 					res = -1;
 				}
 				for (i = 0; i < (tech_pvt->alsa_periods_in_buffer - 1); i++) {
 					res = snd_pcm_writei(tech_pvt->alsap, silencebuf, len / 2);
 					if (res != len / 2) {
-						DEBUGA_CELLIAX("Write returned a different quantity: %d\n", CELLIAX_P_LOG, res);
+						DEBUGA_GSMOPEN("Write returned a different quantity: %d\n", GSMOPEN_P_LOG, res);
 						res = -1;
 					} else if (res < 0) {
-						DEBUGA_CELLIAX("Write error %s\n", CELLIAX_P_LOG, snd_strerror(res));
+						DEBUGA_GSMOPEN("Write error %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 						res = -1;
 					}
 				}
@@ -2526,21 +2526,21 @@
 
 		res = snd_pcm_delay(tech_pvt->alsap, &delayp1);
 		if (res < 0) {
-			DEBUGA_CELLIAX("Error %d on snd_pcm_delay: \"%s\"\n", CELLIAX_P_LOG, res, snd_strerror(res));
+			DEBUGA_GSMOPEN("Error %d on snd_pcm_delay: \"%s\"\n", GSMOPEN_P_LOG, res, snd_strerror(res));
 			res = snd_pcm_prepare(tech_pvt->alsap);
 			if (res) {
-				DEBUGA_CELLIAX("snd_pcm_prepare failed: '%s'\n", CELLIAX_P_LOG, snd_strerror(res));
+				DEBUGA_GSMOPEN("snd_pcm_prepare failed: '%s'\n", GSMOPEN_P_LOG, snd_strerror(res));
 			}
 			res = snd_pcm_delay(tech_pvt->alsap, &delayp1);
 		}
 
 		delayp2 = snd_pcm_avail_update(tech_pvt->alsap);
 		if (delayp2 < 0) {
-			DEBUGA_CELLIAX("Error %d on snd_pcm_avail_update: \"%s\"\n", CELLIAX_P_LOG, (int) delayp2, snd_strerror(delayp2));
+			DEBUGA_GSMOPEN("Error %d on snd_pcm_avail_update: \"%s\"\n", GSMOPEN_P_LOG, (int) delayp2, snd_strerror(delayp2));
 
 			res = snd_pcm_prepare(tech_pvt->alsap);
 			if (res) {
-				DEBUGA_CELLIAX("snd_pcm_prepare failed: '%s'\n", CELLIAX_P_LOG, snd_strerror(res));
+				DEBUGA_GSMOPEN("snd_pcm_prepare failed: '%s'\n", GSMOPEN_P_LOG, snd_strerror(res));
 			}
 			delayp2 = snd_pcm_avail_update(tech_pvt->alsap);
 		}
@@ -2550,31 +2550,31 @@
 
 			res = snd_pcm_prepare(tech_pvt->alsap);
 			if (res) {
-				DEBUGA_CELLIAX
+				DEBUGA_GSMOPEN
 					("snd_pcm_prepare failed while trying to prevent an ALSA write XRUN: %s, delayp1=%d, delayp2=%d\n",
-					 CELLIAX_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
+					 GSMOPEN_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
 			} else {
 
 				int i;
 				for (i = 0; i < (tech_pvt->alsa_periods_in_buffer - 1); i++) {
-					res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
+					res = snd_pcm_format_set_silence(gsmopen_format, silencebuf, len / 2);
 					if (res < 0) {
-						DEBUGA_CELLIAX("Silence error %s\n", CELLIAX_P_LOG, snd_strerror(res));
+						DEBUGA_GSMOPEN("Silence error %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 						res = -1;
 					}
 					res = snd_pcm_writei(tech_pvt->alsap, silencebuf, len / 2);
 					if (res < 0) {
-						DEBUGA_CELLIAX("Write error %s\n", CELLIAX_P_LOG, snd_strerror(res));
+						DEBUGA_GSMOPEN("Write error %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 						res = -1;
 					} else if (res != len / 2) {
-						DEBUGA_CELLIAX("Write returned a different quantity: %d\n", CELLIAX_P_LOG, res);
+						DEBUGA_GSMOPEN("Write returned a different quantity: %d\n", GSMOPEN_P_LOG, res);
 						res = -1;
 					}
 				}
 
-				DEBUGA_CELLIAX
-					("PREVENTING an ALSA write XRUN (celliax can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n",
-					 CELLIAX_P_LOG, tech_pvt->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
+				DEBUGA_GSMOPEN
+					("PREVENTING an ALSA write XRUN (gsmopen can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n",
+					 GSMOPEN_P_LOG, tech_pvt->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
 			}
 
 		}
@@ -2602,12 +2602,12 @@
 			res = snd_pcm_writei(tech_pvt->alsap, sizbuf2, len);
 		}
 		if (res == -EPIPE) {
-			DEBUGA_CELLIAX
-				("ALSA write EPIPE (XRUN) (celliax can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n",
-				 CELLIAX_P_LOG, tech_pvt->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
+			DEBUGA_GSMOPEN
+				("ALSA write EPIPE (XRUN) (gsmopen can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n",
+				 GSMOPEN_P_LOG, tech_pvt->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
 			res = snd_pcm_prepare(tech_pvt->alsap);
 			if (res) {
-				ERRORA("audio play prepare failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
+				ERRORA("audio play prepare failed: %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 			} else {
 
 				if (tech_pvt->alsa_play_is_mono) {
@@ -2636,11 +2636,11 @@
 
 		} else {
 			if (res == -ESTRPIPE) {
-				ERRORA("You've got some big problems\n", CELLIAX_P_LOG);
+				ERRORA("You've got some big problems\n", GSMOPEN_P_LOG);
 			} else if (res == -EAGAIN) {
 				res = 0;
 			} else if (res < 0) {
-				ERRORA("Error %d on audio write: \"%s\"\n", CELLIAX_P_LOG, res, snd_strerror(res));
+				ERRORA("Error %d on audio write: \"%s\"\n", GSMOPEN_P_LOG, res, snd_strerror(res));
 			}
 		}
 	}
@@ -2649,22 +2649,22 @@
 		time(&now_timestamp);
 		if ((now_timestamp - tech_pvt->audio_play_reset_timestamp) > tech_pvt->audio_play_reset_period) {
 			if (option_debug)
-				DEBUGA_CELLIAX("reset audio play\n", CELLIAX_P_LOG);
+				DEBUGA_GSMOPEN("reset audio play\n", GSMOPEN_P_LOG);
 			res = snd_pcm_wait(tech_pvt->alsap, 1000);
 			if (res < 0) {
-				ERRORA("audio play wait failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
+				ERRORA("audio play wait failed: %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 			}
 			res = snd_pcm_drop(tech_pvt->alsap);
 			if (res) {
-				ERRORA("audio play drop failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
+				ERRORA("audio play drop failed: %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 			}
 			res = snd_pcm_prepare(tech_pvt->alsap);
 			if (res) {
-				ERRORA("audio play prepare failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
+				ERRORA("audio play prepare failed: %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 			}
 			res = snd_pcm_wait(tech_pvt->alsap, 1000);
 			if (res < 0) {
-				ERRORA("audio play wait failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
+				ERRORA("audio play wait failed: %s\n", GSMOPEN_P_LOG, snd_strerror(res));
 			}
 			time(&tech_pvt->audio_play_reset_timestamp);
 		}
@@ -2679,12 +2679,12 @@
 int alsa_read(private_t * tech_pvt, short *data, int datalen)
 {
 	//static struct ast_frame f;
-	static short __buf[CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
-	static short __buf2[(CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2];
+	static short __buf[GSMOPEN_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
+	static short __buf2[(GSMOPEN_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2];
 	short *buf;
 	short *buf2;
 	static int readpos = 0;
-	//static int left = CELLIAX_FRAME_SIZE;
+	//static int left = GSMOPEN_FRAME_SIZE;
 	static int left;
 	snd_pcm_state_t state;
 	int r = 0;
@@ -2692,7 +2692,7 @@
 	int error = 0;
 	//time_t now_timestamp;
 
-	//DEBUGA_CELLIAX("buf=%p, datalen=%d, left=%d\n", CELLIAX_P_LOG, (void *)buf, datalen, left);
+	//DEBUGA_GSMOPEN("buf=%p, datalen=%d, left=%d\n", GSMOPEN_P_LOG, (void *)buf, datalen, left);
 	//memset(&f, 0, sizeof(struct ast_frame)); //giova
 
 
@@ -2703,23 +2703,23 @@
 
 	state = snd_pcm_state(tech_pvt->alsac);
 	if (state != SND_PCM_STATE_RUNNING) {
-		DEBUGA_CELLIAX("ALSA read state is not SND_PCM_STATE_RUNNING\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("ALSA read state is not SND_PCM_STATE_RUNNING\n", GSMOPEN_P_LOG);
 
 		if (state != SND_PCM_STATE_PREPARED) {
 			error = snd_pcm_prepare(tech_pvt->alsac);
 			if (error) {
-				ERRORA("snd_pcm_prepare failed, %s\n", CELLIAX_P_LOG, snd_strerror(error));
+				ERRORA("snd_pcm_prepare failed, %s\n", GSMOPEN_P_LOG, snd_strerror(error));
 				return r;
 			}
-			DEBUGA_CELLIAX("prepared!\n", CELLIAX_P_LOG);
+			DEBUGA_GSMOPEN("prepared!\n", GSMOPEN_P_LOG);
 		}
 		usleep(1000);
 		error = snd_pcm_start(tech_pvt->alsac);
 		if (error) {
-			ERRORA("snd_pcm_start failed, %s\n", CELLIAX_P_LOG, snd_strerror(error));
+			ERRORA("snd_pcm_start failed, %s\n", GSMOPEN_P_LOG, snd_strerror(error));
 			return r;
 		}
-		DEBUGA_CELLIAX("started!\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("started!\n", GSMOPEN_P_LOG);
 		usleep(1000);
 	}
 
@@ -2728,13 +2728,13 @@
 
 	if (tech_pvt->alsa_capture_is_mono) {
 		r = snd_pcm_readi(tech_pvt->alsac, buf + readpos, left);
-		//DEBUGA_CELLIAX("r=%d, buf=%p, buf+readpos=%p, datalen=%d, left=%d\n", CELLIAX_P_LOG, r, (void *)buf, (void *)(buf + readpos), datalen, left);
+		//DEBUGA_GSMOPEN("r=%d, buf=%p, buf+readpos=%p, datalen=%d, left=%d\n", GSMOPEN_P_LOG, r, (void *)buf, (void *)(buf + readpos), datalen, left);
 	} else {
 		r = snd_pcm_readi(tech_pvt->alsac, buf2 + (readpos * 2), left);
 
 		int a = 0;
 		int i = 0;
-		for (i = 0; i < (CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
+		for (i = 0; i < (GSMOPEN_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
 			__buf[a] = (__buf2[i] + __buf2[i + 1]) / 2;	//comment out this line to use only left
 			//__buf[a] = __buf2[i]; // enable this line to use only left
 			a++;
@@ -2744,14 +2744,14 @@
 	}
 
 	if (r == -EPIPE) {
-		DEBUGA_CELLIAX("ALSA XRUN on read\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("ALSA XRUN on read\n", GSMOPEN_P_LOG);
 		return r;
 	} else if (r == -ESTRPIPE) {
-		ERRORA("-ESTRPIPE\n", CELLIAX_P_LOG);
+		ERRORA("-ESTRPIPE\n", GSMOPEN_P_LOG);
 		return r;
 
 	} else if (r == -EAGAIN) {
-		DEBUGA_CELLIAX("ALSA read -EAGAIN, the soundcard is not ready to be read by celliax\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("ALSA read -EAGAIN, the soundcard is not ready to be read by gsmopen\n", GSMOPEN_P_LOG);
 		while (r == -EAGAIN) {
 			usleep(1000);
 
@@ -2762,7 +2762,7 @@
 
 				int a = 0;
 				int i = 0;
-				for (i = 0; i < (CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
+				for (i = 0; i < (GSMOPEN_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
 					__buf[a] = (__buf2[i] + __buf2[i + 1]) / 2;
 					a++;
 					i++;
@@ -2772,19 +2772,19 @@
 
 		}
 	} else if (r < 0) {
-		WARNINGA("ALSA Read error: %s\n", CELLIAX_P_LOG, snd_strerror(r));
+		WARNINGA("ALSA Read error: %s\n", GSMOPEN_P_LOG, snd_strerror(r));
 	} else if (r >= 0) {
-		//DEBUGA_CELLIAX("read: r=%d, readpos=%d, left=%d, off=%d\n", CELLIAX_P_LOG, r, readpos, left, off);
+		//DEBUGA_GSMOPEN("read: r=%d, readpos=%d, left=%d, off=%d\n", GSMOPEN_P_LOG, r, readpos, left, off);
 		off -= r;				//what is the meaning of this? a leftover, probably
 	}
 	/* Update positions */
 	readpos += r;
 	left -= r;
 
-	if (readpos >= CELLIAX_FRAME_SIZE) {
+	if (readpos >= GSMOPEN_FRAME_SIZE) {
 		/* A real frame */
 		readpos = 0;
-		left = CELLIAX_FRAME_SIZE;
+		left = GSMOPEN_FRAME_SIZE;
 		int i;
 		for (i = 0; i < r; i++)
 			data[i] = buf[i];
@@ -2798,11 +2798,11 @@
 
 
 
-int celliax_sendsms(private_t * tech_pvt, char *dest, char *text)
+int gsmopen_sendsms(private_t * tech_pvt, char *dest, char *text)
 {
 	//char *idest = data;
 	//char rdest[256];
-	//struct celliax_pvt *p = NULL;
+	//struct gsmopen_pvt *p = NULL;
 	//char *device;
 	//char *dest;
 	//char *text;
@@ -2811,14 +2811,14 @@
 	int failed = 0;
 
 	//strncpy(rdest, idest, sizeof(rdest) - 1);
-	DEBUGA_CELLIAX("CelliaxSendsms: dest=%s text=%s\n", CELLIAX_P_LOG, dest, text);
-	DEBUGA_CELLIAX("START\n", CELLIAX_P_LOG);
-	/* we can use celliax_request to get the channel, but celliax_request would look for onowned channels, and probably we can send SMSs while a call is ongoing
+	DEBUGA_GSMOPEN("GSMopenSendsms: dest=%s text=%s\n", GSMOPEN_P_LOG, dest, text);
+	DEBUGA_GSMOPEN("START\n", GSMOPEN_P_LOG);
+	/* we can use gsmopen_request to get the channel, but gsmopen_request would look for onowned channels, and probably we can send SMSs while a call is ongoing
 	 *
 	 */
 
 	if (tech_pvt->controldevprotocol != PROTOCOL_AT) {
-		ERRORA(", CELLIAX_P_LOGCelliaxSendsms supports only AT command cellphones at the moment :-( !\n", CELLIAX_P_LOG);
+		ERRORA(", GSMOPEN_P_LOGGSMopenSendsms supports only AT command cellphones at the moment :-( !\n", GSMOPEN_P_LOG);
 		return RESULT_FAILURE;
 	}
 
@@ -2835,9 +2835,9 @@
 		} else {
 			char dest2[1048];
 
-			err = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
+			err = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
 			if (err) {
-				ERRORA("AT+CSCS=\"UCS2\" (set TE messages to ucs2)  do not got OK from the phone\n", CELLIAX_P_LOG);
+				ERRORA("AT+CSCS=\"UCS2\" (set TE messages to ucs2)  do not got OK from the phone\n", GSMOPEN_P_LOG);
 			}
 
 			memset(dest2, '\0', sizeof(dest2));
@@ -2846,34 +2846,34 @@
 		}
 		//TODO: support phones that only accept pdu mode
 		//TODO would be better to lock controldev here
-		err = celliax_serial_write_AT_noack(tech_pvt, smscommand);
+		err = gsmopen_serial_write_AT_noack(tech_pvt, smscommand);
 		if (err) {
-			ERRORA("Error sending SMS\n", CELLIAX_P_LOG);
+			ERRORA("Error sending SMS\n", GSMOPEN_P_LOG);
 			failed = 1;
 			goto uscita;
 		}
-		err = celliax_serial_AT_expect(tech_pvt, "> ", 0, 1);	// wait 1.5s for the prompt, no  crlf
+		err = gsmopen_serial_AT_expect(tech_pvt, "> ", 0, 1);	// wait 1.5s for the prompt, no  crlf
 #if 1
 		if (err) {
-			DEBUGA_CELLIAX
+			DEBUGA_GSMOPEN
 				("Error or timeout getting prompt '> ' for sending sms directly to the remote party. BTW, seems that we cannot do that with Motorola c350, so we'll write to cellphone memory, then send from memory\n",
-				 CELLIAX_P_LOG);
+				 GSMOPEN_P_LOG);
 
-			err = celliax_serial_write_AT_ack(tech_pvt, "ATE1");	//motorola (at least c350) do not echo the '>' prompt when in ATE0... go figure!!!!
+			err = gsmopen_serial_write_AT_ack(tech_pvt, "ATE1");	//motorola (at least c350) do not echo the '>' prompt when in ATE0... go figure!!!!
 			if (err) {
-				ERRORA("Error activating echo from modem\n", CELLIAX_P_LOG);
+				ERRORA("Error activating echo from modem\n", GSMOPEN_P_LOG);
 			}
 			tech_pvt->at_cmgw[0] = '\0';
 			sprintf(smscommand, "AT+CMGW=\"%s\"", dest);	//TODO: support phones that only accept pdu mode
-			err = celliax_serial_write_AT_noack(tech_pvt, smscommand);
+			err = gsmopen_serial_write_AT_noack(tech_pvt, smscommand);
 			if (err) {
-				ERRORA("Error writing SMS destination to the cellphone memory\n", CELLIAX_P_LOG);
+				ERRORA("Error writing SMS destination to the cellphone memory\n", GSMOPEN_P_LOG);
 				failed = 1;
 				goto uscita;
 			}
-			err = celliax_serial_AT_expect(tech_pvt, "> ", 0, 1);	// wait 1.5s for the prompt, no  crlf
+			err = gsmopen_serial_AT_expect(tech_pvt, "> ", 0, 1);	// wait 1.5s for the prompt, no  crlf
 			if (err) {
-				ERRORA("Error or timeout getting prompt '> ' for writing sms text in cellphone memory\n", CELLIAX_P_LOG);
+				ERRORA("Error or timeout getting prompt '> ' for writing sms text in cellphone memory\n", GSMOPEN_P_LOG);
 				failed = 1;
 				goto uscita;
 			}
@@ -2889,29 +2889,29 @@
 		}
 
 		smscommand[strlen(smscommand)] = 0x1A;
-		DEBUGA_CELLIAX("smscommand len is: %d, text is:|||%s|||\n", CELLIAX_P_LOG, strlen(smscommand), smscommand);
+		DEBUGA_GSMOPEN("smscommand len is: %d, text is:|||%s|||\n", GSMOPEN_P_LOG, strlen(smscommand), smscommand);
 
-		err = celliax_serial_write_AT_ack_nocr_longtime(tech_pvt, smscommand);
+		err = gsmopen_serial_write_AT_ack_nocr_longtime(tech_pvt, smscommand);
 		//TODO would be better to unlock controldev here
 		if (err) {
-			ERRORA("Error writing SMS text to the cellphone memory\n", CELLIAX_P_LOG);
+			ERRORA("Error writing SMS text to the cellphone memory\n", GSMOPEN_P_LOG);
 			//return RESULT_FAILURE;
 			failed = 1;
 			goto uscita;
 		}
 		if (tech_pvt->at_cmgw[0]) {
 			sprintf(smscommand, "AT+CMSS=%s", tech_pvt->at_cmgw);
-			err = celliax_serial_write_AT_expect_longtime(tech_pvt, smscommand, "OK");
+			err = gsmopen_serial_write_AT_expect_longtime(tech_pvt, smscommand, "OK");
 			if (err) {
-				ERRORA("Error sending SMS from the cellphone memory\n", CELLIAX_P_LOG);
+				ERRORA("Error sending SMS from the cellphone memory\n", GSMOPEN_P_LOG);
 				//return RESULT_FAILURE;
 				failed = 1;
 				goto uscita;
 			}
 
-			err = celliax_serial_write_AT_ack(tech_pvt, "ATE0");	//motorola (at least c350) do not echo the '>' prompt when in ATE0... go figure!!!!
+			err = gsmopen_serial_write_AT_ack(tech_pvt, "ATE0");	//motorola (at least c350) do not echo the '>' prompt when in ATE0... go figure!!!!
 			if (err) {
-				ERRORA("Error de-activating echo from modem\n", CELLIAX_P_LOG);
+				ERRORA("Error de-activating echo from modem\n", GSMOPEN_P_LOG);
 			}
 		}
 	  uscita:
@@ -2921,16 +2921,16 @@
 
 			/* let's see what we've sent, just for check TODO: Motorola it's not reliable! Motorola c350 tells that all was sent, but is not true! It just sends how much it fits into one SMS FIXME: need an algorithm to calculate how many ucs2 chars fits into an SMS. It make difference based, probably, on the GSM alphabet translation, or so */
 			sprintf(smscommand, "AT+CMGR=%s", tech_pvt->at_cmgw);
-			err = celliax_serial_write_AT_ack(tech_pvt, smscommand);
+			err = gsmopen_serial_write_AT_ack(tech_pvt, smscommand);
 			if (err) {
-				ERRORA("Error reading SMS back from the cellphone memory\n", CELLIAX_P_LOG);
+				ERRORA("Error reading SMS back from the cellphone memory\n", GSMOPEN_P_LOG);
 			}
 
 			/* let's delete from cellphone memory what we've sent */
 			sprintf(smscommand, "AT+CMGD=%s", tech_pvt->at_cmgw);
-			err = celliax_serial_write_AT_ack(tech_pvt, smscommand);
+			err = gsmopen_serial_write_AT_ack(tech_pvt, smscommand);
 			if (err) {
-				ERRORA("Error deleting SMS from the cellphone memory\n", CELLIAX_P_LOG);
+				ERRORA("Error deleting SMS from the cellphone memory\n", GSMOPEN_P_LOG);
 			}
 
 			tech_pvt->at_cmgw[0] = '\0';
@@ -2940,7 +2940,7 @@
 		POPPA_UNLOCKA(&tech_pvt->controldev_lock);
 	}
 
-	DEBUGA_CELLIAX("FINISH\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("FINISH\n", GSMOPEN_P_LOG);
 	if (failed)
 		return -1;
 	else
@@ -2959,28 +2959,28 @@
 /*
  * store the boost factor
  */
-void celliax_store_boost(char *s, double *boost)
+void gsmopen_store_boost(char *s, double *boost)
 {
 	private_t *tech_pvt = NULL;
 
 	if (sscanf(s, "%lf", boost) != 1) {
-		ERRORA("invalid boost <%s>\n", CELLIAX_P_LOG, s);
+		ERRORA("invalid boost <%s>\n", GSMOPEN_P_LOG, s);
 		return;
 	}
 	if (*boost < -BOOST_MAX) {
-		WARNINGA("boost %s too small, using %d\n", CELLIAX_P_LOG, s, -BOOST_MAX);
+		WARNINGA("boost %s too small, using %d\n", GSMOPEN_P_LOG, s, -BOOST_MAX);
 		*boost = -BOOST_MAX;
 	} else if (*boost > BOOST_MAX) {
-		WARNINGA("boost %s too large, using %d\n", CELLIAX_P_LOG, s, BOOST_MAX);
+		WARNINGA("boost %s too large, using %d\n", GSMOPEN_P_LOG, s, BOOST_MAX);
 		*boost = BOOST_MAX;
 	}
 	*boost = exp(log(10) * *boost / 20) * BOOST_SCALE;
 	if (option_debug > 1)
-		DEBUGA_CELLIAX("setting boost %s to %f\n", CELLIAX_P_LOG, s, *boost);
+		DEBUGA_GSMOPEN("setting boost %s to %f\n", GSMOPEN_P_LOG, s, *boost);
 }
 
 
-int celliax_sound_boost(void *data, int samples_num, double boost)
+int gsmopen_sound_boost(void *data, int samples_num, double boost)
 {
 /* LUIGI RIZZO's magic */
 	if (boost != 0) {			/* scale and clip values */

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c (15045 => 15046)


--- freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c	2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c	2009-10-02 13:17:39 UTC (rev 15046)
@@ -21,7 +21,7 @@
  * Portions created by the Initial Developer are Copyright (C)
  * the Initial Developer. All Rights Reserved.
  *
- * This module (mod_celliax) has been contributed by:
+ * This module (mod_gsmopen) has been contributed by:
  *
  * Giovanni Maruzzelli (gmaruzz@gmail.com)
  *
@@ -30,11 +30,11 @@
  *
  *
  *
- * mod_celliax.c -- GSM compatible Endpoint Module
+ * mod_gsmopen.c -- GSM compatible Endpoint Module
  *
  */
 
-#include "celliax.h"
+#include "gsmopen.h"
 #define MDL_CHAT_PROTO "SMS"
 
 #ifdef WIN32
@@ -82,26 +82,26 @@
 
 /***************/
 #endif /* WIN32 */
-SWITCH_MODULE_LOAD_FUNCTION(mod_celliax_load);
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_celliax_shutdown);
-SWITCH_MODULE_DEFINITION(mod_celliax, mod_celliax_load, mod_celliax_shutdown, NULL);
+SWITCH_MODULE_LOAD_FUNCTION(mod_gsmopen_load);
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_gsmopen_shutdown);
+SWITCH_MODULE_DEFINITION(mod_gsmopen, mod_gsmopen_load, mod_gsmopen_shutdown, NULL);
 #if 0
 SWITCH_STANDARD_API(sk_function);
 /* BEGIN: Changes here */
-#define SK_SYNTAX "list [full] || console || celliax_API_msg || remove < celliaxusername | #interface_name | #interface_id > || reload"
+#define SK_SYNTAX "list [full] || console || gsmopen_API_msg || remove < gsmopenusername | #interface_name | #interface_id > || reload"
 /* END: Changes heres */
-SWITCH_STANDARD_API(celliax_function);
-#define CELLIAX_SYNTAX "interface_name celliax_API_msg"
+SWITCH_STANDARD_API(gsmopen_function);
+#define GSMOPEN_SYNTAX "interface_name gsmopen_API_msg"
 #endif //0
 
 SWITCH_STANDARD_API(sendsms_function);
-#define SENDSMS_SYNTAX "celliax_sendsms interface_name destination_number SMS_text"
+#define SENDSMS_SYNTAX "gsmopen_sendsms interface_name destination_number SMS_text"
 /* BEGIN: Changes here */
 #define FULL_RELOAD 0
 #define SOFT_RELOAD 1
 /* END: Changes heres */
 
-char *interface_status[] = {	/* should match CELLIAX_STATE_xxx in celliax.h */
+char *interface_status[] = {	/* should match GSMOPEN_STATE_xxx in gsmopen.h */
 	"IDLE",
 	"DOWN",
 	"RING",
@@ -115,7 +115,7 @@
 	"HANG_RQ",
 	"PREANSW"
 };
-char *phone_callflow[] = {		/* should match CALLFLOW_XXX in celliax.h */
+char *phone_callflow[] = {		/* should match CALLFLOW_XXX in gsmopen.h */
 	"CALL_IDLE",
 	"CALL_DOWN",
 	"INCOMING_RNG",
@@ -165,13 +165,13 @@
 	int real_interfaces;
 	int next_interface;
 	char hold_music[256];
-	private_t CELLIAX_INTERFACES[CELLIAX_MAX_INTERFACES];
+	private_t GSMOPEN_INTERFACES[GSMOPEN_MAX_INTERFACES];
 	switch_mutex_t *mutex;
 	private_t *sk_console;
 } globals;
 
-switch_endpoint_interface_t *celliax_endpoint_interface;
-switch_memory_pool_t *celliax_module_pool = NULL;
+switch_endpoint_interface_t *gsmopen_endpoint_interface;
+switch_memory_pool_t *gsmopen_module_pool = NULL;
 int running = 0;
 
 SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
@@ -201,23 +201,23 @@
 static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
 static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
 static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
-static switch_status_t celliax_tech_init(private_t * tech_pvt, switch_core_session_t *session);
+static switch_status_t gsmopen_tech_init(private_t * tech_pvt, switch_core_session_t *session);
 
-static switch_status_t celliax_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
+static switch_status_t gsmopen_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
 {
 	switch_core_session_t *session = NULL;
 
 	if (switch_core_codec_init
 		(&tech_pvt->read_codec, "L16", NULL, sample_rate, codec_ms, 1,
 		 SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
-		ERRORA("Can't load codec?\n", CELLIAX_P_LOG);
+		ERRORA("Can't load codec?\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 	}
 
 	if (switch_core_codec_init
 		(&tech_pvt->write_codec, "L16", NULL, sample_rate, codec_ms, 1,
 		 SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
-		ERRORA("Can't load codec?\n", CELLIAX_P_LOG);
+		ERRORA("Can't load codec?\n", GSMOPEN_P_LOG);
 		switch_core_codec_destroy(&tech_pvt->read_codec);
 		return SWITCH_STATUS_FALSE;
 	}
@@ -232,7 +232,7 @@
 		switch_core_session_set_write_codec(session, &tech_pvt->write_codec);
 		switch_core_session_rwunlock(session);
 	} else {
-		ERRORA("no session\n", CELLIAX_P_LOG);
+		ERRORA("no session\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 	}
 
@@ -240,7 +240,7 @@
 
 }
 
-switch_status_t celliax_tech_init(private_t * tech_pvt, switch_core_session_t *session)
+switch_status_t gsmopen_tech_init(private_t * tech_pvt, switch_core_session_t *session)
 {
 
 	switch_assert(tech_pvt != NULL);
@@ -252,32 +252,32 @@
 	switch_core_session_set_private(session, tech_pvt);
 	switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session), sizeof(tech_pvt->session_uuid_str));
 	if (!strlen(tech_pvt->session_uuid_str)) {
-		ERRORA("no tech_pvt->session_uuid_str\n", CELLIAX_P_LOG);
+		ERRORA("no tech_pvt->session_uuid_str\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 	}
-	if (celliax_codec(tech_pvt, SAMPLERATE_CELLIAX, 20) != SWITCH_STATUS_SUCCESS) {
-		ERRORA("celliax_codec FAILED\n", CELLIAX_P_LOG);
+	if (gsmopen_codec(tech_pvt, SAMPLERATE_GSMOPEN, 20) != SWITCH_STATUS_SUCCESS) {
+		ERRORA("gsmopen_codec FAILED\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 	}
 	//teletone_dtmf_detect_init(&tech_pvt->dtmf_detect, tech_pvt->read_codec.implementation->actual_samples_per_second);
 	teletone_dtmf_detect_init(&tech_pvt->dtmf_detect, 8000);
 
 	if (alsa_init(tech_pvt)) {
-		ERRORA("alsa_init failed\n", CELLIAX_P_LOG);
+		ERRORA("alsa_init failed\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 
 	}
-	if (switch_core_timer_init(&tech_pvt->timer_read, "soft", 20, tech_pvt->read_codec.implementation->samples_per_packet, celliax_module_pool) !=
+	if (switch_core_timer_init(&tech_pvt->timer_read, "soft", 20, tech_pvt->read_codec.implementation->samples_per_packet, gsmopen_module_pool) !=
 		SWITCH_STATUS_SUCCESS) {
-		ERRORA("setup timer failed\n", CELLIAX_P_LOG);
+		ERRORA("setup timer failed\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 	}
 
 	switch_core_timer_sync(&tech_pvt->timer_read);
 
-	if (switch_core_timer_init(&tech_pvt->timer_write, "soft", 20, tech_pvt->write_codec.implementation->samples_per_packet, celliax_module_pool) !=
+	if (switch_core_timer_init(&tech_pvt->timer_write, "soft", 20, tech_pvt->write_codec.implementation->samples_per_packet, gsmopen_module_pool) !=
 		SWITCH_STATUS_SUCCESS) {
-		ERRORA("setup timer failed\n", CELLIAX_P_LOG);
+		ERRORA("setup timer failed\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 	}
 
@@ -285,7 +285,7 @@
 
 
 	switch_clear_flag(tech_pvt, TFLAG_HANGUP);
-	DEBUGA_CELLIAX("celliax_codec SUCCESS\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("gsmopen_codec SUCCESS\n", GSMOPEN_P_LOG);
 	return SWITCH_STATUS_SUCCESS;
 }
 
@@ -302,24 +302,24 @@
 
 		/* take a number as interface id */
 		if (interface_id > 0 || (interface_id == 0 && strcmp(the_interface, "0") == 0)) {
-			if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
+			if (strlen(globals.GSMOPEN_INTERFACES[interface_id].name)) {
 				return SWITCH_STATUS_SUCCESS;
 			}
 		} else {
 			/* interface name */
-			for (interface_id = 0; interface_id < CELLIAX_MAX_INTERFACES; interface_id++) {
-				if (strcmp(globals.CELLIAX_INTERFACES[interface_id].name, the_interface) == 0) {
+			for (interface_id = 0; interface_id < GSMOPEN_MAX_INTERFACES; interface_id++) {
+				if (strcmp(globals.GSMOPEN_INTERFACES[interface_id].name, the_interface) == 0) {
 					return SWITCH_STATUS_SUCCESS;
 					break;
 				}
 			}
 		}
-	} else {					/* look by celliax_user */
+	} else {					/* look by gsmopen_user */
 
 
-		for (i = 0; i < CELLIAX_MAX_INTERFACES; i++) {
-			if (strlen(globals.CELLIAX_INTERFACES[i].celliax_user)) {
-				if (strcmp(globals.CELLIAX_INTERFACES[i].celliax_user, the_interface) == 0) {
+		for (i = 0; i < GSMOPEN_MAX_INTERFACES; i++) {
+			if (strlen(globals.GSMOPEN_INTERFACES[i].gsmopen_user)) {
+				if (strcmp(globals.GSMOPEN_INTERFACES[i].gsmopen_user, the_interface) == 0) {
 					return SWITCH_STATUS_SUCCESS;
 				}
 			}
@@ -347,63 +347,63 @@
 
 		if (interface_id > 0 || (interface_id == 0 && strcmp(the_interface, "0") == 0)) {
 			/* take a number as interface id */
-			tech_pvt = &globals.CELLIAX_INTERFACES[interface_id];
+			tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
 		} else {
 
-			for (interface_id = 0; interface_id < CELLIAX_MAX_INTERFACES; interface_id++) {
-				if (strcmp(globals.CELLIAX_INTERFACES[interface_id].name, the_interface) == 0) {
-					tech_pvt = &globals.CELLIAX_INTERFACES[interface_id];
+			for (interface_id = 0; interface_id < GSMOPEN_MAX_INTERFACES; interface_id++) {
+				if (strcmp(globals.GSMOPEN_INTERFACES[interface_id].name, the_interface) == 0) {
+					tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
 					break;
 				}
 			}
 		}
-	} else {					/* remove by celliax_user */
-		for (interface_id = 0; interface_id < CELLIAX_MAX_INTERFACES; interface_id++) {
-			if (strcmp(globals.CELLIAX_INTERFACES[interface_id].celliax_user, the_interface) == 0) {
-				tech_pvt = &globals.CELLIAX_INTERFACES[interface_id];
+	} else {					/* remove by gsmopen_user */
+		for (interface_id = 0; interface_id < GSMOPEN_MAX_INTERFACES; interface_id++) {
+			if (strcmp(globals.GSMOPEN_INTERFACES[interface_id].gsmopen_user, the_interface) == 0) {
+				tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
 				break;
 			}
 		}
 	}
 
 	if (!tech_pvt) {
-		DEBUGA_CELLIAX("interface '%s' does not exist\n", CELLIAX_P_LOG, the_interface);
+		DEBUGA_GSMOPEN("interface '%s' does not exist\n", GSMOPEN_P_LOG, the_interface);
 		goto end;
 	}
 
-	if (strlen(globals.CELLIAX_INTERFACES[interface_id].session_uuid_str)) {
-		DEBUGA_CELLIAX("interface '%s' is busy\n", CELLIAX_P_LOG, the_interface);
+	if (strlen(globals.GSMOPEN_INTERFACES[interface_id].session_uuid_str)) {
+		DEBUGA_GSMOPEN("interface '%s' is busy\n", GSMOPEN_P_LOG, the_interface);
 		goto end;
 	}
 
-	globals.CELLIAX_INTERFACES[interface_id].running = 0;
+	globals.GSMOPEN_INTERFACES[interface_id].running = 0;
 
-	if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
+	if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
 #ifdef WIN32
-		switch_file_write(tech_pvt->CelliaxHandles.fdesc[1], "sciutati", &howmany);	// let's the controldev_thread die
+		switch_file_write(tech_pvt->GSMopenHandles.fdesc[1], "sciutati", &howmany);	// let's the controldev_thread die
 #else /* WIN32 */
-		howmany = write(tech_pvt->CelliaxHandles.fdesc[1], "sciutati", howmany);
+		howmany = write(tech_pvt->GSMopenHandles.fdesc[1], "sciutati", howmany);
 #endif /* WIN32 */
 	}
 
-	if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
+	if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
 #ifdef WIN32
-		if (SendMessage(tech_pvt->CelliaxHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {	// let's the celliax_api_thread_func die
-			DEBUGA_CELLIAX("got FALSE here, thread probably was already dead. GetLastError returned: %d\n", CELLIAX_P_LOG, GetLastError());
-			globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread = NULL;
+		if (SendMessage(tech_pvt->GSMopenHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {	// let's the gsmopen_api_thread_func die
+			DEBUGA_GSMOPEN("got FALSE here, thread probably was already dead. GetLastError returned: %d\n", GSMOPEN_P_LOG, GetLastError());
+			globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread = NULL;
 		}
 #else
 		XEvent e;
-		Atom atom1 = XInternAtom(tech_pvt->CelliaxHandles.disp, "CELLIAXCONTROLAPI_MESSAGE_BEGIN", False);
+		Atom atom1 = XInternAtom(tech_pvt->GSMopenHandles.disp, "GSMOPENCONTROLAPI_MESSAGE_BEGIN", False);
 		memset(&e, 0, sizeof(e));
 		e.xclient.type = ClientMessage;
 		e.xclient.message_type = atom1;	/*  leading message */
-		e.xclient.display = tech_pvt->CelliaxHandles.disp;
-		e.xclient.window = tech_pvt->CelliaxHandles.celliax_win;
+		e.xclient.display = tech_pvt->GSMopenHandles.disp;
+		e.xclient.window = tech_pvt->GSMopenHandles.gsmopen_win;
 		e.xclient.format = 8;
 
-		XSendEvent(tech_pvt->CelliaxHandles.disp, tech_pvt->CelliaxHandles.win, False, 0, &e);
-		XSync(tech_pvt->CelliaxHandles.disp, False);
+		XSendEvent(tech_pvt->GSMopenHandles.disp, tech_pvt->GSMopenHandles.win, False, 0, &e);
+		XSync(tech_pvt->GSMopenHandles.disp, False);
 #endif
 	}
 
@@ -412,27 +412,27 @@
 		switch_yield(50000);
 	}
 
-	if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
-		switch_thread_join(&status, globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread);
+	if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
+		switch_thread_join(&status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread);
 	}
 
-	if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
-		switch_thread_join(&status, globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread);
+	if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
+		switch_thread_join(&status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread);
 	}
 
 	switch_mutex_lock(globals.mutex);
-	if (globals.sk_console == &globals.CELLIAX_INTERFACES[interface_id]) {
-		DEBUGA_CELLIAX("interface '%s' no more console\n", CELLIAX_P_LOG, the_interface);
+	if (globals.sk_console == &globals.GSMOPEN_INTERFACES[interface_id]) {
+		DEBUGA_GSMOPEN("interface '%s' no more console\n", GSMOPEN_P_LOG, the_interface);
 		globals.sk_console = NULL;
 	} else {
-		DEBUGA_CELLIAX("interface '%s' STILL console\n", CELLIAX_P_LOG, the_interface);
+		DEBUGA_GSMOPEN("interface '%s' STILL console\n", GSMOPEN_P_LOG, the_interface);
 	}
-	memset(&globals.CELLIAX_INTERFACES[interface_id], '\0', sizeof(private_t));
+	memset(&globals.GSMOPEN_INTERFACES[interface_id], '\0', sizeof(private_t));
 	globals.real_interfaces--;
 	switch_mutex_unlock(globals.mutex);
 
-	DEBUGA_CELLIAX("interface '%s' deleted successfully\n", CELLIAX_P_LOG, the_interface);
-	globals.CELLIAX_INTERFACES[interface_id].running = 1;
+	DEBUGA_GSMOPEN("interface '%s' deleted successfully\n", GSMOPEN_P_LOG, the_interface);
+	globals.GSMOPEN_INTERFACES[interface_id].running = 1;
   end:
 	//running = 1;
 	return SWITCH_STATUS_SUCCESS;
@@ -456,7 +456,7 @@
 
 	channel = switch_core_session_get_channel(session);
 	switch_assert(channel != NULL);
-	//ERRORA("%s CHANNEL INIT\n", CELLIAX_P_LOG, tech_pvt->name);
+	//ERRORA("%s CHANNEL INIT\n", GSMOPEN_P_LOG, tech_pvt->name);
 	switch_set_flag(tech_pvt, TFLAG_IO);
 
 	/* Move channel's state machine to ROUTING. This means the call is trying
@@ -468,7 +468,7 @@
 	globals.calls++;
 
 	switch_mutex_unlock(globals.mutex);
-	DEBUGA_CELLIAX("%s CHANNEL INIT %s\n", CELLIAX_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
+	DEBUGA_GSMOPEN("%s CHANNEL INIT %s\n", GSMOPEN_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
 
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -481,7 +481,7 @@
 
 
 	if (tech_pvt) {
-		DEBUGA_CELLIAX("%s CHANNEL DESTROY %s\n", CELLIAX_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
+		DEBUGA_GSMOPEN("%s CHANNEL DESTROY %s\n", GSMOPEN_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
 
 		if (switch_core_codec_ready(&tech_pvt->read_codec)) {
 			switch_core_codec_destroy(&tech_pvt->read_codec);
@@ -497,13 +497,13 @@
 		alsa_shutdown(tech_pvt);
 
 		*tech_pvt->session_uuid_str = '\0';
-		tech_pvt->interface_state = CELLIAX_STATE_IDLE;
+		tech_pvt->interface_state = GSMOPEN_STATE_IDLE;
 		if (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED) {
 			tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
 		}
 		switch_core_session_set_private(session, NULL);
 	} else {
-		DEBUGA_CELLIAX("!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n", CELLIAX_P_LOG, switch_core_session_get_uuid(session));
+		DEBUGA_GSMOPEN("!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(session));
 	}
 
 	return SWITCH_STATUS_SUCCESS;
@@ -532,23 +532,23 @@
 	}
 
 
-	DEBUGA_CELLIAX("%s CHANNEL HANGUP\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL HANGUP\n", GSMOPEN_P_LOG, tech_pvt->name);
 	switch_clear_flag(tech_pvt, TFLAG_IO);
 	switch_clear_flag(tech_pvt, TFLAG_VOICE);
 	switch_set_flag(tech_pvt, TFLAG_HANGUP);
 
-	celliax_hangup(tech_pvt);
+	gsmopen_hangup(tech_pvt);
 
 	//memset(tech_pvt->session_uuid_str, '\0', sizeof(tech_pvt->session_uuid_str));
 	//*tech_pvt->session_uuid_str = '\0';
-	DEBUGA_CELLIAX("%s CHANNEL HANGUP\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL HANGUP\n", GSMOPEN_P_LOG, tech_pvt->name);
 	switch_mutex_lock(globals.mutex);
 	globals.calls--;
 	if (globals.calls < 0) {
 		globals.calls = 0;
 	}
 
-	tech_pvt->interface_state = CELLIAX_STATE_IDLE;
+	tech_pvt->interface_state = GSMOPEN_STATE_IDLE;
 	if (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED) {
 		tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
 	}
@@ -568,7 +568,7 @@
 	tech_pvt = switch_core_session_get_private(session);
 	switch_assert(tech_pvt != NULL);
 
-	DEBUGA_CELLIAX("%s CHANNEL ROUTING\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL ROUTING\n", GSMOPEN_P_LOG, tech_pvt->name);
 
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -585,7 +585,7 @@
 	tech_pvt = switch_core_session_get_private(session);
 	switch_assert(tech_pvt != NULL);
 
-	DEBUGA_CELLIAX("%s CHANNEL EXECUTE\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL EXECUTE\n", GSMOPEN_P_LOG, tech_pvt->name);
 
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -601,10 +601,10 @@
 	tech_pvt = switch_core_session_get_private(session);
 	switch_assert(tech_pvt != NULL);
 
-	DEBUGA_CELLIAX("%s CHANNEL KILL_CHANNEL\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL KILL_CHANNEL\n", GSMOPEN_P_LOG, tech_pvt->name);
 	switch (sig) {
 	case SWITCH_SIG_KILL:
-		DEBUGA_CELLIAX("%s CHANNEL got SWITCH_SIG_KILL\n", CELLIAX_P_LOG, switch_channel_get_name(channel));
+		DEBUGA_GSMOPEN("%s CHANNEL got SWITCH_SIG_KILL\n", GSMOPEN_P_LOG, switch_channel_get_name(channel));
 		//switch_mutex_lock(tech_pvt->flag_mutex);
 		switch_clear_flag(tech_pvt, TFLAG_IO);
 		switch_clear_flag(tech_pvt, TFLAG_VOICE);
@@ -612,7 +612,7 @@
 		//switch_mutex_unlock(tech_pvt->flag_mutex);
 		break;
 	case SWITCH_SIG_BREAK:
-		DEBUGA_CELLIAX("%s CHANNEL got SWITCH_SIG_BREAK\n", CELLIAX_P_LOG, switch_channel_get_name(channel));
+		DEBUGA_GSMOPEN("%s CHANNEL got SWITCH_SIG_BREAK\n", GSMOPEN_P_LOG, switch_channel_get_name(channel));
 		//switch_set_flag(tech_pvt, TFLAG_BREAK);
 		//switch_mutex_lock(tech_pvt->flag_mutex);
 		switch_set_flag(tech_pvt, TFLAG_BREAK);
@@ -630,7 +630,7 @@
 
 	tech_pvt = switch_core_session_get_private(session);
 
-	DEBUGA_CELLIAX("%s CHANNEL CONSUME_MEDIA\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL CONSUME_MEDIA\n", GSMOPEN_P_LOG, tech_pvt->name);
 	return SWITCH_STATUS_SUCCESS;
 }
 
@@ -639,7 +639,7 @@
 {
 	private_t *tech_pvt = NULL;
 	tech_pvt = switch_core_session_get_private(session);
-	DEBUGA_CELLIAX("%s CHANNEL EXCHANGE_MEDIA\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL EXCHANGE_MEDIA\n", GSMOPEN_P_LOG, tech_pvt->name);
 	return SWITCH_STATUS_SUCCESS;
 }
 
@@ -647,7 +647,7 @@
 {
 	private_t *tech_pvt = NULL;
 	tech_pvt = switch_core_session_get_private(session);
-	DEBUGA_CELLIAX("%s CHANNEL SOFT_EXECUTE\n", CELLIAX_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("%s CHANNEL SOFT_EXECUTE\n", GSMOPEN_P_LOG, tech_pvt->name);
 	return SWITCH_STATUS_SUCCESS;
 }
 
@@ -656,10 +656,10 @@
 	private_t *tech_pvt = switch_core_session_get_private(session);
 	switch_assert(tech_pvt != NULL);
 
-	DEBUGA_CELLIAX("%s CHANNEL SEND_DTMF\n", CELLIAX_P_LOG, tech_pvt->name);
-	DEBUGA_CELLIAX("DTMF: %c\n", CELLIAX_P_LOG, dtmf->digit);
+	DEBUGA_GSMOPEN("%s CHANNEL SEND_DTMF\n", GSMOPEN_P_LOG, tech_pvt->name);
+	DEBUGA_GSMOPEN("DTMF: %c\n", GSMOPEN_P_LOG, dtmf->digit);
 
-	celliax_senddigit(tech_pvt, dtmf->digit);
+	gsmopen_senddigit(tech_pvt, dtmf->digit);
 
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -677,7 +677,7 @@
 	switch_assert(tech_pvt != NULL);
 
 	if (!switch_channel_ready(channel) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
-		ERRORA("channel not ready \n", CELLIAX_P_LOG);
+		ERRORA("channel not ready \n", GSMOPEN_P_LOG);
 		//TODO: kill the bastard
 		return SWITCH_STATUS_FALSE;
 	}
@@ -704,7 +704,7 @@
 		//switch_core_timer_check(&tech_pvt->timer, SWITCH_TRUE);
 		tech_pvt->read_frame.timestamp = tech_pvt->timer_read.samplecount;
 
-		celliax_sound_boost(tech_pvt->read_frame.data, tech_pvt->read_frame.samples, tech_pvt->capture_boost);
+		gsmopen_sound_boost(tech_pvt->read_frame.data, tech_pvt->read_frame.samples, tech_pvt->capture_boost);
 
 
 
@@ -716,10 +716,10 @@
 	}
 
 	if (samples != 160) {
-		ERRORA("samples=%d\n", CELLIAX_P_LOG, samples);
+		ERRORA("samples=%d\n", GSMOPEN_P_LOG, samples);
 		goto cng;
 	}
-//DEBUGA_CELLIAX("samples=%d tech_pvt->read_frame.timestamp=%d\n", CELLIAX_P_LOG, samples, tech_pvt->read_frame.timestamp);
+//DEBUGA_GSMOPEN("samples=%d tech_pvt->read_frame.timestamp=%d\n", GSMOPEN_P_LOG, samples, tech_pvt->read_frame.timestamp);
 
 //usleep(17000);
 //usleep(17000);
@@ -746,7 +746,7 @@
 				switch_channel_queue_dtmf(channel, &dtmf);
 				p++;
 			}
-			NOTICA("DTMF DETECTED: [%s] new_dtmf_timestamp: %u, delta_t: %u\n", CELLIAX_P_LOG, digit_str, (unsigned int) new_dtmf_timestamp,
+			NOTICA("DTMF DETECTED: [%s] new_dtmf_timestamp: %u, delta_t: %u\n", GSMOPEN_P_LOG, digit_str, (unsigned int) new_dtmf_timestamp,
 				   (unsigned int) (new_dtmf_timestamp - tech_pvt->old_dtmf_timestamp));
 			tech_pvt->old_dtmf_timestamp = new_dtmf_timestamp;
 		}
@@ -754,19 +754,19 @@
 	while (switch_test_flag(tech_pvt, TFLAG_IO)) {
 		if (switch_test_flag(tech_pvt, TFLAG_BREAK)) {
 			switch_clear_flag(tech_pvt, TFLAG_BREAK);
-			DEBUGA_CELLIAX("CHANNEL READ FRAME goto CNG\n", CELLIAX_P_LOG);
+			DEBUGA_GSMOPEN("CHANNEL READ FRAME goto CNG\n", GSMOPEN_P_LOG);
 			goto cng;
 		}
 
 		if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
-			DEBUGA_CELLIAX("CHANNEL READ FRAME not IO\n", CELLIAX_P_LOG);
+			DEBUGA_GSMOPEN("CHANNEL READ FRAME not IO\n", GSMOPEN_P_LOG);
 			return SWITCH_STATUS_FALSE;
 		}
 
 		if (switch_test_flag(tech_pvt, TFLAG_IO) && switch_test_flag(tech_pvt, TFLAG_VOICE)) {
 			switch_clear_flag(tech_pvt, TFLAG_VOICE);
 			if (!tech_pvt->read_frame.datalen) {
-				DEBUGA_CELLIAX("CHANNEL READ CONTINUE\n", CELLIAX_P_LOG);
+				DEBUGA_GSMOPEN("CHANNEL READ CONTINUE\n", GSMOPEN_P_LOG);
 				continue;
 			}
 			*frame = &tech_pvt->read_frame;
@@ -775,17 +775,17 @@
 				switch_swap_linear((*frame)->data, (int) (*frame)->datalen / 2);
 			}
 #endif
-			//WARNINGA("HERE\n", CELLIAX_P_LOG);
+			//WARNINGA("HERE\n", GSMOPEN_P_LOG);
 			return SWITCH_STATUS_SUCCESS;
 		}
 
-		WARNINGA("HERE\n", CELLIAX_P_LOG);
-		DEBUGA_CELLIAX("CHANNEL READ no TFLAG_VOICE\n", CELLIAX_P_LOG);
+		WARNINGA("HERE\n", GSMOPEN_P_LOG);
+		DEBUGA_GSMOPEN("CHANNEL READ no TFLAG_VOICE\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_FALSE;
 
 	}
 
-	DEBUGA_CELLIAX("CHANNEL READ FALSE\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("CHANNEL READ FALSE\n", GSMOPEN_P_LOG);
 	return SWITCH_STATUS_FALSE;
 
   cng:
@@ -812,7 +812,7 @@
 	switch_assert(tech_pvt != NULL);
 
 	if (!switch_channel_ready(channel) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
-		ERRORA("channel not ready \n", CELLIAX_P_LOG);
+		ERRORA("channel not ready \n", GSMOPEN_P_LOG);
 		//TODO: kill the bastard
 		return SWITCH_STATUS_FALSE;
 	}
@@ -825,17 +825,17 @@
 	switch_core_timer_next(&tech_pvt->timer_write);
 	//sent = frame->datalen;
 
-	//ERRORA("PLAY \n", CELLIAX_P_LOG);
+	//ERRORA("PLAY \n", GSMOPEN_P_LOG);
 	//snd_pcm_writei(tech_pvt->alsap, (short *) frame->data, (int) (frame->datalen / 2));
 
-	celliax_sound_boost(frame->data, frame->samples, tech_pvt->playback_boost);
+	gsmopen_sound_boost(frame->data, frame->samples, tech_pvt->playback_boost);
 	sent = alsa_write(tech_pvt, frame->data, (int) (frame->datalen));
-//DEBUGA_CELLIAX("sent=%d \n", CELLIAX_P_LOG, sent);
+//DEBUGA_GSMOPEN("sent=%d \n", GSMOPEN_P_LOG, sent);
 
 	if (sent && sent != frame->datalen / 2 && sent != -1) {
-		DEBUGA_CELLIAX("sent %d\n", CELLIAX_P_LOG, sent);
+		DEBUGA_GSMOPEN("sent %d\n", GSMOPEN_P_LOG, sent);
 	}
-	//NOTICA("sent=%d\n", CELLIAX_P_LOG, sent);
+	//NOTICA("sent=%d\n", GSMOPEN_P_LOG, sent);
 	return SWITCH_STATUS_SUCCESS;
 }
 
@@ -850,9 +850,9 @@
 	tech_pvt = switch_core_session_get_private(session);
 	switch_assert(tech_pvt != NULL);
 
-	//ERRORA("%s CHANNEL INIT\n", CELLIAX_P_LOG, tech_pvt->name);
+	//ERRORA("%s CHANNEL INIT\n", GSMOPEN_P_LOG, tech_pvt->name);
 	switch_set_flag(tech_pvt, TFLAG_IO);
-celliax_serial_answer(tech_pvt);
+gsmopen_serial_answer(tech_pvt);
 
 	/* Move channel's state machine to ROUTING. This means the call is trying
 	   to get from the initial start where the call because, to the point
@@ -863,7 +863,7 @@
 	globals.calls++;
 
 	switch_mutex_unlock(globals.mutex);
-	DEBUGA_CELLIAX("%s CHANNEL ANSWER %s\n", CELLIAX_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
+	DEBUGA_GSMOPEN("%s CHANNEL ANSWER %s\n", GSMOPEN_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
 
 
 
@@ -880,7 +880,7 @@
 
 
 
-	DEBUGA_CELLIAX("ANSWERED! \n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("ANSWERED! \n", GSMOPEN_P_LOG);
 
 	return SWITCH_STATUS_SUCCESS;
 }
@@ -901,15 +901,15 @@
 	switch (msg->message_id) {
 	case SWITCH_MESSAGE_INDICATE_ANSWER:
 		{
-			DEBUGA_CELLIAX("MSG_ID=%d, TO BE ANSWERED!\n", CELLIAX_P_LOG, msg->message_id);
+			DEBUGA_GSMOPEN("MSG_ID=%d, TO BE ANSWERED!\n", GSMOPEN_P_LOG, msg->message_id);
 			channel_answer_channel(session);
 		}
 		break;
 	case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
 
-		WARNINGA("%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n", CELLIAX_P_LOG, switch_channel_get_name(channel));
+		WARNINGA("%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n", GSMOPEN_P_LOG, switch_channel_get_name(channel));
 		while ((samples = alsa_read(tech_pvt, tmp_buffer, tech_pvt->read_codec.implementation->samples_per_packet * 4)) > 160) {
-			WARNINGA("read %d samples\n", CELLIAX_P_LOG, samples);
+			WARNINGA("read %d samples\n", GSMOPEN_P_LOG, samples);
 		}
 		switch_core_timer_sync(&tech_pvt->timer_read);
 		switch_core_timer_sync(&tech_pvt->timer_write);
@@ -919,7 +919,7 @@
 
 	default:
 		{
-			DEBUGA_CELLIAX("MSG_ID=%d\n", CELLIAX_P_LOG, msg->message_id);
+			DEBUGA_GSMOPEN("MSG_ID=%d\n", GSMOPEN_P_LOG, msg->message_id);
 		}
 		break;
 	}
@@ -937,12 +937,12 @@
 		body = "";
 	}
 
-	WARNINGA("event: |||%s|||\n", CELLIAX_P_LOG, body);
+	WARNINGA("event: |||%s|||\n", GSMOPEN_P_LOG, body);
 
 	return SWITCH_STATUS_SUCCESS;
 }
 
-switch_state_handler_table_t celliax_state_handlers = {
+switch_state_handler_table_t gsmopen_state_handlers = {
 	/*.on_init */ channel_on_init,
 	/*.on_routing */ channel_on_routing,
 	/*.on_execute */ channel_on_execute,
@@ -957,7 +957,7 @@
 	/*.on_destroy */ channel_on_destroy
 };
 
-switch_io_routines_t celliax_io_routines = {
+switch_io_routines_t gsmopen_io_routines = {
 	/*.outgoing_channel */ channel_outgoing_channel,
 	/*.read_frame */ channel_read_frame,
 	/*.write_frame */ channel_write_frame,
@@ -973,14 +973,14 @@
 													switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
 {
 	private_t *tech_pvt = NULL;
-	if ((*new_session = switch_core_session_request(celliax_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
+	if ((*new_session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
 		switch_channel_t *channel = NULL;
 		switch_caller_profile_t *caller_profile;
 		char *rdest;
 		int found = 0;
 		char interface_name[256];
 
-		DEBUGA_CELLIAX("1 SESSION_REQUEST %s\n", CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
+		DEBUGA_GSMOPEN("1 SESSION_REQUEST %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(*new_session));
 		switch_core_session_add_stream(*new_session, NULL);
 
 
@@ -995,35 +995,35 @@
 			switch_mutex_lock(globals.mutex);
 			if (strncmp("ANY", interface_name, strlen(interface_name)) == 0 || strncmp("RR", interface_name, strlen(interface_name)) == 0) {
 				/* we've been asked for the "ANY" interface, let's find the first idle interface */
-				//DEBUGA_CELLIAX("Finding one available celliax interface\n", CELLIAX_P_LOG);
-				//tech_pvt = find_available_celliax_interface(NULL);
+				//DEBUGA_GSMOPEN("Finding one available gsmopen interface\n", GSMOPEN_P_LOG);
+				//tech_pvt = find_available_gsmopen_interface(NULL);
 				//if (tech_pvt)
 				//found = 1;
 				//} else if (strncmp("RR", interface_name, strlen(interface_name)) == 0) {
 				/* Find the first idle interface using Round Robin */
-				DEBUGA_CELLIAX("Finding one available celliax interface RR\n", CELLIAX_P_LOG);
-				tech_pvt = find_available_celliax_interface_rr(NULL);
+				DEBUGA_GSMOPEN("Finding one available gsmopen interface RR\n", GSMOPEN_P_LOG);
+				tech_pvt = find_available_gsmopen_interface_rr(NULL);
 				if (tech_pvt)
 					found = 1;
-				DEBUGA_CELLIAX("FOUND one available celliax interface RR\n", CELLIAX_P_LOG);
+				DEBUGA_GSMOPEN("FOUND one available gsmopen interface RR\n", GSMOPEN_P_LOG);
 			}
 
-			for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
+			for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
 				/* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-				if (strlen(globals.CELLIAX_INTERFACES[i].name)
-					&& (strncmp(globals.CELLIAX_INTERFACES[i].name, interface_name, strlen(interface_name)) == 0)) {
-					if (strlen(globals.CELLIAX_INTERFACES[i].session_uuid_str)) {
-						DEBUGA_CELLIAX
-							("globals.CELLIAX_INTERFACES[%d].name=|||%s||| session_uuid_str=|||%s||| is BUSY\n",
-							 CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name, globals.CELLIAX_INTERFACES[i].session_uuid_str);
-						DEBUGA_CELLIAX("1 SESSION_DESTROY %s\n", CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
+				if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+					&& (strncmp(globals.GSMOPEN_INTERFACES[i].name, interface_name, strlen(interface_name)) == 0)) {
+					if (strlen(globals.GSMOPEN_INTERFACES[i].session_uuid_str)) {
+						DEBUGA_GSMOPEN
+							("globals.GSMOPEN_INTERFACES[%d].name=|||%s||| session_uuid_str=|||%s||| is BUSY\n",
+							 GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name, globals.GSMOPEN_INTERFACES[i].session_uuid_str);
+						DEBUGA_GSMOPEN("1 SESSION_DESTROY %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(*new_session));
 						switch_core_session_destroy(new_session);
 						switch_mutex_unlock(globals.mutex);
 						return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
 					}
 
-					DEBUGA_CELLIAX("globals.CELLIAX_INTERFACES[%d].name=|||%s|||?\n", CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name);
-					tech_pvt = &globals.CELLIAX_INTERFACES[i];
+					DEBUGA_GSMOPEN("globals.GSMOPEN_INTERFACES[%d].name=|||%s|||?\n", GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name);
+					tech_pvt = &globals.GSMOPEN_INTERFACES[i];
 					found = 1;
 					break;
 				}
@@ -1031,14 +1031,14 @@
 			}
 
 		} else {
-			ERRORA("Doh! no destination number?\n", CELLIAX_P_LOG);
+			ERRORA("Doh! no destination number?\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(new_session);
 			return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
 		}
 
 		if (!found) {
-			DEBUGA_CELLIAX("Doh! no available interface for |||%s|||?\n", CELLIAX_P_LOG, interface_name);
-			DEBUGA_CELLIAX("2 SESSION_DESTROY %s\n", CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
+			DEBUGA_GSMOPEN("Doh! no available interface for |||%s|||?\n", GSMOPEN_P_LOG, interface_name);
+			DEBUGA_GSMOPEN("2 SESSION_DESTROY %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(*new_session));
 			switch_core_session_destroy(new_session);
 			switch_mutex_unlock(globals.mutex);
 			//return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
@@ -1047,13 +1047,13 @@
 
 		channel = switch_core_session_get_channel(*new_session);
 		if (!channel) {
-			ERRORA("Doh! no channel?\n", CELLIAX_P_LOG);
+			ERRORA("Doh! no channel?\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(new_session);
 			switch_mutex_unlock(globals.mutex);
 			return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
 		}
-		if (celliax_tech_init(tech_pvt, *new_session) != SWITCH_STATUS_SUCCESS) {
-			ERRORA("Doh! no tech_init?\n", CELLIAX_P_LOG);
+		if (gsmopen_tech_init(tech_pvt, *new_session) != SWITCH_STATUS_SUCCESS) {
+			ERRORA("Doh! no tech_init?\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(new_session);
 			switch_mutex_unlock(globals.mutex);
 			return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
@@ -1063,14 +1063,14 @@
 		if (outbound_profile) {
 			char name[128];
 
-			snprintf(name, sizeof(name), "celliax/%s", outbound_profile->destination_number);
-			//snprintf(name, sizeof(name), "celliax/%s", tech_pvt->name);
+			snprintf(name, sizeof(name), "gsmopen/%s", outbound_profile->destination_number);
+			//snprintf(name, sizeof(name), "gsmopen/%s", tech_pvt->name);
 			switch_channel_set_name(channel, name);
 			caller_profile = switch_caller_profile_clone(*new_session, outbound_profile);
 			switch_channel_set_caller_profile(channel, caller_profile);
 			tech_pvt->caller_profile = caller_profile;
 		} else {
-			ERRORA("Doh! no caller profile\n", CELLIAX_P_LOG);
+			ERRORA("Doh! no caller profile\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(new_session);
 			switch_mutex_unlock(globals.mutex);
 			return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
@@ -1081,7 +1081,7 @@
 		rdest = strchr(caller_profile->destination_number, '/');
 		*rdest++ = '\0';
 
-		//celliax_call(tech_pvt, rdest, 30);
+		//gsmopen_call(tech_pvt, rdest, 30);
 
 		switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(*new_session), sizeof(tech_pvt->session_uuid_str));
 		caller_profile = tech_pvt->caller_profile;
@@ -1090,17 +1090,17 @@
 		switch_channel_set_flag(channel, CF_OUTBOUND);
 		switch_set_flag(tech_pvt, TFLAG_OUTBOUND);
 		switch_channel_set_state(channel, CS_INIT);
-		celliax_call(tech_pvt, rdest, 30);
+		gsmopen_call(tech_pvt, rdest, 30);
 		switch_mutex_unlock(globals.mutex);
 		return SWITCH_CAUSE_SUCCESS;
 	}
 
-	ERRORA("Doh! no new_session\n", CELLIAX_P_LOG);
+	ERRORA("Doh! no new_session\n", GSMOPEN_P_LOG);
 	return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
 }
 
 /*!
- * \brief This thread runs during a call, and monitor the interface for signaling, like hangup, caller id, etc most of signaling is handled inside the celliax_signaling_read function
+ * \brief This thread runs during a call, and monitor the interface for signaling, like hangup, caller id, etc most of signaling is handled inside the gsmopen_signaling_read function
  *
  */
 /* BEGIN: Changes heres */
@@ -1109,13 +1109,13 @@
 static switch_status_t load_config(int reload_type)
 /* END: Changes heres */
 {
-	char *cf = "celliax.conf";
+	char *cf = "gsmopen.conf";
 	switch_xml_t cfg, xml, global_settings, param, interfaces, myinterface;
 	private_t *tech_pvt = NULL;
 
-	switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, celliax_module_pool);
+	switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
 	if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
-		ERRORA("open of %s failed\n", CELLIAX_P_LOG, cf);
+		ERRORA("open of %s failed\n", GSMOPEN_P_LOG, cf);
 		running = 0;
 		switch_xml_free(xml);
 		return SWITCH_STATUS_TERM;
@@ -1128,21 +1128,21 @@
 			char *val = (char *) switch_xml_attr_soft(param, "value");
 
 			if (!strcasecmp(var, "debug")) {
-				DEBUGA_CELLIAX("globals.debug=%d\n", CELLIAX_P_LOG, globals.debug);
+				DEBUGA_GSMOPEN("globals.debug=%d\n", GSMOPEN_P_LOG, globals.debug);
 				globals.debug = atoi(val);
-				DEBUGA_CELLIAX("globals.debug=%d\n", CELLIAX_P_LOG, globals.debug);
+				DEBUGA_GSMOPEN("globals.debug=%d\n", GSMOPEN_P_LOG, globals.debug);
 			} else if (!strcasecmp(var, "hold-music")) {
 				switch_set_string(globals.hold_music, val);
-				DEBUGA_CELLIAX("globals.hold_music=%s\n", CELLIAX_P_LOG, globals.hold_music);
+				DEBUGA_GSMOPEN("globals.hold_music=%s\n", GSMOPEN_P_LOG, globals.hold_music);
 			} else if (!strcmp(var, "dialplan")) {
 				set_global_dialplan(val);
-				DEBUGA_CELLIAX("globals.dialplan=%s\n", CELLIAX_P_LOG, globals.dialplan);
+				DEBUGA_GSMOPEN("globals.dialplan=%s\n", GSMOPEN_P_LOG, globals.dialplan);
 			} else if (!strcmp(var, "destination")) {
 				set_global_destination(val);
-				DEBUGA_CELLIAX("globals.destination=%s\n", CELLIAX_P_LOG, globals.destination);
+				DEBUGA_GSMOPEN("globals.destination=%s\n", GSMOPEN_P_LOG, globals.destination);
 			} else if (!strcmp(var, "context")) {
 				set_global_context(val);
-				DEBUGA_CELLIAX("globals.context=%s\n", CELLIAX_P_LOG, globals.context);
+				DEBUGA_GSMOPEN("globals.context=%s\n", GSMOPEN_P_LOG, globals.context);
 
 			}
 
@@ -1226,7 +1226,7 @@
 			char *at_has_ecam="0";
 			char *alsa_period_size="160";
 			char *alsa_periods_in_buffer="4";
-			char *celliax_sound_rate="8000";
+			char *gsmopen_sound_rate="8000";
 			char *alsa_play_is_mono="1";
 			char *alsa_capture_is_mono="1";
 			char *capture_boost="5";
@@ -1391,8 +1391,8 @@
 					alsa_period_size = val;
 				} else if (!strcasecmp(var, "alsa_periods_in_buffer")) {
 					alsa_periods_in_buffer = val;
-				} else if (!strcasecmp(var, "celliax_sound_rate")) {
-					celliax_sound_rate = val;
+				} else if (!strcasecmp(var, "gsmopen_sound_rate")) {
+					gsmopen_sound_rate = val;
 				} else if (!strcasecmp(var, "alsa_play_is_mono")) {
 					alsa_play_is_mono = val;
 				} else if (!strcasecmp(var, "alsa_capture_is_mono")) {
@@ -1419,63 +1419,63 @@
 			/* END: Changes here */
 
 			if (!id) {
-				ERRORA("interface missing REQUIRED param 'id'\n", CELLIAX_P_LOG);
+				ERRORA("interface missing REQUIRED param 'id'\n", GSMOPEN_P_LOG);
 				continue;
 			}
 
 			if (switch_is_number(id)) {
 				interface_id = atoi(id);
 			} else {
-				ERRORA("interface param 'id' MUST be a number, now id='%s'\n", CELLIAX_P_LOG, id);
+				ERRORA("interface param 'id' MUST be a number, now id='%s'\n", GSMOPEN_P_LOG, id);
 				continue;
 			}
 
 			if(!switch_is_number(at_early_audio)) {
-				ERRORA("interface param 'at_early_audio' MUST be a number, now at_early_audio='%s'\n", CELLIAX_P_LOG, at_early_audio);
+				ERRORA("interface param 'at_early_audio' MUST be a number, now at_early_audio='%s'\n", GSMOPEN_P_LOG, at_early_audio);
 				continue;
 			}
 			if(!switch_is_number(at_after_preinit_pause)) {
-				ERRORA("interface param 'at_after_preinit_pause' MUST be a number, now at_after_preinit_pause='%s'\n", CELLIAX_P_LOG, at_after_preinit_pause);
+				ERRORA("interface param 'at_after_preinit_pause' MUST be a number, now at_after_preinit_pause='%s'\n", GSMOPEN_P_LOG, at_after_preinit_pause);
 				continue;
 			}
 			if(!switch_is_number(at_initial_pause)) {
-				ERRORA("interface param 'at_initial_pause' MUST be a number, now at_initial_pause='%s'\n", CELLIAX_P_LOG, at_initial_pause);
+				ERRORA("interface param 'at_initial_pause' MUST be a number, now at_initial_pause='%s'\n", GSMOPEN_P_LOG, at_initial_pause);
 				continue;
 			}
 			if(!switch_is_number(at_has_clcc)) {
-				ERRORA("interface param 'at_has_clcc' MUST be a number, now at_has_clcc='%s'\n", CELLIAX_P_LOG, at_has_clcc);
+				ERRORA("interface param 'at_has_clcc' MUST be a number, now at_has_clcc='%s'\n", GSMOPEN_P_LOG, at_has_clcc);
 				continue;
 			}
 			if(!switch_is_number(at_has_ecam)) {
-				ERRORA("interface param 'at_has_ecam' MUST be a number, now at_has_ecam='%s'\n", CELLIAX_P_LOG, at_has_ecam);
+				ERRORA("interface param 'at_has_ecam' MUST be a number, now at_has_ecam='%s'\n", GSMOPEN_P_LOG, at_has_ecam);
 				continue;
 			}
 			if(!switch_is_number(alsa_period_size)) {
-				ERRORA("interface param 'alsa_period_size' MUST be a number, now alsa_period_size='%s'\n", CELLIAX_P_LOG, alsa_period_size);
+				ERRORA("interface param 'alsa_period_size' MUST be a number, now alsa_period_size='%s'\n", GSMOPEN_P_LOG, alsa_period_size);
 				continue;
 			}
 			if(!switch_is_number(alsa_periods_in_buffer)) {
-				ERRORA("interface param 'alsa_periods_in_buffer' MUST be a number, now alsa_periods_in_buffer='%s'\n", CELLIAX_P_LOG, alsa_periods_in_buffer);
+				ERRORA("interface param 'alsa_periods_in_buffer' MUST be a number, now alsa_periods_in_buffer='%s'\n", GSMOPEN_P_LOG, alsa_periods_in_buffer);
 				continue;
 			}
-			if(!switch_is_number(celliax_sound_rate)) {
-				ERRORA("interface param 'celliax_sound_rate' MUST be a number, now celliax_sound_rate='%s'\n", CELLIAX_P_LOG, celliax_sound_rate);
+			if(!switch_is_number(gsmopen_sound_rate)) {
+				ERRORA("interface param 'gsmopen_sound_rate' MUST be a number, now gsmopen_sound_rate='%s'\n", GSMOPEN_P_LOG, gsmopen_sound_rate);
 				continue;
 			}
 			if(!switch_is_number(alsa_play_is_mono)) {
-				ERRORA("interface param 'alsa_play_is_mono' MUST be a number, now alsa_play_is_mono='%s'\n", CELLIAX_P_LOG, alsa_play_is_mono);
+				ERRORA("interface param 'alsa_play_is_mono' MUST be a number, now alsa_play_is_mono='%s'\n", GSMOPEN_P_LOG, alsa_play_is_mono);
 				continue;
 			}
 			if(!switch_is_number(alsa_capture_is_mono)) {
-				ERRORA("interface param 'alsa_capture_is_mono' MUST be a number, now alsa_capture_is_mono='%s'\n", CELLIAX_P_LOG, alsa_capture_is_mono);
+				ERRORA("interface param 'alsa_capture_is_mono' MUST be a number, now alsa_capture_is_mono='%s'\n", GSMOPEN_P_LOG, alsa_capture_is_mono);
 				continue;
 			}
 			if(!switch_is_number(capture_boost)) {
-				ERRORA("interface param 'capture_boost' MUST be a number, now capture_boost='%s'\n", CELLIAX_P_LOG, capture_boost);
+				ERRORA("interface param 'capture_boost' MUST be a number, now capture_boost='%s'\n", GSMOPEN_P_LOG, capture_boost);
 				continue;
 			}
 			if(!switch_is_number(playback_boost)) {
-				ERRORA("interface param 'playback_boost' MUST be a number, now playback_boost='%s'\n", CELLIAX_P_LOG, playback_boost);
+				ERRORA("interface param 'playback_boost' MUST be a number, now playback_boost='%s'\n", GSMOPEN_P_LOG, playback_boost);
 				continue;
 			}
 
@@ -1487,144 +1487,144 @@
 
 
 			if (name) {
-				DEBUGA_CELLIAX("name=%s\n", CELLIAX_P_LOG, name);
+				DEBUGA_GSMOPEN("name=%s\n", GSMOPEN_P_LOG, name);
 			}
-			if (interface_id && interface_id < CELLIAX_MAX_INTERFACES) {
+			if (interface_id && interface_id < GSMOPEN_MAX_INTERFACES) {
 				private_t newconf;
-				switch_threadattr_t *celliax_api_thread_attr = NULL;
+				switch_threadattr_t *gsmopen_api_thread_attr = NULL;
 
 				memset(&newconf, '\0', sizeof(newconf));
-				globals.CELLIAX_INTERFACES[interface_id] = newconf;
+				globals.GSMOPEN_INTERFACES[interface_id] = newconf;
 
 
-				tech_pvt = &globals.CELLIAX_INTERFACES[interface_id];
+				tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
 
-				switch_mutex_init(&globals.CELLIAX_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, celliax_module_pool);
+				switch_mutex_init(&globals.GSMOPEN_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
 
 
-				//FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].id , id );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].name , name );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].context , context );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].dialplan , dialplan );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].destination , destination );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].controldevice_name , controldevice_name );
-				//FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].digit_timeout , digit_timeout );
-				//FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].max_digits , max_digits );
-				//FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].hotline , hotline );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].dial_regex , dial_regex );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].hold_music , hold_music );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].fail_dial_regex , fail_dial_regex );
-				//FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].enable_callerid , enable_callerid );
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_pre_number, at_dial_pre_number);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_post_number, at_dial_post_number);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_expect, at_dial_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_hangup, at_hangup);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_hangup_expect, at_hangup_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_answer, at_answer);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_answer_expect, at_answer_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_send_dtmf, at_send_dtmf);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_1, at_preinit_1);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_1_expect, at_preinit_1_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_2, at_preinit_2);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_2_expect, at_preinit_2_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_3, at_preinit_3);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_3_expect, at_preinit_3_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_4, at_preinit_4);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_4_expect, at_preinit_4_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_5, at_preinit_5);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_5_expect, at_preinit_5_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_1, at_postinit_1);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_1_expect, at_postinit_1_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_2, at_postinit_2);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_2_expect, at_postinit_2_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_3, at_postinit_3);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_3_expect, at_postinit_3_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_4, at_postinit_4);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_4_expect, at_postinit_4_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_5, at_postinit_5);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_5_expect, at_postinit_5_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_battchg, at_query_battchg);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_battchg_expect, at_query_battchg_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_signal, at_query_signal);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_signal_expect, at_query_signal_expect);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_idle, at_call_idle);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_incoming, at_call_incoming);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_active, at_call_active);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_failed, at_call_failed);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_calling, at_call_calling);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_noservice_string, at_indicator_noservice_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nosignal_string, at_indicator_nosignal_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_lowsignal_string, at_indicator_lowsignal_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_lowbattchg_string, at_indicator_lowbattchg_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nobattchg_string, at_indicator_nobattchg_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callactive_string, at_indicator_callactive_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nocallactive_string, at_indicator_nocallactive_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nocallsetup_string, at_indicator_nocallsetup_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupincoming_string, at_indicator_callsetupincoming_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupoutgoing_string, at_indicator_callsetupoutgoing_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupremoteringing_string, at_indicator_callsetupremoteringing_string);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].sms_receiving_program, sms_receiving_program);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].alsacname, alsacname);
-				switch_set_string(globals.CELLIAX_INTERFACES[interface_id].alsapname, alsapname);
+				//FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].id , id );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].name , name );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].context , context );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].dialplan , dialplan );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].destination , destination );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].controldevice_name , controldevice_name );
+				//FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].digit_timeout , digit_timeout );
+				//FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].max_digits , max_digits );
+				//FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].hotline , hotline );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].dial_regex , dial_regex );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].hold_music , hold_music );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].fail_dial_regex , fail_dial_regex );
+				//FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].enable_callerid , enable_callerid );
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_dial_pre_number, at_dial_pre_number);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_dial_post_number, at_dial_post_number);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_dial_expect, at_dial_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_hangup, at_hangup);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_hangup_expect, at_hangup_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_answer, at_answer);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_answer_expect, at_answer_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_send_dtmf, at_send_dtmf);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_1, at_preinit_1);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_1_expect, at_preinit_1_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_2, at_preinit_2);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_2_expect, at_preinit_2_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_3, at_preinit_3);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_3_expect, at_preinit_3_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_4, at_preinit_4);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_4_expect, at_preinit_4_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_5, at_preinit_5);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_5_expect, at_preinit_5_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_1, at_postinit_1);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_1_expect, at_postinit_1_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_2, at_postinit_2);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_2_expect, at_postinit_2_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_3, at_postinit_3);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_3_expect, at_postinit_3_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_4, at_postinit_4);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_4_expect, at_postinit_4_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_5, at_postinit_5);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_5_expect, at_postinit_5_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_battchg, at_query_battchg);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_battchg_expect, at_query_battchg_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_signal, at_query_signal);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_signal_expect, at_query_signal_expect);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_idle, at_call_idle);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_incoming, at_call_incoming);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_active, at_call_active);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_failed, at_call_failed);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_calling, at_call_calling);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_noservice_string, at_indicator_noservice_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nosignal_string, at_indicator_nosignal_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_lowsignal_string, at_indicator_lowsignal_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_lowbattchg_string, at_indicator_lowbattchg_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nobattchg_string, at_indicator_nobattchg_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callactive_string, at_indicator_callactive_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nocallactive_string, at_indicator_nocallactive_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nocallsetup_string, at_indicator_nocallsetup_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callsetupincoming_string, at_indicator_callsetupincoming_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callsetupoutgoing_string, at_indicator_callsetupoutgoing_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callsetupremoteringing_string, at_indicator_callsetupremoteringing_string);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].sms_receiving_program, sms_receiving_program);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].alsacname, alsacname);
+				switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].alsapname, alsapname);
 
-				globals.CELLIAX_INTERFACES[interface_id].at_early_audio = atoi(at_early_audio);
-				globals.CELLIAX_INTERFACES[interface_id].at_after_preinit_pause = atoi(at_after_preinit_pause);
-				globals.CELLIAX_INTERFACES[interface_id].at_initial_pause = atoi(at_initial_pause);
-				globals.CELLIAX_INTERFACES[interface_id].at_has_clcc = atoi(at_has_clcc);
-				globals.CELLIAX_INTERFACES[interface_id].at_has_ecam = atoi(at_has_ecam);
-				globals.CELLIAX_INTERFACES[interface_id].alsa_period_size = atoi(alsa_period_size);
-				globals.CELLIAX_INTERFACES[interface_id].alsa_periods_in_buffer = atoi(alsa_periods_in_buffer);
-				globals.CELLIAX_INTERFACES[interface_id].celliax_sound_rate = atoi(celliax_sound_rate);
-				globals.CELLIAX_INTERFACES[interface_id].alsa_play_is_mono = atoi(alsa_play_is_mono);
-				globals.CELLIAX_INTERFACES[interface_id].alsa_capture_is_mono = atoi(alsa_capture_is_mono);
-				globals.CELLIAX_INTERFACES[interface_id].capture_boost = atoi(capture_boost);
-				globals.CELLIAX_INTERFACES[interface_id].playback_boost = atoi(playback_boost);
+				globals.GSMOPEN_INTERFACES[interface_id].at_early_audio = atoi(at_early_audio);
+				globals.GSMOPEN_INTERFACES[interface_id].at_after_preinit_pause = atoi(at_after_preinit_pause);
+				globals.GSMOPEN_INTERFACES[interface_id].at_initial_pause = atoi(at_initial_pause);
+				globals.GSMOPEN_INTERFACES[interface_id].at_has_clcc = atoi(at_has_clcc);
+				globals.GSMOPEN_INTERFACES[interface_id].at_has_ecam = atoi(at_has_ecam);
+				globals.GSMOPEN_INTERFACES[interface_id].alsa_period_size = atoi(alsa_period_size);
+				globals.GSMOPEN_INTERFACES[interface_id].alsa_periods_in_buffer = atoi(alsa_periods_in_buffer);
+				globals.GSMOPEN_INTERFACES[interface_id].gsmopen_sound_rate = atoi(gsmopen_sound_rate);
+				globals.GSMOPEN_INTERFACES[interface_id].alsa_play_is_mono = atoi(alsa_play_is_mono);
+				globals.GSMOPEN_INTERFACES[interface_id].alsa_capture_is_mono = atoi(alsa_capture_is_mono);
+				globals.GSMOPEN_INTERFACES[interface_id].capture_boost = atoi(capture_boost);
+				globals.GSMOPEN_INTERFACES[interface_id].playback_boost = atoi(playback_boost);
 
 
 
-				globals.CELLIAX_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
-				globals.CELLIAX_INTERFACES[interface_id].controldevprotocol = controldevprotocol;
-				//globals.CELLIAX_INTERFACES[interface_id].at_early_audio = at_early_audio;
-				//globals.CELLIAX_INTERFACES[interface_id].at_after_preinit_pause = at_after_preinit_pause;
-				//globals.CELLIAX_INTERFACES[interface_id].at_initial_pause = at_initial_pause;
-				//globals.CELLIAX_INTERFACES[interface_id].at_has_clcc = at_has_clcc;
-				//globals.CELLIAX_INTERFACES[interface_id].at_has_ecam = at_has_ecam;
-				//globals.CELLIAX_INTERFACES[interface_id].alsa_period_size = alsa_period_size;
-				//globals.CELLIAX_INTERFACES[interface_id].alsa_periods_in_buffer = alsa_periods_in_buffer;
-				//globals.CELLIAX_INTERFACES[interface_id].celliax_sound_rate = celliax_sound_rate;
-				//globals.CELLIAX_INTERFACES[interface_id].alsa_play_is_mono = alsa_play_is_mono;
-				//globals.CELLIAX_INTERFACES[interface_id].alsa_capture_is_mono = alsa_capture_is_mono;
-				//globals.CELLIAX_INTERFACES[interface_id].capture_boost = capture_boost;
-				//globals.CELLIAX_INTERFACES[interface_id].playback_boost = playback_boost;
-				globals.CELLIAX_INTERFACES[interface_id].running = running; //FIXME
+				globals.GSMOPEN_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
+				globals.GSMOPEN_INTERFACES[interface_id].controldevprotocol = controldevprotocol;
+				//globals.GSMOPEN_INTERFACES[interface_id].at_early_audio = at_early_audio;
+				//globals.GSMOPEN_INTERFACES[interface_id].at_after_preinit_pause = at_after_preinit_pause;
+				//globals.GSMOPEN_INTERFACES[interface_id].at_initial_pause = at_initial_pause;
+				//globals.GSMOPEN_INTERFACES[interface_id].at_has_clcc = at_has_clcc;
+				//globals.GSMOPEN_INTERFACES[interface_id].at_has_ecam = at_has_ecam;
+				//globals.GSMOPEN_INTERFACES[interface_id].alsa_period_size = alsa_period_size;
+				//globals.GSMOPEN_INTERFACES[interface_id].alsa_periods_in_buffer = alsa_periods_in_buffer;
+				//globals.GSMOPEN_INTERFACES[interface_id].gsmopen_sound_rate = gsmopen_sound_rate;
+				//globals.GSMOPEN_INTERFACES[interface_id].alsa_play_is_mono = alsa_play_is_mono;
+				//globals.GSMOPEN_INTERFACES[interface_id].alsa_capture_is_mono = alsa_capture_is_mono;
+				//globals.GSMOPEN_INTERFACES[interface_id].capture_boost = capture_boost;
+				//globals.GSMOPEN_INTERFACES[interface_id].playback_boost = playback_boost;
+				globals.GSMOPEN_INTERFACES[interface_id].running = running; //FIXME
 
-				celliax_store_boost("5", &globals.CELLIAX_INTERFACES[interface_id].capture_boost); //FIXME
-				celliax_store_boost("10", &globals.CELLIAX_INTERFACES[interface_id].playback_boost); //FIXME
+				gsmopen_store_boost("5", &globals.GSMOPEN_INTERFACES[interface_id].capture_boost); //FIXME
+				gsmopen_store_boost("10", &globals.GSMOPEN_INTERFACES[interface_id].playback_boost); //FIXME
 
 
-				DEBUGA_CELLIAX("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].name=%s\n",
-						CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name);
-				DEBUGA_CELLIAX
-					("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].dialplan=%s\n",
-					 CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].dialplan);
-				DEBUGA_CELLIAX
-					("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].destination=%s\n",
-					 CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].destination);
-				DEBUGA_CELLIAX
-					("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].context=%s\n",
-					 CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].context);
-				WARNINGA("STARTING interface_id=%d\n", CELLIAX_P_LOG, interface_id);
+				DEBUGA_GSMOPEN("interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].name=%s\n",
+						GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].name);
+				DEBUGA_GSMOPEN
+					("interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].dialplan=%s\n",
+					 GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].dialplan);
+				DEBUGA_GSMOPEN
+					("interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].destination=%s\n",
+					 GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].destination);
+				DEBUGA_GSMOPEN
+					("interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].context=%s\n",
+					 GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].context);
+				WARNINGA("STARTING interface_id=%d\n", GSMOPEN_P_LOG, interface_id);
 
 				int res = 0;
 
 				/* init the serial port */
-				if (globals.CELLIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
-					globals.CELLIAX_INTERFACES[interface_id].controldevfd =
-						celliax_serial_init(&globals.CELLIAX_INTERFACES[interface_id], globals.CELLIAX_INTERFACES[interface_id].controldevice_speed);
-					if (globals.CELLIAX_INTERFACES[interface_id].controldevfd < 1) {
-						ERRORA("celliax_serial_init failed\n", CELLIAX_P_LOG);
+				if (globals.GSMOPEN_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
+					globals.GSMOPEN_INTERFACES[interface_id].controldevfd =
+						gsmopen_serial_init(&globals.GSMOPEN_INTERFACES[interface_id], globals.GSMOPEN_INTERFACES[interface_id].controldevice_speed);
+					if (globals.GSMOPEN_INTERFACES[interface_id].controldevfd < 1) {
+						ERRORA("gsmopen_serial_init failed\n", GSMOPEN_P_LOG);
 						return SWITCH_STATUS_FALSE;
-						//celliax_sound_shutdown(tmp);
+						//gsmopen_sound_shutdown(tmp);
 						//if (tmp)
 						//free(tmp);
 						//return NULL;
@@ -1632,13 +1632,13 @@
 				}
 
 				/* config the phone/modem on the serial port */
-				if (globals.CELLIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
+				if (globals.GSMOPEN_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
 					//int res;
-					res = celliax_serial_config(&globals.CELLIAX_INTERFACES[interface_id]);
+					res = gsmopen_serial_config(&globals.GSMOPEN_INTERFACES[interface_id]);
 					if (res) {
-						ERRORA("celliax_serial_config failed\n", CELLIAX_P_LOG);
+						ERRORA("gsmopen_serial_config failed\n", GSMOPEN_P_LOG);
 						return SWITCH_STATUS_FALSE;
-						//celliax_sound_shutdown(tmp);
+						//gsmopen_sound_shutdown(tmp);
 						//if (tmp)
 						//free(tmp);
 						//return NULL;
@@ -1647,32 +1647,32 @@
 
 
 				switch_sleep(100000);
-				switch_threadattr_create(&celliax_api_thread_attr, celliax_module_pool);
-				switch_threadattr_stacksize_set(celliax_api_thread_attr, SWITCH_THREAD_STACKSIZE);
-				switch_thread_create(&globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread, celliax_api_thread_attr, celliax_do_celliaxapi_thread,
-						&globals.CELLIAX_INTERFACES[interface_id], celliax_module_pool);
+				switch_threadattr_create(&gsmopen_api_thread_attr, gsmopen_module_pool);
+				switch_threadattr_stacksize_set(gsmopen_api_thread_attr, SWITCH_THREAD_STACKSIZE);
+				switch_thread_create(&globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread, gsmopen_api_thread_attr, gsmopen_do_gsmopenapi_thread,
+						&globals.GSMOPEN_INTERFACES[interface_id], gsmopen_module_pool);
 
 				switch_sleep(100000);
 
 			} else {
-				ERRORA("interface id %d is higher than CELLIAX_MAX_INTERFACES (%d)\n", CELLIAX_P_LOG, interface_id, CELLIAX_MAX_INTERFACES);
+				ERRORA("interface id %d is higher than GSMOPEN_MAX_INTERFACES (%d)\n", GSMOPEN_P_LOG, interface_id, GSMOPEN_MAX_INTERFACES);
 				continue;
 			}
 
 		}
 
-		for (i = 0; i < CELLIAX_MAX_INTERFACES; i++) {
-			if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
+		for (i = 0; i < GSMOPEN_MAX_INTERFACES; i++) {
+			if (strlen(globals.GSMOPEN_INTERFACES[i].name)) {
 				/* How many real intterfaces */
 				globals.real_interfaces = i + 1;
 
-				tech_pvt = &globals.CELLIAX_INTERFACES[i];
+				tech_pvt = &globals.GSMOPEN_INTERFACES[i];
 
-				DEBUGA_CELLIAX("i=%d globals.CELLIAX_INTERFACES[%d].interface_id=%s\n", CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].interface_id);
-				DEBUGA_CELLIAX("i=%d globals.CELLIAX_INTERFACES[%d].name=%s\n", CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].name);
-				DEBUGA_CELLIAX("i=%d globals.CELLIAX_INTERFACES[%d].context=%s\n", CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].context);
-				DEBUGA_CELLIAX("i=%d globals.CELLIAX_INTERFACES[%d].dialplan=%s\n", CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].dialplan);
-				DEBUGA_CELLIAX("i=%d globals.CELLIAX_INTERFACES[%d].destination=%s\n", CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].destination);
+				DEBUGA_GSMOPEN("i=%d globals.GSMOPEN_INTERFACES[%d].interface_id=%s\n", GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].interface_id);
+				DEBUGA_GSMOPEN("i=%d globals.GSMOPEN_INTERFACES[%d].name=%s\n", GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].name);
+				DEBUGA_GSMOPEN("i=%d globals.GSMOPEN_INTERFACES[%d].context=%s\n", GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].context);
+				DEBUGA_GSMOPEN("i=%d globals.GSMOPEN_INTERFACES[%d].dialplan=%s\n", GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].dialplan);
+				DEBUGA_GSMOPEN("i=%d globals.GSMOPEN_INTERFACES[%d].destination=%s\n", GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].destination);
 			}
 		}
 	}
@@ -1691,15 +1691,15 @@
 
 	switch_assert(proto != NULL);
 
-	DEBUGA_CELLIAX("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n", CELLIAX_P_LOG, proto, from, to, subject, body, type, hint?hint:"NULL");
+	DEBUGA_GSMOPEN("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n", GSMOPEN_P_LOG, proto, from, to, subject, body, type, hint?hint:"NULL");
 
 	if (!to || !strlen(to)) {
-		ERRORA("Missing To: header.\n", CELLIAX_P_LOG);
+		ERRORA("Missing To: header.\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_SUCCESS;
 	}
 
 	if ((!from && !hint) || (!strlen(from) && !strlen(hint)) ) {
-		ERRORA("Missing From: AND Hint: headers.\n", CELLIAX_P_LOG);
+		ERRORA("Missing From: AND Hint: headers.\n", GSMOPEN_P_LOG);
 		return SWITCH_STATUS_SUCCESS;
 	}
 
@@ -1720,25 +1720,25 @@
 			*host++ = '\0';
 		}
 
-		DEBUGA_CELLIAX("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n", CELLIAX_P_LOG, proto, from, to, subject, body, type, hint?hint:"NULL");
+		DEBUGA_GSMOPEN("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n", GSMOPEN_P_LOG, proto, from, to, subject, body, type, hint?hint:"NULL");
 		if (hint && strlen(hint)) {
 			//in hint we receive the interface name to use
-			for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
-				if (strlen(globals.CELLIAX_INTERFACES[i].name)
-						&& (strncmp(globals.CELLIAX_INTERFACES[i].name, hint, strlen(hint)) == 0)) {
-					tech_pvt = &globals.CELLIAX_INTERFACES[i];
-					DEBUGA_CELLIAX("Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n", CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name);
+			for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
+				if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+						&& (strncmp(globals.GSMOPEN_INTERFACES[i].name, hint, strlen(hint)) == 0)) {
+					tech_pvt = &globals.GSMOPEN_INTERFACES[i];
+					DEBUGA_GSMOPEN("Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n", GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name);
 					found = 1;
 					break;
 				}
 			}
 		} /* FIXME add a tech_pvt member for the SIM telephone number //else {
 		//we have no a predefined interface name to use (hint is NULL), so let's choose an interface from the username (from)
-		for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
-		if (strlen(globals.CELLIAX_INTERFACES[i].name)
-		&& (strncmp(globals.CELLIAX_INTERFACES[i].skype_user, from, strlen(from)) == 0)) {
-		tech_pvt = &globals.CELLIAX_INTERFACES[i];
-		DEBUGA_CELLIAX("Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n", CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name);
+		for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
+		if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+		&& (strncmp(globals.GSMOPEN_INTERFACES[i].skype_user, from, strlen(from)) == 0)) {
+		tech_pvt = &globals.GSMOPEN_INTERFACES[i];
+		DEBUGA_GSMOPEN("Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n", GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name);
 		found = 1;
 		break;
 		}
@@ -1746,10 +1746,10 @@
 		}
 		*/
 		if (!found) {
-			ERRORA("ERROR: A Celliax interface with name='%s' or one with SIM_number='%s' was not found\n", CELLIAX_P_LOG, hint?hint:"NULL", from?from:"NULL");
+			ERRORA("ERROR: A GSMopen interface with name='%s' or one with SIM_number='%s' was not found\n", GSMOPEN_P_LOG, hint?hint:"NULL", from?from:"NULL");
 			goto end;
 		} else {
-			celliax_sendsms(tech_pvt, (char *)to, (char *)body);
+			gsmopen_sendsms(tech_pvt, (char *)to, (char *)body);
 		}
 	}
 end:
@@ -1759,12 +1759,12 @@
 }
 
 
-SWITCH_MODULE_LOAD_FUNCTION(mod_celliax_load)
+SWITCH_MODULE_LOAD_FUNCTION(mod_gsmopen_load)
 {
 	switch_api_interface_t *commands_api_interface;
 	switch_chat_interface_t *chat_interface;
 
-	celliax_module_pool = pool;
+	gsmopen_module_pool = pool;
 	memset(&globals, '\0', sizeof(globals));
 
 	running = 1;
@@ -1780,18 +1780,18 @@
         }
 
 	*module_interface = switch_loadable_module_create_module_interface(pool, modname);
-	celliax_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
-	celliax_endpoint_interface->interface_name = "celliax";
-	celliax_endpoint_interface->io_routines = &celliax_io_routines;
-	celliax_endpoint_interface->state_handler = &celliax_state_handlers;
+	gsmopen_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+	gsmopen_endpoint_interface->interface_name = "gsmopen";
+	gsmopen_endpoint_interface->io_routines = &gsmopen_io_routines;
+	gsmopen_endpoint_interface->state_handler = &gsmopen_state_handlers;
 
 	if (running) {
 
 #if 0
-		SWITCH_ADD_API(commands_api_interface, "sk", "Celliax console commands", sk_function, SK_SYNTAX);
-		SWITCH_ADD_API(commands_api_interface, "celliax", "Celliax interface commands", celliax_function, CELLIAX_SYNTAX);
+		SWITCH_ADD_API(commands_api_interface, "sk", "GSMopen console commands", sk_function, SK_SYNTAX);
+		SWITCH_ADD_API(commands_api_interface, "gsmopen", "GSMopen interface commands", gsmopen_function, GSMOPEN_SYNTAX);
 #endif //0
-		SWITCH_ADD_API(commands_api_interface, "celliax_sendsms", "celliax_sendsms interface destination_number SMS_text", sendsms_function, SENDSMS_SYNTAX);
+		SWITCH_ADD_API(commands_api_interface, "gsmopen_sendsms", "gsmopen_sendsms interface destination_number SMS_text", sendsms_function, SENDSMS_SYNTAX);
 		SWITCH_ADD_CHAT(chat_interface, MDL_CHAT_PROTO, chat_send);
 
 		/* indicate that the module should continue to be loaded */
@@ -1800,7 +1800,7 @@
 		return SWITCH_STATUS_FALSE;
 }
 
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_celliax_shutdown)
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_gsmopen_shutdown)
 {
 	int x;
 	private_t *tech_pvt = NULL;
@@ -1810,19 +1810,19 @@
 
 	running = 0;
 
-	for (interface_id = 0; interface_id < CELLIAX_MAX_INTERFACES; interface_id++) {
-		tech_pvt = &globals.CELLIAX_INTERFACES[interface_id];
+	for (interface_id = 0; interface_id < GSMOPEN_MAX_INTERFACES; interface_id++) {
+		tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
 
-		if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
+		if (strlen(globals.GSMOPEN_INTERFACES[interface_id].name)) {
 
 
 
-			//alsa_shutdown(&globals.CELLIAX_INTERFACES[interface_id]);
-			if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
+			//alsa_shutdown(&globals.GSMOPEN_INTERFACES[interface_id]);
+			if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
 #ifdef WIN32
-				switch_file_write(tech_pvt->CelliaxHandles.fdesc[1], "sciutati", &howmany);	// let's the controldev_thread die
+				switch_file_write(tech_pvt->GSMopenHandles.fdesc[1], "sciutati", &howmany);	// let's the controldev_thread die
 #else /* WIN32 */
-				howmany = write(tech_pvt->CelliaxHandles.fdesc[1], "sciutati", howmany);
+				howmany = write(tech_pvt->GSMopenHandles.fdesc[1], "sciutati", howmany);
 #endif /* WIN32 */
 			}
 			x = 10;
@@ -1830,26 +1830,26 @@
 				x--;
 				switch_yield(50000);
 			}
-			if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
-				switch_thread_join(&status, globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread);
+			if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
+				switch_thread_join(&status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread);
 			}
-			if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
-				switch_thread_join(&status, globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread);
+			if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
+				switch_thread_join(&status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread);
 			}
 #ifndef WIN32
-			WARNINGA("SHUTDOWN interface_id=%d\n", CELLIAX_P_LOG, interface_id);
-			shutdown(tech_pvt->audiocelliaxpipe[0], 2);
-			close(tech_pvt->audiocelliaxpipe[0]);
-			shutdown(tech_pvt->audiocelliaxpipe[1], 2);
-			close(tech_pvt->audiocelliaxpipe[1]);
+			WARNINGA("SHUTDOWN interface_id=%d\n", GSMOPEN_P_LOG, interface_id);
+			shutdown(tech_pvt->audiogsmopenpipe[0], 2);
+			close(tech_pvt->audiogsmopenpipe[0]);
+			shutdown(tech_pvt->audiogsmopenpipe[1], 2);
+			close(tech_pvt->audiogsmopenpipe[1]);
 			shutdown(tech_pvt->audiopipe[0], 2);
 			close(tech_pvt->audiopipe[0]);
 			shutdown(tech_pvt->audiopipe[1], 2);
 			close(tech_pvt->audiopipe[1]);
-			shutdown(tech_pvt->CelliaxHandles.fdesc[0], 2);
-			close(tech_pvt->CelliaxHandles.fdesc[0]);
-			shutdown(tech_pvt->CelliaxHandles.fdesc[1], 2);
-			close(tech_pvt->CelliaxHandles.fdesc[1]);
+			shutdown(tech_pvt->GSMopenHandles.fdesc[0], 2);
+			close(tech_pvt->GSMopenHandles.fdesc[0]);
+			shutdown(tech_pvt->GSMopenHandles.fdesc[1], 2);
+			close(tech_pvt->GSMopenHandles.fdesc[1]);
 #endif /* WIN32 */
 		}
 
@@ -1867,9 +1867,9 @@
 }
 
 
-void *SWITCH_THREAD_FUNC celliax_do_celliaxapi_thread(switch_thread_t *thread, void *obj)
+void *SWITCH_THREAD_FUNC gsmopen_do_gsmopenapi_thread(switch_thread_t *thread, void *obj)
 {
-	return celliax_do_celliaxapi_thread_func(obj);
+	return gsmopen_do_gsmopenapi_thread_func(obj);
 }
 
 int dtmf_received(private_t * tech_pvt, char *value)
@@ -1885,18 +1885,18 @@
 		if (!switch_channel_test_flag(channel, CF_BRIDGED)) {
 
 			switch_dtmf_t dtmf = { (char) value[0], switch_core_default_dtmf_duration(0) };
-			DEBUGA_CELLIAX("received DTMF %c on channel %s\n", CELLIAX_P_LOG, dtmf.digit, switch_channel_get_name(channel));
+			DEBUGA_GSMOPEN("received DTMF %c on channel %s\n", GSMOPEN_P_LOG, dtmf.digit, switch_channel_get_name(channel));
 			switch_mutex_lock(tech_pvt->flag_mutex);
 			//FIXME: why sometimes DTMFs from here do not seems to be get by FS?
 			switch_channel_queue_dtmf(channel, &dtmf);
 			switch_set_flag(tech_pvt, TFLAG_DTMF);
 			switch_mutex_unlock(tech_pvt->flag_mutex);
 		} else {
-			DEBUGA_CELLIAX
-				("received a DTMF on channel %s, but we're BRIDGED, so let's NOT relay it out of band\n", CELLIAX_P_LOG, switch_channel_get_name(channel));
+			DEBUGA_GSMOPEN
+				("received a DTMF on channel %s, but we're BRIDGED, so let's NOT relay it out of band\n", GSMOPEN_P_LOG, switch_channel_get_name(channel));
 		}
 	} else {
-		WARNINGA("received %c DTMF, but no channel?\n", CELLIAX_P_LOG, value[0]);
+		WARNINGA("received %c DTMF, but no channel?\n", GSMOPEN_P_LOG, value[0]);
 	}
 	switch_core_session_rwunlock(session);
 
@@ -1908,34 +1908,34 @@
 	switch_core_session_t *session = NULL;
 	switch_channel_t *channel = NULL;
 
-	if ((session = switch_core_session_request(celliax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
-		DEBUGA_CELLIAX("2 SESSION_REQUEST %s\n", CELLIAX_P_LOG, switch_core_session_get_uuid(session));
+	if ((session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
+		DEBUGA_GSMOPEN("2 SESSION_REQUEST %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(session));
 		switch_core_session_add_stream(session, NULL);
 		channel = switch_core_session_get_channel(session);
 		if (!channel) {
-			ERRORA("Doh! no channel?\n", CELLIAX_P_LOG);
+			ERRORA("Doh! no channel?\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(&session);
 			return 0;
 		}
-		if (celliax_tech_init(tech_pvt, session) != SWITCH_STATUS_SUCCESS) {
-			ERRORA("Doh! no tech_init?\n", CELLIAX_P_LOG);
+		if (gsmopen_tech_init(tech_pvt, session) != SWITCH_STATUS_SUCCESS) {
+			ERRORA("Doh! no tech_init?\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(&session);
 			return 0;
 		}
 
 		if ((tech_pvt->caller_profile =
-			 switch_caller_profile_new(switch_core_session_get_pool(session), "celliax",
+			 switch_caller_profile_new(switch_core_session_get_pool(session), "gsmopen",
 									   tech_pvt->dialplan, tech_pvt->callid_name,
-									   tech_pvt->callid_number, NULL, NULL, NULL, NULL, "mod_celliax", tech_pvt->context, tech_pvt->destination)) != 0) {
+									   tech_pvt->callid_number, NULL, NULL, NULL, NULL, "mod_gsmopen", tech_pvt->context, tech_pvt->destination)) != 0) {
 			char name[128];
-			//switch_snprintf(name, sizeof(name), "celliax/%s/%s", tech_pvt->name, tech_pvt->caller_profile->destination_number);
-			switch_snprintf(name, sizeof(name), "celliax/%s", tech_pvt->name);
+			//switch_snprintf(name, sizeof(name), "gsmopen/%s/%s", tech_pvt->name, tech_pvt->caller_profile->destination_number);
+			switch_snprintf(name, sizeof(name), "gsmopen/%s", tech_pvt->name);
 			switch_channel_set_name(channel, name);
 			switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
 		}
 		switch_channel_set_state(channel, CS_INIT);
 		if (switch_core_session_thread_launch(session) != SWITCH_STATUS_SUCCESS) {
-			ERRORA("Error spawning thread\n", CELLIAX_P_LOG);
+			ERRORA("Error spawning thread\n", GSMOPEN_P_LOG);
 			switch_core_session_destroy(&session);
 			return 0;
 		}
@@ -1944,7 +1944,7 @@
 		//switch_channel_mark_answered(channel);
 	}
 
-	DEBUGA_CELLIAX("new_inbound_channel\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("new_inbound_channel\n", GSMOPEN_P_LOG);
 
 	return 0;
 }
@@ -1957,20 +1957,20 @@
 	if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
 		session = switch_core_session_locate(tech_pvt->session_uuid_str);
 	} else {
-		ERRORA("No session???\n", CELLIAX_P_LOG);
+		ERRORA("No session???\n", GSMOPEN_P_LOG);
 		goto done;
 	}
 	if (session) {
 		channel = switch_core_session_get_channel(session);
 	} else {
-		ERRORA("No session???\n", CELLIAX_P_LOG);
+		ERRORA("No session???\n", GSMOPEN_P_LOG);
 		goto done;
 	}
 	if (channel) {
 		switch_channel_mark_ring_ready(channel);
-		DEBUGA_CELLIAX("celliax_call: REMOTE PARTY RINGING\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("gsmopen_call: REMOTE PARTY RINGING\n", GSMOPEN_P_LOG);
 	} else {
-		ERRORA("No channel???\n", CELLIAX_P_LOG);
+		ERRORA("No channel???\n", GSMOPEN_P_LOG);
 	}
 
 	switch_core_session_rwunlock(session);
@@ -1987,7 +1987,7 @@
 	if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
 		session = switch_core_session_locate(tech_pvt->session_uuid_str);
 	} else {
-		ERRORA("No session???\n\n\n", CELLIAX_P_LOG);
+		ERRORA("No session???\n\n\n", GSMOPEN_P_LOG);
 		//TODO: kill the bastard
 		goto done;
 	}
@@ -1995,15 +1995,15 @@
 		channel = switch_core_session_get_channel(session);
 		switch_core_session_add_stream(session, NULL);
 	} else {
-		ERRORA("No session???\n", CELLIAX_P_LOG);
+		ERRORA("No session???\n", GSMOPEN_P_LOG);
 		//TODO: kill the bastard
 		goto done;
 	}
 	if (channel) {
 		switch_channel_mark_pre_answered(channel);
-		DEBUGA_CELLIAX("celliax_call: REMOTE PARTY EARLY MEDIA\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("gsmopen_call: REMOTE PARTY EARLY MEDIA\n", GSMOPEN_P_LOG);
 	} else {
-		ERRORA("No channel???\n", CELLIAX_P_LOG);
+		ERRORA("No channel???\n", GSMOPEN_P_LOG);
 		//TODO: kill the bastard
 	}
 
@@ -2021,37 +2021,37 @@
 	if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
 		session = switch_core_session_locate(tech_pvt->session_uuid_str);
 	} else {
-		ERRORA("No session???\n", CELLIAX_P_LOG);
+		ERRORA("No session???\n", GSMOPEN_P_LOG);
 		goto done;
 	}
 	if (session) {
 		channel = switch_core_session_get_channel(session);
 	} else {
-		ERRORA("No channel???\n", CELLIAX_P_LOG);
+		ERRORA("No channel???\n", GSMOPEN_P_LOG);
 		goto done;
 	}
 	if (channel) {
 		switch_channel_mark_answered(channel);
-		tech_pvt->phone_callflow = CELLIAX_STATE_UP;
-		tech_pvt->interface_state = CELLIAX_STATE_UP;
-		//DEBUGA_CELLIAX("celliax_call: %s, answered\n", CELLIAX_P_LOG, id);
+		tech_pvt->phone_callflow = GSMOPEN_STATE_UP;
+		tech_pvt->interface_state = GSMOPEN_STATE_UP;
+		//DEBUGA_GSMOPEN("gsmopen_call: %s, answered\n", GSMOPEN_P_LOG, id);
 	} else {
-		ERRORA("No channel???\n", CELLIAX_P_LOG);
+		ERRORA("No channel???\n", GSMOPEN_P_LOG);
 	}
 
 	switch_core_session_rwunlock(session);
 
   done:
-	DEBUGA_CELLIAX("outbound_channel_answered!\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("outbound_channel_answered!\n", GSMOPEN_P_LOG);
 
 	return 0;
 }
 
-private_t *find_available_celliax_interface_rr(private_t * tech_pvt_calling)
+private_t *find_available_gsmopen_interface_rr(private_t * tech_pvt_calling)
 {
 	private_t *tech_pvt = NULL;
 	int i;
-	//int num_interfaces = CELLIAX_MAX_INTERFACES; 
+	//int num_interfaces = GSMOPEN_MAX_INTERFACES; 
 	//int num_interfaces = globals.real_interfaces;
 
 	switch_mutex_lock(globals.mutex);
@@ -2060,35 +2060,35 @@
 	//XXX no, is just a convention, but you can have it start from 0. I do not, for aestetic reasons :-)  
 	//if (globals.next_interface == 0) globals.next_interface = 1;
 
-	for (i = 0; i < CELLIAX_MAX_INTERFACES; i++) {
+	for (i = 0; i < GSMOPEN_MAX_INTERFACES; i++) {
 		int interface_id;
 
 		interface_id = globals.next_interface;
-		//interface_id = interface_id < CELLIAX_MAX_INTERFACES ? interface_id : interface_id - CELLIAX_MAX_INTERFACES + 1;
-		globals.next_interface = interface_id + 1 < CELLIAX_MAX_INTERFACES ? interface_id + 1 : 0;
+		//interface_id = interface_id < GSMOPEN_MAX_INTERFACES ? interface_id : interface_id - GSMOPEN_MAX_INTERFACES + 1;
+		globals.next_interface = interface_id + 1 < GSMOPEN_MAX_INTERFACES ? interface_id + 1 : 0;
 
-		if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
-			int celliax_state = 0;
+		if (strlen(globals.GSMOPEN_INTERFACES[interface_id].name)) {
+			int gsmopen_state = 0;
 
-			tech_pvt = &globals.CELLIAX_INTERFACES[interface_id];
-			celliax_state = tech_pvt->interface_state;
-			//DEBUGA_CELLIAX("celliax interface: %d, name: %s, state: %d\n", CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name, celliax_state);
-			if ((tech_pvt_calling ? strcmp(tech_pvt->celliax_user, tech_pvt_calling->celliax_user) : 1)
-				&& (CELLIAX_STATE_DOWN == celliax_state || 0 == celliax_state) && (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED
+			tech_pvt = &globals.GSMOPEN_INTERFACES[interface_id];
+			gsmopen_state = tech_pvt->interface_state;
+			//DEBUGA_GSMOPEN("gsmopen interface: %d, name: %s, state: %d\n", GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].name, gsmopen_state);
+			if ((tech_pvt_calling ? strcmp(tech_pvt->gsmopen_user, tech_pvt_calling->gsmopen_user) : 1)
+				&& (GSMOPEN_STATE_DOWN == gsmopen_state || 0 == gsmopen_state) && (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED
 																				   || 0 == tech_pvt->phone_callflow)) {
-				DEBUGA_CELLIAX("returning as available celliax interface name: %s, state: %d callflow: %d\n", CELLIAX_P_LOG, tech_pvt->name, celliax_state,
+				DEBUGA_GSMOPEN("returning as available gsmopen interface name: %s, state: %d callflow: %d\n", GSMOPEN_P_LOG, tech_pvt->name, gsmopen_state,
 							   tech_pvt->phone_callflow);
 				/*set to Dialing state to avoid other thread fint it, don't know if it is safe */
 				//XXX no, it's not safe 
 				if (tech_pvt_calling == NULL) {
-					tech_pvt->interface_state = CELLIAX_STATE_SELECTED;
+					tech_pvt->interface_state = GSMOPEN_STATE_SELECTED;
 				}
 
 				switch_mutex_unlock(globals.mutex);
 				return tech_pvt;
 			}
 		}						// else {
-		//DEBUGA_CELLIAX("GSM interface: %d blank!! A hole here means we cannot hunt the last interface.\n", CELLIAX_P_LOG, interface_id);
+		//DEBUGA_GSMOPEN("GSM interface: %d blank!! A hole here means we cannot hunt the last interface.\n", GSMOPEN_P_LOG, interface_id);
 		//}
 	}
 
@@ -2123,20 +2123,20 @@
 		stream->write_function(stream, "F ID\t    Name    \tIB (F/T)    OB (F/T)\tState\tCallFlw\t\tUUID\n");
 		stream->write_function(stream, "= ====\t  ========  \t=======     =======\t======\t============\t======\n");
 
-		for (i = 0; i < CELLIAX_MAX_INTERFACES; i++) {
+		for (i = 0; i < GSMOPEN_MAX_INTERFACES; i++) {
 			next_flag_char = i == globals.next_interface ? '*' : ' ';
 
-			if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
+			if (strlen(globals.GSMOPEN_INTERFACES[i].name)) {
 				stream->write_function(stream,
 									   "%c %d\t[%s]\t%3ld/%ld\t%6ld/%ld\t%s\t%s\t%s\n",
 									   next_flag_char,
-									   i, globals.CELLIAX_INTERFACES[i].name,
-									   globals.CELLIAX_INTERFACES[i].ib_failed_calls,
-									   globals.CELLIAX_INTERFACES[i].ib_calls,
-									   globals.CELLIAX_INTERFACES[i].ob_failed_calls,
-									   globals.CELLIAX_INTERFACES[i].ob_calls,
-									   interface_status[globals.CELLIAX_INTERFACES[i].interface_state],
-									   phone_callflow[globals.CELLIAX_INTERFACES[i].phone_callflow], globals.CELLIAX_INTERFACES[i].session_uuid_str);
+									   i, globals.GSMOPEN_INTERFACES[i].name,
+									   globals.GSMOPEN_INTERFACES[i].ib_failed_calls,
+									   globals.GSMOPEN_INTERFACES[i].ib_calls,
+									   globals.GSMOPEN_INTERFACES[i].ob_failed_calls,
+									   globals.GSMOPEN_INTERFACES[i].ob_calls,
+									   interface_status[globals.GSMOPEN_INTERFACES[i].interface_state],
+									   phone_callflow[globals.GSMOPEN_INTERFACES[i].phone_callflow], globals.GSMOPEN_INTERFACES[i].session_uuid_str);
 			} else if (argc > 1 && !strcasecmp(argv[1], "full")) {
 				stream->write_function(stream, "%c\t%d\n", next_flag_char, i);
 			}
@@ -2149,12 +2149,12 @@
 		int found = 0;
 
 		if (argc == 2) {
-			for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
+			for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
 				/* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-				if (strlen(globals.CELLIAX_INTERFACES[i].name)
-					&& (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[1], strlen(argv[1])) == 0)) {
-					globals.sk_console = &globals.CELLIAX_INTERFACES[i];
-					stream->write_function(stream, "sk console is now: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n", i, globals.CELLIAX_INTERFACES[i].name);
+				if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+					&& (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[1], strlen(argv[1])) == 0)) {
+					globals.sk_console = &globals.GSMOPEN_INTERFACES[i];
+					stream->write_function(stream, "sk console is now: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n", i, globals.GSMOPEN_INTERFACES[i].name);
 					stream->write_function(stream, "sk console is: |||%s|||\n", globals.sk_console->name);
 					found = 1;
 					break;
@@ -2162,7 +2162,7 @@
 
 			}
 			if (!found)
-				stream->write_function(stream, "ERROR: A Celliax interface with name='%s' was not found\n", argv[1]);
+				stream->write_function(stream, "ERROR: A GSMopen interface with name='%s' was not found\n", argv[1]);
 		} else {
 
 			stream->write_function(stream, "-ERR Usage: sk console interface_name\n");
@@ -2201,7 +2201,7 @@
 	return SWITCH_STATUS_SUCCESS;
 }
 
-SWITCH_STANDARD_API(celliax_function)
+SWITCH_STANDARD_API(gsmopen_function)
 {
 	char *mycmd = NULL, *argv[10] = { 0 };
 	int argc = 0;
@@ -2212,12 +2212,12 @@
 	}
 
 	if (!argc) {
-		stream->write_function(stream, "ERROR, usage: %s", CELLIAX_SYNTAX);
+		stream->write_function(stream, "ERROR, usage: %s", GSMOPEN_SYNTAX);
 		goto end;
 	}
 
 	if (argc < 2) {
-		stream->write_function(stream, "ERROR, usage: %s", CELLIAX_SYNTAX);
+		stream->write_function(stream, "ERROR, usage: %s", GSMOPEN_SYNTAX);
 		goto end;
 	}
 
@@ -2225,27 +2225,27 @@
 		int i;
 		int found = 0;
 
-		for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
+		for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
 			/* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-			if (strlen(globals.CELLIAX_INTERFACES[i].name)
-				&& (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-				tech_pvt = &globals.CELLIAX_INTERFACES[i];
-				stream->write_function(stream, "Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n", i, globals.CELLIAX_INTERFACES[i].name);
+			if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+				&& (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+				tech_pvt = &globals.GSMOPEN_INTERFACES[i];
+				stream->write_function(stream, "Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n", i, globals.GSMOPEN_INTERFACES[i].name);
 				found = 1;
 				break;
 			}
 
 		}
 		if (!found) {
-			stream->write_function(stream, "ERROR: A Celliax interface with name='%s' was not found\n", argv[0]);
+			stream->write_function(stream, "ERROR: A GSMopen interface with name='%s' was not found\n", argv[0]);
 			switch_safe_free(mycmd);
 
 			return SWITCH_STATUS_SUCCESS;
 		} else {
-			//celliax_signaling_write(tech_pvt, (char *) &cmd[strlen(argv[0]) + 1]);
+			//gsmopen_signaling_write(tech_pvt, (char *) &cmd[strlen(argv[0]) + 1]);
 		}
 	} else {
-		stream->write_function(stream, "ERROR, usage: %s", CELLIAX_SYNTAX);
+		stream->write_function(stream, "ERROR, usage: %s", GSMOPEN_SYNTAX);
 	}
   end:
 	switch_safe_free(mycmd);
@@ -2254,9 +2254,9 @@
 }
 #endif //0
 
-int celliax_transfer(private_t * tech_pvt, char *id, char *value)
+int gsmopen_transfer(private_t * tech_pvt, char *id, char *value)
 {
-	char msg_to_celliax[1024];
+	char msg_to_gsmopen[1024];
 	int i;
 	int found = 0;
 	private_t *giovatech;
@@ -2265,17 +2265,17 @@
 	switch_mutex_lock(globals.mutex);
 
 	gettimeofday(&timenow, NULL);
-	for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
-		if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
+	for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
+		if (strlen(globals.GSMOPEN_INTERFACES[i].name)) {
 
-			giovatech = &globals.CELLIAX_INTERFACES[i];
-			//NOTICA("celliax interface: %d, name: %s, state: %d, value=%s, giovatech->callid_number=%s, giovatech->celliax_user=%s\n", CELLIAX_P_LOG, i, giovatech->name, giovatech->interface_state, value, giovatech->callid_number, giovatech->celliax_user);
+			giovatech = &globals.GSMOPEN_INTERFACES[i];
+			//NOTICA("gsmopen interface: %d, name: %s, state: %d, value=%s, giovatech->callid_number=%s, giovatech->gsmopen_user=%s\n", GSMOPEN_P_LOG, i, giovatech->name, giovatech->interface_state, value, giovatech->callid_number, giovatech->gsmopen_user);
 			//FIXME check a timestamp here
-			if (strlen(giovatech->celliax_call_id) && (giovatech->interface_state != CELLIAX_STATE_DOWN) && (!strcmp(giovatech->celliax_user, tech_pvt->celliax_user)) && (!strcmp(giovatech->callid_number, value)) && ((((timenow.tv_sec - giovatech->answer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->answer_time.tv_usec)) < 500000)) {	//0.5sec
+			if (strlen(giovatech->gsmopen_call_id) && (giovatech->interface_state != GSMOPEN_STATE_DOWN) && (!strcmp(giovatech->gsmopen_user, tech_pvt->gsmopen_user)) && (!strcmp(giovatech->callid_number, value)) && ((((timenow.tv_sec - giovatech->answer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->answer_time.tv_usec)) < 500000)) {	//0.5sec
 				found = 1;
-				DEBUGA_CELLIAX
-					("FOUND  (name=%s, giovatech->interface_state=%d != CELLIAX_STATE_DOWN) && (giovatech->celliax_user=%s == tech_pvt->celliax_user=%s) && (giovatech->callid_number=%s == value=%s)\n",
-					 CELLIAX_P_LOG, giovatech->name, giovatech->interface_state, giovatech->celliax_user, tech_pvt->celliax_user, giovatech->callid_number,
+				DEBUGA_GSMOPEN
+					("FOUND  (name=%s, giovatech->interface_state=%d != GSMOPEN_STATE_DOWN) && (giovatech->gsmopen_user=%s == tech_pvt->gsmopen_user=%s) && (giovatech->callid_number=%s == value=%s)\n",
+					 GSMOPEN_P_LOG, giovatech->name, giovatech->interface_state, giovatech->gsmopen_user, tech_pvt->gsmopen_user, giovatech->callid_number,
 					 value)
 					break;
 			}
@@ -2284,16 +2284,16 @@
 
 	if (found) {
 		//tech_pvt->callid_number[0]='\0';
-		//sprintf(msg_to_celliax, "ALTER CALL %s END HANGUP", id);
-		//celliax_signaling_write(tech_pvt, msg_to_celliax);
+		//sprintf(msg_to_gsmopen, "ALTER CALL %s END HANGUP", id);
+		//gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
 		switch_mutex_unlock(globals.mutex);
 		return 0;
 	}
-	DEBUGA_CELLIAX("NOT FOUND\n", CELLIAX_P_LOG);
+	DEBUGA_GSMOPEN("NOT FOUND\n", GSMOPEN_P_LOG);
 
-	if (!tech_pvt || !tech_pvt->celliax_call_id || !strlen(tech_pvt->celliax_call_id)) {
+	if (!tech_pvt || !tech_pvt->gsmopen_call_id || !strlen(tech_pvt->gsmopen_call_id)) {
 		/* we are not inside an active call */
-		DEBUGA_CELLIAX("We're NO MORE in a call now %s\n", CELLIAX_P_LOG, (tech_pvt && tech_pvt->celliax_call_id) ? tech_pvt->celliax_call_id : "");
+		DEBUGA_GSMOPEN("We're NO MORE in a call now %s\n", GSMOPEN_P_LOG, (tech_pvt && tech_pvt->gsmopen_call_id) ? tech_pvt->gsmopen_call_id : "");
 		switch_mutex_unlock(globals.mutex);
 
 	} else {
@@ -2305,21 +2305,21 @@
 		  <- CALL 288 CAN_TRANSFER test2 TRUE
 		 **********************************/
 
-		private_t *available_celliax_interface = NULL;
+		private_t *available_gsmopen_interface = NULL;
 
 		gettimeofday(&timenow, NULL);
-		for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
-			if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
+		for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
+			if (strlen(globals.GSMOPEN_INTERFACES[i].name)) {
 
-				giovatech = &globals.CELLIAX_INTERFACES[i];
-				//NOTICA("celliax interface: %d, name: %s, state: %d, value=%s, giovatech->callid_number=%s, giovatech->celliax_user=%s\n", CELLIAX_P_LOG, i, giovatech->name, giovatech->interface_state, value, giovatech->callid_number, giovatech->celliax_user);
+				giovatech = &globals.GSMOPEN_INTERFACES[i];
+				//NOTICA("gsmopen interface: %d, name: %s, state: %d, value=%s, giovatech->callid_number=%s, giovatech->gsmopen_user=%s\n", GSMOPEN_P_LOG, i, giovatech->name, giovatech->interface_state, value, giovatech->callid_number, giovatech->gsmopen_user);
 				//FIXME check a timestamp here
-				if (strlen(giovatech->celliax_transfer_call_id) && (giovatech->interface_state != CELLIAX_STATE_DOWN) && (!strcmp(giovatech->celliax_user, tech_pvt->celliax_user)) && (!strcmp(giovatech->transfer_callid_number, value)) && ((((timenow.tv_sec - giovatech->transfer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->transfer_time.tv_usec)) < 1000000)) {	//1.0 sec
+				if (strlen(giovatech->gsmopen_transfer_call_id) && (giovatech->interface_state != GSMOPEN_STATE_DOWN) && (!strcmp(giovatech->gsmopen_user, tech_pvt->gsmopen_user)) && (!strcmp(giovatech->transfer_callid_number, value)) && ((((timenow.tv_sec - giovatech->transfer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->transfer_time.tv_usec)) < 1000000)) {	//1.0 sec
 					found = 1;
-					DEBUGA_CELLIAX
-						("FOUND  (name=%s, giovatech->interface_state=%d != CELLIAX_STATE_DOWN) && (giovatech->celliax_user=%s == tech_pvt->celliax_user=%s) && (giovatech->transfer_callid_number=%s == value=%s)\n",
-						 CELLIAX_P_LOG, giovatech->name, giovatech->interface_state,
-						 giovatech->celliax_user, tech_pvt->celliax_user, giovatech->transfer_callid_number, value)
+					DEBUGA_GSMOPEN
+						("FOUND  (name=%s, giovatech->interface_state=%d != GSMOPEN_STATE_DOWN) && (giovatech->gsmopen_user=%s == tech_pvt->gsmopen_user=%s) && (giovatech->transfer_callid_number=%s == value=%s)\n",
+						 GSMOPEN_P_LOG, giovatech->name, giovatech->interface_state,
+						 giovatech->gsmopen_user, tech_pvt->gsmopen_user, giovatech->transfer_callid_number, value)
 						break;
 				}
 			}
@@ -2327,105 +2327,105 @@
 
 		if (found) {
 			//tech_pvt->callid_number[0]='\0';
-			//sprintf(msg_to_celliax, "ALTER CALL %s END HANGUP", id);
-			//celliax_signaling_write(tech_pvt, msg_to_celliax);
+			//sprintf(msg_to_gsmopen, "ALTER CALL %s END HANGUP", id);
+			//gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
 			switch_mutex_unlock(globals.mutex);
 			return 0;
 		}
-		DEBUGA_CELLIAX("NOT FOUND\n", CELLIAX_P_LOG);
+		DEBUGA_GSMOPEN("NOT FOUND\n", GSMOPEN_P_LOG);
 
-		available_celliax_interface = find_available_celliax_interface_rr(tech_pvt);
-		if (available_celliax_interface) {
-			/* there is a celliax interface idle, let's transfer the call to it */
+		available_gsmopen_interface = find_available_gsmopen_interface_rr(tech_pvt);
+		if (available_gsmopen_interface) {
+			/* there is a gsmopen interface idle, let's transfer the call to it */
 
 			//FIXME write a timestamp here
 			gettimeofday(&tech_pvt->transfer_time, NULL);
-			switch_copy_string(tech_pvt->celliax_transfer_call_id, id, sizeof(tech_pvt->celliax_transfer_call_id) - 1);
+			switch_copy_string(tech_pvt->gsmopen_transfer_call_id, id, sizeof(tech_pvt->gsmopen_transfer_call_id) - 1);
 
 			switch_copy_string(tech_pvt->transfer_callid_number, value, sizeof(tech_pvt->transfer_callid_number) - 1);
 
-			DEBUGA_CELLIAX
-				("Let's transfer the celliax_call %s to %s interface (with celliax_user: %s), because we are already in a celliax call(%s)\n",
-				 CELLIAX_P_LOG, tech_pvt->celliax_call_id, available_celliax_interface->name, available_celliax_interface->celliax_user, id);
+			DEBUGA_GSMOPEN
+				("Let's transfer the gsmopen_call %s to %s interface (with gsmopen_user: %s), because we are already in a gsmopen call(%s)\n",
+				 GSMOPEN_P_LOG, tech_pvt->gsmopen_call_id, available_gsmopen_interface->name, available_gsmopen_interface->gsmopen_user, id);
 
 			//FIXME why this? the inbound call will come, eventually, on that other interface
-			//available_celliax_interface->ib_calls++;
+			//available_gsmopen_interface->ib_calls++;
 
-			sprintf(msg_to_celliax, "ALTER CALL %s TRANSFER %s", id, available_celliax_interface->celliax_user);
-			//celliax_signaling_write(tech_pvt, msg_to_celliax);
-			if (tech_pvt->interface_state == CELLIAX_STATE_SELECTED) {
-				tech_pvt->interface_state = CELLIAX_STATE_IDLE;	//we marked it CELLIAX_STATE_SELECTED just in case it has to make an outbound call
+			sprintf(msg_to_gsmopen, "ALTER CALL %s TRANSFER %s", id, available_gsmopen_interface->gsmopen_user);
+			//gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
+			if (tech_pvt->interface_state == GSMOPEN_STATE_SELECTED) {
+				tech_pvt->interface_state = GSMOPEN_STATE_IDLE;	//we marked it GSMOPEN_STATE_SELECTED just in case it has to make an outbound call
 			}
 		} else {
-			/* no celliax interfaces idle, do nothing */
-			DEBUGA_CELLIAX
-				("Not answering the celliax_call %s, because we are already in a celliax call(%s) and not transferring, because no other celliax interfaces are available\n",
-				 CELLIAX_P_LOG, id, tech_pvt->celliax_call_id);
-			sprintf(msg_to_celliax, "ALTER CALL %s END HANGUP", id);
-			//celliax_signaling_write(tech_pvt, msg_to_celliax);
+			/* no gsmopen interfaces idle, do nothing */
+			DEBUGA_GSMOPEN
+				("Not answering the gsmopen_call %s, because we are already in a gsmopen call(%s) and not transferring, because no other gsmopen interfaces are available\n",
+				 GSMOPEN_P_LOG, id, tech_pvt->gsmopen_call_id);
+			sprintf(msg_to_gsmopen, "ALTER CALL %s END HANGUP", id);
+			//gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
 		}
 		switch_sleep(10000);
-		DEBUGA_CELLIAX
-			("We have NOT answered a GSM RING from celliax_call %s, because we are already in a celliax call (%s)\n",
-			 CELLIAX_P_LOG, id, tech_pvt->celliax_call_id);
+		DEBUGA_GSMOPEN
+			("We have NOT answered a GSM RING from gsmopen_call %s, because we are already in a gsmopen call (%s)\n",
+			 GSMOPEN_P_LOG, id, tech_pvt->gsmopen_call_id);
 
 		switch_mutex_unlock(globals.mutex);
 	}
 	return 0;
 }
 
-void *celliax_do_celliaxapi_thread_func(void *obj)
+void *gsmopen_do_gsmopenapi_thread_func(void *obj)
 {
 
 	private_t *tech_pvt = obj;
-	//if (celliax_present(CelliaxHandles)) 
+	//if (gsmopen_present(GSMopenHandles)) 
 	if (1) {
 		while (running) {
 			int res;
-			//celliax_sleep(1000000); //1 sec
-			//DEBUGA_CELLIAX("ciao!\n", CELLIAX_P_LOG);
-			res = celliax_serial_read(tech_pvt);
+			//gsmopen_sleep(1000000); //1 sec
+			//DEBUGA_GSMOPEN("ciao!\n", GSMOPEN_P_LOG);
+			res = gsmopen_serial_read(tech_pvt);
 			if (res == -1) {	//manage the graceful interface shutdown
 				tech_pvt->controldev_dead = 1;
 				close(tech_pvt->controldevfd);
-				ERRORA("celliax_serial_monitor failed, declaring %s dead\n", CELLIAX_P_LOG, tech_pvt->controldevice_name);
+				ERRORA("gsmopen_serial_monitor failed, declaring %s dead\n", GSMOPEN_P_LOG, tech_pvt->controldevice_name);
 				switch_sleep(1000000);
-			} else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == CELLIAX_STATE_RING && tech_pvt->phone_callflow != CALLFLOW_CALL_HANGUP_REQUESTED ) {
-				WARNINGA("INCOMING RING\n", CELLIAX_P_LOG);
+			} else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == GSMOPEN_STATE_RING && tech_pvt->phone_callflow != CALLFLOW_CALL_HANGUP_REQUESTED ) {
+				WARNINGA("INCOMING RING\n", GSMOPEN_P_LOG);
 
-				celliax_ring(tech_pvt);
+				gsmopen_ring(tech_pvt);
 
-				//FIXME celliax_answer(tech_pvt);
+				//FIXME gsmopen_answer(tech_pvt);
 				//new_inbound_channel(tech_pvt);
-				//FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt->context)) {
-				//FIXME ERRORA("celliax_new failed! BAD BAD BAD\n", CELLIAX_P_LOG);
+				//FIXME if (!gsmopen_new(p, AST_STATE_RING, tech_pvt->context)) {
+				//FIXME ERRORA("gsmopen_new failed! BAD BAD BAD\n", GSMOPEN_P_LOG);
 				//FIXME }
 
 
-			} else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == CELLIAX_STATE_DIALING) {
-				WARNINGA("WE'RE DIALING, let's take the earlymedia\n", CELLIAX_P_LOG);
+			} else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == GSMOPEN_STATE_DIALING) {
+				WARNINGA("WE'RE DIALING, let's take the earlymedia\n", GSMOPEN_P_LOG);
 				tech_pvt->interface_state = CALLFLOW_STATUS_EARLYMEDIA;
 				remote_party_is_early_media(tech_pvt);
 				//new_inbound_channel(tech_pvt);
-				//FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt->context)) {
-				//FIXME ERRORA("celliax_new failed! BAD BAD BAD\n", CELLIAX_P_LOG);
+				//FIXME if (!gsmopen_new(p, AST_STATE_RING, tech_pvt->context)) {
+				//FIXME ERRORA("gsmopen_new failed! BAD BAD BAD\n", GSMOPEN_P_LOG);
 				//FIXME }
 
 
 
 
 			} else if (tech_pvt->interface_state == CALLFLOW_CALL_REMOTEANSWER) {
-				WARNINGA("REMOTE PARTY ANSWERED\n", CELLIAX_P_LOG);
+				WARNINGA("REMOTE PARTY ANSWERED\n", GSMOPEN_P_LOG);
 				outbound_channel_answered(tech_pvt);
 				//new_inbound_channel(tech_pvt);
-				//FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt->context)) {
-				//FIXME ERRORA("celliax_new failed! BAD BAD BAD\n", CELLIAX_P_LOG);
+				//FIXME if (!gsmopen_new(p, AST_STATE_RING, tech_pvt->context)) {
+				//FIXME ERRORA("gsmopen_new failed! BAD BAD BAD\n", GSMOPEN_P_LOG);
 				//FIXME }
 			}
 			usleep(100);		//give other threads a chance
 		}
 	} else {
-		ERRORA("GSM is not running, maybe crashed. Please run/restart GSM and relaunch Celliax\n", CELLIAX_P_LOG);
+		ERRORA("GSM is not running, maybe crashed. Please run/restart GSM and relaunch GSMopen\n", GSMOPEN_P_LOG);
 		running = 0;
 		return NULL;
 	}
@@ -2439,7 +2439,7 @@
 	char sms_buf[512];
 	switch_event_t *event;
 
-	DEBUGA_CELLIAX("received SMS >>>%s<<< on interface %s\n", CELLIAX_P_LOG, value, tech_pvt->name);
+	DEBUGA_GSMOPEN("received SMS >>>%s<<< on interface %s\n", GSMOPEN_P_LOG, value, tech_pvt->name);
 
 	switch_snprintf(sms_buf, sizeof(sms_buf), "incoming SMS on %s\n", tech_pvt->name);
 
@@ -2479,11 +2479,11 @@
 		int i;
 		int found = 0;
 
-		for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
+		for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
 			/* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-			if (strlen(globals.CELLIAX_INTERFACES[i].name)
-				&& (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-				tech_pvt = &globals.CELLIAX_INTERFACES[i];
+			if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+				&& (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+				tech_pvt = &globals.GSMOPEN_INTERFACES[i];
 				stream->write_function(stream, "Trying to send your SMS: interface=%s, dest=%s, text=%s\n", argv[0], argv[1], argv[2]);
 				found = 1;
 				break;
@@ -2491,13 +2491,13 @@
 
 		}
 		if (!found) {
-			stream->write_function(stream, "ERROR: A Celliax interface with name='%s' was not found\n", argv[0]);
+			stream->write_function(stream, "ERROR: A GSMopen interface with name='%s' was not found\n", argv[0]);
 			switch_safe_free(mycmd);
 
 			return SWITCH_STATUS_SUCCESS;
 		} else {
-			//celliax_sendsms(tech_pvt, (char *) argv[1], (char *) argv[2]);
-			NOTICA("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n", CELLIAX_P_LOG, MDL_CHAT_PROTO, tech_pvt->name, argv[1], "SIMPLE MESSAGE", switch_str_nil(argv[2]), tech_pvt->name);
+			//gsmopen_sendsms(tech_pvt, (char *) argv[1], (char *) argv[2]);
+			NOTICA("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n", GSMOPEN_P_LOG, MDL_CHAT_PROTO, tech_pvt->name, argv[1], "SIMPLE MESSAGE", switch_str_nil(argv[2]), tech_pvt->name);
 
 			chat_send(MDL_CHAT_PROTO, tech_pvt->name, argv[1], "SIMPLE MESSAGE", switch_str_nil(argv[2]), NULL, tech_pvt->name);
 		}
@@ -2518,8 +2518,8 @@
 	switch_core_session_t *session = NULL;
 	int event_sent_to_esl = 0;
 
-	DEBUGA_CELLIAX("received SMS on interface %s: %s\n", CELLIAX_P_LOG, tech_pvt->name, tech_pvt->sms_message);
-	DEBUGA_CELLIAX("received SMS on interface %s: DATE=%s, SENDER=%s, BODY=%s\n", CELLIAX_P_LOG, tech_pvt->name, tech_pvt->sms_date, tech_pvt->sms_sender, tech_pvt->sms_body);
+	DEBUGA_GSMOPEN("received SMS on interface %s: %s\n", GSMOPEN_P_LOG, tech_pvt->name, tech_pvt->sms_message);
+	DEBUGA_GSMOPEN("received SMS on interface %s: DATE=%s, SENDER=%s, BODY=%s\n", GSMOPEN_P_LOG, tech_pvt->name, tech_pvt->sms_date, tech_pvt->sms_sender, tech_pvt->sms_body);
 
 	if (!switch_strlen_zero(tech_pvt->session_uuid_str)) {
 		session = switch_core_session_locate(tech_pvt->session_uuid_str);
@@ -2547,7 +2547,7 @@
 		}
 
 	}else{
-		ERRORA("cannot create event on interface %s. WHY?????\n", CELLIAX_P_LOG, tech_pvt->name);
+		ERRORA("cannot create event on interface %s. WHY?????\n", GSMOPEN_P_LOG, tech_pvt->name);
 	}
 
 	if(!event_sent_to_esl){
@@ -2570,7 +2570,7 @@
 			}
 			switch_event_fire(&event);
 		} else{
-			ERRORA("cannot create event on interface %s. WHY?????\n", CELLIAX_P_LOG, tech_pvt->name);
+			ERRORA("cannot create event on interface %s. WHY?????\n", GSMOPEN_P_LOG, tech_pvt->name);
 		}
 	}
 
@@ -2599,22 +2599,22 @@
 	}
 
 	if (!argc) {
-		stream->write_function(stream, "ERROR, usage: %s", CELLIAX_CHAT_SYNTAX);
+		stream->write_function(stream, "ERROR, usage: %s", GSMOPEN_CHAT_SYNTAX);
 		goto end;
 	}
 
 	if (argc < 3) {
-		stream->write_function(stream, "ERROR, usage: %s", CELLIAX_CHAT_SYNTAX);
+		stream->write_function(stream, "ERROR, usage: %s", GSMOPEN_CHAT_SYNTAX);
 		goto end;
 	}
 
 	if (argv[0]) {
-		for (i = 0; !found && i < CELLIAX_MAX_INTERFACES; i++) {
+		for (i = 0; !found && i < GSMOPEN_MAX_INTERFACES; i++) {
 			/* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-			if (strlen(globals.CELLIAX_INTERFACES[i].name)
-					&& (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-				tech_pvt = &globals.CELLIAX_INTERFACES[i];
-				stream->write_function(stream, "Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n", i, globals.CELLIAX_INTERFACES[i].name);
+			if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+					&& (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+				tech_pvt = &globals.GSMOPEN_INTERFACES[i];
+				stream->write_function(stream, "Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n", i, globals.GSMOPEN_INTERFACES[i].name);
 				found = 1;
 				break;
 			}
@@ -2629,17 +2629,17 @@
 			//chat_send(p*roto, const char *from, const char *to, const char *subject, const char *body, const char *type, const char *hint);
 			//chat_send(MDL_CHAT_PROTO, tech_pvt->skype_user, argv[1], "SIMPLE MESSAGE", switch_str_nil((char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), NULL, hint);
 
-			NOTICA("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n", CELLIAX_P_LOG, MDL_CHAT_PROTO, tech_pvt->skype_user, argv[1], "SIMPLE MESSAGE", switch_str_nil((char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), tech_pvt->name);
+			NOTICA("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n", GSMOPEN_P_LOG, MDL_CHAT_PROTO, tech_pvt->skype_user, argv[1], "SIMPLE MESSAGE", switch_str_nil((char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), tech_pvt->name);
 
 			chat_send(MDL_CHAT_PROTO, tech_pvt->skype_user, argv[1], "SIMPLE MESSAGE", switch_str_nil((char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), NULL, tech_pvt->name);
 
-			//NOTICA("TEXT is: %s\n", CELLIAX_P_LOG, (char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1] );
+			//NOTICA("TEXT is: %s\n", GSMOPEN_P_LOG, (char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1] );
 			//snprintf(skype_msg, sizeof(skype_msg), "CHAT CREATE %s", argv[1]);
 			//skypiax_signaling_write(tech_pvt, skype_msg);
 			//switch_sleep(100);
 		}
 	} else {
-		stream->write_function(stream, "ERROR, usage: %s", CELLIAX_CHAT_SYNTAX);
+		stream->write_function(stream, "ERROR, usage: %s", GSMOPEN_CHAT_SYNTAX);
 		goto end;
 	}