<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14722] </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14722">14722</a></dd>
<dt>Author</dt> <dd>gmaruzz</dd>
<dt>Date</dt> <dd>2009-09-01 15:14:09 -0500 (Tue, 01 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>celliax: big cosmetics, change all names from skyp* to celliax*</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchbranchesgmaruzzmod_celliaxcelliaxh">freeswitch/branches/gmaruzz/mod_celliax/celliax.h</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_celliaxcelliax_protocolc">freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_celliaxmod_celliaxc">freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchbranchesgmaruzzmod_celliaxcelliaxh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax.h (14721 => 14722)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/celliax.h        2009-09-01 19:49:14 UTC (rev 14721)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax.h        2009-09-01 20:14:09 UTC (rev 14722)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">  *
</span><span class="cx">  *
</span><span class="cx">  *
</span><del>- * mod_celliax.c -- Skype compatible Endpoint Module
</del><ins>+ * mod_celliax.c -- GSM compatible Endpoint Module
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="lines">@@ -44,11 +44,11 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #ifndef GIOVA48
</span><del>-#define     SKYPIAX_FRAME_SIZE   160
</del><ins>+#define     CELLIAX_FRAME_SIZE   160
</ins><span class="cx"> #else //GIOVA48
</span><del>-#define     SKYPIAX_FRAME_SIZE   960
</del><ins>+#define     CELLIAX_FRAME_SIZE   960
</ins><span class="cx"> #endif //GIOVA48
</span><del>-#define     SAMPLERATE_SKYPIAX   8000
</del><ins>+#define     SAMPLERATE_CELLIAX   8000
</ins><span class="cx"> 
</span><span class="cx"> #define CELLIAX_ALSA
</span><span class="cx"> #include &lt;switch.h&gt;
</span><span class="lines">@@ -89,12 +89,12 @@
</span><span class="cx"> //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 */
</span><span class="cx"> #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 */
</span><span class="cx"> 
</span><del>-//#define SAMPLERATE_SKYPIAX 16000
-//#define SAMPLES_PER_FRAME SAMPLERATE_SKYPIAX/50
</del><ins>+//#define SAMPLERATE_CELLIAX 16000
+//#define SAMPLES_PER_FRAME SAMPLERATE_CELLIAX/50
</ins><span class="cx"> 
</span><del>-#ifndef SKYPIAX_SVN_VERSION
-#define SKYPIAX_SVN_VERSION SWITCH_VERSION_REVISION
-#endif /* SKYPIAX_SVN_VERSION */
</del><ins>+#ifndef CELLIAX_SVN_VERSION
+#define CELLIAX_SVN_VERSION SWITCH_VERSION_REVISION
+#endif /* CELLIAX_SVN_VERSION */
</ins><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="cx">         TFLAG_IO = (1 &lt;&lt; 0),
</span><span class="lines">@@ -112,40 +112,40 @@
</span><span class="cx">         GFLAG_MY_CODEC_PREFS = (1 &lt;&lt; 0)
</span><span class="cx"> } GFLAGS;
</span><span class="cx"> 
</span><del>-#define DEBUGA_SKYPE(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;SKYPIAX_SVN_VERSION &quot;[%p|%-7lx][DEBUG_SKYPE  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
-#define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;SKYPIAX_SVN_VERSION &quot;[%p|%-7lx][DEBUG_CALL  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
-#define DEBUGA_PBX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;SKYPIAX_SVN_VERSION &quot;[%p|%-7lx][DEBUG_PBX  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
-#define ERRORA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,                 &quot;rev &quot;SKYPIAX_SVN_VERSION &quot;[%p|%-7lx][ERRORA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
-#define WARNINGA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,                 &quot;rev &quot;SKYPIAX_SVN_VERSION &quot;[%p|%-7lx][WARNINGA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
-#define NOTICA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,                 &quot;rev &quot;SKYPIAX_SVN_VERSION &quot;[%p|%-7lx][NOTICA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
</del><ins>+#define DEBUGA_CELLIAX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;CELLIAX_SVN_VERSION &quot;[%p|%-7lx][DEBUG_CELLIAX  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
+#define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;CELLIAX_SVN_VERSION &quot;[%p|%-7lx][DEBUG_CALL  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
+#define DEBUGA_PBX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;CELLIAX_SVN_VERSION &quot;[%p|%-7lx][DEBUG_PBX  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
+#define ERRORA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,                 &quot;rev &quot;CELLIAX_SVN_VERSION &quot;[%p|%-7lx][ERRORA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
+#define WARNINGA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,                 &quot;rev &quot;CELLIAX_SVN_VERSION &quot;[%p|%-7lx][WARNINGA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
+#define NOTICA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,                 &quot;rev &quot;CELLIAX_SVN_VERSION &quot;[%p|%-7lx][NOTICA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
</ins><span class="cx"> 
</span><del>-#define SKYPIAX_P_LOG NULL, (unsigned long)55, __LINE__, tech_pvt ? tech_pvt-&gt;name ? tech_pvt-&gt;name : &quot;none&quot; : &quot;none&quot;, -1, tech_pvt ? tech_pvt-&gt;interface_state : -1, tech_pvt ? tech_pvt-&gt;phone_callflow : -1
</del><ins>+#define CELLIAX_P_LOG NULL, (unsigned long)55, __LINE__, tech_pvt ? tech_pvt-&gt;name ? tech_pvt-&gt;name : &quot;none&quot; : &quot;none&quot;, -1, tech_pvt ? tech_pvt-&gt;interface_state : -1, tech_pvt ? tech_pvt-&gt;phone_callflow : -1
</ins><span class="cx"> 
</span><span class="cx"> /*********************************/
</span><del>-#define SKYPIAX_CAUSE_NORMAL                1
-#define SKYPIAX_CAUSE_FAILURE                2
-#define SKYPIAX_CAUSE_NO_ANSWER                3
</del><ins>+#define CELLIAX_CAUSE_NORMAL                1
+#define CELLIAX_CAUSE_FAILURE                2
+#define CELLIAX_CAUSE_NO_ANSWER                3
</ins><span class="cx"> /*********************************/
</span><del>-#define SKYPIAX_FRAME_DTMF                        1
</del><ins>+#define CELLIAX_FRAME_DTMF                        1
</ins><span class="cx"> /*********************************/
</span><del>-#define SKYPIAX_CONTROL_RINGING                1
-#define SKYPIAX_CONTROL_ANSWER                2
-#define SKYPIAX_CONTROL_HANGUP                3
-#define SKYPIAX_CONTROL_BUSY                4
</del><ins>+#define CELLIAX_CONTROL_RINGING                1
+#define CELLIAX_CONTROL_ANSWER                2
+#define CELLIAX_CONTROL_HANGUP                3
+#define CELLIAX_CONTROL_BUSY                4
</ins><span class="cx"> 
</span><span class="cx"> /*********************************/
</span><del>-#define                SKYPIAX_STATE_IDLE                                        0
-#define                SKYPIAX_STATE_DOWN                                        1
-#define                SKYPIAX_STATE_RING                                        2
-#define                SKYPIAX_STATE_DIALING                                3
-#define                SKYPIAX_STATE_BUSY                                        4
-#define                SKYPIAX_STATE_UP                                        5
-#define                SKYPIAX_STATE_RINGING                                6
-#define                SKYPIAX_STATE_PRERING                                7
-#define                SKYPIAX_STATE_ERROR_DOUBLE_CALL                8
-#define                SKYPIAX_STATE_SELECTED                                9
-#define         SKYPIAX_STATE_HANGUP_REQUESTED                10
-#define                SKYPIAX_STATE_PREANSWER                                11
</del><ins>+#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
</ins><span class="cx"> /*********************************/
</span><span class="cx"> /* call flow from the device */
</span><span class="cx"> #define         CALLFLOW_CALL_IDLE                                        0
</span><span class="lines">@@ -182,11 +182,11 @@
</span><span class="cx"> #define         AT_OK   0
</span><span class="cx"> #define         AT_ERROR   1
</span><span class="cx"> 
</span><del>-#define SKYPIAX_MAX_INTERFACES 64
</del><ins>+#define CELLIAX_MAX_INTERFACES 64
</ins><span class="cx"> 
</span><span class="cx"> #ifndef WIN32
</span><del>-struct SkypiaxHandles {
-        Window skype_win;
</del><ins>+struct CelliaxHandles {
+        Window celliax_win;
</ins><span class="cx">         Display *disp;
</span><span class="cx">         Window win;
</span><span class="cx">         int currentuserhandle;
</span><span class="lines">@@ -195,13 +195,13 @@
</span><span class="cx"> };
</span><span class="cx"> #else //WIN32
</span><span class="cx"> 
</span><del>-struct SkypiaxHandles {
</del><ins>+struct CelliaxHandles {
</ins><span class="cx">         HWND win32_hInit_MainWindowHandle;
</span><del>-        HWND win32_hGlobal_SkypeAPIWindowHandle;
</del><ins>+        HWND win32_hGlobal_GSMAPIWindowHandle;
</ins><span class="cx">         HINSTANCE win32_hInit_ProcessHandle;
</span><span class="cx">         char win32_acInit_WindowClassName[128];
</span><del>-        UINT win32_uiGlobal_MsgID_SkypeControlAPIAttach;
-        UINT win32_uiGlobal_MsgID_SkypeControlAPIDiscover;
</del><ins>+        UINT win32_uiGlobal_MsgID_GSMControlAPIAttach;
+        UINT win32_uiGlobal_MsgID_GSMControlAPIDiscover;
</ins><span class="cx">         int currentuserhandle;
</span><span class="cx">         int api_connected;
</span><span class="cx">         switch_file_t *fdesc[2];
</span><span class="lines">@@ -250,7 +250,7 @@
</span><span class="cx">         int tcp_cli_port;
</span><span class="cx">         int tcp_srv_port;
</span><span class="cx"> #endif
</span><del>-        struct SkypiaxHandles SkypiaxHandles;
</del><ins>+        struct CelliaxHandles CelliaxHandles;
</ins><span class="cx"> 
</span><span class="cx">         int interface_state;                /*!&lt; \brief 'state' of the interface (channel) */
</span><span class="cx">         char language[80];                        /*!&lt; \brief default Asterisk dialplan language for this interface */
</span><span class="lines">@@ -261,21 +261,21 @@
</span><span class="cx">         double playback_boost;
</span><span class="cx">         double capture_boost;
</span><span class="cx">         int stripmsd;
</span><del>-        char skype_call_id[512];
-        int skype_call_ongoing;
-        char skype_friends[4096];
-        char skype_fullname[512];
-        char skype_displayname[512];
-        int skype_callflow;                        /*!&lt; \brief 'callflow' of the skype interface (as opposed to phone interface) */
-        int skype;                                        /*!&lt; \brief config flag, bool, Skype support on this interface (0 if false, -1 if true) */
</del><ins>+        char celliax_call_id[512];
+        int celliax_call_ongoing;
+        char celliax_friends[4096];
+        char celliax_fullname[512];
+        char celliax_displayname[512];
+        int phone_callflow;                        /*!&lt; \brief 'callflow' of the celliax interface (as opposed to phone interface) */
+        int celliax;                                        /*!&lt; \brief config flag, bool, GSM support on this interface (0 if false, -1 if true) */
</ins><span class="cx">         int control_to_send;
</span><span class="cx"> #ifdef WIN32
</span><span class="cx">         switch_file_t *audiopipe[2];
</span><del>-        switch_file_t *audioskypepipe[2];
</del><ins>+        switch_file_t *audiocelliaxpipe[2];
</ins><span class="cx">         switch_file_t *celliax_sound_capt_fd;        /*!&lt; \brief file descriptor for sound capture dev */
</span><span class="cx"> #else                                                        /* WIN32 */
</span><span class="cx">         int audiopipe[2];
</span><del>-        int audioskypepipe[2];
</del><ins>+        int audiocelliaxpipe[2];
</ins><span class="cx">         int celliax_sound_capt_fd;        /*!&lt; \brief file descriptor for sound capture dev */
</span><span class="cx"> #endif                                                        /* WIN32 */
</span><span class="cx">         switch_thread_t *tcp_srv_thread;
</span><span class="lines">@@ -294,14 +294,14 @@
</span><span class="cx">         //int phonebook_number_lenght;
</span><span class="cx">         //int phonebook_text_lenght;
</span><span class="cx">         int celliax_dir_entry_extension_prefix;
</span><del>-        char skype_user[256];
-        char skype_password[256];
</del><ins>+        char celliax_user[256];
+        char celliax_password[256];
</ins><span class="cx">         char destination[256];
</span><span class="cx">         struct timeval answer_time;
</span><span class="cx"> 
</span><span class="cx">         struct timeval transfer_time;
</span><span class="cx">         char transfer_callid_number[50];
</span><del>-        char skype_transfer_call_id[512];
</del><ins>+        char celliax_transfer_call_id[512];
</ins><span class="cx">         int running;
</span><span class="cx">         unsigned long ib_calls;
</span><span class="cx">         unsigned long ob_calls;
</span><span class="lines">@@ -400,7 +400,6 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         struct timeval call_incoming_time;
</span><del>-        int phone_callflow;                        /*!&lt; \brief 'callflow' of the phone interface (as opposed to skype interface) */
</del><span class="cx">         switch_mutex_t *controldev_lock;
</span><span class="cx"> 
</span><span class="cx">         int phonebook_listing;
</span><span class="lines">@@ -455,13 +454,13 @@
</span><span class="cx"> void *celliax_do_tcp_cli_thread_func(void *obj);
</span><span class="cx"> void *SWITCH_THREAD_FUNC celliax_do_tcp_cli_thread(switch_thread_t *thread, void *obj);
</span><span class="cx"> 
</span><del>-void *celliax_do_skypeapi_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_skypeapi_thread(switch_thread_t *thread, void *obj);
</del><ins>+void *celliax_do_celliaxapi_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC celliax_do_celliaxapi_thread(switch_thread_t *thread, void *obj);
</ins><span class="cx"> int dtmf_received(private_t * tech_pvt, char *value);
</span><span class="cx"> int start_audio_threads(private_t * tech_pvt);
</span><span class="cx"> int new_inbound_channel(private_t * tech_pvt);
</span><span class="cx"> int outbound_channel_answered(private_t * tech_pvt);
</span><del>-//int celliax_signaling_write(private_t * tech_pvt, char *msg_to_skype);
</del><ins>+//int celliax_signaling_write(private_t * tech_pvt, char *msg_to_celliax);
</ins><span class="cx"> #if defined(WIN32) &amp;&amp; !defined(__CYGWIN__)
</span><span class="cx"> int celliax_pipe_read(switch_file_t *pipe, short *buf, int howmany);
</span><span class="cx"> int celliax_pipe_write(switch_file_t *pipe, short *buf, int howmany);
</span><span class="lines">@@ -522,16 +521,16 @@
</span><span class="cx"> //#define PUSHA_UNLOCKA(x)    pthread_cleanup_push(celliax_unlocka_log, (void *) x);
</span><span class="cx"> //#define POPPA_UNLOCKA(x)    pthread_cleanup_pop(0);
</span><span class="cx"> 
</span><del>-#define PUSHA_UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;PUSHA_UNLOCKA: %p\n&quot;, SKYPIAX_P_LOG, (void *)x);
-#define POPPA_UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;POPPA_UNLOCKA: %p\n&quot;, SKYPIAX_P_LOG, (void *)x);
-//#define LOKKA(x)    if(option_debug &gt; 100) ERRORA(&quot;LOKKA: %p\n&quot;, SKYPIAX_P_LOG, (void *)x);
</del><ins>+#define PUSHA_UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;PUSHA_UNLOCKA: %p\n&quot;, CELLIAX_P_LOG, (void *)x);
+#define POPPA_UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;POPPA_UNLOCKA: %p\n&quot;, CELLIAX_P_LOG, (void *)x);
+//#define LOKKA(x)    if(option_debug &gt; 100) ERRORA(&quot;LOKKA: %p\n&quot;, CELLIAX_P_LOG, (void *)x);
</ins><span class="cx"> #define LOKKA(x)    switch_mutex_lock(x);
</span><span class="cx"> #define UNLOCKA(x)  switch_mutex_unlock(x);
</span><del>-//#define UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;UNLOCKA: %p\n&quot;, SKYPIAX_P_LOG, (void *)x);
</del><ins>+//#define UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;UNLOCKA: %p\n&quot;, CELLIAX_P_LOG, (void *)x);
</ins><span class="cx"> 
</span><del>-#define celliax_queue_control(x, y) ERRORA(&quot;celliax_queue_control: %p, %d\n&quot;, SKYPIAX_P_LOG, (void *)x, y);
</del><ins>+#define celliax_queue_control(x, y) ERRORA(&quot;celliax_queue_control: %p, %d\n&quot;, CELLIAX_P_LOG, (void *)x, y);
</ins><span class="cx"> 
</span><del>-#define ast_setstate(x, y) ERRORA(&quot;ast_setstate: %p, %d\n&quot;, SKYPIAX_P_LOG, (void *)x, y);
</del><ins>+#define ast_setstate(x, y) ERRORA(&quot;ast_setstate: %p, %d\n&quot;, CELLIAX_P_LOG, (void *)x, y);
</ins><span class="cx"> 
</span><span class="cx"> int celliax_serial_read(private_t * tech_pvt);
</span><span class="cx"> int celliax_answer(private_t * tech_pvt);
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_celliaxcelliax_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c (14721 => 14722)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c        2009-09-01 19:49:14 UTC (rev 14721)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c        2009-09-01 20:14:09 UTC (rev 14722)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> extern switch_memory_pool_t *celliax_module_pool;
</span><span class="cx"> extern switch_endpoint_interface_t *celliax_endpoint_interface;
</span><span class="cx"> #endif /* ASTERISK */
</span><del>-//int samplerate_celliax = SAMPLERATE_SKYPIAX;
</del><ins>+//int samplerate_celliax = SAMPLERATE_CELLIAX;
</ins><span class="cx"> 
</span><span class="cx"> extern int running;
</span><span class="cx"> int celliax_dir_entry_extension = 1;
</span><span class="lines">@@ -40,14 +40,14 @@
</span><span class="cx"> #endif /* __CYGWIN__ */
</span><span class="cx">         fd = open(tech_pvt-&gt;controldevice_name, O_RDWR | O_NOCTTY | O_NONBLOCK);
</span><span class="cx">         if (fd == -1) {
</span><del>-                DEBUGA_SKYPE(&quot;serial error: %s\n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                DEBUGA_CELLIAX(&quot;serial error: %s\n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 tech_pvt-&gt;controldevfd = fd;
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx"> /*  flush it */
</span><span class="cx">         rt = tcflush(fd, TCIFLUSH);
</span><span class="cx">         if (rt == -1) {
</span><del>-                ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">         }
</span><span class="cx"> /*  attributes */
</span><span class="cx">         tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL;
</span><span class="lines">@@ -60,19 +60,19 @@
</span><span class="cx"> /*  set controldevice_speed */
</span><span class="cx">         rt = cfsetispeed(&amp;tp, tech_pvt-&gt;controldevice_speed);
</span><span class="cx">         if (rt == -1) {
</span><del>-                ERRORA(&quot;serial error: %s, speed was: %d&quot;, SKYPIAX_P_LOG, strerror(errno), tech_pvt-&gt;controldevice_speed);
</del><ins>+                ERRORA(&quot;serial error: %s, speed was: %d&quot;, CELLIAX_P_LOG, strerror(errno), tech_pvt-&gt;controldevice_speed);
</ins><span class="cx">         }
</span><span class="cx">         rt = cfsetospeed(&amp;tp, tech_pvt-&gt;controldevice_speed);
</span><span class="cx">         if (rt == -1) {
</span><del>-                ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">         }
</span><span class="cx"> /*  set port attributes */
</span><span class="cx">         if (tcsetattr(fd, TCSADRAIN, &amp;tp) == -1) {
</span><del>-                ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">         }
</span><span class="cx">         rt = tcsetattr(fd, TCSANOW, &amp;tp);
</span><span class="cx">         if (rt == -1) {
</span><del>-                ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">         }
</span><span class="cx">         unsigned int status = 0;
</span><span class="cx"> #ifndef __CYGWIN__
</span><span class="lines">@@ -93,10 +93,10 @@
</span><span class="cx">         ioctl(fd, TIOCMSET, &amp;status);
</span><span class="cx"> #endif /* __CYGWIN__ */
</span><span class="cx">         tech_pvt-&gt;controldevfd = fd;
</span><del>-        DEBUGA_SKYPE(&quot;Syncing Serial\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;Syncing Serial\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         rt = celliax_serial_sync(tech_pvt);
</span><span class="cx">         if (rt == -1) {
</span><del>-                ERRORA(&quot;Serial init error\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Serial init error\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx">         return (fd);
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> 
</span><span class="cx"> /* initial_pause? */
</span><span class="cx">         if (tech_pvt-&gt;at_initial_pause) {
</span><del>-                DEBUGA_SKYPE(&quot;sleeping for %d usec\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_initial_pause);
</del><ins>+                DEBUGA_CELLIAX(&quot;sleeping for %d usec\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_initial_pause);
</ins><span class="cx">                 usleep(tech_pvt-&gt;at_initial_pause);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_1)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_2)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_3)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_4)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_5)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -212,20 +212,20 @@
</span><span class="cx"> 
</span><span class="cx"> /* after_preinit_pause? */
</span><span class="cx">         if (tech_pvt-&gt;at_after_preinit_pause) {
</span><del>-                DEBUGA_SKYPE(&quot;sleeping for %d usec\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_after_preinit_pause);
</del><ins>+                DEBUGA_CELLIAX(&quot;sleeping for %d usec\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_after_preinit_pause);
</ins><span class="cx">                 usleep(tech_pvt-&gt;at_after_preinit_pause);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* phone, brother, art you alive? */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT&quot;);
</span><span class="cx">         if (res) {
</span><del>-                ERRORA(&quot;no response to AT\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no response to AT\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx">         /* for motorola, bring it back to &quot;normal&quot; mode if it happens to be in another mode */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+mode=0&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+mode=0 does not get OK from the phone. If it is NOT Motorola,&quot; &quot; no problem.\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+mode=0 does not get OK from the phone. If it is NOT Motorola,&quot; &quot; no problem.\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         usleep(50000);
</span><span class="cx">         /* for motorola end */
</span><span class="lines">@@ -233,19 +233,19 @@
</span><span class="cx">         /* reset AT configuration to phone default */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;ATZ&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;ATZ failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;ATZ failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* disable AT command echo */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;ATE0&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;ATE0 failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;ATE0 failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* disable extended error reporting */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMEE=0&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CMEE failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CMEE failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* various phone manufacturer identifier */
</span><span class="lines">@@ -256,108 +256,108 @@
</span><span class="cx">                 sprintf(at_command, &quot;ATI%d&quot;, i);
</span><span class="cx">                 res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</span><span class="cx">                 if (res) {
</span><del>-                        DEBUGA_SKYPE(&quot;ATI%d command failed, continue\n&quot;, SKYPIAX_P_LOG, i);
</del><ins>+                        DEBUGA_CELLIAX(&quot;ATI%d command failed, continue\n&quot;, CELLIAX_P_LOG, i);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* phone manufacturer */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGMI&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CGMI failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CGMI failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* phone model */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGMM&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CGMM failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CGMM failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGSN&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CGSN failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CGSN failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> /* this take a lot of time to complete on devices with slow serial link (eg.: 9600bps) */
</span><span class="cx">         /* signal incoming SMS with a +CMTI unsolicited msg */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CNMI=3,1,0,0,0&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 tech_pvt-&gt;sms_cnmi_not_supported = 1;
</span><span class="cx">                 tech_pvt-&gt;celliax_serial_sync_period = 30;
</span><span class="cx">         }
</span><span class="cx">         /* what is the Message Center address (number) to which the SMS has to be sent? */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCA?&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CSCA? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CSCA? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* what is the Message Format of SMSs? */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF?&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CMGF? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CMGF? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF=1&quot;);        //TODO: support phones that only accept pdu mode
</span><span class="cx">         if (res) {
</span><del>-                ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return RESULT_FAILURE;
</span><span class="cx">         }
</span><span class="cx">         /* what is the Charset of SMSs? */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS?&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CSCS? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CSCS? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         tech_pvt-&gt;no_ucs2 = 0;
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</span><span class="cx">         if (res) {
</span><del>-                WARNINGA(&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, let's try with 'GSM'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                WARNINGA(&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, let's try with 'GSM'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 tech_pvt-&gt;no_ucs2 = 1;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (tech_pvt-&gt;no_ucs2) {
</span><span class="cx">                 res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</span><span class="cx">                 if (res) {
</span><del>-                        WARNINGA(&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM)  do not got OK from the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        WARNINGA(&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM)  do not got OK from the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">                 //res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,16&quot;); //&quot;flash&quot;, class 0  sms 7 bit
</span><span class="cx">                 res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,0&quot;);        //normal, 7 bit message
</span><span class="cx">                 if (res) {
</span><del>-                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 //res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,20&quot;); //&quot;flash&quot;, class 0 sms 16 bit unicode
</span><span class="cx">                 res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,8&quot;);        //unicode, 16 bit message
</span><span class="cx">                 if (res) {
</span><del>-                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* is the unsolicited reporting of mobile equipment event supported? */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=?&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CMER=? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CMER=? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* request unsolicited reporting of mobile equipment indicators' events, to be screened by categories reported by +CIND=? */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=3,0,0,1&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CMER=? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CMER=? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* is the solicited reporting of mobile equipment indications supported? */
</span><span class="cx"> 
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CIND=?&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CIND=? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CIND=? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* is the unsolicited reporting of call monitoring supported? sony-ericsson specific */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=?&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT*ECAM=? failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT*ECAM=? failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* enable the unsolicited reporting of call monitoring. sony-ericsson specific */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=1&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT*ECAM=1 failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT*ECAM=1 failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 tech_pvt-&gt;at_has_ecam = 0;
</span><span class="cx">         } else {
</span><span class="cx">                 tech_pvt-&gt;at_has_ecam = 1;
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx">         /* disable unsolicited signaling of call list */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CLCC=0&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CLCC=0 failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CLCC=0 failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 tech_pvt-&gt;at_has_clcc = 0;
</span><span class="cx">         } else {
</span><span class="cx">                 tech_pvt-&gt;at_has_clcc = 1;
</span><span class="lines">@@ -375,14 +375,14 @@
</span><span class="cx">         /* give unsolicited caller id when incoming call */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CLIP=1&quot;);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+CLIP failed, continue\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+CLIP failed, continue\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* for motorola */
</span><span class="cx">         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+MCST=1&quot;);        /* motorola call control codes
</span><span class="cx">                                                                                                                                    (to know when call is disconnected (they
</span><span class="cx">                                                                                                                                    don't give you &quot;no carrier&quot;) */
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE(&quot;AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,&quot; &quot; no problem.\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,&quot; &quot; no problem.\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* for motorola end */
</span><span class="cx"> 
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_1)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_2)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_3)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_4)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_5)) {
</span><span class="cx">                         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
</del><ins>+                                DEBUGA_CELLIAX(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         break;
</span><span class="lines">@@ -466,7 +466,7 @@
</span><span class="cx">         FD_ZERO(&amp;read_fds);
</span><span class="cx">         FD_SET(tech_pvt-&gt;controldevfd, &amp;read_fds);
</span><span class="cx"> 
</span><del>-        //NOTICA (&quot; INSIDE this celliax_serial_device %s \n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+        //NOTICA (&quot; INSIDE this celliax_serial_device %s \n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</ins><span class="cx">         tmp_answer_ptr = tmp_answer;
</span><span class="cx">         memset(tmp_answer, 0, sizeof(char) * AT_BUFSIZ);
</span><span class="cx"> 
</span><span class="lines">@@ -483,20 +483,20 @@
</span><span class="cx">                 if (read_count == 0) {
</span><span class="cx">                         ERRORA
</span><span class="cx">                                 (&quot;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&quot;,
</span><del>-                                 SKYPIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+                                 CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</ins><span class="cx">                         tech_pvt-&gt;controldev_dead = 1;
</span><span class="cx">                         close(tech_pvt-&gt;controldevfd);
</span><span class="cx">                         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">                         if (tech_pvt-&gt;owner) {
</span><del>-                                tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
-                                celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
+                                celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                         }
</span><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (option_debug &gt; 90) {
</span><del>-                        //DEBUGA_SKYPE(&quot;1 read %d bytes, --|%s|--\n&quot;, SKYPIAX_P_LOG, read_count, tmp_answer_ptr);
-                        //DEBUGA_SKYPE(&quot;2 read %d bytes, --|%s|--\n&quot;, SKYPIAX_P_LOG, read_count, tmp_answer);
</del><ins>+                        //DEBUGA_CELLIAX(&quot;1 read %d bytes, --|%s|--\n&quot;, CELLIAX_P_LOG, read_count, tmp_answer_ptr);
+                        //DEBUGA_CELLIAX(&quot;2 read %d bytes, --|%s|--\n&quot;, CELLIAX_P_LOG, read_count, tmp_answer);
</ins><span class="cx">                 }
</span><span class="cx">                 tmp_answer_ptr = tmp_answer_ptr + read_count;
</span><span class="cx"> 
</span><span class="lines">@@ -511,7 +511,7 @@
</span><span class="cx">                         if (strlen(token_ptr) &gt; AT_MESG_MAX_LENGTH) {
</span><span class="cx">                                 WARNINGA
</span><span class="cx">                                         (&quot;AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n&quot;,
</span><del>-                                         SKYPIAX_P_LOG, token_ptr, tech_pvt-&gt;line_array.result[la_counter]);
</del><ins>+                                         CELLIAX_P_LOG, token_ptr, tech_pvt-&gt;line_array.result[la_counter]);
</ins><span class="cx">                         }
</span><span class="cx">                         la_counter++;
</span><span class="cx">                         while ((token_ptr = strtok(NULL, &quot;\n\r&quot;))) {
</span><span class="lines">@@ -520,7 +520,7 @@
</span><span class="cx">                                 if (strlen(token_ptr) &gt; AT_MESG_MAX_LENGTH) {
</span><span class="cx">                                         WARNINGA
</span><span class="cx">                                                 (&quot;AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n&quot;,
</span><del>-                                                 SKYPIAX_P_LOG, token_ptr, tech_pvt-&gt;line_array.result[la_counter]);
</del><ins>+                                                 CELLIAX_P_LOG, token_ptr, tech_pvt-&gt;line_array.result[la_counter]);
</ins><span class="cx">                                 }
</span><span class="cx">                                 la_counter++;
</span><span class="cx">                         }
</span><span class="lines">@@ -529,9 +529,9 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (expected_string &amp;&amp; !expect_crlf) {
</span><del>-                        DEBUGA_SKYPE
</del><ins>+                        DEBUGA_CELLIAX
</ins><span class="cx">                                 (&quot;last_line_ptr=|%s|, expected_string=|%s|, expect_crlf=%d, memcmp(last_line_ptr, expected_string, strlen(expected_string)) = %d\n&quot;,
</span><del>-                                 SKYPIAX_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr, expected_string, strlen(expected_string)));
</del><ins>+                                 CELLIAX_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr, expected_string, strlen(expected_string)));
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (expected_string &amp;&amp; !expect_crlf &amp;&amp; !memcmp(last_line_ptr, expected_string, strlen(expected_string))
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx">                 /* let's list the complete lines read so far, without re-listing the lines that has yet been listed */
</span><span class="cx">                 if (option_debug &gt; 1) {
</span><span class="cx">                         for (i = la_read; i &lt; la_counter; i++)
</span><del>-                                DEBUGA_SKYPE(&quot;Read line %d: |%s|\n&quot;, SKYPIAX_P_LOG, i, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                DEBUGA_CELLIAX(&quot;Read line %d: |%s|\n&quot;, CELLIAX_P_LOG, i, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 /* 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 */
</span><span class="lines">@@ -560,8 +560,8 @@
</span><span class="cx">                                 /* give CALLID (+CLIP) a chance, wait for the next RING before answering */
</span><span class="cx">                                 if (tech_pvt-&gt;phone_callflow == CALLFLOW_INCOMING_RING) {
</span><span class="cx">                                         /* we're at the second ring, set the interface state, will be answered by celliax_do_monitor */
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| got second RING\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                        tech_pvt-&gt;interface_state = SKYPIAX_STATE_RING;
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| got second RING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                        tech_pvt-&gt;interface_state = CELLIAX_STATE_RING;
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         /* we're at the first ring, so there is no CALLID yet thus clean the previous one 
</span><span class="cx">                                            just in case we don't receive the caller identification in this new call */
</span><span class="lines">@@ -570,14 +570,14 @@
</span><span class="cx">                                         /* only send AT+CLCC? if the device previously reported its support */
</span><span class="cx">                                         if (tech_pvt-&gt;at_has_clcc != 0) {
</span><span class="cx">                                                 /* we're at the first ring, try to get CALLID (with +CLCC) */
</span><del>-                                                DEBUGA_SKYPE(&quot;|%s| got first RING, sending AT+CLCC?\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;|%s| got first RING, sending AT+CLCC?\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 res = celliax_serial_write_AT_noack(tech_pvt, &quot;AT+CLCC?&quot;);
</span><span class="cx">                                                 if (res) {
</span><del>-                                                        ERRORA(&quot;AT+CLCC? (call list) was not correctly sent to the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                        ERRORA(&quot;AT+CLCC? (call list) was not correctly sent to the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                                 }
</span><span class="cx">                                         } else {
</span><del>-                                                DEBUGA_SKYPE(&quot;|%s| got first RING, but not sending AT+CLCC? as this device &quot;
-                                                                         &quot;seems not to support\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;|%s| got first RING, but not sending AT+CLCC? as this device &quot;
+                                                                         &quot;seems not to support\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><span class="lines">@@ -612,7 +612,7 @@
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>-                                DEBUGA_SKYPE(&quot;|%s| CLCC CALLID: name is %s, number is %s\n&quot;, SKYPIAX_P_LOG,
</del><ins>+                                DEBUGA_CELLIAX(&quot;|%s| CLCC CALLID: name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</ins><span class="cx">                                                          tech_pvt-&gt;line_array.result[i],
</span><span class="cx">                                                          tech_pvt-&gt;callid_name[0] ? tech_pvt-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                                                          tech_pvt-&gt;callid_number[0] ? tech_pvt-&gt;callid_number : &quot;not available&quot;);
</span><span class="lines">@@ -646,15 +646,15 @@
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_RING) {
</del><ins>+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_RING) {
</ins><span class="cx">                                         gettimeofday(&amp;(tech_pvt-&gt;call_incoming_time), NULL);
</span><del>-                                        DEBUGA_SKYPE(&quot;SKYPIAX_STATE_RING call_incoming_time.tv_sec=%ld\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;CELLIAX_STATE_RING call_incoming_time.tv_sec=%ld\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec);
</ins><span class="cx"> 
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                tech_pvt-&gt;interface_state = SKYPIAX_STATE_RING;
</del><ins>+                                tech_pvt-&gt;interface_state = CELLIAX_STATE_RING;
</ins><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>-                                DEBUGA_SKYPE(&quot;|%s| CLIP INCOMING CALLID: name is %s, number is %s\n&quot;, SKYPIAX_P_LOG,
</del><ins>+                                DEBUGA_CELLIAX(&quot;|%s| CLIP INCOMING CALLID: name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</ins><span class="cx">                                                 tech_pvt-&gt;line_array.result[i],
</span><span class="cx">                                                 (strlen(tech_pvt-&gt;callid_name) &amp;&amp; tech_pvt-&gt;callid_name[0] != 1) ? tech_pvt-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                                                 strlen(tech_pvt-&gt;callid_number) ? tech_pvt-&gt;callid_number : &quot;not available&quot;);
</span><span class="lines">@@ -665,9 +665,11 @@
</span><span class="cx"> 
</span><span class="cx">                                 if( !strlen(tech_pvt-&gt;callid_name) &amp;&amp; tech_pvt-&gt;callid_name[0] != 1) {
</span><span class="cx">                                         strncpy(tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number, sizeof(tech_pvt-&gt;callid_name)) ;
</span><ins>+                                        //strncpy(tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number, sizeof(tech_pvt-&gt;callid_name)) ;
+                                        snprintf(tech_pvt-&gt;callid_name, sizeof(tech_pvt-&gt;callid_name), &quot;Celliax: %s&quot;, tech_pvt-&gt;callid_number);
</ins><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                DEBUGA_SKYPE(&quot;|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n&quot;, SKYPIAX_P_LOG,
</del><ins>+                                DEBUGA_CELLIAX(&quot;|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</ins><span class="cx">                                                 tech_pvt-&gt;line_array.result[i],
</span><span class="cx">                                                 tech_pvt-&gt;callid_name,
</span><span class="cx">                                                 tech_pvt-&gt;callid_number);
</span><span class="lines">@@ -676,36 +678,36 @@
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;BUSY&quot;) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_LINEBUSY;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_LINEBUSY\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        ast_setstate(tech_pvt-&gt;owner, SKYPIAX_STATE_BUSY);
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_BUSY);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_LINEBUSY\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        ast_setstate(tech_pvt-&gt;owner, CELLIAX_STATE_BUSY);
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_BUSY);
</ins><span class="cx">                                 } else {
</span><del>-                                        ERRORA(&quot;Why BUSY now?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                        ERRORA(&quot;Why BUSY now?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;NO ANSWER&quot;) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_NOANSWER;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_NOANSWER\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_NO_ANSWER;
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_NOANSWER\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_NO_ANSWER;
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                 } else {
</span><del>-                                        ERRORA(&quot;Why NO ANSWER now?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                        ERRORA(&quot;Why NO ANSWER now?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;NO CARRIER&quot;) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_NOCARRIER;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_NOCARRIER\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN) {
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_NOCARRIER\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
</ins><span class="cx">                                         //cicopet
</span><span class="cx">                                         celliax_hangup(tech_pvt);
</span><del>-                                        //tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
-                                        //celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                        //tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
+                                        //celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                 } else {
</span><del>-                                        ERRORA(&quot;Why NO CARRIER now?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                        ERRORA(&quot;Why NO CARRIER now?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -716,27 +718,27 @@
</span><span class="cx"> 
</span><span class="cx">                                 err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][6], &quot;%d,%d&quot;, &amp;power_supply, &amp;battery_strenght);
</span><span class="cx">                                 if (err &lt; 2) {
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                         err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][5], &quot;%d,%d&quot;, &amp;power_supply, &amp;battery_strenght);
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, SKYPIAX_P_LOG,
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, CELLIAX_P_LOG,
</ins><span class="cx">                                                                  tech_pvt-&gt;line_array.result[i], power_supply ? &quot;power supply&quot; : &quot;battery&quot;, battery_strenght);
</span><span class="cx"> 
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 if (err &lt; 2) {
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| is not formatted as: |+CBC:xx,yy| giving up\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| is not formatted as: |+CBC:xx,yy| giving up\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 else {
</span><span class="cx">                                         if (option_debug &gt; 1)
</span><del>-                                                DEBUGA_SKYPE(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, SKYPIAX_P_LOG,
</del><ins>+                                                DEBUGA_CELLIAX(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, CELLIAX_P_LOG,
</ins><span class="cx">                                                                          tech_pvt-&gt;line_array.result[i], power_supply ? &quot;power supply&quot; : &quot;battery&quot;, battery_strenght);
</span><span class="cx">                                         if (!power_supply) {
</span><span class="cx">                                                 if (battery_strenght &lt; 10) {
</span><del>-                                                        ERRORA(&quot;|%s| BATTERY ALMOST EXHAUSTED\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        ERRORA(&quot;|%s| BATTERY ALMOST EXHAUSTED\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 } else if (battery_strenght &lt; 20) {
</span><del>-                                                        WARNINGA(&quot;|%s| BATTERY LOW\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        WARNINGA(&quot;|%s| BATTERY LOW\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                                 }
</span><span class="cx"> 
</span><span class="lines">@@ -752,16 +754,16 @@
</span><span class="cx"> 
</span><span class="cx">                                 err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][6], &quot;%d,%d&quot;, &amp;signal_quality, &amp;ber);
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i], signal_quality, ber);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i], signal_quality, ber);
</ins><span class="cx">                                 if (err &lt; 2) {
</span><del>-                                        ERRORA(&quot;|%s| is not formatted as: |+CSQ: xx,yy|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+CSQ: xx,yy|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 } else {
</span><span class="cx">                                         if (signal_quality &lt; 11 || signal_quality == 99) {
</span><span class="cx">                                                 WARNINGA
</span><span class="cx">                                                         (&quot;|%s| CELLPHONE GETS ALMOST NO SIGNAL, consider to move it or additional antenna\n&quot;,
</span><del>-                                                         SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                         CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                         } else if (signal_quality &lt; 15) {
</span><del>-                                                WARNINGA(&quot;|%s| CELLPHONE GETS SIGNAL LOW\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                WARNINGA(&quot;|%s| CELLPHONE GETS SIGNAL LOW\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                         }
</span><span class="cx"> 
</span><span class="lines">@@ -772,9 +774,9 @@
</span><span class="cx">                                 int err;
</span><span class="cx"> 
</span><span class="cx">                                 err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][7], &quot;%s&quot;, tech_pvt-&gt;at_cmgw);
</span><del>-                                DEBUGA_SKYPE(&quot;|%s| +CMGW: %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_cmgw);
</del><ins>+                                DEBUGA_CELLIAX(&quot;|%s| +CMGW: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_cmgw);
</ins><span class="cx">                                 if (err &lt; 1) {
</span><del>-                                        ERRORA(&quot;|%s| is not formatted as: |+CMGW: xxxx|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+CMGW: xxxx|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                         }
</span><span class="lines">@@ -783,12 +785,12 @@
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_call_idle) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_IDLE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        DEBUGA_SKYPE(&quot;just received a remote HANGUP\n&quot;, SKYPIAX_P_LOG);
-                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_NORMAL;
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
-                                        DEBUGA_SKYPE(&quot;just sent SKYPIAX_CONTROL_HANGUP\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_IDLE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        DEBUGA_CELLIAX(&quot;just received a remote HANGUP\n&quot;, CELLIAX_P_LOG);
+                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_NORMAL;
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
+                                        DEBUGA_CELLIAX(&quot;just sent CELLIAX_CONTROL_HANGUP\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -797,60 +799,60 @@
</span><span class="cx">                                 //char list_command[64];
</span><span class="cx"> 
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_INCOMING\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_INCOMING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                 if (tech_pvt-&gt;phone_callflow != CALLFLOW_CALL_INCOMING &amp;&amp; tech_pvt-&gt;phone_callflow != CALLFLOW_INCOMING_RING) {
</span><span class="cx">                                         //mark the time of CALLFLOW_CALL_INCOMING
</span><span class="cx">                                         gettimeofday(&amp;(tech_pvt-&gt;call_incoming_time), NULL);
</span><span class="cx">                                         tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_INCOMING;
</span><del>-                                        DEBUGA_SKYPE(&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec);
</ins><span class="cx"> 
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_call_active) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><del>-                                DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_ACTIVE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_ACTIVE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                 if (tech_pvt-&gt;interface_state == CALLFLOW_CALL_DIALING || tech_pvt-&gt;interface_state == CALLFLOW_STATUS_EARLYMEDIA) {
</span><del>-                                        DEBUGA_PBX(&quot;just received a remote ANSWER\n&quot;, SKYPIAX_P_LOG);
-                                        if (tech_pvt-&gt;phone_callflow == SKYPIAX_STATE_UP) {
-                                                //celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_RINGING);
-                                                DEBUGA_PBX(&quot;just sent SKYPIAX_CONTROL_RINGING\n&quot;, SKYPIAX_P_LOG);
-                                                DEBUGA_PBX(&quot;going to send SKYPIAX_CONTROL_ANSWER\n&quot;, SKYPIAX_P_LOG);
-                                                //celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_ANSWER);
</del><ins>+                                        DEBUGA_PBX(&quot;just received a remote ANSWER\n&quot;, CELLIAX_P_LOG);
+                                        if (tech_pvt-&gt;phone_callflow == CELLIAX_STATE_UP) {
+                                                //celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_RINGING);
+                                                DEBUGA_PBX(&quot;just sent CELLIAX_CONTROL_RINGING\n&quot;, CELLIAX_P_LOG);
+                                                DEBUGA_PBX(&quot;going to send CELLIAX_CONTROL_ANSWER\n&quot;, CELLIAX_P_LOG);
+                                                //celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_ANSWER);
</ins><span class="cx">                                                 tech_pvt-&gt;interface_state = CALLFLOW_CALL_REMOTEANSWER;
</span><del>-                                                DEBUGA_PBX(&quot;just sent SKYPIAX_CONTROL_ANSWER\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                DEBUGA_PBX(&quot;just sent CELLIAX_CONTROL_ANSWER\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><span class="cx">                                 }
</span><del>-                                //tech_pvt-&gt;interface_state = SKYPIAX_STATE_UP;
-                                //DEBUGA_PBX(&quot;just interface_state UP\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                //tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
+                                //DEBUGA_PBX(&quot;just interface_state UP\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_call_calling) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_DIALING\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_DIALING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_call_failed) == 0)) {
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_FAILED;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_FAILED\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_FAILED\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CSCA:&quot;, 6) == 0)) {        //TODO SMS FIXME in config!
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CSCA: Message Center Address!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CSCA: Message Center Address!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMGF:&quot;, 6) == 0)) {        //TODO SMS FIXME in config!
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMGF: Message Format!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMGF: Message Format!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMTI:&quot;, 6) == 0)) {        //TODO SMS FIXME in config!
</span><span class="lines">@@ -859,13 +861,13 @@
</span><span class="cx"> 
</span><span class="cx">                                 //FIXME all the following commands in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMTI: Incoming SMS!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMTI: Incoming SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                 err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][12], &quot;%d&quot;, &amp;pos);
</span><span class="cx">                                 if (err &lt; 1) {
</span><del>-                                        ERRORA(&quot;|%s| is not formatted as: |+CMTI: \&quot;MT\&quot;,xx|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+CMTI: \&quot;MT\&quot;,xx|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 } else {
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMTI: Incoming SMS in position: %d!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i], pos);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMTI: Incoming SMS in position: %d!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i], pos);
</ins><span class="cx">                                         tech_pvt-&gt;unread_sms_msg_id = pos;
</span><span class="cx">                                         usleep(1000);
</span><span class="cx"> 
</span><span class="lines">@@ -875,7 +877,7 @@
</span><span class="cx">                                                 if (tech_pvt-&gt;no_ucs2 == 0) {
</span><span class="cx">                                                         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</span><span class="cx">                                                         if (res) {
</span><del>-                                                                ERRORA(&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, continuing\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                                ERRORA(&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                                                 //memset(tech_pvt-&gt;sms_message, 0, sizeof(tech_pvt-&gt;sms_message));
</span><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="lines">@@ -888,18 +890,18 @@
</span><span class="cx">                                                 res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</span><span class="cx">                                                 tech_pvt-&gt;reading_sms_msg = 0;
</span><span class="cx">                                                 if (res) {
</span><del>-                                                        ERRORA(&quot;AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;, SKYPIAX_P_LOG, at_command);
</del><ins>+                                                        ERRORA(&quot;AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;, CELLIAX_P_LOG, at_command);
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</span><span class="cx">                                                 if (res) {
</span><del>-                                                        ERRORA(&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM) do not got OK from the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                        ERRORA(&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM) do not got OK from the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 memset(at_command, 0, sizeof(at_command));
</span><span class="cx">                                                 sprintf(at_command, &quot;AT+CMGD=%d&quot;, tech_pvt-&gt;unread_sms_msg_id);        /* delete the message */
</span><span class="cx">                                                 tech_pvt-&gt;unread_sms_msg_id = 0;
</span><span class="cx">                                                 res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</span><span class="cx">                                                 if (res) {
</span><del>-                                                        ERRORA(&quot;AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;, SKYPIAX_P_LOG, at_command);
</del><ins>+                                                        ERRORA(&quot;AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;, CELLIAX_P_LOG, at_command);
</ins><span class="cx">                                                 }
</span><span class="cx"> 
</span><span class="cx">                                                 if (strlen(tech_pvt-&gt;sms_message)) {
</span><span class="lines">@@ -912,7 +914,7 @@
</span><span class="cx">                                                                 char *arg1[] = { tech_pvt-&gt;sms_receiving_program, (char *) NULL };
</span><span class="cx">                                                                 int i;
</span><span class="cx"> 
</span><del>-                                                                NOTICA(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;sms_message);
</del><ins>+                                                                NOTICA(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;sms_message);
</ins><span class="cx">                                                                 pipe(fd1);
</span><span class="cx">                                                                 pid1 = fork();
</span><span class="cx"> 
</span><span class="lines">@@ -927,7 +929,7 @@
</span><span class="cx">                                                                         if (err) {
</span><span class="cx">                                                                                 ERRORA
</span><span class="cx">                                                                                         (&quot;'sms_receiving_program' is set in config file to '%s', and it gave us back this error: %d, (%s). SMS received was:---%s---\n&quot;,
</span><del>-                                                                                         SKYPIAX_P_LOG, tech_pvt-&gt;sms_receiving_program, err, strerror(errno), tech_pvt-&gt;sms_message);
</del><ins>+                                                                                         CELLIAX_P_LOG, tech_pvt-&gt;sms_receiving_program, err, strerror(errno), tech_pvt-&gt;sms_message);
</ins><span class="cx">                                                                         }
</span><span class="cx">                                                                         close(fd1[0]);        // close output pipe side
</span><span class="cx">                                                                 }
</span><span class="lines">@@ -941,15 +943,15 @@
</span><span class="cx">                                                         } else {
</span><span class="cx">                                                                 ERRORA
</span><span class="cx">                                                                         (&quot;got SMS incoming message, but 'sms_receiving_program' is not set in config file. SMS received was:---%s---\n&quot;,
</span><del>-                                                                         SKYPIAX_P_LOG, tech_pvt-&gt;sms_message);
</del><ins>+                                                                         CELLIAX_P_LOG, tech_pvt-&gt;sms_message);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx"> #if 1                                                        //is this one needed? maybe it can interrupt an incoming call that is just to announce itself
</span><del>-                                                if (tech_pvt-&gt;phone_callflow == CALLFLOW_CALL_IDLE &amp;&amp; tech_pvt-&gt;interface_state == SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner == NULL) {
</del><ins>+                                                if (tech_pvt-&gt;phone_callflow == CALLFLOW_CALL_IDLE &amp;&amp; tech_pvt-&gt;interface_state == CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner == NULL) {
</ins><span class="cx">                                                         /* we're not in a call, neither calling */
</span><span class="cx">                                                         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</span><span class="cx">                                                         if (res) {
</span><del>-                                                                ERRORA(&quot;AT+CKPD=\&quot;EEE\&quot; (cellphone screen back to user) do not got OK from the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                                ERRORA(&quot;AT+CKPD=\&quot;EEE\&quot; (cellphone screen back to user) do not got OK from the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx"> #endif
</span><span class="lines">@@ -964,35 +966,35 @@
</span><span class="cx">                                 //int unread_msg_id=0;
</span><span class="cx"> 
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +MMGL: Listing Motorola SMSs!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +MMGL: Listing Motorola SMSs!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                 err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][7], &quot;%d&quot;, &amp;tech_pvt-&gt;unread_sms_msg_id);
</span><span class="cx">                                 if (err &lt; 1) {
</span><del>-                                        ERRORA(&quot;|%s| is not formatted as: |+MMGL: xx|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+MMGL: xx|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMGL:&quot;, 6) == 0)) {        //TODO  SMS FIXME in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMGL: Listing SMSs!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMGL: Listing SMSs!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx">                         if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+MMGR:&quot;, 6) == 0)) {        //TODO MOTOROLA SMS FIXME in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +MMGR: Reading Motorola SMS!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +MMGR: Reading Motorola SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 if (tech_pvt-&gt;reading_sms_msg)
</span><span class="cx">                                         tech_pvt-&gt;reading_sms_msg++;
</span><span class="cx">                         }
</span><span class="cx">                         if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMGR: \&quot;STO U&quot;, 13) == 0)) {        //TODO  SMS FIXME in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading stored UNSENT SMS!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMGR: Reading stored UNSENT SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         } else if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMGR: \&quot;STO S&quot;, 13) == 0)) {        //TODO  SMS FIXME in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading stored SENT SMS!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMGR: Reading stored SENT SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         } else if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMGR: \&quot;REC R&quot;, 13) == 0)) {        //TODO  SMS FIXME in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading received READ SMS!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMGR: Reading received READ SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         } else if ((strncmp(tech_pvt-&gt;line_array.result[i], &quot;+CMGR: \&quot;REC U&quot;, 13) == 0)) {        //TODO  SMS FIXME in config!
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading received UNREAD SMS!\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| +CMGR: Reading received UNREAD SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 if (tech_pvt-&gt;reading_sms_msg)
</span><span class="cx">                                         tech_pvt-&gt;reading_sms_msg++;
</span><span class="cx">                         }
</span><span class="lines">@@ -1000,34 +1002,34 @@
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;+MCST: 17&quot;) == 0)) {        /* motorola call processing unsolicited messages */
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_INFLUX;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_INFLUX\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_INFLUX\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;+MCST: 68&quot;) == 0)) {        /* motorola call processing unsolicited messages */
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_NOSERVICE;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_NOSERVICE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_NOSERVICE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;+MCST: 70&quot;) == 0)) {        /* motorola call processing unsolicited messages */
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_OUTGOINGRESTRICTED;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;+MCST: 72&quot;) == 0)) {        /* motorola call processing unsolicited messages */
</span><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_SECURITYFAIL;
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_SECURITYFAIL\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
-                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
-                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| CALLFLOW_CALL_SECURITYFAIL\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
+                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1037,7 +1039,7 @@
</span><span class="cx">                                         int err, first_entry, last_entry, number_lenght, text_lenght;
</span><span class="cx"> 
</span><span class="cx">                                         if (option_debug)
</span><del>-                                                DEBUGA_SKYPE(&quot;phonebook struct: |%s|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;phonebook struct: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                         err = sscanf(&amp;tech_pvt-&gt;line_array.result[i][8], &quot;%d-%d),%d,%d&quot;, &amp;first_entry, &amp;last_entry, &amp;number_lenght, &amp;text_lenght);
</span><span class="cx">                                         if (err &lt; 4) {
</span><span class="lines">@@ -1048,13 +1050,13 @@
</span><span class="cx">                                         if (err &lt; 4) {
</span><span class="cx">                                                 ERRORA
</span><span class="cx">                                                         (&quot;phonebook struct: |%s| is nor formatted as: |+CPBR: (1-750),40,14| neither as: |+CPBR: 1-750,40,14|\n&quot;,
</span><del>-                                                         SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                         CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                         } else {
</span><span class="cx"> 
</span><span class="cx">                                                 if (option_debug)
</span><del>-                                                        DEBUGA_SKYPE
</del><ins>+                                                        DEBUGA_CELLIAX
</ins><span class="cx">                                                                 (&quot;First entry: %d, last entry: %d, phone number max lenght: %d, text max lenght: %d\n&quot;,
</span><del>-                                                                 SKYPIAX_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
</del><ins>+                                                                 CELLIAX_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
</ins><span class="cx">                                                 tech_pvt-&gt;phonebook_first_entry = first_entry;
</span><span class="cx">                                                 tech_pvt-&gt;phonebook_last_entry = last_entry;
</span><span class="cx">                                                 tech_pvt-&gt;phonebook_number_lenght = number_lenght;
</span><span class="lines">@@ -1070,18 +1072,18 @@
</span><span class="cx">                                                 char entry_text[256];
</span><span class="cx"> 
</span><span class="cx">                                                 if (option_debug)
</span><del>-                                                        DEBUGA_SKYPE(&quot;phonebook entry: |%s|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                                 err =
</span><span class="cx">                                                         sscanf(&amp;tech_pvt-&gt;line_array.result[i][7], &quot;%d,\&quot;%255[0-9+]\&quot;,%d,\&quot;%255[^\&quot;]\&quot;&quot;, &amp;entry_id, entry_number, &amp;entry_type, entry_text);
</span><span class="cx">                                                 if (err &lt; 4) {
</span><span class="cx">                                                         ERRORA
</span><span class="cx">                                                                 (&quot;err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\&quot;+39025458068\&quot;,145,\&quot;ciao a tutti\&quot;|\n&quot;,
</span><del>-                                                                 SKYPIAX_P_LOG, err, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                                 CELLIAX_P_LOG, err, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 } else {
</span><span class="cx">                                                         //TODO: sanitize entry_text
</span><span class="cx">                                                         if (option_debug)
</span><del>-                                                                DEBUGA_SKYPE(&quot;Number: %s, Text: %s, Type: %d\n&quot;, SKYPIAX_P_LOG, entry_number, entry_text, entry_type);
</del><ins>+                                                                DEBUGA_CELLIAX(&quot;Number: %s, Text: %s, Type: %d\n&quot;, CELLIAX_P_LOG, entry_number, entry_text, entry_type);
</ins><span class="cx">                                                         /* write entry in phonebook file */
</span><span class="cx">                                                         if (tech_pvt-&gt;phonebook_writing_fp) {
</span><span class="cx">                                                                 celliax_dir_entry_extension++;
</span><span class="lines">@@ -1106,34 +1108,34 @@
</span><span class="cx">                                                 char entry_text[256] = &quot;&quot;;
</span><span class="cx"> 
</span><span class="cx">                                                 if (option_debug)
</span><del>-                                                        DEBUGA_SKYPE(&quot;phonebook entry: |%s|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                                 err =
</span><span class="cx">                                                         sscanf(&amp;tech_pvt-&gt;line_array.result[i][7], &quot;%d,\&quot;%255[0-9+]\&quot;,%d,\&quot;%255[^\&quot;]\&quot;&quot;, &amp;entry_id, entry_number, &amp;entry_type, entry_text);
</span><span class="cx">                                                 if (err &lt; 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
</span><span class="cx">                                                         ERRORA
</span><span class="cx">                                                                 (&quot;err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\&quot;+39025458068\&quot;,145,\&quot;ciao a tutti\&quot;|\n&quot;,
</span><del>-                                                                 SKYPIAX_P_LOG, err, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                                 CELLIAX_P_LOG, err, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 } else {
</span><span class="cx">                                                         //TODO: sanitize entry_text
</span><span class="cx"> 
</span><span class="cx">                                                         if (option_debug)
</span><del>-                                                                DEBUGA_SKYPE(&quot;Number: %s, Text: %s, Type: %d\n&quot;, SKYPIAX_P_LOG, entry_number, entry_text, entry_type);
</del><ins>+                                                                DEBUGA_CELLIAX(&quot;Number: %s, Text: %s, Type: %d\n&quot;, CELLIAX_P_LOG, entry_number, entry_text, entry_type);
</ins><span class="cx">                                                         memset(tech_pvt-&gt;callid_name, 0, sizeof(tech_pvt-&gt;callid_name));
</span><span class="cx">                                                         memset(tech_pvt-&gt;callid_number, 0, sizeof(tech_pvt-&gt;callid_number));
</span><span class="cx">                                                         strncpy(tech_pvt-&gt;callid_name, entry_text, sizeof(tech_pvt-&gt;callid_name));
</span><span class="cx">                                                         strncpy(tech_pvt-&gt;callid_number, entry_number, sizeof(tech_pvt-&gt;callid_number));
</span><span class="cx">                                                         if (option_debug)
</span><del>-                                                                DEBUGA_SKYPE(&quot;incoming callid: Text: %s, Number: %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number);
</del><ins>+                                                                DEBUGA_CELLIAX(&quot;incoming callid: Text: %s, Number: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number);
</ins><span class="cx"> 
</span><del>-                                                        DEBUGA_SKYPE(&quot;|%s| CPBR INCOMING CALLID: name is %s, number is %s\n&quot;,
-                                                                                 SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i],
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;|%s| CPBR INCOMING CALLID: name is %s, number is %s\n&quot;,
+                                                                                 CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i],
</ins><span class="cx">                                                                                  tech_pvt-&gt;callid_name[0] != 1 ? tech_pvt-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                                                                                  tech_pvt-&gt;callid_number[0] ? tech_pvt-&gt;callid_number : &quot;not available&quot;);
</span><span class="cx"> 
</span><span class="cx">                                                         /* mark the time of RING */
</span><span class="cx">                                                         gettimeofday(&amp;(tech_pvt-&gt;ringtime), NULL);
</span><del>-                                                        tech_pvt-&gt;interface_state = SKYPIAX_STATE_RING;
</del><ins>+                                                        tech_pvt-&gt;interface_state = CELLIAX_STATE_RING;
</ins><span class="cx">                                                         tech_pvt-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><span class="cx"> 
</span><span class="cx">                                                 }
</span><span class="lines">@@ -1141,7 +1143,7 @@
</span><span class="cx">                                         }
</span><span class="cx"> 
</span><span class="cx">                                         else {
</span><del>-                                                DEBUGA_SKYPE(&quot;phonebook entry: |%s|\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="lines">@@ -1157,66 +1159,66 @@
</span><span class="cx">                                         switch (ccstatus) {
</span><span class="cx">                                         case 0:
</span><span class="cx">                                                 if (tech_pvt-&gt;owner) {
</span><del>-                                                        ast_setstate(tech_pvt-&gt;owner, SKYPIAX_STATE_DOWN);
-                                                        tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_NORMAL;
-                                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, CELLIAX_STATE_DOWN);
+                                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_NORMAL;
+                                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><del>-                                                tech_pvt-&gt;interface_state = SKYPIAX_STATE_DOWN;
</del><ins>+                                                tech_pvt-&gt;interface_state = CELLIAX_STATE_DOWN;
</ins><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 1:
</span><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 2:
</span><span class="cx">                                                 if (tech_pvt-&gt;owner) {
</span><del>-                                                        ast_setstate(tech_pvt-&gt;owner, SKYPIAX_STATE_DIALING);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, CELLIAX_STATE_DIALING);
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 tech_pvt-&gt;interface_state = CALLFLOW_CALL_DIALING;
</span><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 3:
</span><span class="cx">                                                 if (tech_pvt-&gt;owner) {
</span><del>-                                                        ast_setstate(tech_pvt-&gt;owner, SKYPIAX_STATE_UP);
-                                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_ANSWER);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, CELLIAX_STATE_UP);
+                                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_ANSWER);
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><del>-                                                tech_pvt-&gt;interface_state = SKYPIAX_STATE_UP;
</del><ins>+                                                tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
</ins><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 4:
</span><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE
-                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX
+                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 5:
</span><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE
-                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX
+                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 6:
</span><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE
-                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX
+                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         case 7:
</span><span class="cx">                                                 if (tech_pvt-&gt;owner) {
</span><del>-                                                        ast_setstate(tech_pvt-&gt;owner, SKYPIAX_STATE_BUSY);
-                                                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_BUSY);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, CELLIAX_STATE_BUSY);
+                                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_BUSY);
</ins><span class="cx">                                                 }
</span><span class="cx">                                                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_LINEBUSY;
</span><del>-                                                tech_pvt-&gt;interface_state = SKYPIAX_STATE_BUSY;
</del><ins>+                                                tech_pvt-&gt;interface_state = CELLIAX_STATE_BUSY;
</ins><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                                 break;
</span><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><span class="cx">                                         if (option_debug &gt; 1)
</span><del>-                                                DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                         }
</span><span class="lines">@@ -1224,58 +1226,58 @@
</span><span class="cx">                         /* 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 */
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_noservice_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        ERRORA(&quot;|%s| at_indicator_noservice_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| at_indicator_noservice_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_nosignal_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        ERRORA(&quot;|%s| at_indicator_nosignal_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| at_indicator_nosignal_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_lowsignal_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        WARNINGA(&quot;|%s| at_indicator_lowsignal_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        WARNINGA(&quot;|%s| at_indicator_lowsignal_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_lowbattchg_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        WARNINGA(&quot;|%s| at_indicator_lowbattchg_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        WARNINGA(&quot;|%s| at_indicator_lowbattchg_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_nobattchg_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        ERRORA(&quot;|%s| at_indicator_nobattchg_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| at_indicator_nobattchg_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_callactive_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| at_indicator_callactive_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| at_indicator_callactive_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_nocallactive_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| at_indicator_nocallactive_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| at_indicator_nocallactive_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_nocallsetup_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| at_indicator_nocallsetup_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| at_indicator_nocallsetup_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_callsetupincoming_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| at_indicator_callsetupincoming_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| at_indicator_callsetupincoming_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_callsetupoutgoing_string) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| at_indicator_callsetupoutgoing_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| at_indicator_callsetupoutgoing_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_indicator_callsetupremoteringing_string)
</span><span class="cx">                                  == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;|%s| at_indicator_callsetupremoteringing_string\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;|%s| at_indicator_callsetupremoteringing_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="lines">@@ -1286,19 +1288,19 @@
</span><span class="cx">                                 if ((strncmp(tech_pvt-&gt;line_array.result[i], expected_string, strlen(expected_string))
</span><span class="cx">                                          == 0)) {
</span><span class="cx">                                         if (option_debug &gt; 1)
</span><del>-                                                DEBUGA_SKYPE(&quot;|%s| got what EXPECTED\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;|%s| got what EXPECTED\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                         at_ack = AT_OK;
</span><span class="cx">                                 }
</span><span class="cx">                         } else {
</span><span class="cx">                                 if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;OK&quot;) == 0)) {
</span><span class="cx">                                         if (option_debug &gt; 1)
</span><del>-                                                DEBUGA_SKYPE(&quot;got OK\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;got OK\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                         at_ack = AT_OK;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         if ((strcmp(tech_pvt-&gt;line_array.result[i], &quot;ERROR&quot;) == 0)) {
</span><span class="cx">                                 if (option_debug &gt; 1)
</span><del>-                                        DEBUGA_SKYPE(&quot;got ERROR\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;got ERROR\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 at_ack = AT_ERROR;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1322,17 +1324,17 @@
</span><span class="cx">                                                 if (tech_pvt-&gt;line_array.result[i][c] == ',' &amp;&amp; tech_pvt-&gt;line_array.result[i][c - 1] != '\\' &amp;&amp; inside_quote == 0) {
</span><span class="cx">                                                         if (inside_comma) {
</span><span class="cx">                                                                 inside_comma = 0;
</span><del>-                                                                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
</del><ins>+                                                                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
</ins><span class="cx">                                                         } else {
</span><span class="cx">                                                                 inside_comma = 1;
</span><del>-                                                                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
</del><ins>+                                                                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx">                                                 if (tech_pvt-&gt;line_array.result[i][c] == '&quot;' &amp;&amp; tech_pvt-&gt;line_array.result[i][c - 1] != '\\') {
</span><span class="cx">                                                         if (inside_quote) {
</span><span class="cx">                                                                 inside_quote = 0;
</span><del>-                                                                //ERRORA(&quot;END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
-                                                                DEBUGA_SKYPE(&quot;content=%s\n&quot;, SKYPIAX_P_LOG, content);
</del><ins>+                                                                //ERRORA(&quot;END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
+                                                                DEBUGA_CELLIAX(&quot;content=%s\n&quot;, CELLIAX_P_LOG, content);
</ins><span class="cx"> 
</span><span class="cx">                                                                 strncat(tech_pvt-&gt;sms_message, &quot;---&quot;, ((sizeof(tech_pvt-&gt;sms_message) - strlen(tech_pvt-&gt;sms_message)) - 1));
</span><span class="cx">                                                                 strncat(tech_pvt-&gt;sms_message, content, ((sizeof(tech_pvt-&gt;sms_message) - strlen(tech_pvt-&gt;sms_message)) - 1));
</span><span class="lines">@@ -1349,7 +1351,7 @@
</span><span class="cx">                                                                 d = 0;
</span><span class="cx">                                                         } else {
</span><span class="cx">                                                                 inside_quote = 1;
</span><del>-                                                                //WARNINGA(&quot;START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
</del><ins>+                                                                //WARNINGA(&quot;START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx">                                                 if (inside_quote &amp;&amp; tech_pvt-&gt;line_array.result[i][c] != '&quot;') {
</span><span class="lines">@@ -1374,7 +1376,7 @@
</span><span class="cx">                                                 strncat(tech_pvt-&gt;sms_message, sms_body, ((sizeof(tech_pvt-&gt;sms_message) - strlen(tech_pvt-&gt;sms_message)) - 1));
</span><span class="cx">                                         strncat(tech_pvt-&gt;sms_message, &quot;|||&quot;, ((sizeof(tech_pvt-&gt;sms_message) - strlen(tech_pvt-&gt;sms_message)) - 1));
</span><span class="cx"> 
</span><del>-                                        DEBUGA_SKYPE(&quot;sms_message=%s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;sms_message);
</del><ins>+                                        DEBUGA_CELLIAX(&quot;sms_message=%s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;sms_message);
</ins><span class="cx"> 
</span><span class="cx">                                 }                                //it was the UCS2 from cellphone
</span><span class="cx"> 
</span><span class="lines">@@ -1388,7 +1390,7 @@
</span><span class="cx">                         break;
</span><span class="cx"> 
</span><span class="cx">                 if (la_counter &gt; AT_MESG_MAX_LINES) {
</span><del>-                        ERRORA(&quot;Too many lines in result (&gt;%d). Stopping reader.\n&quot;, SKYPIAX_P_LOG, AT_MESG_MAX_LINES);
</del><ins>+                        ERRORA(&quot;Too many lines in result (&gt;%d). Stopping reader.\n&quot;, CELLIAX_P_LOG, AT_MESG_MAX_LINES);
</ins><span class="cx">                         at_ack = AT_ERROR;
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="lines">@@ -1397,11 +1399,11 @@
</span><span class="cx">         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         POPPA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         if (select_err == -1) {
</span><del>-                ERRORA(&quot;select returned -1 on %s, setting controldev_dead, error was: %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;controldevice_name, strerror(errno));
</del><ins>+                ERRORA(&quot;select returned -1 on %s, setting controldev_dead, error was: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name, strerror(errno));
</ins><span class="cx">                 tech_pvt-&gt;controldev_dead = 1;
</span><span class="cx">                 close(tech_pvt-&gt;controldevfd);
</span><span class="cx">                 if (tech_pvt-&gt;owner)
</span><del>-                        celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
</del><ins>+                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1410,31 +1412,31 @@
</span><span class="cx">                 struct timeval call_incoming_timeout;
</span><span class="cx">                 gettimeofday(&amp;call_incoming_timeout, NULL);
</span><span class="cx">                 call_incoming_timeout.tv_sec -= 3;
</span><del>-                DEBUGA_SKYPE
</del><ins>+                DEBUGA_CELLIAX
</ins><span class="cx">                         (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                         SKYPIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                         CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">                 if (call_incoming_timeout.tv_sec &gt; tech_pvt-&gt;call_incoming_time.tv_sec) {
</span><span class="cx"> 
</span><span class="cx">                         tech_pvt-&gt;call_incoming_time.tv_sec = 0;
</span><span class="cx">                         tech_pvt-&gt;call_incoming_time.tv_usec = 0;
</span><del>-                        DEBUGA_SKYPE
</del><ins>+                        DEBUGA_CELLIAX
</ins><span class="cx">                                 (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                                 SKYPIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                                 CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">                         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CPBS=RC&quot;);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                         tech_pvt-&gt;phonebook_querying = 1;
</span><span class="cx">                         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CPBR=?&quot;);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                         tech_pvt-&gt;phonebook_querying = 0;
</span><span class="cx">                         sprintf(list_command, &quot;AT+CPBR=%d,%d&quot;, tech_pvt-&gt;phonebook_first_entry, tech_pvt-&gt;phonebook_last_entry);
</span><span class="cx">                         tech_pvt-&gt;phonebook_listing_received_calls = 1;
</span><span class="cx">                         res = celliax_serial_write_AT_expect_longtime(tech_pvt, list_command, &quot;OK&quot;);
</span><span class="cx">                         if (res) {
</span><del>-                                WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;phonebook_first_entry, tech_pvt-&gt;phonebook_last_entry);
</del><ins>+                                WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;phonebook_first_entry, tech_pvt-&gt;phonebook_last_entry);
</ins><span class="cx">                         }
</span><span class="cx">                         tech_pvt-&gt;phonebook_listing_received_calls = 0;
</span><span class="cx">                 }
</span><span class="lines">@@ -1444,22 +1446,22 @@
</span><span class="cx">                 struct timeval call_incoming_timeout;
</span><span class="cx">                 gettimeofday(&amp;call_incoming_timeout, NULL);
</span><span class="cx">                 call_incoming_timeout.tv_sec -= 10;
</span><del>-                DEBUGA_SKYPE
</del><ins>+                DEBUGA_CELLIAX
</ins><span class="cx">                         (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                         SKYPIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                         CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">                 if (call_incoming_timeout.tv_sec &gt; tech_pvt-&gt;ringtime.tv_sec) {
</span><del>-                        ERRORA(&quot;Ringing stopped and I have not answered. Why?\n&quot;, SKYPIAX_P_LOG);
-                        DEBUGA_SKYPE
</del><ins>+                        ERRORA(&quot;Ringing stopped and I have not answered. Why?\n&quot;, CELLIAX_P_LOG);
+                        DEBUGA_CELLIAX
</ins><span class="cx">                                 (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                                 SKYPIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                                 CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">                         if (tech_pvt-&gt;owner) {
</span><del>-                                celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_HANGUP);
-                                tech_pvt-&gt;owner-&gt;hangupcause = SKYPIAX_CAUSE_FAILURE;
</del><ins>+                                celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
+                                tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         tech_pvt-&gt;line_array.elemcount = la_counter;
</span><del>-        //NOTICA (&quot; OUTSIDE this celliax_serial_device %s \n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+        //NOTICA (&quot; OUTSIDE this celliax_serial_device %s \n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</ins><span class="cx">         if (look_for_ack)
</span><span class="cx">                 return at_ack;
</span><span class="cx">         else
</span><span class="lines">@@ -1479,51 +1481,51 @@
</span><span class="cx">                 res = write(tech_pvt-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx"> 
</span><span class="cx">                 if (res != 1) {
</span><del>-                        DEBUGA_SKYPE(&quot;Error sending (%.1s): %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], res, strerror(errno));
</del><ins>+                        DEBUGA_CELLIAX(&quot;Error sending (%.1s): %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], res, strerror(errno));
</ins><span class="cx">                         usleep(100000);
</span><span class="cx">                         for (count = 0; count &lt; 10; count++) {
</span><span class="cx">                                 res = write(tech_pvt-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx">                                 if (res == 1) {
</span><del>-                                        DEBUGA_SKYPE(&quot;Successfully RE-sent (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                        DEBUGA_CELLIAX(&quot;Successfully RE-sent (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</ins><span class="cx">                                         break;
</span><span class="cx">                                 } else
</span><del>-                                        DEBUGA_SKYPE(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                        DEBUGA_CELLIAX(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</ins><span class="cx">                                 usleep(100000);
</span><span class="cx"> 
</span><span class="cx">                         }
</span><span class="cx">                         if (res != 1) {
</span><del>-                                ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</ins><span class="cx">                                 return -1;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 if (option_debug &gt; 1)
</span><del>-                        DEBUGA_SKYPE(&quot;sent data... (%.1s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i]);
</del><ins>+                        DEBUGA_CELLIAX(&quot;sent data... (%.1s)\n&quot;, CELLIAX_P_LOG, &amp;data[i]);
</ins><span class="cx">                 usleep(1000);                        /* release the cpu */
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         res = write(tech_pvt-&gt;controldevfd, &quot;\r&quot;, 1);
</span><span class="cx"> 
</span><span class="cx">         if (res != 1) {
</span><del>-                DEBUGA_SKYPE(&quot;Error sending (carriage return): %d (%s)\n&quot;, SKYPIAX_P_LOG, res, strerror(errno));
</del><ins>+                DEBUGA_CELLIAX(&quot;Error sending (carriage return): %d (%s)\n&quot;, CELLIAX_P_LOG, res, strerror(errno));
</ins><span class="cx">                 usleep(100000);
</span><span class="cx">                 for (count = 0; count &lt; 10; count++) {
</span><span class="cx">                         res = write(tech_pvt-&gt;controldevfd, &quot;\r&quot;, 1);
</span><span class="cx"> 
</span><span class="cx">                         if (res == 1) {
</span><del>-                                DEBUGA_SKYPE(&quot;Successfully RE-sent carriage return: %d %d (%s)\n&quot;, SKYPIAX_P_LOG, count, res, strerror(errno));
</del><ins>+                                DEBUGA_CELLIAX(&quot;Successfully RE-sent carriage return: %d %d (%s)\n&quot;, CELLIAX_P_LOG, count, res, strerror(errno));
</ins><span class="cx">                                 break;
</span><span class="cx">                         } else
</span><del>-                                DEBUGA_SKYPE(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, count, res, strerror(errno));
</del><ins>+                                DEBUGA_CELLIAX(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, CELLIAX_P_LOG, count, res, strerror(errno));
</ins><span class="cx">                         usleep(100000);
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx">                 if (res != 1) {
</span><del>-                        ERRORA(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, count, res, strerror(errno));
</del><ins>+                        ERRORA(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, CELLIAX_P_LOG, count, res, strerror(errno));
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;sent (carriage return)\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;sent (carriage return)\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         usleep(1000);                                /* release the cpu */
</span><span class="cx"> 
</span><span class="cx">         return howmany;
</span><span class="lines">@@ -1542,24 +1544,24 @@
</span><span class="cx">                 res = write(tech_pvt-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx"> 
</span><span class="cx">                 if (res != 1) {
</span><del>-                        DEBUGA_SKYPE(&quot;Error sending (%.1s): %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], res, strerror(errno));
</del><ins>+                        DEBUGA_CELLIAX(&quot;Error sending (%.1s): %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], res, strerror(errno));
</ins><span class="cx">                         usleep(100000);
</span><span class="cx">                         for (count = 0; count &lt; 10; count++) {
</span><span class="cx">                                 res = write(tech_pvt-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx">                                 if (res == 1)
</span><span class="cx">                                         break;
</span><span class="cx">                                 else
</span><del>-                                        DEBUGA_SKYPE(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                        DEBUGA_CELLIAX(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</ins><span class="cx">                                 usleep(100000);
</span><span class="cx"> 
</span><span class="cx">                         }
</span><span class="cx">                         if (res != 1) {
</span><del>-                                ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</ins><span class="cx">                                 return -1;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 if (option_debug &gt; 1)
</span><del>-                        DEBUGA_SKYPE(&quot;sent data... (%.1s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i]);
</del><ins>+                        DEBUGA_CELLIAX(&quot;sent data... (%.1s)\n&quot;, CELLIAX_P_LOG, &amp;data[i]);
</ins><span class="cx">                 usleep(1000);                        /* release the cpu */
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1572,13 +1574,13 @@
</span><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;celliax_serial_write_AT_noack: %s\n&quot;, SKYPIAX_P_LOG, data);
</del><ins>+                DEBUGA_CELLIAX(&quot;celliax_serial_write_AT_noack: %s\n&quot;, CELLIAX_P_LOG, data);
</ins><span class="cx"> 
</span><span class="cx">         PUSHA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         LOKKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
</span><span class="cx"> 
</span><del>-                ERRORA(&quot;Error sending data... (%s)\n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;Error sending data... (%s)\n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="lines">@@ -1595,9 +1597,9 @@
</span><span class="cx">         PUSHA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         LOKKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;sending: %s\n&quot;, SKYPIAX_P_LOG, data);
</del><ins>+                DEBUGA_CELLIAX(&quot;sending: %s\n&quot;, CELLIAX_P_LOG, data);
</ins><span class="cx">         if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
</span><del>-                ERRORA(&quot;Error sending data... (%s) \n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="lines">@@ -1617,9 +1619,9 @@
</span><span class="cx">         PUSHA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         LOKKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;sending: %s\n&quot;, SKYPIAX_P_LOG, data);
</del><ins>+                DEBUGA_CELLIAX(&quot;sending: %s\n&quot;, CELLIAX_P_LOG, data);
</ins><span class="cx">         if (celliax_serial_write_AT_nocr(tech_pvt, data) != strlen(data)) {
</span><del>-                ERRORA(&quot;Error sending data... (%s) \n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="lines">@@ -1639,9 +1641,9 @@
</span><span class="cx">         PUSHA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         LOKKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;sending: %s, expecting: %s\n&quot;, SKYPIAX_P_LOG, data, expected_string);
</del><ins>+                DEBUGA_CELLIAX(&quot;sending: %s, expecting: %s\n&quot;, CELLIAX_P_LOG, data, expected_string);
</ins><span class="cx">         if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
</span><del>-                ERRORA(&quot;Error sending data... (%s) \n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="lines">@@ -1661,7 +1663,7 @@
</span><span class="cx">         PUSHA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         LOKKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;expecting: %s\n&quot;, SKYPIAX_P_LOG, expected_string);
</del><ins>+                DEBUGA_CELLIAX(&quot;expecting: %s\n&quot;, CELLIAX_P_LOG, expected_string);
</ins><span class="cx"> 
</span><span class="cx">         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
</span><span class="cx">         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="lines">@@ -1693,19 +1695,19 @@
</span><span class="cx"> 
</span><span class="cx">         res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</span><span class="cx">         if (res) {
</span><del>-                DEBUGA_SKYPE
</del><ins>+                DEBUGA_CELLIAX
</ins><span class="cx">                         (&quot;at_answer command failed, command used: %s, expecting: %s, trying with AT+CKPD=\&quot;S\&quot;\n&quot;,
</span><del>-                         SKYPIAX_P_LOG, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</del><ins>+                         CELLIAX_P_LOG, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</ins><span class="cx"> 
</span><span class="cx">                 res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;S\&quot;&quot;);
</span><span class="cx">                 if (res) {
</span><del>-                        ERRORA(&quot;at_answer command failed, command used: 'AT+CKPD=\&quot;S\&quot;', giving up\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;at_answer command failed, command used: 'AT+CKPD=\&quot;S\&quot;', giving up\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        //tech_pvt-&gt;interface_state = SKYPIAX_STATE_UP;
</del><ins>+        //tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
</ins><span class="cx">         //tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><del>-        DEBUGA_SKYPE(&quot;AT: call answered\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;AT: call answered\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1729,18 +1731,18 @@
</span><span class="cx"> {
</span><span class="cx">         int res;
</span><span class="cx"> 
</span><del>-        if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN) {
</del><ins>+        if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
</ins><span class="cx">                 res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_hangup, tech_pvt-&gt;at_hangup_expect);
</span><span class="cx">                 if (res) {
</span><del>-                        DEBUGA_SKYPE(&quot;at_hangup command failed, command used: %s, trying to use AT+CKPD=\&quot;EEE\&quot;\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_hangup);
</del><ins>+                        DEBUGA_CELLIAX(&quot;at_hangup command failed, command used: %s, trying to use AT+CKPD=\&quot;EEE\&quot;\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_hangup);
</ins><span class="cx">                         res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;at_hangup command failed, command used: 'AT+CKPD=\&quot;EEE\&quot;'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;at_hangup command failed, command used: 'AT+CKPD=\&quot;EEE\&quot;'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 return -1;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        tech_pvt-&gt;interface_state = SKYPIAX_STATE_DOWN;
</del><ins>+        tech_pvt-&gt;interface_state = CELLIAX_STATE_DOWN;
</ins><span class="cx">         tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1769,25 +1771,25 @@
</span><span class="cx">         char at_command[256];
</span><span class="cx"> 
</span><span class="cx">         if (option_debug)
</span><del>-                DEBUGA_PBX(&quot;Dialing %s\n&quot;, SKYPIAX_P_LOG, dstr);
</del><ins>+                DEBUGA_PBX(&quot;Dialing %s\n&quot;, CELLIAX_P_LOG, dstr);
</ins><span class="cx">         memset(at_command, 0, sizeof(at_command));
</span><span class="cx">         tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_DIALING;
</span><del>-        tech_pvt-&gt;interface_state = SKYPIAX_STATE_DIALING;
</del><ins>+        tech_pvt-&gt;interface_state = CELLIAX_STATE_DIALING;
</ins><span class="cx">         //ast_uri_decode(dstr);
</span><span class="cx"> /*
</span><span class="cx">   size_t fixdstr = strspn(dstr, AST_DIGIT_ANYDIG);
</span><span class="cx">   if (fixdstr == 0) {
</span><span class="cx">     ERRORA(&quot;dial command failed because of invalid dial number. dial string was: %s\n&quot;,
</span><del>-           SKYPIAX_P_LOG, dstr);
</del><ins>+           CELLIAX_P_LOG, dstr);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx"> */
</span><span class="cx">         //dstr[fixdstr] = '\0';
</span><span class="cx">         sprintf(at_command, &quot;%s%s%s&quot;, tech_pvt-&gt;at_dial_pre_number, dstr, tech_pvt-&gt;at_dial_post_number);
</span><del>-        DEBUGA_PBX(&quot;Dialstring %s\n&quot;, SKYPIAX_P_LOG, at_command);
</del><ins>+        DEBUGA_PBX(&quot;Dialstring %s\n&quot;, CELLIAX_P_LOG, at_command);
</ins><span class="cx">         res = celliax_serial_write_AT_expect(tech_pvt, at_command, tech_pvt-&gt;at_dial_expect);
</span><span class="cx">         if (res) {
</span><del>-                ERRORA(&quot;dial command failed, dial string was: %s\n&quot;, SKYPIAX_P_LOG, at_command);
</del><ins>+                ERRORA(&quot;dial command failed, dial string was: %s\n&quot;, CELLIAX_P_LOG, at_command);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx">         // jet - early audio
</span><span class="lines">@@ -1813,7 +1815,7 @@
</span><span class="cx"> 
</span><span class="cx">         memset(converted, '\0', sizeof(converted));
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;ucs2_in=%s\n&quot;, SKYPIAX_P_LOG, ucs2_in);
</del><ins>+        DEBUGA_CELLIAX(&quot;ucs2_in=%s\n&quot;, CELLIAX_P_LOG, ucs2_in);
</ins><span class="cx">         /* cicopet */
</span><span class="cx">         for (c = 0; c &lt; strlen(ucs2_in); c++) {
</span><span class="cx">                 sprintf(stringa, &quot;0x%c%c&quot;, ucs2_in[c], ucs2_in[c + 1]);
</span><span class="lines">@@ -1828,21 +1830,21 @@
</span><span class="cx"> 
</span><span class="cx">         iconv_format = iconv_open(&quot;UTF8&quot;, &quot;UCS-2BE&quot;);
</span><span class="cx">         if (iconv_format == (iconv_t) - 1) {
</span><del>-                ERRORA(&quot;error: %s\n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;error: %s\n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         inbytesleft = i;
</span><span class="cx">         iconv_res = iconv(iconv_format, &amp;inbuf, &amp;inbytesleft, &amp;outbuf, &amp;outbytesleft);
</span><span class="cx">         if (iconv_res == (size_t) -1) {
</span><del>-                DEBUGA_SKYPE(&quot;ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
-                                         SKYPIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
-                DEBUGA_SKYPE(&quot;error: %s %d\n&quot;, SKYPIAX_P_LOG, strerror(errno), errno);
</del><ins>+                DEBUGA_CELLIAX(&quot;ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
+                                         CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+                DEBUGA_CELLIAX(&quot;error: %s %d\n&quot;, CELLIAX_P_LOG, strerror(errno), errno);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><del>-        DEBUGA_SKYPE
</del><ins>+        DEBUGA_CELLIAX
</ins><span class="cx">                 (&quot;iconv_res=%d,  in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
</span><del>-                 SKYPIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
</del><ins>+                 CELLIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
</ins><span class="cx">         iconv_close(iconv_format);
</span><span class="cx"> 
</span><span class="cx">         return 0;
</span><span class="lines">@@ -1867,32 +1869,32 @@
</span><span class="cx"> 
</span><span class="cx">         iconv_format = iconv_open(&quot;UCS-2BE&quot;, &quot;UTF8&quot;);
</span><span class="cx">         if (iconv_format == (iconv_t) - 1) {
</span><del>-                ERRORA(&quot;error: %s\n&quot;, SKYPIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;error: %s\n&quot;, CELLIAX_P_LOG, strerror(errno));
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx">         outbytesleft = 16000;
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
-                                 SKYPIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</del><ins>+        DEBUGA_CELLIAX(&quot;in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
+                                 CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</ins><span class="cx">         iconv_res = iconv(iconv_format, &amp;inbuf, &amp;inbytesleft, &amp;outbuf, &amp;outbytesleft);
</span><span class="cx">         if (iconv_res == (size_t) -1) {
</span><del>-                ERRORA(&quot;error: %s %d\n&quot;, SKYPIAX_P_LOG, strerror(errno), errno);
</del><ins>+                ERRORA(&quot;error: %s %d\n&quot;, CELLIAX_P_LOG, strerror(errno), errno);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><del>-        DEBUGA_SKYPE
</del><ins>+        DEBUGA_CELLIAX
</ins><span class="cx">                 (&quot;iconv_res=%d,  in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
</span><del>-                 SKYPIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</del><ins>+                 CELLIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</ins><span class="cx">         iconv_close(iconv_format);
</span><span class="cx"> 
</span><span class="cx">         for (i = 0; i &lt; 16000 - outbytesleft; i++) {
</span><span class="cx">                 memset(stringa, '\0', sizeof(stringa));
</span><span class="cx">                 memset(stringa2, '\0', sizeof(stringa2));
</span><span class="cx">                 sprintf(stringa, &quot;%02X&quot;, converted[i]);
</span><del>-                DEBUGA_SKYPE(&quot;character is |%02X|\n&quot;, SKYPIAX_P_LOG, converted[i]);
</del><ins>+                DEBUGA_CELLIAX(&quot;character is |%02X|\n&quot;, CELLIAX_P_LOG, converted[i]);
</ins><span class="cx">                 stringa2[0] = stringa[strlen(stringa) - 2];
</span><span class="cx">                 stringa2[1] = stringa[strlen(stringa) - 1];
</span><span class="cx">                 strncat(ucs2_out, stringa2, ((outbytesleft - strlen(ucs2_out)) - 1));        //add the received line to the buffer
</span><del>-                DEBUGA_SKYPE(&quot;stringa=%s, stringa2=%s, ucs2_out=%s\n&quot;, SKYPIAX_P_LOG, stringa, stringa2, ucs2_out);
</del><ins>+                DEBUGA_CELLIAX(&quot;stringa=%s, stringa2=%s, ucs2_out=%s\n&quot;, CELLIAX_P_LOG, stringa, stringa2, ucs2_out);
</ins><span class="cx">         }
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1905,30 +1907,30 @@
</span><span class="cx">         int res;
</span><span class="cx"> 
</span><span class="cx">         if (option_debug) {
</span><del>-                DEBUGA_PBX(&quot;ENTERING FUNC\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;ENTERING FUNC\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* do something to actually answer the call, if needed (eg. pick up the phone) */
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL) {
</span><span class="cx">                 if (celliax_serial_answer(tech_pvt)) {
</span><del>-                        ERRORA(&quot;celliax_answer FAILED\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;celliax_answer FAILED\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         if (option_debug) {
</span><del>-                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        tech_pvt-&gt;interface_state = SKYPIAX_STATE_UP;
</del><ins>+        tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
</ins><span class="cx">         tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><span class="cx"> 
</span><del>-        while (tech_pvt-&gt;interface_state == SKYPIAX_STATE_RING) {
</del><ins>+        while (tech_pvt-&gt;interface_state == CELLIAX_STATE_RING) {
</ins><span class="cx">                 usleep(10000);                        //10msec
</span><span class="cx">         }
</span><del>-        if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_UP) {
-                ERRORA(&quot;call answering failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        if (tech_pvt-&gt;interface_state != CELLIAX_STATE_UP) {
+                ERRORA(&quot;call answering failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 res = -1;
</span><span class="cx">         } else {
</span><span class="cx">                 if (option_debug)
</span><del>-                        DEBUGA_PBX(&quot;call answered\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_PBX(&quot;call answered\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 res = 0;
</span><span class="cx"> #ifdef CELLIAX_PORTAUDIO
</span><span class="cx">                 speex_echo_state_reset(tech_pvt-&gt;stream-&gt;echo_state);
</span><span class="lines">@@ -1936,15 +1938,15 @@
</span><span class="cx"> 
</span><span class="cx">                 new_inbound_channel(tech_pvt);
</span><span class="cx">                 if (tech_pvt-&gt;owner) {
</span><del>-                        DEBUGA_PBX(&quot;going to send SKYPIAX_STATE_UP\n&quot;, SKYPIAX_P_LOG);
-                        ast_setstate(tech_pvt-&gt;owner, SKYPIAX_STATE_UP);
-                        //ast_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_ANSWER);
-                        //celliax_queue_control(tech_pvt-&gt;owner, SKYPIAX_CONTROL_ANSWER);
-                        DEBUGA_PBX(&quot;just sent SKYPIAX_STATE_UP\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_PBX(&quot;going to send CELLIAX_STATE_UP\n&quot;, CELLIAX_P_LOG);
+                        ast_setstate(tech_pvt-&gt;owner, CELLIAX_STATE_UP);
+                        //ast_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_ANSWER);
+                        //celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_ANSWER);
+                        DEBUGA_PBX(&quot;just sent CELLIAX_STATE_UP\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         if (option_debug) {
</span><del>-                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         return res;
</span><span class="cx"> }
</span><span class="lines">@@ -1957,54 +1959,54 @@
</span><span class="cx"> 
</span><span class="cx">         /* if there is not celliax pvt why we are here ? */
</span><span class="cx">         if (!tech_pvt) {
</span><del>-                ERRORA(&quot;Asked to hangup channel not connected\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Asked to hangup channel not connected\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return 0;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;ENTERING FUNC\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;ENTERING FUNC\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL) {
</span><del>-                if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN) {
</del><ins>+                if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
</ins><span class="cx">                         /* actually hangup through the serial port */
</span><span class="cx">                         if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL) {
</span><span class="cx">                                 int res;
</span><span class="cx">                                 res = celliax_serial_hangup(tech_pvt);
</span><span class="cx">                                 if (res) {
</span><del>-                                        ERRORA(&quot;celliax_serial_hangup error: %d\n&quot;, SKYPIAX_P_LOG, res);
</del><ins>+                                        ERRORA(&quot;celliax_serial_hangup error: %d\n&quot;, CELLIAX_P_LOG, res);
</ins><span class="cx">                                         if (option_debug) {
</span><del>-                                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                         }
</span><span class="cx">                                         return -1;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        while (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN) {
</del><ins>+                        while (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
</ins><span class="cx">                                 usleep(10000);        //10msec
</span><span class="cx">                         }
</span><del>-                        if (tech_pvt-&gt;interface_state != SKYPIAX_STATE_DOWN) {
-                                ERRORA(&quot;call hangup failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
+                                ERRORA(&quot;call hangup failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 return -1;
</span><span class="cx">                         } else {
</span><del>-                                DEBUGA_SKYPE(&quot;call hungup\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                DEBUGA_CELLIAX(&quot;call hungup\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                tech_pvt-&gt;interface_state = SKYPIAX_STATE_DOWN;
</del><ins>+                tech_pvt-&gt;interface_state = CELLIAX_STATE_DOWN;
</ins><span class="cx">                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_set_flag(tech_pvt, TFLAG_HANGUP);
</span><span class="cx">         if (option_debug) {
</span><del>-                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-#define SKYPIAX_ALSA
-#ifdef SKYPIAX_ALSA
</del><ins>+#define CELLIAX_ALSA
+#ifdef CELLIAX_ALSA
</ins><span class="cx"> /*! \brief ALSA pcm format, according to endianess  */
</span><span class="cx"> #if __BYTE_ORDER == __LITTLE_ENDIAN
</span><span class="cx"> snd_pcm_format_t celliax_format = SND_PCM_FORMAT_S16_LE;
</span><span class="lines">@@ -2024,18 +2026,18 @@
</span><span class="cx"> {
</span><span class="cx">         tech_pvt-&gt;alsac = alsa_open_dev(tech_pvt, SND_PCM_STREAM_CAPTURE);
</span><span class="cx">         if (!tech_pvt-&gt;alsac) {
</span><del>-                ERRORA(&quot;Failed opening ALSA capture device: %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;alsacname);
</del><ins>+                ERRORA(&quot;Failed opening ALSA capture device: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;alsacname);
</ins><span class="cx">                 if (alsa_shutdown(tech_pvt)) {
</span><del>-                        ERRORA(&quot;alsa_shutdown failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;alsa_shutdown failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx">         tech_pvt-&gt;alsap = alsa_open_dev(tech_pvt, SND_PCM_STREAM_PLAYBACK);
</span><span class="cx">         if (!tech_pvt-&gt;alsap) {
</span><del>-                ERRORA(&quot;Failed opening ALSA playback device: %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;alsapname);
</del><ins>+                ERRORA(&quot;Failed opening ALSA playback device: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;alsapname);
</ins><span class="cx">                 if (alsa_shutdown(tech_pvt)) {
</span><del>-                        ERRORA(&quot;alsa_shutdown failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;alsa_shutdown failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 return -1;
</span><span class="lines">@@ -2063,12 +2065,12 @@
</span><span class="cx">         if (tech_pvt-&gt;alsap) {
</span><span class="cx">                 err = snd_pcm_drop(tech_pvt-&gt;alsap);
</span><span class="cx">                 if (err &lt; 0) {
</span><del>-                        ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;alsapname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;alsapname, snd_strerror(err));
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 err = snd_pcm_close(tech_pvt-&gt;alsap);
</span><span class="cx">                 if (err &lt; 0) {
</span><del>-                        ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;alsapname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;alsapname, snd_strerror(err));
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 tech_pvt-&gt;alsap = NULL;
</span><span class="lines">@@ -2076,12 +2078,12 @@
</span><span class="cx">         if (tech_pvt-&gt;alsac) {
</span><span class="cx">                 err = snd_pcm_drop(tech_pvt-&gt;alsac);
</span><span class="cx">                 if (err &lt; 0) {
</span><del>-                        ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;alsacname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;alsacname, snd_strerror(err));
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 err = snd_pcm_close(tech_pvt-&gt;alsac);
</span><span class="cx">                 if (err &lt; 0) {
</span><del>-                        ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;alsacname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;alsacname, snd_strerror(err));
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 tech_pvt-&gt;alsac = NULL;
</span><span class="lines">@@ -2131,53 +2133,53 @@
</span><span class="cx">         if (err &lt; 0) {
</span><span class="cx">                 ERRORA
</span><span class="cx">                         (&quot;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&quot;
</span><del>-                         &quot; is running?\n&quot;, SKYPIAX_P_LOG, snd_strerror(err), stream == SND_PCM_STREAM_CAPTURE ? tech_pvt-&gt;alsacname : tech_pvt-&gt;alsapname);
</del><ins>+                         &quot; is running?\n&quot;, CELLIAX_P_LOG, snd_strerror(err), stream == SND_PCM_STREAM_CAPTURE ? tech_pvt-&gt;alsacname : tech_pvt-&gt;alsapname);
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         snd_pcm_info_alloca(&amp;info);
</span><span class="cx"> 
</span><span class="cx">         if ((err = snd_pcm_info(handle, info)) &lt; 0) {
</span><del>-                ERRORA(&quot;info error: %s&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;info error: %s&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         err = snd_pcm_nonblock(handle, 1);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;nonblock setting error: %s&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;nonblock setting error: %s&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         err = snd_pcm_hw_params_any(handle, params);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Broken configuration for this PCM, no configurations available: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Broken configuration for this PCM, no configurations available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         err = snd_pcm_hw_params_set_access(handle, params, SND_PCM_ACCESS_RW_INTERLEAVED);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Access type not available: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Access type not available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx">         err = snd_pcm_hw_params_set_format(handle, params, celliax_format);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Sample format non available: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Sample format non available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx">         err = snd_pcm_hw_params_set_channels(handle, params, 1);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                DEBUGA_SKYPE(&quot;Channels count set failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                DEBUGA_CELLIAX(&quot;Channels count set failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         }
</span><span class="cx"> #if 1
</span><span class="cx">         unsigned int chan_num;
</span><span class="cx">         err = snd_pcm_hw_params_get_channels(params, &amp;chan_num);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Channels count non available: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Channels count non available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx">         if (chan_num &lt; 1 || chan_num &gt; 2) {
</span><del>-                ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d\n&quot;, SKYPIAX_P_LOG, chan_num);
-                ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d on %s %s\n&quot;, SKYPIAX_P_LOG, chan_num, tech_pvt-&gt;alsapname, tech_pvt-&gt;alsacname);
</del><ins>+                ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d\n&quot;, CELLIAX_P_LOG, chan_num);
+                ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d on %s %s\n&quot;, CELLIAX_P_LOG, chan_num, tech_pvt-&gt;alsapname, tech_pvt-&gt;alsacname);
</ins><span class="cx">                 return NULL;
</span><span class="cx">         } else {
</span><span class="cx">                 if (chan_num == 1) {
</span><span class="lines">@@ -2201,11 +2203,11 @@
</span><span class="cx">         rate = tech_pvt-&gt;celliax_sound_rate;
</span><span class="cx">         err = snd_pcm_hw_params_set_rate_near(handle, params, &amp;rate, 0);
</span><span class="cx">         if ((float) tech_pvt-&gt;celliax_sound_rate * 1.05 &lt; rate || (float) tech_pvt-&gt;celliax_sound_rate * 0.95 &gt; rate) {
</span><del>-                WARNINGA(&quot;Rate is not accurate (requested = %iHz, got = %iHz)\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;celliax_sound_rate, rate);
</del><ins>+                WARNINGA(&quot;Rate is not accurate (requested = %iHz, got = %iHz)\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;celliax_sound_rate, rate);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Error setting rate: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting rate: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx">         tech_pvt-&gt;celliax_sound_rate = rate;
</span><span class="lines">@@ -2213,7 +2215,7 @@
</span><span class="cx">         err = snd_pcm_hw_params_set_period_size_near(handle, params, &amp;period_size, 0);
</span><span class="cx"> 
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Error setting period_size: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting period_size: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2224,21 +2226,21 @@
</span><span class="cx">         err = snd_pcm_hw_params_set_buffer_size_near(handle, params, &amp;tech_pvt-&gt;alsa_buffer_size);
</span><span class="cx"> 
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Error setting buffer_size: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting buffer_size: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         err = snd_pcm_hw_params(handle, params);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Unable to install hw params: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Unable to install hw params: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         snd_pcm_hw_params_get_period_size(params, &amp;chunk_size, 0);
</span><span class="cx">         snd_pcm_hw_params_get_buffer_size(params, &amp;buffer_size);
</span><span class="cx">         if (chunk_size == buffer_size) {
</span><del>-                ERRORA(&quot;Can't use period equal to buffer size (%lu == %lu)\n&quot;, SKYPIAX_P_LOG, chunk_size, buffer_size);
</del><ins>+                ERRORA(&quot;Can't use period equal to buffer size (%lu == %lu)\n&quot;, CELLIAX_P_LOG, chunk_size, buffer_size);
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2251,13 +2253,13 @@
</span><span class="cx">            0);
</span><span class="cx"> 
</span><span class="cx">            if (err &lt; 0) {
</span><del>-           ERRORA(&quot;Error setting slep_min: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+           ERRORA(&quot;Error setting slep_min: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">            }
</span><span class="cx">          */
</span><span class="cx">         n = chunk_size;
</span><span class="cx">         err = snd_pcm_sw_params_set_avail_min(handle, swparams, n);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Error setting avail_min: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting avail_min: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         }
</span><span class="cx">         if (stream == SND_PCM_STREAM_CAPTURE) {
</span><span class="cx">                 start_delay = 1;
</span><span class="lines">@@ -2273,7 +2275,7 @@
</span><span class="cx">                 start_threshold = n;
</span><span class="cx">         err = snd_pcm_sw_params_set_start_threshold(handle, swparams, start_threshold);
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Error setting start_threshold: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting start_threshold: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (stop_delay &lt;= 0)
</span><span class="lines">@@ -2288,30 +2290,30 @@
</span><span class="cx">         err = snd_pcm_sw_params_set_stop_threshold(handle, swparams, stop_threshold);
</span><span class="cx"> 
</span><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Error setting stop_threshold: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting stop_threshold: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (snd_pcm_sw_params(handle, swparams) &lt; 0) {
</span><del>-                ERRORA(&quot;Error installing software parameters: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error installing software parameters: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         err = snd_pcm_poll_descriptors_count(handle);
</span><span class="cx">         if (err &lt;= 0) {
</span><del>-                ERRORA(&quot;Unable to get a poll descriptors count, error is %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Unable to get a poll descriptors count, error is %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (err != 1) {                                //number of poll descriptors
</span><del>-                DEBUGA_SKYPE(&quot;Can't handle more than one device\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;Can't handle more than one device\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         err = snd_pcm_poll_descriptors(handle, &amp;tech_pvt-&gt;pfd, err);
</span><span class="cx">         if (err != 1) {
</span><del>-                ERRORA(&quot;snd_pcm_poll_descriptors failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;snd_pcm_poll_descriptors failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><del>-        DEBUGA_SKYPE(&quot;Acquired fd %d from the poll descriptor\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;pfd.fd);
</del><ins>+        DEBUGA_CELLIAX(&quot;Acquired fd %d from the poll descriptor\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;pfd.fd);
</ins><span class="cx"> 
</span><span class="cx">         if (stream == SND_PCM_STREAM_CAPTURE) {
</span><span class="cx">                 tech_pvt-&gt;celliax_sound_capt_fd = tech_pvt-&gt;pfd.fd;
</span><span class="lines">@@ -2323,52 +2325,49 @@
</span><span class="cx">                 if (state != SND_PCM_STATE_PREPARED) {
</span><span class="cx">                         err = snd_pcm_prepare(handle);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                                ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                                 return NULL;
</span><span class="cx">                         }
</span><del>-                        DEBUGA_SKYPE(&quot;prepared!\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_CELLIAX(&quot;prepared!\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">                 if (stream == SND_PCM_STREAM_CAPTURE) {
</span><span class="cx">                         err = snd_pcm_start(handle);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                                ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                                 return NULL;
</span><span class="cx">                         }
</span><del>-                        DEBUGA_SKYPE(&quot;started!\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_CELLIAX(&quot;started!\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         if (option_debug &gt; 1) {
</span><span class="cx">                 snd_output_t *output = NULL;
</span><span class="cx">                 err = snd_output_stdio_attach(&amp;output, stdout, 0);
</span><span class="cx">                 if (err &lt; 0) {
</span><del>-                        ERRORA(&quot;snd_output_stdio_attach failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;snd_output_stdio_attach failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">                 }
</span><span class="cx">                 snd_pcm_dump(handle, output);
</span><span class="cx">         }
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;ALSA handle = %ld\n&quot;, SKYPIAX_P_LOG, (long int) handle);
</del><ins>+                DEBUGA_CELLIAX(&quot;ALSA handle = %ld\n&quot;, CELLIAX_P_LOG, (long int) handle);
</ins><span class="cx">         return handle;
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*! \brief Write audio frames to interface */
</span><del>-#endif /* SKYPIAX_ALSA */
</del><ins>+#endif /* CELLIAX_ALSA */
</ins><span class="cx"> 
</span><span class="cx"> int celliax_call(private_t * tech_pvt, char *rdest, int timeout)
</span><span class="cx"> {
</span><del>-        //char msg_to_skype[1024];
</del><span class="cx"> 
</span><span class="cx">         //celliax_sleep(5000);
</span><del>-        DEBUGA_SKYPE(&quot;Calling Skype, rdest is: %s\n&quot;, SKYPIAX_P_LOG, rdest);
</del><ins>+        DEBUGA_CELLIAX(&quot;Calling GSM, rdest is: %s\n&quot;, CELLIAX_P_LOG, rdest);
</ins><span class="cx">         //celliax_signaling_write(tech_pvt, &quot;SET AGC OFF&quot;);
</span><span class="cx">         //celliax_sleep(10000);
</span><span class="cx">         //celliax_signaling_write(tech_pvt, &quot;SET AEC OFF&quot;);
</span><span class="cx">         //celliax_sleep(10000);
</span><span class="cx"> 
</span><span class="cx">         celliax_serial_call(tech_pvt, rdest);
</span><del>-        //sprintf(msg_to_skype, &quot;CALL %s&quot;, rdest);
-        //if (celliax_signaling_write(tech_pvt, msg_to_skype) &lt; 0) {
-        //ERRORA(&quot;failed to communicate with Skype client, now exit\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        //ERRORA(&quot;failed to communicate with GSM client, now exit\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         //return -1;
</span><span class="cx">         //}
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2378,8 +2377,7 @@
</span><span class="cx"> int celliax_senddigit(private_t * tech_pvt, char digit)
</span><span class="cx"> {
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;DIGIT received: %c\n&quot;, SKYPIAX_P_LOG, digit);
-        //celliax_signaling_write(tech_pvt, msg_to_skype);
</del><ins>+        DEBUGA_CELLIAX(&quot;DIGIT received: %c\n&quot;, CELLIAX_P_LOG, digit);
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT &amp;&amp; tech_pvt-&gt;at_send_dtmf[0]) {
</span><span class="cx">                 int res = 0;
</span><span class="cx">                 char at_command[256];
</span><span class="lines">@@ -2388,7 +2386,7 @@
</span><span class="cx">                 sprintf(at_command, &quot;%s=\&quot;%c\&quot;&quot;, tech_pvt-&gt;at_send_dtmf, digit);
</span><span class="cx">                 res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</span><span class="cx">                 if (res) {
</span><del>-                        ERRORA(&quot;senddigit command failed, command used: '%s=\&quot;%c\&quot;', giving up\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_send_dtmf, digit);
</del><ins>+                        ERRORA(&quot;senddigit command failed, command used: '%s=\&quot;%c\&quot;', giving up\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_send_dtmf, digit);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2411,10 +2409,10 @@
</span><span class="cx">         snd_pcm_sframes_t delayp1;
</span><span class="cx">         snd_pcm_sframes_t delayp2;
</span><span class="cx"> 
</span><del>-        //ERRORA(&quot;data=%p, datalen=%d\n&quot;, SKYPIAX_P_LOG, (void *)data, datalen);
</del><ins>+        //ERRORA(&quot;data=%p, datalen=%d\n&quot;, CELLIAX_P_LOG, (void *)data, datalen);
</ins><span class="cx">         /* We have to digest the frame in 160-byte portions */
</span><span class="cx">         if (datalen &gt; sizeof(sizbuf) - sizpos) {
</span><del>-                ERRORA(&quot;Frame too large\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Frame too large\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 res = -1;
</span><span class="cx">         } else {
</span><span class="cx">                 memcpy(sizbuf + sizpos, data, datalen);
</span><span class="lines">@@ -2427,25 +2425,25 @@
</span><span class="cx">                 if (state == SND_PCM_STATE_XRUN) {
</span><span class="cx">                         int i;
</span><span class="cx"> 
</span><del>-                        DEBUGA_SKYPE
</del><ins>+                        DEBUGA_CELLIAX
</ins><span class="cx">                                 (&quot;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&quot;,
</span><del>-                                 SKYPIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer);
</del><ins>+                                 CELLIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer);
</ins><span class="cx">                         res = snd_pcm_prepare(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         } else {
</span><span class="cx">                                 res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
</span><span class="cx">                                 if (res &lt; 0) {
</span><del>-                                        DEBUGA_SKYPE(&quot;Silence error %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                        DEBUGA_CELLIAX(&quot;Silence error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                                         res = -1;
</span><span class="cx">                                 }
</span><span class="cx">                                 for (i = 0; i &lt; (tech_pvt-&gt;alsa_periods_in_buffer - 1); i++) {
</span><span class="cx">                                         res = snd_pcm_writei(tech_pvt-&gt;alsap, silencebuf, len / 2);
</span><span class="cx">                                         if (res != len / 2) {
</span><del>-                                                DEBUGA_SKYPE(&quot;Write returned a different quantity: %d\n&quot;, SKYPIAX_P_LOG, res);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;Write returned a different quantity: %d\n&quot;, CELLIAX_P_LOG, res);
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         } else if (res &lt; 0) {
</span><del>-                                                DEBUGA_SKYPE(&quot;Write error %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                                DEBUGA_CELLIAX(&quot;Write error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="lines">@@ -2455,21 +2453,21 @@
</span><span class="cx"> 
</span><span class="cx">                 res = snd_pcm_delay(tech_pvt-&gt;alsap, &amp;delayp1);
</span><span class="cx">                 if (res &lt; 0) {
</span><del>-                        DEBUGA_SKYPE(&quot;Error %d on snd_pcm_delay: \&quot;%s\&quot;\n&quot;, SKYPIAX_P_LOG, res, snd_strerror(res));
</del><ins>+                        DEBUGA_CELLIAX(&quot;Error %d on snd_pcm_delay: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, res, snd_strerror(res));
</ins><span class="cx">                         res = snd_pcm_prepare(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;snd_pcm_prepare failed: '%s'\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                DEBUGA_CELLIAX(&quot;snd_pcm_prepare failed: '%s'\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                         res = snd_pcm_delay(tech_pvt-&gt;alsap, &amp;delayp1);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 delayp2 = snd_pcm_avail_update(tech_pvt-&gt;alsap);
</span><span class="cx">                 if (delayp2 &lt; 0) {
</span><del>-                        DEBUGA_SKYPE(&quot;Error %d on snd_pcm_avail_update: \&quot;%s\&quot;\n&quot;, SKYPIAX_P_LOG, (int) delayp2, snd_strerror(delayp2));
</del><ins>+                        DEBUGA_CELLIAX(&quot;Error %d on snd_pcm_avail_update: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, (int) delayp2, snd_strerror(delayp2));
</ins><span class="cx"> 
</span><span class="cx">                         res = snd_pcm_prepare(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE(&quot;snd_pcm_prepare failed: '%s'\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                DEBUGA_CELLIAX(&quot;snd_pcm_prepare failed: '%s'\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                         delayp2 = snd_pcm_avail_update(tech_pvt-&gt;alsap);
</span><span class="cx">                 }
</span><span class="lines">@@ -2479,31 +2477,31 @@
</span><span class="cx"> 
</span><span class="cx">                         res = snd_pcm_prepare(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                DEBUGA_SKYPE
</del><ins>+                                DEBUGA_CELLIAX
</ins><span class="cx">                                         (&quot;snd_pcm_prepare failed while trying to prevent an ALSA write XRUN: %s, delayp1=%d, delayp2=%d\n&quot;,
</span><del>-                                         SKYPIAX_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
</del><ins>+                                         CELLIAX_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
</ins><span class="cx">                         } else {
</span><span class="cx"> 
</span><span class="cx">                                 int i;
</span><span class="cx">                                 for (i = 0; i &lt; (tech_pvt-&gt;alsa_periods_in_buffer - 1); i++) {
</span><span class="cx">                                         res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
</span><span class="cx">                                         if (res &lt; 0) {
</span><del>-                                                DEBUGA_SKYPE(&quot;Silence error %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                                DEBUGA_CELLIAX(&quot;Silence error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         }
</span><span class="cx">                                         res = snd_pcm_writei(tech_pvt-&gt;alsap, silencebuf, len / 2);
</span><span class="cx">                                         if (res &lt; 0) {
</span><del>-                                                DEBUGA_SKYPE(&quot;Write error %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                                DEBUGA_CELLIAX(&quot;Write error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         } else if (res != len / 2) {
</span><del>-                                                DEBUGA_SKYPE(&quot;Write returned a different quantity: %d\n&quot;, SKYPIAX_P_LOG, res);
</del><ins>+                                                DEBUGA_CELLIAX(&quot;Write returned a different quantity: %d\n&quot;, CELLIAX_P_LOG, res);
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                DEBUGA_SKYPE
</del><ins>+                                DEBUGA_CELLIAX
</ins><span class="cx">                                         (&quot;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&quot;,
</span><del>-                                         SKYPIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+                                         CELLIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="lines">@@ -2531,12 +2529,12 @@
</span><span class="cx">                         res = snd_pcm_writei(tech_pvt-&gt;alsap, sizbuf2, len);
</span><span class="cx">                 }
</span><span class="cx">                 if (res == -EPIPE) {
</span><del>-                        DEBUGA_SKYPE
</del><ins>+                        DEBUGA_CELLIAX
</ins><span class="cx">                                 (&quot;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&quot;,
</span><del>-                                 SKYPIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+                                 CELLIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</ins><span class="cx">                         res = snd_pcm_prepare(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         } else {
</span><span class="cx"> 
</span><span class="cx">                                 if (tech_pvt-&gt;alsa_play_is_mono) {
</span><span class="lines">@@ -2565,11 +2563,11 @@
</span><span class="cx"> 
</span><span class="cx">                 } else {
</span><span class="cx">                         if (res == -ESTRPIPE) {
</span><del>-                                ERRORA(&quot;You've got some big problems\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;You've got some big problems\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         } else if (res == -EAGAIN) {
</span><span class="cx">                                 res = 0;
</span><span class="cx">                         } else if (res &lt; 0) {
</span><del>-                                ERRORA(&quot;Error %d on audio write: \&quot;%s\&quot;\n&quot;, SKYPIAX_P_LOG, res, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;Error %d on audio write: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, res, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -2578,22 +2576,22 @@
</span><span class="cx">                 time(&amp;now_timestamp);
</span><span class="cx">                 if ((now_timestamp - tech_pvt-&gt;audio_play_reset_timestamp) &gt; tech_pvt-&gt;audio_play_reset_period) {
</span><span class="cx">                         if (option_debug)
</span><del>-                                DEBUGA_SKYPE(&quot;reset audio play\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                DEBUGA_CELLIAX(&quot;reset audio play\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         res = snd_pcm_wait(tech_pvt-&gt;alsap, 1000);
</span><span class="cx">                         if (res &lt; 0) {
</span><del>-                                ERRORA(&quot;audio play wait failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play wait failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                         res = snd_pcm_drop(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;audio play drop failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play drop failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                         res = snd_pcm_prepare(tech_pvt-&gt;alsap);
</span><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                         res = snd_pcm_wait(tech_pvt-&gt;alsap, 1000);
</span><span class="cx">                         if (res &lt; 0) {
</span><del>-                                ERRORA(&quot;audio play wait failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play wait failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                         time(&amp;tech_pvt-&gt;audio_play_reset_timestamp);
</span><span class="cx">                 }
</span><span class="lines">@@ -2608,12 +2606,12 @@
</span><span class="cx"> int alsa_read(private_t * tech_pvt, short *data, int datalen)
</span><span class="cx"> {
</span><span class="cx">         //static struct ast_frame f;
</span><del>-        static short __buf[SKYPIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
-        static short __buf2[(SKYPIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2];
</del><ins>+        static short __buf[CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
+        static short __buf2[(CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2];
</ins><span class="cx">         short *buf;
</span><span class="cx">         short *buf2;
</span><span class="cx">         static int readpos = 0;
</span><del>-        //static int left = SKYPIAX_FRAME_SIZE;
</del><ins>+        //static int left = CELLIAX_FRAME_SIZE;
</ins><span class="cx">         static int left;
</span><span class="cx">         snd_pcm_state_t state;
</span><span class="cx">         int r = 0;
</span><span class="lines">@@ -2621,7 +2619,7 @@
</span><span class="cx">         int error = 0;
</span><span class="cx">         //time_t now_timestamp;
</span><span class="cx"> 
</span><del>-        //DEBUGA_SKYPE(&quot;buf=%p, datalen=%d, left=%d\n&quot;, SKYPIAX_P_LOG, (void *)buf, datalen, left);
</del><ins>+        //DEBUGA_CELLIAX(&quot;buf=%p, datalen=%d, left=%d\n&quot;, CELLIAX_P_LOG, (void *)buf, datalen, left);
</ins><span class="cx">         //memset(&amp;f, 0, sizeof(struct ast_frame)); //giova
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -2632,23 +2630,23 @@
</span><span class="cx"> 
</span><span class="cx">         state = snd_pcm_state(tech_pvt-&gt;alsac);
</span><span class="cx">         if (state != SND_PCM_STATE_RUNNING) {
</span><del>-                DEBUGA_SKYPE(&quot;ALSA read state is not SND_PCM_STATE_RUNNING\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;ALSA read state is not SND_PCM_STATE_RUNNING\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (state != SND_PCM_STATE_PREPARED) {
</span><span class="cx">                         error = snd_pcm_prepare(tech_pvt-&gt;alsac);
</span><span class="cx">                         if (error) {
</span><del>-                                ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(error));
</del><ins>+                                ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(error));
</ins><span class="cx">                                 return r;
</span><span class="cx">                         }
</span><del>-                        DEBUGA_SKYPE(&quot;prepared!\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_CELLIAX(&quot;prepared!\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">                 usleep(1000);
</span><span class="cx">                 error = snd_pcm_start(tech_pvt-&gt;alsac);
</span><span class="cx">                 if (error) {
</span><del>-                        ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(error));
</del><ins>+                        ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(error));
</ins><span class="cx">                         return r;
</span><span class="cx">                 }
</span><del>-                DEBUGA_SKYPE(&quot;started!\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;started!\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 usleep(1000);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2657,13 +2655,13 @@
</span><span class="cx"> 
</span><span class="cx">         if (tech_pvt-&gt;alsa_capture_is_mono) {
</span><span class="cx">                 r = snd_pcm_readi(tech_pvt-&gt;alsac, buf + readpos, left);
</span><del>-                //DEBUGA_SKYPE(&quot;r=%d, buf=%p, buf+readpos=%p, datalen=%d, left=%d\n&quot;, SKYPIAX_P_LOG, r, (void *)buf, (void *)(buf + readpos), datalen, left);
</del><ins>+                //DEBUGA_CELLIAX(&quot;r=%d, buf=%p, buf+readpos=%p, datalen=%d, left=%d\n&quot;, CELLIAX_P_LOG, r, (void *)buf, (void *)(buf + readpos), datalen, left);
</ins><span class="cx">         } else {
</span><span class="cx">                 r = snd_pcm_readi(tech_pvt-&gt;alsac, buf2 + (readpos * 2), left);
</span><span class="cx"> 
</span><span class="cx">                 int a = 0;
</span><span class="cx">                 int i = 0;
</span><del>-                for (i = 0; i &lt; (SKYPIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
</del><ins>+                for (i = 0; i &lt; (CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
</ins><span class="cx">                         __buf[a] = (__buf2[i] + __buf2[i + 1]) / 2;        //comment out this line to use only left
</span><span class="cx">                         //__buf[a] = __buf2[i]; // enable this line to use only left
</span><span class="cx">                         a++;
</span><span class="lines">@@ -2673,14 +2671,14 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (r == -EPIPE) {
</span><del>-                DEBUGA_SKYPE(&quot;ALSA XRUN on read\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;ALSA XRUN on read\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return r;
</span><span class="cx">         } else if (r == -ESTRPIPE) {
</span><del>-                ERRORA(&quot;-ESTRPIPE\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;-ESTRPIPE\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return r;
</span><span class="cx"> 
</span><span class="cx">         } else if (r == -EAGAIN) {
</span><del>-                DEBUGA_SKYPE(&quot;ALSA read -EAGAIN, the soundcard is not ready to be read by celliax\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;ALSA read -EAGAIN, the soundcard is not ready to be read by celliax\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 while (r == -EAGAIN) {
</span><span class="cx">                         usleep(1000);
</span><span class="cx"> 
</span><span class="lines">@@ -2691,7 +2689,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 int a = 0;
</span><span class="cx">                                 int i = 0;
</span><del>-                                for (i = 0; i &lt; (SKYPIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
</del><ins>+                                for (i = 0; i &lt; (CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
</ins><span class="cx">                                         __buf[a] = (__buf2[i] + __buf2[i + 1]) / 2;
</span><span class="cx">                                         a++;
</span><span class="cx">                                         i++;
</span><span class="lines">@@ -2701,19 +2699,19 @@
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx">         } else if (r &lt; 0) {
</span><del>-                WARNINGA(&quot;ALSA Read error: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(r));
</del><ins>+                WARNINGA(&quot;ALSA Read error: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(r));
</ins><span class="cx">         } else if (r &gt;= 0) {
</span><del>-                //DEBUGA_SKYPE(&quot;read: r=%d, readpos=%d, left=%d, off=%d\n&quot;, SKYPIAX_P_LOG, r, readpos, left, off);
</del><ins>+                //DEBUGA_CELLIAX(&quot;read: r=%d, readpos=%d, left=%d, off=%d\n&quot;, CELLIAX_P_LOG, r, readpos, left, off);
</ins><span class="cx">                 off -= r;                                //what is the meaning of this? a leftover, probably
</span><span class="cx">         }
</span><span class="cx">         /* Update positions */
</span><span class="cx">         readpos += r;
</span><span class="cx">         left -= r;
</span><span class="cx"> 
</span><del>-        if (readpos &gt;= SKYPIAX_FRAME_SIZE) {
</del><ins>+        if (readpos &gt;= CELLIAX_FRAME_SIZE) {
</ins><span class="cx">                 /* A real frame */
</span><span class="cx">                 readpos = 0;
</span><del>-                left = SKYPIAX_FRAME_SIZE;
</del><ins>+                left = CELLIAX_FRAME_SIZE;
</ins><span class="cx">                 int i;
</span><span class="cx">                 for (i = 0; i &lt; r; i++)
</span><span class="cx">                         data[i] = buf[i];
</span><span class="lines">@@ -2740,14 +2738,14 @@
</span><span class="cx">         int failed = 0;
</span><span class="cx"> 
</span><span class="cx">         //strncpy(rdest, idest, sizeof(rdest) - 1);
</span><del>-        DEBUGA_SKYPE(&quot;CelliaxSendsms: dest=%s text=%s\n&quot;, SKYPIAX_P_LOG, dest, text);
-        DEBUGA_SKYPE(&quot;START\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;CelliaxSendsms: dest=%s text=%s\n&quot;, CELLIAX_P_LOG, dest, text);
+        DEBUGA_CELLIAX(&quot;START\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         /* 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
</span><span class="cx">          *
</span><span class="cx">          */
</span><span class="cx"> 
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol != PROTOCOL_AT) {
</span><del>-                ERRORA(&quot;, SKYPIAX_P_LOGCelliaxSendsms supports only AT command cellphones at the moment :-( !\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;, CELLIAX_P_LOGCelliaxSendsms supports only AT command cellphones at the moment :-( !\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return RESULT_FAILURE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2766,7 +2764,7 @@
</span><span class="cx"> 
</span><span class="cx">                         err = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         memset(dest2, '\0', sizeof(dest2));
</span><span class="lines">@@ -2777,32 +2775,32 @@
</span><span class="cx">                 //TODO would be better to lock controldev here
</span><span class="cx">                 err = celliax_serial_write_AT_noack(tech_pvt, smscommand);
</span><span class="cx">                 if (err) {
</span><del>-                        ERRORA(&quot;Error sending SMS\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Error sending SMS\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         failed = 1;
</span><span class="cx">                         goto uscita;
</span><span class="cx">                 }
</span><span class="cx">                 err = celliax_serial_AT_expect(tech_pvt, &quot;&gt; &quot;, 0, 1);        // wait 1.5s for the prompt, no  crlf
</span><span class="cx"> #if 1
</span><span class="cx">                 if (err) {
</span><del>-                        DEBUGA_SKYPE
</del><ins>+                        DEBUGA_CELLIAX
</ins><span class="cx">                                 (&quot;Error or timeout getting prompt '&gt; ' 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&quot;,
</span><del>-                                 SKYPIAX_P_LOG);
</del><ins>+                                 CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                         err = celliax_serial_write_AT_ack(tech_pvt, &quot;ATE1&quot;);        //motorola (at least c350) do not echo the '&gt;' prompt when in ATE0... go figure!!!!
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error activating echo from modem\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error activating echo from modem\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                         tech_pvt-&gt;at_cmgw[0] = '\0';
</span><span class="cx">                         sprintf(smscommand, &quot;AT+CMGW=\&quot;%s\&quot;&quot;, dest);        //TODO: support phones that only accept pdu mode
</span><span class="cx">                         err = celliax_serial_write_AT_noack(tech_pvt, smscommand);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error writing SMS destination to the cellphone memory\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error writing SMS destination to the cellphone memory\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 failed = 1;
</span><span class="cx">                                 goto uscita;
</span><span class="cx">                         }
</span><span class="cx">                         err = celliax_serial_AT_expect(tech_pvt, &quot;&gt; &quot;, 0, 1);        // wait 1.5s for the prompt, no  crlf
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error or timeout getting prompt '&gt; ' for writing sms text in cellphone memory\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error or timeout getting prompt '&gt; ' for writing sms text in cellphone memory\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 failed = 1;
</span><span class="cx">                                 goto uscita;
</span><span class="cx">                         }
</span><span class="lines">@@ -2818,12 +2816,12 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 smscommand[strlen(smscommand)] = 0x1A;
</span><del>-                DEBUGA_SKYPE(&quot;smscommand len is: %d, text is:|||%s|||\n&quot;, SKYPIAX_P_LOG, strlen(smscommand), smscommand);
</del><ins>+                DEBUGA_CELLIAX(&quot;smscommand len is: %d, text is:|||%s|||\n&quot;, CELLIAX_P_LOG, strlen(smscommand), smscommand);
</ins><span class="cx"> 
</span><span class="cx">                 err = celliax_serial_write_AT_ack_nocr_longtime(tech_pvt, smscommand);
</span><span class="cx">                 //TODO would be better to unlock controldev here
</span><span class="cx">                 if (err) {
</span><del>-                        ERRORA(&quot;Error writing SMS text to the cellphone memory\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Error writing SMS text to the cellphone memory\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         //return RESULT_FAILURE;
</span><span class="cx">                         failed = 1;
</span><span class="cx">                         goto uscita;
</span><span class="lines">@@ -2832,7 +2830,7 @@
</span><span class="cx">                         sprintf(smscommand, &quot;AT+CMSS=%s&quot;, tech_pvt-&gt;at_cmgw);
</span><span class="cx">                         err = celliax_serial_write_AT_expect_longtime(tech_pvt, smscommand, &quot;OK&quot;);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error sending SMS from the cellphone memory\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error sending SMS from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 //return RESULT_FAILURE;
</span><span class="cx">                                 failed = 1;
</span><span class="cx">                                 goto uscita;
</span><span class="lines">@@ -2840,7 +2838,7 @@
</span><span class="cx"> 
</span><span class="cx">                         err = celliax_serial_write_AT_ack(tech_pvt, &quot;ATE0&quot;);        //motorola (at least c350) do not echo the '&gt;' prompt when in ATE0... go figure!!!!
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error de-activating echo from modem\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error de-activating echo from modem\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">           uscita:
</span><span class="lines">@@ -2852,14 +2850,14 @@
</span><span class="cx">                         sprintf(smscommand, &quot;AT+CMGR=%s&quot;, tech_pvt-&gt;at_cmgw);
</span><span class="cx">                         err = celliax_serial_write_AT_ack(tech_pvt, smscommand);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error reading SMS back from the cellphone memory\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error reading SMS back from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         /* let's delete from cellphone memory what we've sent */
</span><span class="cx">                         sprintf(smscommand, &quot;AT+CMGD=%s&quot;, tech_pvt-&gt;at_cmgw);
</span><span class="cx">                         err = celliax_serial_write_AT_ack(tech_pvt, smscommand);
</span><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error deleting SMS from the cellphone memory\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error deleting SMS from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         tech_pvt-&gt;at_cmgw[0] = '\0';
</span><span class="lines">@@ -2869,7 +2867,7 @@
</span><span class="cx">                 POPPA_UNLOCKA(&amp;tech_pvt-&gt;controldev_lock);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;FINISH\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;FINISH\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         if (failed)
</span><span class="cx">                 return -1;
</span><span class="cx">         else
</span><span class="lines">@@ -2893,19 +2891,19 @@
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx"> 
</span><span class="cx">         if (sscanf(s, &quot;%lf&quot;, boost) != 1) {
</span><del>-                ERRORA(&quot;invalid boost &lt;%s&gt;\n&quot;, SKYPIAX_P_LOG, s);
</del><ins>+                ERRORA(&quot;invalid boost &lt;%s&gt;\n&quot;, CELLIAX_P_LOG, s);
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">         if (*boost &lt; -BOOST_MAX) {
</span><del>-                WARNINGA(&quot;boost %s too small, using %d\n&quot;, SKYPIAX_P_LOG, s, -BOOST_MAX);
</del><ins>+                WARNINGA(&quot;boost %s too small, using %d\n&quot;, CELLIAX_P_LOG, s, -BOOST_MAX);
</ins><span class="cx">                 *boost = -BOOST_MAX;
</span><span class="cx">         } else if (*boost &gt; BOOST_MAX) {
</span><del>-                WARNINGA(&quot;boost %s too large, using %d\n&quot;, SKYPIAX_P_LOG, s, BOOST_MAX);
</del><ins>+                WARNINGA(&quot;boost %s too large, using %d\n&quot;, CELLIAX_P_LOG, s, BOOST_MAX);
</ins><span class="cx">                 *boost = BOOST_MAX;
</span><span class="cx">         }
</span><span class="cx">         *boost = exp(log(10) * *boost / 20) * BOOST_SCALE;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_SKYPE(&quot;setting boost %s to %f\n&quot;, SKYPIAX_P_LOG, s, *boost);
</del><ins>+                DEBUGA_CELLIAX(&quot;setting boost %s to %f\n&quot;, CELLIAX_P_LOG, s, *boost);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_celliaxmod_celliaxc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c (14721 => 14722)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c        2009-09-01 19:49:14 UTC (rev 14721)
+++ freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c        2009-09-01 20:14:09 UTC (rev 14722)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">  *
</span><span class="cx">  *
</span><span class="cx">  *
</span><del>- * mod_celliax.c -- Skype compatible Endpoint Module
</del><ins>+ * mod_celliax.c -- GSM compatible Endpoint Module
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="lines">@@ -86,10 +86,10 @@
</span><span class="cx"> SWITCH_MODULE_DEFINITION(mod_celliax, mod_celliax_load, mod_celliax_shutdown, NULL);
</span><span class="cx"> SWITCH_STANDARD_API(sk_function);
</span><span class="cx"> /* BEGIN: Changes here */
</span><del>-#define SK_SYNTAX &quot;list [full] || console || skype_API_msg || remove &lt; skypeusername | #interface_name | #interface_id &gt; || reload&quot;
</del><ins>+#define SK_SYNTAX &quot;list [full] || console || celliax_API_msg || remove &lt; celliaxusername | #interface_name | #interface_id &gt; || reload&quot;
</ins><span class="cx"> /* END: Changes heres */
</span><span class="cx"> SWITCH_STANDARD_API(celliax_function);
</span><del>-#define SKYPIAX_SYNTAX &quot;interface_name skype_API_msg&quot;
</del><ins>+#define CELLIAX_SYNTAX &quot;interface_name celliax_API_msg&quot;
</ins><span class="cx"> 
</span><span class="cx"> SWITCH_STANDARD_API(sendsms_function);
</span><span class="cx"> #define SENDSMS_SYNTAX &quot;sendsms interface_name destination_number SMS_text&quot;
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> #define SOFT_RELOAD 1
</span><span class="cx"> /* END: Changes heres */
</span><span class="cx"> 
</span><del>-char *interface_status[] = {        /* should match SKYPIAX_STATE_xxx in celliax.h */
</del><ins>+char *interface_status[] = {        /* should match CELLIAX_STATE_xxx in celliax.h */
</ins><span class="cx">         &quot;IDLE&quot;,
</span><span class="cx">         &quot;DOWN&quot;,
</span><span class="cx">         &quot;RING&quot;,
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx">         &quot;HANG_RQ&quot;,
</span><span class="cx">         &quot;PREANSW&quot;
</span><span class="cx"> };
</span><del>-char *skype_callflow[] = {                /* should match CALLFLOW_XXX in celliax.h */
</del><ins>+char *phone_callflow[] = {                /* should match CALLFLOW_XXX in celliax.h */
</ins><span class="cx">         &quot;CALL_IDLE&quot;,
</span><span class="cx">         &quot;CALL_DOWN&quot;,
</span><span class="cx">         &quot;INCOMING_RNG&quot;,
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">         int real_interfaces;
</span><span class="cx">         int next_interface;
</span><span class="cx">         char hold_music[256];
</span><del>-        private_t SKYPIAX_INTERFACES[SKYPIAX_MAX_INTERFACES];
</del><ins>+        private_t CELLIAX_INTERFACES[CELLIAX_MAX_INTERFACES];
</ins><span class="cx">         switch_mutex_t *mutex;
</span><span class="cx">         private_t *sk_console;
</span><span class="cx"> } globals;
</span><span class="lines">@@ -205,14 +205,14 @@
</span><span class="cx">         if (switch_core_codec_init
</span><span class="cx">                 (&amp;tech_pvt-&gt;read_codec, &quot;L16&quot;, NULL, sample_rate, codec_ms, 1,
</span><span class="cx">                  SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                ERRORA(&quot;Can't load codec?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Can't load codec?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (switch_core_codec_init
</span><span class="cx">                 (&amp;tech_pvt-&gt;write_codec, &quot;L16&quot;, NULL, sample_rate, codec_ms, 1,
</span><span class="cx">                  SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
</span><del>-                ERRORA(&quot;Can't load codec?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Can't load codec?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 switch_core_codec_destroy(&amp;tech_pvt-&gt;read_codec);
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">                 switch_core_session_set_write_codec(session, &amp;tech_pvt-&gt;write_codec);
</span><span class="cx">                 switch_core_session_rwunlock(session);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;no session\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no session\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -247,24 +247,24 @@
</span><span class="cx">         switch_core_session_set_private(session, tech_pvt);
</span><span class="cx">         switch_copy_string(tech_pvt-&gt;session_uuid_str, switch_core_session_get_uuid(session), sizeof(tech_pvt-&gt;session_uuid_str));
</span><span class="cx">         if (!strlen(tech_pvt-&gt;session_uuid_str)) {
</span><del>-                ERRORA(&quot;no tech_pvt-&gt;session_uuid_str\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no tech_pvt-&gt;session_uuid_str\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><del>-        if (celliax_codec(tech_pvt, SAMPLERATE_SKYPIAX, 20) != SWITCH_STATUS_SUCCESS) {
-                ERRORA(&quot;celliax_codec FAILED\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        if (celliax_codec(tech_pvt, SAMPLERATE_CELLIAX, 20) != SWITCH_STATUS_SUCCESS) {
+                ERRORA(&quot;celliax_codec FAILED\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx">         //teletone_dtmf_detect_init(&amp;tech_pvt-&gt;dtmf_detect, tech_pvt-&gt;read_codec.implementation-&gt;actual_samples_per_second);
</span><span class="cx">         teletone_dtmf_detect_init(&amp;tech_pvt-&gt;dtmf_detect, 8000);
</span><span class="cx"> 
</span><span class="cx">         if (alsa_init(tech_pvt)) {
</span><del>-                ERRORA(&quot;alsa_init failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;alsa_init failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx"> 
</span><span class="cx">         }
</span><span class="cx">         if (switch_core_timer_init(&amp;tech_pvt-&gt;timer_read, &quot;soft&quot;, 20, tech_pvt-&gt;read_codec.implementation-&gt;samples_per_packet, celliax_module_pool) !=
</span><span class="cx">                 SWITCH_STATUS_SUCCESS) {
</span><del>-                ERRORA(&quot;setup timer failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;setup timer failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx"> 
</span><span class="cx">         if (switch_core_timer_init(&amp;tech_pvt-&gt;timer_write, &quot;soft&quot;, 20, tech_pvt-&gt;write_codec.implementation-&gt;samples_per_packet, celliax_module_pool) !=
</span><span class="cx">                 SWITCH_STATUS_SUCCESS) {
</span><del>-                ERRORA(&quot;setup timer failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;setup timer failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         switch_clear_flag(tech_pvt, TFLAG_HANGUP);
</span><del>-        DEBUGA_SKYPE(&quot;celliax_codec SUCCESS\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;celliax_codec SUCCESS\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -297,24 +297,24 @@
</span><span class="cx"> 
</span><span class="cx">                 /* take a number as interface id */
</span><span class="cx">                 if (interface_id &gt; 0 || (interface_id == 0 &amp;&amp; strcmp(the_interface, &quot;0&quot;) == 0)) {
</span><del>-                        if (strlen(globals.SKYPIAX_INTERFACES[interface_id].name)) {
</del><ins>+                        if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
</ins><span class="cx">                                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         /* interface name */
</span><del>-                        for (interface_id = 0; interface_id &lt; SKYPIAX_MAX_INTERFACES; interface_id++) {
-                                if (strcmp(globals.SKYPIAX_INTERFACES[interface_id].name, the_interface) == 0) {
</del><ins>+                        for (interface_id = 0; interface_id &lt; CELLIAX_MAX_INTERFACES; interface_id++) {
+                                if (strcmp(globals.CELLIAX_INTERFACES[interface_id].name, the_interface) == 0) {
</ins><span class="cx">                                         return SWITCH_STATUS_SUCCESS;
</span><span class="cx">                                         break;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-        } else {                                        /* look by skype_user */
</del><ins>+        } else {                                        /* look by celliax_user */
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                for (i = 0; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
-                        if (strlen(globals.SKYPIAX_INTERFACES[i].skype_user)) {
-                                if (strcmp(globals.SKYPIAX_INTERFACES[i].skype_user, the_interface) == 0) {
</del><ins>+                for (i = 0; i &lt; CELLIAX_MAX_INTERFACES; i++) {
+                        if (strlen(globals.CELLIAX_INTERFACES[i].celliax_user)) {
+                                if (strcmp(globals.CELLIAX_INTERFACES[i].celliax_user, the_interface) == 0) {
</ins><span class="cx">                                         return SWITCH_STATUS_SUCCESS;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -341,63 +341,63 @@
</span><span class="cx"> 
</span><span class="cx">                 if (interface_id &gt; 0 || (interface_id == 0 &amp;&amp; strcmp(the_interface, &quot;0&quot;) == 0)) {
</span><span class="cx">                         /* take a number as interface id */
</span><del>-                        tech_pvt = &amp;globals.SKYPIAX_INTERFACES[interface_id];
</del><ins>+                        tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</ins><span class="cx">                 } else {
</span><span class="cx"> 
</span><del>-                        for (interface_id = 0; interface_id &lt; SKYPIAX_MAX_INTERFACES; interface_id++) {
-                                if (strcmp(globals.SKYPIAX_INTERFACES[interface_id].name, the_interface) == 0) {
-                                        tech_pvt = &amp;globals.SKYPIAX_INTERFACES[interface_id];
</del><ins>+                        for (interface_id = 0; interface_id &lt; CELLIAX_MAX_INTERFACES; interface_id++) {
+                                if (strcmp(globals.CELLIAX_INTERFACES[interface_id].name, the_interface) == 0) {
+                                        tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</ins><span class="cx">                                         break;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-        } else {                                        /* remove by skype_user */
-                for (interface_id = 0; interface_id &lt; SKYPIAX_MAX_INTERFACES; interface_id++) {
-                        if (strcmp(globals.SKYPIAX_INTERFACES[interface_id].skype_user, the_interface) == 0) {
-                                tech_pvt = &amp;globals.SKYPIAX_INTERFACES[interface_id];
</del><ins>+        } else {                                        /* remove by celliax_user */
+                for (interface_id = 0; interface_id &lt; CELLIAX_MAX_INTERFACES; interface_id++) {
+                        if (strcmp(globals.CELLIAX_INTERFACES[interface_id].celliax_user, the_interface) == 0) {
+                                tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</ins><span class="cx">                                 break;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!tech_pvt) {
</span><del>-                DEBUGA_SKYPE(&quot;interface '%s' does not exist\n&quot;, SKYPIAX_P_LOG, the_interface);
</del><ins>+                DEBUGA_CELLIAX(&quot;interface '%s' does not exist\n&quot;, CELLIAX_P_LOG, the_interface);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (strlen(globals.SKYPIAX_INTERFACES[interface_id].session_uuid_str)) {
-                DEBUGA_SKYPE(&quot;interface '%s' is busy\n&quot;, SKYPIAX_P_LOG, the_interface);
</del><ins>+        if (strlen(globals.CELLIAX_INTERFACES[interface_id].session_uuid_str)) {
+                DEBUGA_CELLIAX(&quot;interface '%s' is busy\n&quot;, CELLIAX_P_LOG, the_interface);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        globals.SKYPIAX_INTERFACES[interface_id].running = 0;
</del><ins>+        globals.CELLIAX_INTERFACES[interface_id].running = 0;
</ins><span class="cx"> 
</span><del>-        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_signaling_thread) {
</del><ins>+        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
</ins><span class="cx"> #ifdef WIN32
</span><del>-                switch_file_write(tech_pvt-&gt;SkypiaxHandles.fdesc[1], &quot;sciutati&quot;, &amp;howmany);        // let's the controldev_thread die
</del><ins>+                switch_file_write(tech_pvt-&gt;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, &amp;howmany);        // let's the controldev_thread die
</ins><span class="cx"> #else /* WIN32 */
</span><del>-                howmany = write(tech_pvt-&gt;SkypiaxHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</del><ins>+                howmany = write(tech_pvt-&gt;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</ins><span class="cx"> #endif /* WIN32 */
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread) {
</del><ins>+        if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
</ins><span class="cx"> #ifdef WIN32
</span><del>-                if (SendMessage(tech_pvt-&gt;SkypiaxHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {        // let's the celliax_api_thread_func die
-                        DEBUGA_SKYPE(&quot;got FALSE here, thread probably was already dead. GetLastError returned: %d\n&quot;, SKYPIAX_P_LOG, GetLastError());
-                        globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread = NULL;
</del><ins>+                if (SendMessage(tech_pvt-&gt;CelliaxHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {        // let's the celliax_api_thread_func die
+                        DEBUGA_CELLIAX(&quot;got FALSE here, thread probably was already dead. GetLastError returned: %d\n&quot;, CELLIAX_P_LOG, GetLastError());
+                        globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread = NULL;
</ins><span class="cx">                 }
</span><span class="cx"> #else
</span><span class="cx">                 XEvent e;
</span><del>-                Atom atom1 = XInternAtom(tech_pvt-&gt;SkypiaxHandles.disp, &quot;SKYPECONTROLAPI_MESSAGE_BEGIN&quot;, False);
</del><ins>+                Atom atom1 = XInternAtom(tech_pvt-&gt;CelliaxHandles.disp, &quot;CELLIAXCONTROLAPI_MESSAGE_BEGIN&quot;, False);
</ins><span class="cx">                 memset(&amp;e, 0, sizeof(e));
</span><span class="cx">                 e.xclient.type = ClientMessage;
</span><span class="cx">                 e.xclient.message_type = atom1;        /*  leading message */
</span><del>-                e.xclient.display = tech_pvt-&gt;SkypiaxHandles.disp;
-                e.xclient.window = tech_pvt-&gt;SkypiaxHandles.skype_win;
</del><ins>+                e.xclient.display = tech_pvt-&gt;CelliaxHandles.disp;
+                e.xclient.window = tech_pvt-&gt;CelliaxHandles.celliax_win;
</ins><span class="cx">                 e.xclient.format = 8;
</span><span class="cx"> 
</span><del>-                XSendEvent(tech_pvt-&gt;SkypiaxHandles.disp, tech_pvt-&gt;SkypiaxHandles.win, False, 0, &amp;e);
-                XSync(tech_pvt-&gt;SkypiaxHandles.disp, False);
</del><ins>+                XSendEvent(tech_pvt-&gt;CelliaxHandles.disp, tech_pvt-&gt;CelliaxHandles.win, False, 0, &amp;e);
+                XSync(tech_pvt-&gt;CelliaxHandles.disp, False);
</ins><span class="cx"> #endif
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -406,27 +406,27 @@
</span><span class="cx">                 switch_yield(50000);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_signaling_thread) {
-                switch_thread_join(&amp;status, globals.SKYPIAX_INTERFACES[interface_id].celliax_signaling_thread);
</del><ins>+        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
+                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread) {
-                switch_thread_join(&amp;status, globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread);
</del><ins>+        if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
+                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_mutex_lock(globals.mutex);
</span><del>-        if (globals.sk_console == &amp;globals.SKYPIAX_INTERFACES[interface_id]) {
-                DEBUGA_SKYPE(&quot;interface '%s' no more console\n&quot;, SKYPIAX_P_LOG, the_interface);
</del><ins>+        if (globals.sk_console == &amp;globals.CELLIAX_INTERFACES[interface_id]) {
+                DEBUGA_CELLIAX(&quot;interface '%s' no more console\n&quot;, CELLIAX_P_LOG, the_interface);
</ins><span class="cx">                 globals.sk_console = NULL;
</span><span class="cx">         } else {
</span><del>-                DEBUGA_SKYPE(&quot;interface '%s' STILL console\n&quot;, SKYPIAX_P_LOG, the_interface);
</del><ins>+                DEBUGA_CELLIAX(&quot;interface '%s' STILL console\n&quot;, CELLIAX_P_LOG, the_interface);
</ins><span class="cx">         }
</span><del>-        memset(&amp;globals.SKYPIAX_INTERFACES[interface_id], '\0', sizeof(private_t));
</del><ins>+        memset(&amp;globals.CELLIAX_INTERFACES[interface_id], '\0', sizeof(private_t));
</ins><span class="cx">         globals.real_interfaces--;
</span><span class="cx">         switch_mutex_unlock(globals.mutex);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;interface '%s' deleted successfully\n&quot;, SKYPIAX_P_LOG, the_interface);
-        globals.SKYPIAX_INTERFACES[interface_id].running = 1;
</del><ins>+        DEBUGA_CELLIAX(&quot;interface '%s' deleted successfully\n&quot;, CELLIAX_P_LOG, the_interface);
+        globals.CELLIAX_INTERFACES[interface_id].running = 1;
</ins><span class="cx">   end:
</span><span class="cx">         //running = 1;
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -449,7 +449,7 @@
</span><span class="cx"> 
</span><span class="cx">         channel = switch_core_session_get_channel(session);
</span><span class="cx">         switch_assert(channel != NULL);
</span><del>-        //ERRORA(&quot;%s CHANNEL INIT\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        //ERRORA(&quot;%s CHANNEL INIT\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         switch_set_flag(tech_pvt, TFLAG_IO);
</span><span class="cx"> 
</span><span class="cx">         /* Move channel's state machine to ROUTING. This means the call is trying
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx">         globals.calls++;
</span><span class="cx"> 
</span><span class="cx">         switch_mutex_unlock(globals.mutex);
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL INIT %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL INIT %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -474,7 +474,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         if (tech_pvt) {
</span><del>-                DEBUGA_SKYPE(&quot;%s CHANNEL DESTROY %s\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</del><ins>+                DEBUGA_CELLIAX(&quot;%s CHANNEL DESTROY %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</ins><span class="cx"> 
</span><span class="cx">                 if (switch_core_codec_ready(&amp;tech_pvt-&gt;read_codec)) {
</span><span class="cx">                         switch_core_codec_destroy(&amp;tech_pvt-&gt;read_codec);
</span><span class="lines">@@ -490,13 +490,13 @@
</span><span class="cx">                 alsa_shutdown(tech_pvt);
</span><span class="cx"> 
</span><span class="cx">                 *tech_pvt-&gt;session_uuid_str = '\0';
</span><del>-                tech_pvt-&gt;interface_state = SKYPIAX_STATE_IDLE;
-                if (tech_pvt-&gt;skype_callflow == CALLFLOW_STATUS_FINISHED) {
-                        tech_pvt-&gt;skype_callflow = CALLFLOW_CALL_IDLE;
</del><ins>+                tech_pvt-&gt;interface_state = CELLIAX_STATE_IDLE;
+                if (tech_pvt-&gt;phone_callflow == CALLFLOW_STATUS_FINISHED) {
+                        tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</ins><span class="cx">                 }
</span><span class="cx">                 switch_core_session_set_private(session, NULL);
</span><span class="cx">         } else {
</span><del>-                DEBUGA_SKYPE(&quot;!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n&quot;, SKYPIAX_P_LOG, switch_core_session_get_uuid(session));
</del><ins>+                DEBUGA_CELLIAX(&quot;!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(session));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL HANGUP\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL HANGUP\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         switch_clear_flag(tech_pvt, TFLAG_IO);
</span><span class="cx">         switch_clear_flag(tech_pvt, TFLAG_VOICE);
</span><span class="cx">         switch_set_flag(tech_pvt, TFLAG_HANGUP);
</span><span class="lines">@@ -531,16 +531,16 @@
</span><span class="cx"> 
</span><span class="cx">         //memset(tech_pvt-&gt;session_uuid_str, '\0', sizeof(tech_pvt-&gt;session_uuid_str));
</span><span class="cx">         //*tech_pvt-&gt;session_uuid_str = '\0';
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL HANGUP\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL HANGUP\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         switch_mutex_lock(globals.mutex);
</span><span class="cx">         globals.calls--;
</span><span class="cx">         if (globals.calls &lt; 0) {
</span><span class="cx">                 globals.calls = 0;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        tech_pvt-&gt;interface_state = SKYPIAX_STATE_IDLE;
-        if (tech_pvt-&gt;skype_callflow == CALLFLOW_STATUS_FINISHED) {
-                tech_pvt-&gt;skype_callflow = CALLFLOW_CALL_IDLE;
</del><ins>+        tech_pvt-&gt;interface_state = CELLIAX_STATE_IDLE;
+        if (tech_pvt-&gt;phone_callflow == CALLFLOW_STATUS_FINISHED) {
+                tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</ins><span class="cx">         }
</span><span class="cx">         switch_mutex_unlock(globals.mutex);
</span><span class="cx"> 
</span><span class="lines">@@ -558,7 +558,7 @@
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL ROUTING\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL ROUTING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -575,7 +575,7 @@
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL EXECUTE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL EXECUTE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -591,10 +591,10 @@
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL KILL_CHANNEL\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL KILL_CHANNEL\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         switch (sig) {
</span><span class="cx">         case SWITCH_SIG_KILL:
</span><del>-                DEBUGA_SKYPE(&quot;%s CHANNEL got SWITCH_SIG_KILL\n&quot;, SKYPIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                DEBUGA_CELLIAX(&quot;%s CHANNEL got SWITCH_SIG_KILL\n&quot;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</ins><span class="cx">                 //switch_mutex_lock(tech_pvt-&gt;flag_mutex);
</span><span class="cx">                 switch_clear_flag(tech_pvt, TFLAG_IO);
</span><span class="cx">                 switch_clear_flag(tech_pvt, TFLAG_VOICE);
</span><span class="lines">@@ -602,7 +602,7 @@
</span><span class="cx">                 //switch_mutex_unlock(tech_pvt-&gt;flag_mutex);
</span><span class="cx">                 break;
</span><span class="cx">         case SWITCH_SIG_BREAK:
</span><del>-                DEBUGA_SKYPE(&quot;%s CHANNEL got SWITCH_SIG_BREAK\n&quot;, SKYPIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                DEBUGA_CELLIAX(&quot;%s CHANNEL got SWITCH_SIG_BREAK\n&quot;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</ins><span class="cx">                 //switch_set_flag(tech_pvt, TFLAG_BREAK);
</span><span class="cx">                 //switch_mutex_lock(tech_pvt-&gt;flag_mutex);
</span><span class="cx">                 switch_set_flag(tech_pvt, TFLAG_BREAK);
</span><span class="lines">@@ -620,7 +620,7 @@
</span><span class="cx"> 
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL CONSUME_MEDIA\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL CONSUME_MEDIA\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -629,7 +629,7 @@
</span><span class="cx"> {
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL EXCHANGE_MEDIA\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL EXCHANGE_MEDIA\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -637,7 +637,7 @@
</span><span class="cx"> {
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL SOFT_EXECUTE\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL SOFT_EXECUTE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -646,8 +646,8 @@
</span><span class="cx">         private_t *tech_pvt = switch_core_session_get_private(session);
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;%s CHANNEL SEND_DTMF\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name);
-        DEBUGA_SKYPE(&quot;DTMF: %c\n&quot;, SKYPIAX_P_LOG, dtmf-&gt;digit);
</del><ins>+        DEBUGA_CELLIAX(&quot;%s CHANNEL SEND_DTMF\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
+        DEBUGA_CELLIAX(&quot;DTMF: %c\n&quot;, CELLIAX_P_LOG, dtmf-&gt;digit);
</ins><span class="cx"> 
</span><span class="cx">         celliax_senddigit(tech_pvt, dtmf-&gt;digit);
</span><span class="cx"> 
</span><span class="lines">@@ -667,7 +667,7 @@
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><span class="cx">         if (!switch_channel_ready(channel) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
</span><del>-                ERRORA(&quot;channel not ready \n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;channel not ready \n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="lines">@@ -706,10 +706,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (samples != 160) {
</span><del>-                ERRORA(&quot;samples=%d\n&quot;, SKYPIAX_P_LOG, samples);
</del><ins>+                ERRORA(&quot;samples=%d\n&quot;, CELLIAX_P_LOG, samples);
</ins><span class="cx">                 goto cng;
</span><span class="cx">         }
</span><del>-//DEBUGA_SKYPE(&quot;samples=%d tech_pvt-&gt;read_frame.timestamp=%d\n&quot;, SKYPIAX_P_LOG, samples, tech_pvt-&gt;read_frame.timestamp);
</del><ins>+//DEBUGA_CELLIAX(&quot;samples=%d tech_pvt-&gt;read_frame.timestamp=%d\n&quot;, CELLIAX_P_LOG, samples, tech_pvt-&gt;read_frame.timestamp);
</ins><span class="cx"> 
</span><span class="cx"> //usleep(17000);
</span><span class="cx"> //usleep(17000);
</span><span class="lines">@@ -736,7 +736,7 @@
</span><span class="cx">                                 switch_channel_queue_dtmf(channel, &amp;dtmf);
</span><span class="cx">                                 p++;
</span><span class="cx">                         }
</span><del>-                        NOTICA(&quot;DTMF DETECTED: [%s] new_dtmf_timestamp: %u, delta_t: %u\n&quot;, SKYPIAX_P_LOG, digit_str, (unsigned int) new_dtmf_timestamp,
</del><ins>+                        NOTICA(&quot;DTMF DETECTED: [%s] new_dtmf_timestamp: %u, delta_t: %u\n&quot;, CELLIAX_P_LOG, digit_str, (unsigned int) new_dtmf_timestamp,
</ins><span class="cx">                                    (unsigned int) (new_dtmf_timestamp - tech_pvt-&gt;old_dtmf_timestamp));
</span><span class="cx">                         tech_pvt-&gt;old_dtmf_timestamp = new_dtmf_timestamp;
</span><span class="cx">                 }
</span><span class="lines">@@ -744,19 +744,19 @@
</span><span class="cx">         while (switch_test_flag(tech_pvt, TFLAG_IO)) {
</span><span class="cx">                 if (switch_test_flag(tech_pvt, TFLAG_BREAK)) {
</span><span class="cx">                         switch_clear_flag(tech_pvt, TFLAG_BREAK);
</span><del>-                        DEBUGA_SKYPE(&quot;CHANNEL READ FRAME goto CNG\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_CELLIAX(&quot;CHANNEL READ FRAME goto CNG\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         goto cng;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
</span><del>-                        DEBUGA_SKYPE(&quot;CHANNEL READ FRAME not IO\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        DEBUGA_CELLIAX(&quot;CHANNEL READ FRAME not IO\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         return SWITCH_STATUS_FALSE;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (switch_test_flag(tech_pvt, TFLAG_IO) &amp;&amp; switch_test_flag(tech_pvt, TFLAG_VOICE)) {
</span><span class="cx">                         switch_clear_flag(tech_pvt, TFLAG_VOICE);
</span><span class="cx">                         if (!tech_pvt-&gt;read_frame.datalen) {
</span><del>-                                DEBUGA_SKYPE(&quot;CHANNEL READ CONTINUE\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                DEBUGA_CELLIAX(&quot;CHANNEL READ CONTINUE\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         *frame = &amp;tech_pvt-&gt;read_frame;
</span><span class="lines">@@ -765,17 +765,17 @@
</span><span class="cx">                                 switch_swap_linear((*frame)-&gt;data, (int) (*frame)-&gt;datalen / 2);
</span><span class="cx">                         }
</span><span class="cx"> #endif
</span><del>-                        //WARNINGA(&quot;HERE\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        //WARNINGA(&quot;HERE\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         return SWITCH_STATUS_SUCCESS;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                WARNINGA(&quot;HERE\n&quot;, SKYPIAX_P_LOG);
-                DEBUGA_SKYPE(&quot;CHANNEL READ no TFLAG_VOICE\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                WARNINGA(&quot;HERE\n&quot;, CELLIAX_P_LOG);
+                DEBUGA_CELLIAX(&quot;CHANNEL READ no TFLAG_VOICE\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx"> 
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;CHANNEL READ FALSE\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;CHANNEL READ FALSE\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         return SWITCH_STATUS_FALSE;
</span><span class="cx"> 
</span><span class="cx">   cng:
</span><span class="lines">@@ -802,7 +802,7 @@
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><span class="cx">         if (!switch_channel_ready(channel) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
</span><del>-                ERRORA(&quot;channel not ready \n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;channel not ready \n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="lines">@@ -815,17 +815,17 @@
</span><span class="cx">         switch_core_timer_next(&amp;tech_pvt-&gt;timer_write);
</span><span class="cx">         //sent = frame-&gt;datalen;
</span><span class="cx"> 
</span><del>-        //ERRORA(&quot;PLAY \n&quot;, SKYPIAX_P_LOG);
</del><ins>+        //ERRORA(&quot;PLAY \n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         //snd_pcm_writei(tech_pvt-&gt;alsap, (short *) frame-&gt;data, (int) (frame-&gt;datalen / 2));
</span><span class="cx"> 
</span><span class="cx">         celliax_sound_boost(frame-&gt;data, frame-&gt;samples, tech_pvt-&gt;playback_boost);
</span><span class="cx">         sent = alsa_write(tech_pvt, frame-&gt;data, (int) (frame-&gt;datalen));
</span><del>-//DEBUGA_SKYPE(&quot;sent=%d \n&quot;, SKYPIAX_P_LOG, sent);
</del><ins>+//DEBUGA_CELLIAX(&quot;sent=%d \n&quot;, CELLIAX_P_LOG, sent);
</ins><span class="cx"> 
</span><span class="cx">         if (sent &amp;&amp; sent != frame-&gt;datalen / 2 &amp;&amp; sent != -1) {
</span><del>-                DEBUGA_SKYPE(&quot;sent %d\n&quot;, SKYPIAX_P_LOG, sent);
</del><ins>+                DEBUGA_CELLIAX(&quot;sent %d\n&quot;, CELLIAX_P_LOG, sent);
</ins><span class="cx">         }
</span><del>-        //NOTICA(&quot;sent=%d\n&quot;, SKYPIAX_P_LOG, sent);
</del><ins>+        //NOTICA(&quot;sent=%d\n&quot;, CELLIAX_P_LOG, sent);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -840,7 +840,7 @@
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;ANSWERED! \n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;ANSWERED! \n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -861,15 +861,15 @@
</span><span class="cx">         switch (msg-&gt;message_id) {
</span><span class="cx">         case SWITCH_MESSAGE_INDICATE_ANSWER:
</span><span class="cx">                 {
</span><del>-                        DEBUGA_SKYPE(&quot;MSG_ID=%d, TO BE ANSWERED!\n&quot;, SKYPIAX_P_LOG, msg-&gt;message_id);
</del><ins>+                        DEBUGA_CELLIAX(&quot;MSG_ID=%d, TO BE ANSWERED!\n&quot;, CELLIAX_P_LOG, msg-&gt;message_id);
</ins><span class="cx">                         channel_answer_channel(session);
</span><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
</span><span class="cx"> 
</span><del>-                WARNINGA(&quot;%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n&quot;, SKYPIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                WARNINGA(&quot;%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n&quot;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</ins><span class="cx">                 while ((samples = alsa_read(tech_pvt, tmp_buffer, tech_pvt-&gt;read_codec.implementation-&gt;samples_per_packet * 4)) &gt; 160) {
</span><del>-                        WARNINGA(&quot;read %d samples\n&quot;, SKYPIAX_P_LOG, samples);
</del><ins>+                        WARNINGA(&quot;read %d samples\n&quot;, CELLIAX_P_LOG, samples);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_core_timer_sync(&amp;tech_pvt-&gt;timer_read);
</span><span class="cx">                 switch_core_timer_sync(&amp;tech_pvt-&gt;timer_write);
</span><span class="lines">@@ -879,7 +879,7 @@
</span><span class="cx"> 
</span><span class="cx">         default:
</span><span class="cx">                 {
</span><del>-                        DEBUGA_SKYPE(&quot;MSG_ID=%d\n&quot;, SKYPIAX_P_LOG, msg-&gt;message_id);
</del><ins>+                        DEBUGA_CELLIAX(&quot;MSG_ID=%d\n&quot;, CELLIAX_P_LOG, msg-&gt;message_id);
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -897,7 +897,7 @@
</span><span class="cx">                 body = &quot;&quot;;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        WARNINGA(&quot;event: |||%s|||\n&quot;, SKYPIAX_P_LOG, body);
</del><ins>+        WARNINGA(&quot;event: |||%s|||\n&quot;, CELLIAX_P_LOG, body);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -940,7 +940,7 @@
</span><span class="cx">                 int found = 0;
</span><span class="cx">                 char interface_name[256];
</span><span class="cx"> 
</span><del>-                DEBUGA_SKYPE(&quot;1 SESSION_REQUEST %s\n&quot;, SKYPIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</del><ins>+                DEBUGA_CELLIAX(&quot;1 SESSION_REQUEST %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</ins><span class="cx">                 switch_core_session_add_stream(*new_session, NULL);
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -955,35 +955,35 @@
</span><span class="cx">                         switch_mutex_lock(globals.mutex);
</span><span class="cx">                         if (strncmp(&quot;ANY&quot;, interface_name, strlen(interface_name)) == 0 || strncmp(&quot;RR&quot;, interface_name, strlen(interface_name)) == 0) {
</span><span class="cx">                                 /* we've been asked for the &quot;ANY&quot; interface, let's find the first idle interface */
</span><del>-                                //DEBUGA_SKYPE(&quot;Finding one available skype interface\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                //DEBUGA_CELLIAX(&quot;Finding one available celliax interface\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 //tech_pvt = find_available_celliax_interface(NULL);
</span><span class="cx">                                 //if (tech_pvt)
</span><span class="cx">                                 //found = 1;
</span><span class="cx">                                 //} else if (strncmp(&quot;RR&quot;, interface_name, strlen(interface_name)) == 0) {
</span><span class="cx">                                 /* Find the first idle interface using Round Robin */
</span><del>-                                DEBUGA_SKYPE(&quot;Finding one available skype interface RR\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                DEBUGA_CELLIAX(&quot;Finding one available celliax interface RR\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 tech_pvt = find_available_celliax_interface_rr(NULL);
</span><span class="cx">                                 if (tech_pvt)
</span><span class="cx">                                         found = 1;
</span><del>-                                DEBUGA_SKYPE(&quot;FOUND one available skype interface RR\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                DEBUGA_CELLIAX(&quot;FOUND one available celliax interface RR\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        for (i = 0; !found &amp;&amp; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
</del><ins>+                        for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</ins><span class="cx">                                 /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the &quot;ANY&quot; interface */
</span><del>-                                if (strlen(globals.SKYPIAX_INTERFACES[i].name)
-                                        &amp;&amp; (strncmp(globals.SKYPIAX_INTERFACES[i].name, interface_name, strlen(interface_name)) == 0)) {
-                                        if (strlen(globals.SKYPIAX_INTERFACES[i].session_uuid_str)) {
-                                                DEBUGA_SKYPE
-                                                        (&quot;globals.SKYPIAX_INTERFACES[%d].name=|||%s||| session_uuid_str=|||%s||| is BUSY\n&quot;,
-                                                         SKYPIAX_P_LOG, i, globals.SKYPIAX_INTERFACES[i].name, globals.SKYPIAX_INTERFACES[i].session_uuid_str);
-                                                DEBUGA_SKYPE(&quot;1 SESSION_DESTROY %s\n&quot;, SKYPIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</del><ins>+                                if (strlen(globals.CELLIAX_INTERFACES[i].name)
+                                        &amp;&amp; (strncmp(globals.CELLIAX_INTERFACES[i].name, interface_name, strlen(interface_name)) == 0)) {
+                                        if (strlen(globals.CELLIAX_INTERFACES[i].session_uuid_str)) {
+                                                DEBUGA_CELLIAX
+                                                        (&quot;globals.CELLIAX_INTERFACES[%d].name=|||%s||| session_uuid_str=|||%s||| is BUSY\n&quot;,
+                                                         CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name, globals.CELLIAX_INTERFACES[i].session_uuid_str);
+                                                DEBUGA_CELLIAX(&quot;1 SESSION_DESTROY %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</ins><span class="cx">                                                 switch_core_session_destroy(new_session);
</span><span class="cx">                                                 switch_mutex_unlock(globals.mutex);
</span><span class="cx">                                                 return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="cx">                                         }
</span><span class="cx"> 
</span><del>-                                        DEBUGA_SKYPE(&quot;globals.SKYPIAX_INTERFACES[%d].name=|||%s|||?\n&quot;, SKYPIAX_P_LOG, i, globals.SKYPIAX_INTERFACES[i].name);
-                                        tech_pvt = &amp;globals.SKYPIAX_INTERFACES[i];
</del><ins>+                                        DEBUGA_CELLIAX(&quot;globals.CELLIAX_INTERFACES[%d].name=|||%s|||?\n&quot;, CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name);
+                                        tech_pvt = &amp;globals.CELLIAX_INTERFACES[i];
</ins><span class="cx">                                         found = 1;
</span><span class="cx">                                         break;
</span><span class="cx">                                 }
</span><span class="lines">@@ -991,14 +991,14 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 } else {
</span><del>-                        ERRORA(&quot;Doh! no destination number?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no destination number?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(new_session);
</span><span class="cx">                         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (!found) {
</span><del>-                        DEBUGA_SKYPE(&quot;Doh! no available interface for |||%s|||?\n&quot;, SKYPIAX_P_LOG, interface_name);
-                        DEBUGA_SKYPE(&quot;2 SESSION_DESTROY %s\n&quot;, SKYPIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</del><ins>+                        DEBUGA_CELLIAX(&quot;Doh! no available interface for |||%s|||?\n&quot;, CELLIAX_P_LOG, interface_name);
+                        DEBUGA_CELLIAX(&quot;2 SESSION_DESTROY %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</ins><span class="cx">                         switch_core_session_destroy(new_session);
</span><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                         //return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="lines">@@ -1007,13 +1007,13 @@
</span><span class="cx"> 
</span><span class="cx">                 channel = switch_core_session_get_channel(*new_session);
</span><span class="cx">                 if (!channel) {
</span><del>-                        ERRORA(&quot;Doh! no channel?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no channel?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(new_session);
</span><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="cx">                 }
</span><span class="cx">                 if (celliax_tech_init(tech_pvt, *new_session) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        ERRORA(&quot;Doh! no tech_init?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no tech_init?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(new_session);
</span><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="lines">@@ -1030,7 +1030,7 @@
</span><span class="cx">                         switch_channel_set_caller_profile(channel, caller_profile);
</span><span class="cx">                         tech_pvt-&gt;caller_profile = caller_profile;
</span><span class="cx">                 } else {
</span><del>-                        ERRORA(&quot;Doh! no caller profile\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no caller profile\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(new_session);
</span><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="lines">@@ -1055,7 +1055,7 @@
</span><span class="cx">                 return SWITCH_CAUSE_SUCCESS;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        ERRORA(&quot;Doh! no new_session\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Doh! no new_session\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1073,7 +1073,7 @@
</span><span class="cx"> 
</span><span class="cx">         switch_mutex_init(&amp;globals.mutex, SWITCH_MUTEX_NESTED, celliax_module_pool);
</span><span class="cx">         if (!(xml = switch_xml_open_cfg(cf, &amp;cfg, NULL))) {
</span><del>-                ERRORA(&quot;open of %s failed\n&quot;, SKYPIAX_P_LOG, cf);
</del><ins>+                ERRORA(&quot;open of %s failed\n&quot;, CELLIAX_P_LOG, cf);
</ins><span class="cx">                 running = 0;
</span><span class="cx">                 switch_xml_free(xml);
</span><span class="cx">                 return SWITCH_STATUS_TERM;
</span><span class="lines">@@ -1086,36 +1086,36 @@
</span><span class="cx">                         char *val = (char *) switch_xml_attr_soft(param, &quot;value&quot;);
</span><span class="cx"> 
</span><span class="cx">                         if (!strcasecmp(var, &quot;debug&quot;)) {
</span><del>-                                DEBUGA_SKYPE(&quot;globals.debug=%d\n&quot;, SKYPIAX_P_LOG, globals.debug);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.debug=%d\n&quot;, CELLIAX_P_LOG, globals.debug);
</ins><span class="cx">                                 globals.debug = atoi(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.debug=%d\n&quot;, SKYPIAX_P_LOG, globals.debug);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.debug=%d\n&quot;, CELLIAX_P_LOG, globals.debug);
</ins><span class="cx">                         } else if (!strcasecmp(var, &quot;hold-music&quot;)) {
</span><span class="cx">                                 switch_set_string(globals.hold_music, val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.hold_music=%s\n&quot;, SKYPIAX_P_LOG, globals.hold_music);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.hold_music=%s\n&quot;, CELLIAX_P_LOG, globals.hold_music);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;port&quot;)) {
</span><span class="cx">                                 globals.port = atoi(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.port=%d\n&quot;, SKYPIAX_P_LOG, globals.port);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.port=%d\n&quot;, CELLIAX_P_LOG, globals.port);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;codec-master&quot;)) {
</span><span class="cx">                                 if (!strcasecmp(val, &quot;us&quot;)) {
</span><span class="cx">                                         switch_set_flag(&amp;globals, GFLAG_MY_CODEC_PREFS);
</span><span class="cx">                                 }
</span><del>-                                DEBUGA_SKYPE(&quot;codec-master globals.debug=%d\n&quot;, SKYPIAX_P_LOG, globals.debug);
</del><ins>+                                DEBUGA_CELLIAX(&quot;codec-master globals.debug=%d\n&quot;, CELLIAX_P_LOG, globals.debug);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;dialplan&quot;)) {
</span><span class="cx">                                 set_global_dialplan(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.dialplan=%s\n&quot;, SKYPIAX_P_LOG, globals.dialplan);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.dialplan=%s\n&quot;, CELLIAX_P_LOG, globals.dialplan);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;destination&quot;)) {
</span><span class="cx">                                 set_global_destination(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.destination=%s\n&quot;, SKYPIAX_P_LOG, globals.destination);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.destination=%s\n&quot;, CELLIAX_P_LOG, globals.destination);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;context&quot;)) {
</span><span class="cx">                                 set_global_context(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.context=%s\n&quot;, SKYPIAX_P_LOG, globals.context);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.context=%s\n&quot;, CELLIAX_P_LOG, globals.context);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;codec-prefs&quot;)) {
</span><span class="cx">                                 set_global_codec_string(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.codec_string=%s\n&quot;, SKYPIAX_P_LOG, globals.codec_string);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.codec_string=%s\n&quot;, CELLIAX_P_LOG, globals.codec_string);
</ins><span class="cx">                                 globals.codec_order_last = switch_separate_string(globals.codec_string, ',', globals.codec_order, SWITCH_MAX_CODECS);
</span><span class="cx">                         } else if (!strcmp(var, &quot;codec-rates&quot;)) {
</span><span class="cx">                                 set_global_codec_rates_string(val);
</span><del>-                                DEBUGA_SKYPE(&quot;globals.codec_rates_string=%s\n&quot;, SKYPIAX_P_LOG, globals.codec_rates_string);
</del><ins>+                                DEBUGA_CELLIAX(&quot;globals.codec_rates_string=%s\n&quot;, CELLIAX_P_LOG, globals.codec_rates_string);
</ins><span class="cx">                                 globals.codec_rates_last = switch_separate_string(globals.codec_rates_string, ',', globals.codec_rates, SWITCH_MAX_CODECS);
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1142,7 +1142,7 @@
</span><span class="cx">                         char *X11_display = NULL;
</span><span class="cx">                         char *tcp_cli_port = NULL;
</span><span class="cx">                         char *tcp_srv_port = NULL;
</span><del>-                        char *skype_user = NULL;
</del><ins>+                        char *celliax_user = NULL;
</ins><span class="cx"> 
</span><span class="cx">                         uint32_t interface_id = 0, to = 0, max = 0;
</span><span class="cx">                         uint32_t controldevice_speed = B115200;
</span><span class="lines">@@ -1172,8 +1172,8 @@
</span><span class="cx">                                         fail_dial_regex = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;hold-music&quot;)) {
</span><span class="cx">                                         hold_music = val;
</span><del>-                                } else if (!strcasecmp(var, &quot;skype_user&quot;)) {
-                                        skype_user = val;
</del><ins>+                                } else if (!strcasecmp(var, &quot;celliax_user&quot;)) {
+                                        celliax_user = val;
</ins><span class="cx">                                 } else if (!strcasecmp(var, &quot;tcp_cli_port&quot;)) {
</span><span class="cx">                                         tcp_cli_port = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;tcp_srv_port&quot;)) {
</span><span class="lines">@@ -1187,8 +1187,8 @@
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                         }
</span><del>-                        if (!skype_user) {
-                                ERRORA(&quot;interface missing REQUIRED param 'skype_user'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        if (!celliax_user) {
+                                ERRORA(&quot;interface missing REQUIRED param 'celliax_user'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1204,32 +1204,32 @@
</span><span class="cx">                         /* END: Changes here */
</span><span class="cx"> 
</span><span class="cx">                         if (!X11_display) {
</span><del>-                                ERRORA(&quot;interface missing REQUIRED param 'X11_display'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;interface missing REQUIRED param 'X11_display'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if (!tcp_cli_port) {
</span><del>-                                ERRORA(&quot;interface missing REQUIRED param 'tcp_cli_port'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;interface missing REQUIRED param 'tcp_cli_port'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (!tcp_srv_port) {
</span><del>-                                ERRORA(&quot;interface missing REQUIRED param 'tcp_srv_port'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;interface missing REQUIRED param 'tcp_srv_port'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if (!id) {
</span><del>-                                ERRORA(&quot;interface missing REQUIRED param 'id'\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;interface missing REQUIRED param 'id'\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if (switch_is_number(id)) {
</span><span class="cx">                                 interface_id = atoi(id);
</span><del>-                                DEBUGA_SKYPE(&quot;interface_id=%d\n&quot;, SKYPIAX_P_LOG, interface_id);
</del><ins>+                                DEBUGA_CELLIAX(&quot;interface_id=%d\n&quot;, CELLIAX_P_LOG, interface_id);
</ins><span class="cx">                         } else {
</span><del>-                                ERRORA(&quot;interface param 'id' MUST be a number, now id='%s'\n&quot;, SKYPIAX_P_LOG, id);
</del><ins>+                                ERRORA(&quot;interface param 'id' MUST be a number, now id='%s'\n&quot;, CELLIAX_P_LOG, id);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (!name) {
</span><del>-                                WARNINGA(&quot;interface missing param 'name', not nice, but works\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                WARNINGA(&quot;interface missing param 'name', not nice, but works\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (!controldevice_name) {
</span><span class="lines">@@ -1245,158 +1245,158 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (name) {
</span><del>-                                DEBUGA_SKYPE(&quot;name=%s\n&quot;, SKYPIAX_P_LOG, name);
</del><ins>+                                DEBUGA_CELLIAX(&quot;name=%s\n&quot;, CELLIAX_P_LOG, name);
</ins><span class="cx">                         }
</span><del>-                        if (interface_id &amp;&amp; interface_id &lt; SKYPIAX_MAX_INTERFACES) {
</del><ins>+                        if (interface_id &amp;&amp; interface_id &lt; CELLIAX_MAX_INTERFACES) {
</ins><span class="cx">                                 private_t newconf;
</span><span class="cx">                                 switch_threadattr_t *celliax_api_thread_attr = NULL;
</span><span class="cx">                                 //switch_threadattr_t *celliax_signaling_thread_attr = NULL;
</span><span class="cx"> 
</span><span class="cx">                                 memset(&amp;newconf, '\0', sizeof(newconf));
</span><del>-                                globals.SKYPIAX_INTERFACES[interface_id] = newconf;
-                                globals.SKYPIAX_INTERFACES[interface_id].running = 1;
</del><ins>+                                globals.CELLIAX_INTERFACES[interface_id] = newconf;
+                                globals.CELLIAX_INTERFACES[interface_id].running = 1;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                tech_pvt = &amp;globals.SKYPIAX_INTERFACES[interface_id];
</del><ins>+                                tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</ins><span class="cx"> 
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].interface_id, id);
</del><ins>+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].interface_id, id);
</ins><span class="cx">                                 if (name) {
</span><del>-                                        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].name, name);
</del><ins>+                                        switch_set_string(globals.CELLIAX_INTERFACES[interface_id].name, name);
</ins><span class="cx">                                 } else {
</span><del>-                                        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].name, &quot;N/A&quot;);
</del><ins>+                                        switch_set_string(globals.CELLIAX_INTERFACES[interface_id].name, &quot;N/A&quot;);
</ins><span class="cx">                                 }
</span><del>-                                DEBUGA_SKYPE(&quot;CONFIGURING interface_id=%d\n&quot;, SKYPIAX_P_LOG, interface_id);
</del><ins>+                                DEBUGA_CELLIAX(&quot;CONFIGURING interface_id=%d\n&quot;, CELLIAX_P_LOG, interface_id);
</ins><span class="cx"> #ifdef WIN32
</span><del>-                                globals.SKYPIAX_INTERFACES[interface_id].tcp_cli_port = (unsigned short) atoi(tcp_cli_port);
-                                globals.SKYPIAX_INTERFACES[interface_id].tcp_srv_port = (unsigned short) atoi(tcp_srv_port);
</del><ins>+                                globals.CELLIAX_INTERFACES[interface_id].tcp_cli_port = (unsigned short) atoi(tcp_cli_port);
+                                globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port = (unsigned short) atoi(tcp_srv_port);
</ins><span class="cx"> #else /* WIN32 */
</span><del>-                                globals.SKYPIAX_INTERFACES[interface_id].tcp_cli_port = atoi(tcp_cli_port);
-                                globals.SKYPIAX_INTERFACES[interface_id].tcp_srv_port = atoi(tcp_srv_port);
</del><ins>+                                globals.CELLIAX_INTERFACES[interface_id].tcp_cli_port = atoi(tcp_cli_port);
+                                globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port = atoi(tcp_srv_port);
</ins><span class="cx"> #endif /* WIN32 */
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].X11_display, X11_display);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].skype_user, skype_user);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].dialplan, dialplan);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].destination, destination);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].controldevice_name, controldevice_name);
-                                globals.SKYPIAX_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
-                                globals.SKYPIAX_INTERFACES[interface_id].controldevprotocol = controldevprotocol;
</del><ins>+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].X11_display, X11_display);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].celliax_user, celliax_user);
+                                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].context, context);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].controldevice_name, controldevice_name);
+                                globals.CELLIAX_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
+                                globals.CELLIAX_INTERFACES[interface_id].controldevprotocol = controldevprotocol;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                switch_mutex_init(&amp;globals.SKYPIAX_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, celliax_module_pool);
</del><ins>+                                switch_mutex_init(&amp;globals.CELLIAX_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, celliax_module_pool);
</ins><span class="cx"> /*********************/
</span><span class="cx">                                 //at_dial_pre_number = &quot;AT+CKPD=\&quot;&quot;;
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_dial_pre_number, &quot;ATD&quot;);
</del><ins>+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_pre_number, &quot;ATD&quot;);
</ins><span class="cx">                                 //.at_dial_post_number = &quot;S\&quot;&quot;;
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_dial_post_number, &quot;;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_dial_expect, &quot;OK&quot;);
-                                globals.SKYPIAX_INTERFACES[interface_id].at_early_audio = 0;
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_hangup, &quot;ATH&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_hangup_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_answer, &quot;ATA&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_answer_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_send_dtmf, &quot;AT+VTS&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_1, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_1_expect, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_2, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_2_expect, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_3, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_3_expect, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_4, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_4_expect, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_5, &quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_preinit_5_expect, &quot;&quot;);
-                                globals.SKYPIAX_INTERFACES[interface_id].at_after_preinit_pause = 500000;
-                                globals.SKYPIAX_INTERFACES[interface_id].at_initial_pause = 500000;
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_1, &quot;at+cmic=0,9&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_1_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_2, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_2_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_3, &quot;AT+CSSN=1,0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_3_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_4, &quot;at+sidet=0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_4_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_5, &quot;at+clvl=99&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_postinit_5_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_query_battchg, &quot;AT+CBC&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_query_battchg_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_query_signal, &quot;AT+CSQ&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_query_signal_expect, &quot;OK&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_call_idle, &quot;+MCST: 1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_call_incoming, &quot;+MCST: 2&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_call_active, &quot;+CSSI: 7&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_call_failed, &quot;+MCST: 65&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_call_calling, &quot;+CSSI: 1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_noservice_string, &quot;CIEV: 2;0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_nosignal_string, &quot;CIEV: 5;0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_lowsignal_string, &quot;CIEV: 5;1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_lowbattchg_string, &quot;CIEV: 0;1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_nobattchg_string, &quot;CIEV: 0;0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_callactive_string, &quot;CIEV: 3;1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_nocallactive_string, &quot;CIEV: 3;0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_nocallsetup_string, &quot;CIEV: 6;0&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_callsetupincoming_string, &quot;CIEV: 6;1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_callsetupoutgoing_string, &quot;CIEV: 6;2&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].at_indicator_callsetupremoteringing_string, &quot;CIEV: 6;3&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].sms_receiving_program, &quot;/usr/local/bin/ciapalo&quot;);
-                                globals.SKYPIAX_INTERFACES[interface_id].at_has_clcc = 0;
-                                globals.SKYPIAX_INTERFACES[interface_id].at_has_ecam = 0;
</del><ins>+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_post_number, &quot;;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_expect, &quot;OK&quot;);
+                                globals.CELLIAX_INTERFACES[interface_id].at_early_audio = 0;
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_hangup, &quot;ATH&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_hangup_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_answer, &quot;ATA&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_answer_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_send_dtmf, &quot;AT+VTS&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_1, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_1_expect, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_2, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_2_expect, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_3, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_3_expect, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_4, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_4_expect, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_5, &quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_5_expect, &quot;&quot;);
+                                globals.CELLIAX_INTERFACES[interface_id].at_after_preinit_pause = 500000;
+                                globals.CELLIAX_INTERFACES[interface_id].at_initial_pause = 500000;
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_1, &quot;at+cmic=0,9&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_1_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_2, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_2_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_3, &quot;AT+CSSN=1,0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_3_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_4, &quot;at+sidet=0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_4_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_5, &quot;at+clvl=99&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_5_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_battchg, &quot;AT+CBC&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_battchg_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_signal, &quot;AT+CSQ&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_signal_expect, &quot;OK&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_idle, &quot;+MCST: 1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_incoming, &quot;+MCST: 2&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_active, &quot;+CSSI: 7&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_failed, &quot;+MCST: 65&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_calling, &quot;+CSSI: 1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_noservice_string, &quot;CIEV: 2;0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nosignal_string, &quot;CIEV: 5;0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_lowsignal_string, &quot;CIEV: 5;1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_lowbattchg_string, &quot;CIEV: 0;1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nobattchg_string, &quot;CIEV: 0;0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callactive_string, &quot;CIEV: 3;1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nocallactive_string, &quot;CIEV: 3;0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nocallsetup_string, &quot;CIEV: 6;0&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupincoming_string, &quot;CIEV: 6;1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupoutgoing_string, &quot;CIEV: 6;2&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupremoteringing_string, &quot;CIEV: 6;3&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].sms_receiving_program, &quot;/usr/local/bin/ciapalo&quot;);
+                                globals.CELLIAX_INTERFACES[interface_id].at_has_clcc = 0;
+                                globals.CELLIAX_INTERFACES[interface_id].at_has_ecam = 0;
</ins><span class="cx"> 
</span><del>-                                globals.SKYPIAX_INTERFACES[interface_id].alsa_period_size = 160;
-                                globals.SKYPIAX_INTERFACES[interface_id].alsa_periods_in_buffer = 4;
-                                globals.SKYPIAX_INTERFACES[interface_id].celliax_sound_rate = 8000;
</del><ins>+                                globals.CELLIAX_INTERFACES[interface_id].alsa_period_size = 160;
+                                globals.CELLIAX_INTERFACES[interface_id].alsa_periods_in_buffer = 4;
+                                globals.CELLIAX_INTERFACES[interface_id].celliax_sound_rate = 8000;
</ins><span class="cx"> 
</span><del>-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].alsacname, &quot;plughw:1&quot;);
-                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].alsapname, &quot;plughw:1&quot;);
</del><ins>+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].alsacname, &quot;plughw:1&quot;);
+                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].alsapname, &quot;plughw:1&quot;);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                globals.SKYPIAX_INTERFACES[interface_id].alsa_play_is_mono = 1;
-                                globals.SKYPIAX_INTERFACES[interface_id].alsa_capture_is_mono = 1;
</del><ins>+                                globals.CELLIAX_INTERFACES[interface_id].alsa_play_is_mono = 1;
+                                globals.CELLIAX_INTERFACES[interface_id].alsa_capture_is_mono = 1;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                globals.SKYPIAX_INTERFACES[interface_id].capture_boost = 0;
-                                globals.SKYPIAX_INTERFACES[interface_id].playback_boost = 0;
</del><ins>+                                globals.CELLIAX_INTERFACES[interface_id].capture_boost = 0;
+                                globals.CELLIAX_INTERFACES[interface_id].playback_boost = 0;
</ins><span class="cx"> 
</span><del>-                                celliax_store_boost(&quot;5&quot;, &amp;globals.SKYPIAX_INTERFACES[interface_id].capture_boost);
-                                celliax_store_boost(&quot;10&quot;, &amp;globals.SKYPIAX_INTERFACES[interface_id].playback_boost);
</del><ins>+                                celliax_store_boost(&quot;5&quot;, &amp;globals.CELLIAX_INTERFACES[interface_id].capture_boost);
+                                celliax_store_boost(&quot;10&quot;, &amp;globals.CELLIAX_INTERFACES[interface_id].playback_boost);
</ins><span class="cx"> /*********************/
</span><del>-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].X11_display=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].X11_display);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].skype_user=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].skype_user);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].tcp_cli_port=%d\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].tcp_cli_port);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].tcp_srv_port=%d\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].tcp_srv_port);
-                                DEBUGA_SKYPE(&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].name=%s\n&quot;,
-                                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].name);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].context=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].context);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].dialplan=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].dialplan);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].destination=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].destination);
-                                DEBUGA_SKYPE
-                                        (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].context=%s\n&quot;,
-                                         SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].context);
-                                WARNINGA(&quot;STARTING interface_id=%d\n&quot;, SKYPIAX_P_LOG, interface_id);
</del><ins>+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].X11_display=%s\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].X11_display);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].celliax_user=%s\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].celliax_user);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].tcp_cli_port=%d\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].tcp_cli_port);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port=%d\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port);
+                                DEBUGA_CELLIAX(&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].name=%s\n&quot;,
+                                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].context=%s\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].context);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].dialplan=%s\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].dialplan);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].destination=%s\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].destination);
+                                DEBUGA_CELLIAX
+                                        (&quot;interface_id=%d globals.CELLIAX_INTERFACES[interface_id].context=%s\n&quot;,
+                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].context);
+                                WARNINGA(&quot;STARTING interface_id=%d\n&quot;, CELLIAX_P_LOG, interface_id);
</ins><span class="cx"> 
</span><span class="cx">                                 int res = 0;
</span><span class="cx"> 
</span><span class="cx">                                 /* init the serial port */
</span><del>-                                if (globals.SKYPIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
-                                        globals.SKYPIAX_INTERFACES[interface_id].controldevfd =
-                                                celliax_serial_init(&amp;globals.SKYPIAX_INTERFACES[interface_id], globals.SKYPIAX_INTERFACES[interface_id].controldevice_speed);
-                                        if (globals.SKYPIAX_INTERFACES[interface_id].controldevfd &lt; 1) {
-                                                ERRORA(&quot;celliax_serial_init failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                if (globals.CELLIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
+                                        globals.CELLIAX_INTERFACES[interface_id].controldevfd =
+                                                celliax_serial_init(&amp;globals.CELLIAX_INTERFACES[interface_id], globals.CELLIAX_INTERFACES[interface_id].controldevice_speed);
+                                        if (globals.CELLIAX_INTERFACES[interface_id].controldevfd &lt; 1) {
+                                                ERRORA(&quot;celliax_serial_init failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                                 //celliax_sound_shutdown(tmp);
</span><span class="cx">                                                 //if (tmp)
</span><span class="cx">                                                 //free(tmp);
</span><span class="lines">@@ -1405,11 +1405,11 @@
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 /* config the phone/modem on the serial port */
</span><del>-                                if (globals.SKYPIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
</del><ins>+                                if (globals.CELLIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
</ins><span class="cx">                                         //int res;
</span><del>-                                        res = celliax_serial_config(&amp;globals.SKYPIAX_INTERFACES[interface_id]);
</del><ins>+                                        res = celliax_serial_config(&amp;globals.CELLIAX_INTERFACES[interface_id]);
</ins><span class="cx">                                         if (res) {
</span><del>-                                                ERRORA(&quot;celliax_serial_config failed\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                                ERRORA(&quot;celliax_serial_config failed\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                                 //celliax_sound_shutdown(tmp);
</span><span class="cx">                                                 //if (tmp)
</span><span class="cx">                                                 //free(tmp);
</span><span class="lines">@@ -1421,32 +1421,32 @@
</span><span class="cx">                                 switch_sleep(100000);
</span><span class="cx">                                 switch_threadattr_create(&amp;celliax_api_thread_attr, celliax_module_pool);
</span><span class="cx">                                 switch_threadattr_stacksize_set(celliax_api_thread_attr, SWITCH_THREAD_STACKSIZE);
</span><del>-                                switch_thread_create(&amp;globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread, celliax_api_thread_attr, celliax_do_skypeapi_thread,
-                                                                         &amp;globals.SKYPIAX_INTERFACES[interface_id], celliax_module_pool);
</del><ins>+                                switch_thread_create(&amp;globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread, celliax_api_thread_attr, celliax_do_celliaxapi_thread,
+                                                                         &amp;globals.CELLIAX_INTERFACES[interface_id], celliax_module_pool);
</ins><span class="cx"> 
</span><span class="cx">                                 switch_sleep(100000);
</span><span class="cx"> 
</span><span class="cx">                         } else {
</span><del>-                                ERRORA(&quot;interface id %d is higher than SKYPIAX_MAX_INTERFACES (%d)\n&quot;, SKYPIAX_P_LOG, interface_id, SKYPIAX_MAX_INTERFACES);
</del><ins>+                                ERRORA(&quot;interface id %d is higher than CELLIAX_MAX_INTERFACES (%d)\n&quot;, CELLIAX_P_LOG, interface_id, CELLIAX_MAX_INTERFACES);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                for (i = 0; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
-                        if (strlen(globals.SKYPIAX_INTERFACES[i].name)) {
</del><ins>+                for (i = 0; i &lt; CELLIAX_MAX_INTERFACES; i++) {
+                        if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</ins><span class="cx">                                 /* How many real intterfaces */
</span><span class="cx">                                 globals.real_interfaces = i + 1;
</span><span class="cx"> 
</span><del>-                                tech_pvt = &amp;globals.SKYPIAX_INTERFACES[i];
</del><ins>+                                tech_pvt = &amp;globals.CELLIAX_INTERFACES[i];
</ins><span class="cx"> 
</span><del>-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].interface_id=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].interface_id);
-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].X11_display=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].X11_display);
-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].name=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].name);
-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].context=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].context);
-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].dialplan=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].dialplan);
-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].destination=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].destination);
-                                DEBUGA_SKYPE(&quot;i=%d globals.SKYPIAX_INTERFACES[%d].context=%s\n&quot;, SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].context);
</del><ins>+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].interface_id=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].interface_id);
+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].X11_display=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].X11_display);
+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].name=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].name);
+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].context=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].context);
+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].dialplan=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].dialplan);
+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].destination=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].destination);
+                                DEBUGA_CELLIAX(&quot;i=%d globals.CELLIAX_INTERFACES[%d].context=%s\n&quot;, CELLIAX_P_LOG, i, i, globals.CELLIAX_INTERFACES[i].context);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -1479,9 +1479,9 @@
</span><span class="cx"> 
</span><span class="cx">         if (running) {
</span><span class="cx"> 
</span><del>-                SWITCH_ADD_API(commands_api_interface, &quot;sk&quot;, &quot;Skypiax console commands&quot;, sk_function, SK_SYNTAX);
-                SWITCH_ADD_API(commands_api_interface, &quot;celliax&quot;, &quot;Skypiax interface commands&quot;, celliax_function, SKYPIAX_SYNTAX);
-                SWITCH_ADD_API(commands_api_interface, &quot;sendsms&quot;, &quot;sendsms interface destination_number SMS_text&quot;, sendsms_function, SKYPIAX_SYNTAX);
</del><ins>+                SWITCH_ADD_API(commands_api_interface, &quot;sk&quot;, &quot;Celliax console commands&quot;, sk_function, SK_SYNTAX);
+                SWITCH_ADD_API(commands_api_interface, &quot;celliax&quot;, &quot;Celliax interface commands&quot;, celliax_function, CELLIAX_SYNTAX);
+                SWITCH_ADD_API(commands_api_interface, &quot;sendsms&quot;, &quot;sendsms interface destination_number SMS_text&quot;, sendsms_function, CELLIAX_SYNTAX);
</ins><span class="cx"> 
</span><span class="cx">                 /* indicate that the module should continue to be loaded */
</span><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -1499,19 +1499,19 @@
</span><span class="cx"> 
</span><span class="cx">         running = 0;
</span><span class="cx"> 
</span><del>-        for (interface_id = 0; interface_id &lt; SKYPIAX_MAX_INTERFACES; interface_id++) {
-                tech_pvt = &amp;globals.SKYPIAX_INTERFACES[interface_id];
</del><ins>+        for (interface_id = 0; interface_id &lt; CELLIAX_MAX_INTERFACES; interface_id++) {
+                tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</ins><span class="cx"> 
</span><del>-                if (strlen(globals.SKYPIAX_INTERFACES[interface_id].name)) {
</del><ins>+                if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-                        //alsa_shutdown(&amp;globals.SKYPIAX_INTERFACES[interface_id]);
-                        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_signaling_thread) {
</del><ins>+                        //alsa_shutdown(&amp;globals.CELLIAX_INTERFACES[interface_id]);
+                        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
</ins><span class="cx"> #ifdef WIN32
</span><del>-                                switch_file_write(tech_pvt-&gt;SkypiaxHandles.fdesc[1], &quot;sciutati&quot;, &amp;howmany);        // let's the controldev_thread die
</del><ins>+                                switch_file_write(tech_pvt-&gt;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, &amp;howmany);        // let's the controldev_thread die
</ins><span class="cx"> #else /* WIN32 */
</span><del>-                                howmany = write(tech_pvt-&gt;SkypiaxHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</del><ins>+                                howmany = write(tech_pvt-&gt;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</ins><span class="cx"> #endif /* WIN32 */
</span><span class="cx">                         }
</span><span class="cx">                         x = 10;
</span><span class="lines">@@ -1519,26 +1519,26 @@
</span><span class="cx">                                 x--;
</span><span class="cx">                                 switch_yield(50000);
</span><span class="cx">                         }
</span><del>-                        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_signaling_thread) {
-                                switch_thread_join(&amp;status, globals.SKYPIAX_INTERFACES[interface_id].celliax_signaling_thread);
</del><ins>+                        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
+                                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread);
</ins><span class="cx">                         }
</span><del>-                        if (globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread) {
-                                switch_thread_join(&amp;status, globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread);
</del><ins>+                        if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
+                                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread);
</ins><span class="cx">                         }
</span><span class="cx"> #ifndef WIN32
</span><del>-                        WARNINGA(&quot;SHUTDOWN interface_id=%d\n&quot;, SKYPIAX_P_LOG, interface_id);
-                        shutdown(tech_pvt-&gt;audioskypepipe[0], 2);
-                        close(tech_pvt-&gt;audioskypepipe[0]);
-                        shutdown(tech_pvt-&gt;audioskypepipe[1], 2);
-                        close(tech_pvt-&gt;audioskypepipe[1]);
</del><ins>+                        WARNINGA(&quot;SHUTDOWN interface_id=%d\n&quot;, CELLIAX_P_LOG, interface_id);
+                        shutdown(tech_pvt-&gt;audiocelliaxpipe[0], 2);
+                        close(tech_pvt-&gt;audiocelliaxpipe[0]);
+                        shutdown(tech_pvt-&gt;audiocelliaxpipe[1], 2);
+                        close(tech_pvt-&gt;audiocelliaxpipe[1]);
</ins><span class="cx">                         shutdown(tech_pvt-&gt;audiopipe[0], 2);
</span><span class="cx">                         close(tech_pvt-&gt;audiopipe[0]);
</span><span class="cx">                         shutdown(tech_pvt-&gt;audiopipe[1], 2);
</span><span class="cx">                         close(tech_pvt-&gt;audiopipe[1]);
</span><del>-                        shutdown(tech_pvt-&gt;SkypiaxHandles.fdesc[0], 2);
-                        close(tech_pvt-&gt;SkypiaxHandles.fdesc[0]);
-                        shutdown(tech_pvt-&gt;SkypiaxHandles.fdesc[1], 2);
-                        close(tech_pvt-&gt;SkypiaxHandles.fdesc[1]);
</del><ins>+                        shutdown(tech_pvt-&gt;CelliaxHandles.fdesc[0], 2);
+                        close(tech_pvt-&gt;CelliaxHandles.fdesc[0]);
+                        shutdown(tech_pvt-&gt;CelliaxHandles.fdesc[1], 2);
+                        close(tech_pvt-&gt;CelliaxHandles.fdesc[1]);
</ins><span class="cx"> #endif /* WIN32 */
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -1553,9 +1553,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void *SWITCH_THREAD_FUNC celliax_do_skypeapi_thread(switch_thread_t *thread, void *obj)
</del><ins>+void *SWITCH_THREAD_FUNC celliax_do_celliaxapi_thread(switch_thread_t *thread, void *obj)
</ins><span class="cx"> {
</span><del>-        return celliax_do_skypeapi_thread_func(obj);
</del><ins>+        return celliax_do_celliaxapi_thread_func(obj);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int dtmf_received(private_t * tech_pvt, char *value)
</span><span class="lines">@@ -1571,18 +1571,18 @@
</span><span class="cx">                 if (!switch_channel_test_flag(channel, CF_BRIDGED)) {
</span><span class="cx"> 
</span><span class="cx">                         switch_dtmf_t dtmf = { (char) value[0], switch_core_default_dtmf_duration(0) };
</span><del>-                        DEBUGA_SKYPE(&quot;received DTMF %c on channel %s\n&quot;, SKYPIAX_P_LOG, dtmf.digit, switch_channel_get_name(channel));
</del><ins>+                        DEBUGA_CELLIAX(&quot;received DTMF %c on channel %s\n&quot;, CELLIAX_P_LOG, dtmf.digit, switch_channel_get_name(channel));
</ins><span class="cx">                         switch_mutex_lock(tech_pvt-&gt;flag_mutex);
</span><span class="cx">                         //FIXME: why sometimes DTMFs from here do not seems to be get by FS?
</span><span class="cx">                         switch_channel_queue_dtmf(channel, &amp;dtmf);
</span><span class="cx">                         switch_set_flag(tech_pvt, TFLAG_DTMF);
</span><span class="cx">                         switch_mutex_unlock(tech_pvt-&gt;flag_mutex);
</span><span class="cx">                 } else {
</span><del>-                        DEBUGA_SKYPE
-                                (&quot;received a DTMF on channel %s, but we're BRIDGED, so let's NOT relay it out of band\n&quot;, SKYPIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                        DEBUGA_CELLIAX
+                                (&quot;received a DTMF on channel %s, but we're BRIDGED, so let's NOT relay it out of band\n&quot;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                WARNINGA(&quot;received %c DTMF, but no channel?\n&quot;, SKYPIAX_P_LOG, value[0]);
</del><ins>+                WARNINGA(&quot;received %c DTMF, but no channel?\n&quot;, CELLIAX_P_LOG, value[0]);
</ins><span class="cx">         }
</span><span class="cx">         switch_core_session_rwunlock(session);
</span><span class="cx"> 
</span><span class="lines">@@ -1596,16 +1596,16 @@
</span><span class="cx">         switch_channel_t *channel = NULL;
</span><span class="cx"> 
</span><span class="cx">         if ((session = switch_core_session_request(celliax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
</span><del>-                DEBUGA_SKYPE(&quot;2 SESSION_REQUEST %s\n&quot;, SKYPIAX_P_LOG, switch_core_session_get_uuid(session));
</del><ins>+                DEBUGA_CELLIAX(&quot;2 SESSION_REQUEST %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(session));
</ins><span class="cx">                 switch_core_session_add_stream(session, NULL);
</span><span class="cx">                 channel = switch_core_session_get_channel(session);
</span><span class="cx">                 if (!channel) {
</span><del>-                        ERRORA(&quot;Doh! no channel?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no channel?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(&amp;session);
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><span class="cx">                 if (celliax_tech_init(tech_pvt, session) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        ERRORA(&quot;Doh! no tech_init?\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no tech_init?\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(&amp;session);
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><span class="lines">@@ -1622,7 +1622,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 switch_channel_set_state(channel, CS_INIT);
</span><span class="cx">                 if (switch_core_session_thread_launch(session) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        ERRORA(&quot;Error spawning thread\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Error spawning thread\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(&amp;session);
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><span class="lines">@@ -1631,7 +1631,7 @@
</span><span class="cx">                 switch_channel_mark_answered(channel);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_SKYPE(&quot;new_inbound_channel\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;new_inbound_channel\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1644,20 +1644,20 @@
</span><span class="cx">         if (!switch_strlen_zero(tech_pvt-&gt;session_uuid_str)) {
</span><span class="cx">                 session = switch_core_session_locate(tech_pvt-&gt;session_uuid_str);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No session???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">         if (session) {
</span><span class="cx">                 channel = switch_core_session_get_channel(session);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No session???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">         if (channel) {
</span><span class="cx">                 switch_channel_mark_ring_ready(channel);
</span><del>-                DEBUGA_SKYPE(&quot;skype_call: REMOTE PARTY RINGING\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;celliax_call: REMOTE PARTY RINGING\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_core_session_rwunlock(session);
</span><span class="lines">@@ -1674,7 +1674,7 @@
</span><span class="cx">         if (!switch_strlen_zero(tech_pvt-&gt;session_uuid_str)) {
</span><span class="cx">                 session = switch_core_session_locate(tech_pvt-&gt;session_uuid_str);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No session???\n\n\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n\n\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="lines">@@ -1682,15 +1682,15 @@
</span><span class="cx">                 channel = switch_core_session_get_channel(session);
</span><span class="cx">                 switch_core_session_add_stream(session, NULL);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No session???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">         if (channel) {
</span><span class="cx">                 switch_channel_mark_pre_answered(channel);
</span><del>-                DEBUGA_SKYPE(&quot;skype_call: REMOTE PARTY EARLY MEDIA\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;celliax_call: REMOTE PARTY EARLY MEDIA\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1708,28 +1708,28 @@
</span><span class="cx">         if (!switch_strlen_zero(tech_pvt-&gt;session_uuid_str)) {
</span><span class="cx">                 session = switch_core_session_locate(tech_pvt-&gt;session_uuid_str);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No session???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">         if (session) {
</span><span class="cx">                 channel = switch_core_session_get_channel(session);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="cx">         if (channel) {
</span><span class="cx">                 switch_channel_mark_answered(channel);
</span><del>-                tech_pvt-&gt;phone_callflow = SKYPIAX_STATE_UP;
-                tech_pvt-&gt;interface_state = SKYPIAX_STATE_UP;
-                //DEBUGA_SKYPE(&quot;skype_call: %s, answered\n&quot;, SKYPIAX_P_LOG, id);
</del><ins>+                tech_pvt-&gt;phone_callflow = CELLIAX_STATE_UP;
+                tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
+                //DEBUGA_CELLIAX(&quot;celliax_call: %s, answered\n&quot;, CELLIAX_P_LOG, id);
</ins><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_core_session_rwunlock(session);
</span><span class="cx"> 
</span><span class="cx">   done:
</span><del>-        DEBUGA_SKYPE(&quot;outbound_channel_answered!\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;outbound_channel_answered!\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1738,7 +1738,7 @@
</span><span class="cx"> {
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">         int i;
</span><del>-        //int num_interfaces = SKYPIAX_MAX_INTERFACES; 
</del><ins>+        //int num_interfaces = CELLIAX_MAX_INTERFACES; 
</ins><span class="cx">         //int num_interfaces = globals.real_interfaces;
</span><span class="cx"> 
</span><span class="cx">         switch_mutex_lock(globals.mutex);
</span><span class="lines">@@ -1747,35 +1747,35 @@
</span><span class="cx">         //XXX no, is just a convention, but you can have it start from 0. I do not, for aestetic reasons :-)  
</span><span class="cx">         //if (globals.next_interface == 0) globals.next_interface = 1;
</span><span class="cx"> 
</span><del>-        for (i = 0; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
</del><ins>+        for (i = 0; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</ins><span class="cx">                 int interface_id;
</span><span class="cx"> 
</span><span class="cx">                 interface_id = globals.next_interface;
</span><del>-                //interface_id = interface_id &lt; SKYPIAX_MAX_INTERFACES ? interface_id : interface_id - SKYPIAX_MAX_INTERFACES + 1;
-                globals.next_interface = interface_id + 1 &lt; SKYPIAX_MAX_INTERFACES ? interface_id + 1 : 0;
</del><ins>+                //interface_id = interface_id &lt; CELLIAX_MAX_INTERFACES ? interface_id : interface_id - CELLIAX_MAX_INTERFACES + 1;
+                globals.next_interface = interface_id + 1 &lt; CELLIAX_MAX_INTERFACES ? interface_id + 1 : 0;
</ins><span class="cx"> 
</span><del>-                if (strlen(globals.SKYPIAX_INTERFACES[interface_id].name)) {
-                        int skype_state = 0;
</del><ins>+                if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
+                        int celliax_state = 0;
</ins><span class="cx"> 
</span><del>-                        tech_pvt = &amp;globals.SKYPIAX_INTERFACES[interface_id];
-                        skype_state = tech_pvt-&gt;interface_state;
-                        //DEBUGA_SKYPE(&quot;skype interface: %d, name: %s, state: %d\n&quot;, SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].name, skype_state);
-                        if ((tech_pvt_calling ? strcmp(tech_pvt-&gt;skype_user, tech_pvt_calling-&gt;skype_user) : 1)
-                                &amp;&amp; (SKYPIAX_STATE_DOWN == skype_state || 0 == skype_state) &amp;&amp; (tech_pvt-&gt;skype_callflow == CALLFLOW_STATUS_FINISHED
-                                                                                                                                                           || 0 == tech_pvt-&gt;skype_callflow)) {
-                                DEBUGA_SKYPE(&quot;returning as available skype interface name: %s, state: %d callflow: %d\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;name, skype_state,
-                                                         tech_pvt-&gt;skype_callflow);
</del><ins>+                        tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
+                        celliax_state = tech_pvt-&gt;interface_state;
+                        //DEBUGA_CELLIAX(&quot;celliax interface: %d, name: %s, state: %d\n&quot;, CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name, celliax_state);
+                        if ((tech_pvt_calling ? strcmp(tech_pvt-&gt;celliax_user, tech_pvt_calling-&gt;celliax_user) : 1)
+                                &amp;&amp; (CELLIAX_STATE_DOWN == celliax_state || 0 == celliax_state) &amp;&amp; (tech_pvt-&gt;phone_callflow == CALLFLOW_STATUS_FINISHED
+                                                                                                                                                           || 0 == tech_pvt-&gt;phone_callflow)) {
+                                DEBUGA_CELLIAX(&quot;returning as available celliax interface name: %s, state: %d callflow: %d\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, celliax_state,
+                                                         tech_pvt-&gt;phone_callflow);
</ins><span class="cx">                                 /*set to Dialing state to avoid other thread fint it, don't know if it is safe */
</span><span class="cx">                                 //XXX no, it's not safe 
</span><span class="cx">                                 if (tech_pvt_calling == NULL) {
</span><del>-                                        tech_pvt-&gt;interface_state = SKYPIAX_STATE_SELECTED;
</del><ins>+                                        tech_pvt-&gt;interface_state = CELLIAX_STATE_SELECTED;
</ins><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 switch_mutex_unlock(globals.mutex);
</span><span class="cx">                                 return tech_pvt;
</span><span class="cx">                         }
</span><span class="cx">                 }                                                // else {
</span><del>-                //DEBUGA_SKYPE(&quot;Skype interface: %d blank!! A hole here means we cannot hunt the last interface.\n&quot;, SKYPIAX_P_LOG, interface_id);
</del><ins>+                //DEBUGA_CELLIAX(&quot;GSM interface: %d blank!! A hole here means we cannot hunt the last interface.\n&quot;, CELLIAX_P_LOG, interface_id);
</ins><span class="cx">                 //}
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1809,20 +1809,20 @@
</span><span class="cx">                 stream-&gt;write_function(stream, &quot;F ID\t    Name    \tIB (F/T)    OB (F/T)\tState\tCallFlw\t\tUUID\n&quot;);
</span><span class="cx">                 stream-&gt;write_function(stream, &quot;= ====\t  ========  \t=======     =======\t======\t============\t======\n&quot;);
</span><span class="cx"> 
</span><del>-                for (i = 0; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</ins><span class="cx">                         next_flag_char = i == globals.next_interface ? '*' : ' ';
</span><span class="cx"> 
</span><del>-                        if (strlen(globals.SKYPIAX_INTERFACES[i].name)) {
</del><ins>+                        if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</ins><span class="cx">                                 stream-&gt;write_function(stream,
</span><span class="cx">                                                                            &quot;%c %d\t[%s]\t%3ld/%ld\t%6ld/%ld\t%s\t%s\t%s\n&quot;,
</span><span class="cx">                                                                            next_flag_char,
</span><del>-                                                                           i, globals.SKYPIAX_INTERFACES[i].name,
-                                                                           globals.SKYPIAX_INTERFACES[i].ib_failed_calls,
-                                                                           globals.SKYPIAX_INTERFACES[i].ib_calls,
-                                                                           globals.SKYPIAX_INTERFACES[i].ob_failed_calls,
-                                                                           globals.SKYPIAX_INTERFACES[i].ob_calls,
-                                                                           interface_status[globals.SKYPIAX_INTERFACES[i].interface_state],
-                                                                           skype_callflow[globals.SKYPIAX_INTERFACES[i].skype_callflow], globals.SKYPIAX_INTERFACES[i].session_uuid_str);
</del><ins>+                                                                           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);
</ins><span class="cx">                         } else if (argc &gt; 1 &amp;&amp; !strcasecmp(argv[1], &quot;full&quot;)) {
</span><span class="cx">                                 stream-&gt;write_function(stream, &quot;%c\t%d\n&quot;, next_flag_char, i);
</span><span class="cx">                         }
</span><span class="lines">@@ -1835,12 +1835,12 @@
</span><span class="cx">                 int found = 0;
</span><span class="cx"> 
</span><span class="cx">                 if (argc == 2) {
</span><del>-                        for (i = 0; !found &amp;&amp; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
</del><ins>+                        for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</ins><span class="cx">                                 /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the &quot;ANY&quot; interface */
</span><del>-                                if (strlen(globals.SKYPIAX_INTERFACES[i].name)
-                                        &amp;&amp; (strncmp(globals.SKYPIAX_INTERFACES[i].name, argv[1], strlen(argv[1])) == 0)) {
-                                        globals.sk_console = &amp;globals.SKYPIAX_INTERFACES[i];
-                                        stream-&gt;write_function(stream, &quot;sk console is now: globals.SKYPIAX_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.SKYPIAX_INTERFACES[i].name);
</del><ins>+                                if (strlen(globals.CELLIAX_INTERFACES[i].name)
+                                        &amp;&amp; (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[1], strlen(argv[1])) == 0)) {
+                                        globals.sk_console = &amp;globals.CELLIAX_INTERFACES[i];
+                                        stream-&gt;write_function(stream, &quot;sk console is now: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.CELLIAX_INTERFACES[i].name);
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;sk console is: |||%s|||\n&quot;, globals.sk_console-&gt;name);
</span><span class="cx">                                         found = 1;
</span><span class="cx">                                         break;
</span><span class="lines">@@ -1848,7 +1848,7 @@
</span><span class="cx"> 
</span><span class="cx">                         }
</span><span class="cx">                         if (!found)
</span><del>-                                stream-&gt;write_function(stream, &quot;ERROR: A Skypiax interface with name='%s' was not found\n&quot;, argv[1]);
</del><ins>+                                stream-&gt;write_function(stream, &quot;ERROR: A Celliax interface with name='%s' was not found\n&quot;, argv[1]);
</ins><span class="cx">                 } else {
</span><span class="cx"> 
</span><span class="cx">                         stream-&gt;write_function(stream, &quot;-ERR Usage: sk console interface_name\n&quot;);
</span><span class="lines">@@ -1898,12 +1898,12 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!argc) {
</span><del>-                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, SKYPIAX_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, CELLIAX_SYNTAX);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (argc &lt; 2) {
</span><del>-                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, SKYPIAX_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, CELLIAX_SYNTAX);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1911,19 +1911,19 @@
</span><span class="cx">                 int i;
</span><span class="cx">                 int found = 0;
</span><span class="cx"> 
</span><del>-                for (i = 0; !found &amp;&amp; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</ins><span class="cx">                         /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the &quot;ANY&quot; interface */
</span><del>-                        if (strlen(globals.SKYPIAX_INTERFACES[i].name)
-                                &amp;&amp; (strncmp(globals.SKYPIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-                                tech_pvt = &amp;globals.SKYPIAX_INTERFACES[i];
-                                stream-&gt;write_function(stream, &quot;Using interface: globals.SKYPIAX_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.SKYPIAX_INTERFACES[i].name);
</del><ins>+                        if (strlen(globals.CELLIAX_INTERFACES[i].name)
+                                &amp;&amp; (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+                                tech_pvt = &amp;globals.CELLIAX_INTERFACES[i];
+                                stream-&gt;write_function(stream, &quot;Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.CELLIAX_INTERFACES[i].name);
</ins><span class="cx">                                 found = 1;
</span><span class="cx">                                 break;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx">                 if (!found) {
</span><del>-                        stream-&gt;write_function(stream, &quot;ERROR: A Skypiax interface with name='%s' was not found\n&quot;, argv[0]);
</del><ins>+                        stream-&gt;write_function(stream, &quot;ERROR: A Celliax interface with name='%s' was not found\n&quot;, argv[0]);
</ins><span class="cx">                         switch_safe_free(mycmd);
</span><span class="cx"> 
</span><span class="cx">                         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -1931,7 +1931,7 @@
</span><span class="cx">                         //celliax_signaling_write(tech_pvt, (char *) &amp;cmd[strlen(argv[0]) + 1]);
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, SKYPIAX_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, CELLIAX_SYNTAX);
</ins><span class="cx">         }
</span><span class="cx">   end:
</span><span class="cx">         switch_safe_free(mycmd);
</span><span class="lines">@@ -1963,11 +1963,11 @@
</span><span class="cx">                 int i;
</span><span class="cx">                 int found = 0;
</span><span class="cx"> 
</span><del>-                for (i = 0; !found &amp;&amp; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</ins><span class="cx">                         /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the &quot;ANY&quot; interface */
</span><del>-                        if (strlen(globals.SKYPIAX_INTERFACES[i].name)
-                                &amp;&amp; (strncmp(globals.SKYPIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-                                tech_pvt = &amp;globals.SKYPIAX_INTERFACES[i];
</del><ins>+                        if (strlen(globals.CELLIAX_INTERFACES[i].name)
+                                &amp;&amp; (strncmp(globals.CELLIAX_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+                                tech_pvt = &amp;globals.CELLIAX_INTERFACES[i];
</ins><span class="cx">                                 stream-&gt;write_function(stream, &quot;Trying to send your SMS: interface=%s, dest=%s, text=%s\n&quot;, argv[0], argv[1], argv[2]);
</span><span class="cx">                                 found = 1;
</span><span class="cx">                                 break;
</span><span class="lines">@@ -1975,7 +1975,7 @@
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx">                 if (!found) {
</span><del>-                        stream-&gt;write_function(stream, &quot;ERROR: A Skypiax interface with name='%s' was not found\n&quot;, argv[0]);
</del><ins>+                        stream-&gt;write_function(stream, &quot;ERROR: A Celliax interface with name='%s' was not found\n&quot;, argv[0]);
</ins><span class="cx">                         switch_safe_free(mycmd);
</span><span class="cx"> 
</span><span class="cx">                         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -1994,7 +1994,7 @@
</span><span class="cx"> 
</span><span class="cx"> int celliax_transfer(private_t * tech_pvt, char *id, char *value)
</span><span class="cx"> {
</span><del>-        char msg_to_skype[1024];
</del><ins>+        char msg_to_celliax[1024];
</ins><span class="cx">         int i;
</span><span class="cx">         int found = 0;
</span><span class="cx">         private_t *giovatech;
</span><span class="lines">@@ -2003,17 +2003,17 @@
</span><span class="cx">         switch_mutex_lock(globals.mutex);
</span><span class="cx"> 
</span><span class="cx">         gettimeofday(&amp;timenow, NULL);
</span><del>-        for (i = 0; !found &amp;&amp; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
-                if (strlen(globals.SKYPIAX_INTERFACES[i].name)) {
</del><ins>+        for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
+                if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</ins><span class="cx"> 
</span><del>-                        giovatech = &amp;globals.SKYPIAX_INTERFACES[i];
-                        //NOTICA(&quot;skype interface: %d, name: %s, state: %d, value=%s, giovatech-&gt;callid_number=%s, giovatech-&gt;skype_user=%s\n&quot;, SKYPIAX_P_LOG, i, giovatech-&gt;name, giovatech-&gt;interface_state, value, giovatech-&gt;callid_number, giovatech-&gt;skype_user);
</del><ins>+                        giovatech = &amp;globals.CELLIAX_INTERFACES[i];
+                        //NOTICA(&quot;celliax interface: %d, name: %s, state: %d, value=%s, giovatech-&gt;callid_number=%s, giovatech-&gt;celliax_user=%s\n&quot;, CELLIAX_P_LOG, i, giovatech-&gt;name, giovatech-&gt;interface_state, value, giovatech-&gt;callid_number, giovatech-&gt;celliax_user);
</ins><span class="cx">                         //FIXME check a timestamp here
</span><del>-                        if (strlen(giovatech-&gt;skype_call_id) &amp;&amp; (giovatech-&gt;interface_state != SKYPIAX_STATE_DOWN) &amp;&amp; (!strcmp(giovatech-&gt;skype_user, tech_pvt-&gt;skype_user)) &amp;&amp; (!strcmp(giovatech-&gt;callid_number, value)) &amp;&amp; ((((timenow.tv_sec - giovatech-&gt;answer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech-&gt;answer_time.tv_usec)) &lt; 500000)) {        //0.5sec
</del><ins>+                        if (strlen(giovatech-&gt;celliax_call_id) &amp;&amp; (giovatech-&gt;interface_state != CELLIAX_STATE_DOWN) &amp;&amp; (!strcmp(giovatech-&gt;celliax_user, tech_pvt-&gt;celliax_user)) &amp;&amp; (!strcmp(giovatech-&gt;callid_number, value)) &amp;&amp; ((((timenow.tv_sec - giovatech-&gt;answer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech-&gt;answer_time.tv_usec)) &lt; 500000)) {        //0.5sec
</ins><span class="cx">                                 found = 1;
</span><del>-                                DEBUGA_SKYPE
-                                        (&quot;FOUND  (name=%s, giovatech-&gt;interface_state=%d != SKYPIAX_STATE_DOWN) &amp;&amp; (giovatech-&gt;skype_user=%s == tech_pvt-&gt;skype_user=%s) &amp;&amp; (giovatech-&gt;callid_number=%s == value=%s)\n&quot;,
-                                         SKYPIAX_P_LOG, giovatech-&gt;name, giovatech-&gt;interface_state, giovatech-&gt;skype_user, tech_pvt-&gt;skype_user, giovatech-&gt;callid_number, value)
</del><ins>+                                DEBUGA_CELLIAX
+                                        (&quot;FOUND  (name=%s, giovatech-&gt;interface_state=%d != CELLIAX_STATE_DOWN) &amp;&amp; (giovatech-&gt;celliax_user=%s == tech_pvt-&gt;celliax_user=%s) &amp;&amp; (giovatech-&gt;callid_number=%s == value=%s)\n&quot;,
+                                         CELLIAX_P_LOG, giovatech-&gt;name, giovatech-&gt;interface_state, giovatech-&gt;celliax_user, tech_pvt-&gt;celliax_user, giovatech-&gt;callid_number, value)
</ins><span class="cx">                                         break;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -2021,16 +2021,16 @@
</span><span class="cx"> 
</span><span class="cx">         if (found) {
</span><span class="cx">                 //tech_pvt-&gt;callid_number[0]='\0';
</span><del>-                //sprintf(msg_to_skype, &quot;ALTER CALL %s END HANGUP&quot;, id);
-                //celliax_signaling_write(tech_pvt, msg_to_skype);
</del><ins>+                //sprintf(msg_to_celliax, &quot;ALTER CALL %s END HANGUP&quot;, id);
+                //celliax_signaling_write(tech_pvt, msg_to_celliax);
</ins><span class="cx">                 switch_mutex_unlock(globals.mutex);
</span><span class="cx">                 return 0;
</span><span class="cx">         }
</span><del>-        DEBUGA_SKYPE(&quot;NOT FOUND\n&quot;, SKYPIAX_P_LOG);
</del><ins>+        DEBUGA_CELLIAX(&quot;NOT FOUND\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><del>-        if (!tech_pvt || !tech_pvt-&gt;skype_call_id || !strlen(tech_pvt-&gt;skype_call_id)) {
</del><ins>+        if (!tech_pvt || !tech_pvt-&gt;celliax_call_id || !strlen(tech_pvt-&gt;celliax_call_id)) {
</ins><span class="cx">                 /* we are not inside an active call */
</span><del>-                DEBUGA_SKYPE(&quot;We're NO MORE in a call now %s\n&quot;, SKYPIAX_P_LOG, (tech_pvt &amp;&amp; tech_pvt-&gt;skype_call_id) ? tech_pvt-&gt;skype_call_id : &quot;&quot;);
</del><ins>+                DEBUGA_CELLIAX(&quot;We're NO MORE in a call now %s\n&quot;, CELLIAX_P_LOG, (tech_pvt &amp;&amp; tech_pvt-&gt;celliax_call_id) ? tech_pvt-&gt;celliax_call_id : &quot;&quot;);
</ins><span class="cx">                 switch_mutex_unlock(globals.mutex);
</span><span class="cx"> 
</span><span class="cx">         } else {
</span><span class="lines">@@ -2045,18 +2045,18 @@
</span><span class="cx">                 private_t *available_celliax_interface = NULL;
</span><span class="cx"> 
</span><span class="cx">                 gettimeofday(&amp;timenow, NULL);
</span><del>-                for (i = 0; !found &amp;&amp; i &lt; SKYPIAX_MAX_INTERFACES; i++) {
-                        if (strlen(globals.SKYPIAX_INTERFACES[i].name)) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
+                        if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</ins><span class="cx"> 
</span><del>-                                giovatech = &amp;globals.SKYPIAX_INTERFACES[i];
-                                //NOTICA(&quot;skype interface: %d, name: %s, state: %d, value=%s, giovatech-&gt;callid_number=%s, giovatech-&gt;skype_user=%s\n&quot;, SKYPIAX_P_LOG, i, giovatech-&gt;name, giovatech-&gt;interface_state, value, giovatech-&gt;callid_number, giovatech-&gt;skype_user);
</del><ins>+                                giovatech = &amp;globals.CELLIAX_INTERFACES[i];
+                                //NOTICA(&quot;celliax interface: %d, name: %s, state: %d, value=%s, giovatech-&gt;callid_number=%s, giovatech-&gt;celliax_user=%s\n&quot;, CELLIAX_P_LOG, i, giovatech-&gt;name, giovatech-&gt;interface_state, value, giovatech-&gt;callid_number, giovatech-&gt;celliax_user);
</ins><span class="cx">                                 //FIXME check a timestamp here
</span><del>-                                if (strlen(giovatech-&gt;skype_transfer_call_id) &amp;&amp; (giovatech-&gt;interface_state != SKYPIAX_STATE_DOWN) &amp;&amp; (!strcmp(giovatech-&gt;skype_user, tech_pvt-&gt;skype_user)) &amp;&amp; (!strcmp(giovatech-&gt;transfer_callid_number, value)) &amp;&amp; ((((timenow.tv_sec - giovatech-&gt;transfer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech-&gt;transfer_time.tv_usec)) &lt; 1000000)) {        //1.0 sec
</del><ins>+                                if (strlen(giovatech-&gt;celliax_transfer_call_id) &amp;&amp; (giovatech-&gt;interface_state != CELLIAX_STATE_DOWN) &amp;&amp; (!strcmp(giovatech-&gt;celliax_user, tech_pvt-&gt;celliax_user)) &amp;&amp; (!strcmp(giovatech-&gt;transfer_callid_number, value)) &amp;&amp; ((((timenow.tv_sec - giovatech-&gt;transfer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech-&gt;transfer_time.tv_usec)) &lt; 1000000)) {        //1.0 sec
</ins><span class="cx">                                         found = 1;
</span><del>-                                        DEBUGA_SKYPE
-                                                (&quot;FOUND  (name=%s, giovatech-&gt;interface_state=%d != SKYPIAX_STATE_DOWN) &amp;&amp; (giovatech-&gt;skype_user=%s == tech_pvt-&gt;skype_user=%s) &amp;&amp; (giovatech-&gt;transfer_callid_number=%s == value=%s)\n&quot;,
-                                                 SKYPIAX_P_LOG, giovatech-&gt;name, giovatech-&gt;interface_state,
-                                                 giovatech-&gt;skype_user, tech_pvt-&gt;skype_user, giovatech-&gt;transfer_callid_number, value)
</del><ins>+                                        DEBUGA_CELLIAX
+                                                (&quot;FOUND  (name=%s, giovatech-&gt;interface_state=%d != CELLIAX_STATE_DOWN) &amp;&amp; (giovatech-&gt;celliax_user=%s == tech_pvt-&gt;celliax_user=%s) &amp;&amp; (giovatech-&gt;transfer_callid_number=%s == value=%s)\n&quot;,
+                                                 CELLIAX_P_LOG, giovatech-&gt;name, giovatech-&gt;interface_state,
+                                                 giovatech-&gt;celliax_user, tech_pvt-&gt;celliax_user, giovatech-&gt;transfer_callid_number, value)
</ins><span class="cx">                                                 break;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -2064,12 +2064,12 @@
</span><span class="cx"> 
</span><span class="cx">                 if (found) {
</span><span class="cx">                         //tech_pvt-&gt;callid_number[0]='\0';
</span><del>-                        //sprintf(msg_to_skype, &quot;ALTER CALL %s END HANGUP&quot;, id);
-                        //celliax_signaling_write(tech_pvt, msg_to_skype);
</del><ins>+                        //sprintf(msg_to_celliax, &quot;ALTER CALL %s END HANGUP&quot;, id);
+                        //celliax_signaling_write(tech_pvt, msg_to_celliax);
</ins><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><del>-                DEBUGA_SKYPE(&quot;NOT FOUND\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                DEBUGA_CELLIAX(&quot;NOT FOUND\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 available_celliax_interface = find_available_celliax_interface_rr(tech_pvt);
</span><span class="cx">                 if (available_celliax_interface) {
</span><span class="lines">@@ -2077,57 +2077,57 @@
</span><span class="cx"> 
</span><span class="cx">                         //FIXME write a timestamp here
</span><span class="cx">                         gettimeofday(&amp;tech_pvt-&gt;transfer_time, NULL);
</span><del>-                        switch_copy_string(tech_pvt-&gt;skype_transfer_call_id, id, sizeof(tech_pvt-&gt;skype_transfer_call_id) - 1);
</del><ins>+                        switch_copy_string(tech_pvt-&gt;celliax_transfer_call_id, id, sizeof(tech_pvt-&gt;celliax_transfer_call_id) - 1);
</ins><span class="cx"> 
</span><span class="cx">                         switch_copy_string(tech_pvt-&gt;transfer_callid_number, value, sizeof(tech_pvt-&gt;transfer_callid_number) - 1);
</span><span class="cx"> 
</span><del>-                        DEBUGA_SKYPE
-                                (&quot;Let's transfer the skype_call %s to %s interface (with skype_user: %s), because we are already in a celliax call(%s)\n&quot;,
-                                 SKYPIAX_P_LOG, tech_pvt-&gt;skype_call_id, available_celliax_interface-&gt;name, available_celliax_interface-&gt;skype_user, id);
</del><ins>+                        DEBUGA_CELLIAX
+                                (&quot;Let's transfer the celliax_call %s to %s interface (with celliax_user: %s), because we are already in a celliax call(%s)\n&quot;,
+                                 CELLIAX_P_LOG, tech_pvt-&gt;celliax_call_id, available_celliax_interface-&gt;name, available_celliax_interface-&gt;celliax_user, id);
</ins><span class="cx"> 
</span><span class="cx">                         //FIXME why this? the inbound call will come, eventually, on that other interface
</span><span class="cx">                         //available_celliax_interface-&gt;ib_calls++;
</span><span class="cx"> 
</span><del>-                        sprintf(msg_to_skype, &quot;ALTER CALL %s TRANSFER %s&quot;, id, available_celliax_interface-&gt;skype_user);
-                        //celliax_signaling_write(tech_pvt, msg_to_skype);
-                        if (tech_pvt-&gt;interface_state == SKYPIAX_STATE_SELECTED) {
-                                tech_pvt-&gt;interface_state = SKYPIAX_STATE_IDLE;        //we marked it SKYPIAX_STATE_SELECTED just in case it has to make an outbound call
</del><ins>+                        sprintf(msg_to_celliax, &quot;ALTER CALL %s TRANSFER %s&quot;, id, available_celliax_interface-&gt;celliax_user);
+                        //celliax_signaling_write(tech_pvt, msg_to_celliax);
+                        if (tech_pvt-&gt;interface_state == CELLIAX_STATE_SELECTED) {
+                                tech_pvt-&gt;interface_state = CELLIAX_STATE_IDLE;        //we marked it CELLIAX_STATE_SELECTED just in case it has to make an outbound call
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="cx">                         /* no celliax interfaces idle, do nothing */
</span><del>-                        DEBUGA_SKYPE
-                                (&quot;Not answering the skype_call %s, because we are already in a celliax call(%s) and not transferring, because no other celliax interfaces are available\n&quot;,
-                                 SKYPIAX_P_LOG, id, tech_pvt-&gt;skype_call_id);
-                        sprintf(msg_to_skype, &quot;ALTER CALL %s END HANGUP&quot;, id);
-                        //celliax_signaling_write(tech_pvt, msg_to_skype);
</del><ins>+                        DEBUGA_CELLIAX
+                                (&quot;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&quot;,
+                                 CELLIAX_P_LOG, id, tech_pvt-&gt;celliax_call_id);
+                        sprintf(msg_to_celliax, &quot;ALTER CALL %s END HANGUP&quot;, id);
+                        //celliax_signaling_write(tech_pvt, msg_to_celliax);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_sleep(10000);
</span><del>-                DEBUGA_SKYPE
-                        (&quot;We have NOT answered a Skype RING from skype_call %s, because we are already in a celliax call (%s)\n&quot;,
-                         SKYPIAX_P_LOG, id, tech_pvt-&gt;skype_call_id);
</del><ins>+                DEBUGA_CELLIAX
+                        (&quot;We have NOT answered a GSM RING from celliax_call %s, because we are already in a celliax call (%s)\n&quot;,
+                         CELLIAX_P_LOG, id, tech_pvt-&gt;celliax_call_id);
</ins><span class="cx"> 
</span><span class="cx">                 switch_mutex_unlock(globals.mutex);
</span><span class="cx">         }
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void *celliax_do_skypeapi_thread_func(void *obj)
</del><ins>+void *celliax_do_celliaxapi_thread_func(void *obj)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         private_t *tech_pvt = obj;
</span><del>-        //if (celliax_present(SkypiaxHandles)) 
</del><ins>+        //if (celliax_present(CelliaxHandles)) 
</ins><span class="cx">         if (1) {
</span><span class="cx">                 while (running) {
</span><span class="cx">                         int res;
</span><span class="cx">                         //celliax_sleep(1000000); //1 sec
</span><del>-                        //DEBUGA_SKYPE(&quot;ciao!\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        //DEBUGA_CELLIAX(&quot;ciao!\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                         res = celliax_serial_read(tech_pvt);
</span><span class="cx">                         if (res == -1) {        //manage the graceful interface shutdown
</span><span class="cx">                                 tech_pvt-&gt;controldev_dead = 1;
</span><span class="cx">                                 close(tech_pvt-&gt;controldevfd);
</span><del>-                                ERRORA(&quot;celliax_serial_monitor failed, declaring %s dead\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;controldevice_name);
-                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == SKYPIAX_STATE_RING) {
-                                WARNINGA(&quot;INCOMING RING, let's take the incoming call\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;celliax_serial_monitor failed, declaring %s dead\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
+                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == CELLIAX_STATE_RING) {
+                                WARNINGA(&quot;INCOMING RING, let's take the incoming call\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 celliax_answer(tech_pvt);
</span><span class="cx">                                 //new_inbound_channel(tech_pvt);
</span><span class="cx">                                 //FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
</span><span class="lines">@@ -2135,8 +2135,8 @@
</span><span class="cx">                                 //FIXME }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == SKYPIAX_STATE_DIALING) {
-                                WARNINGA(&quot;WE'RE DIALING, let's take the earlymedia\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == CELLIAX_STATE_DIALING) {
+                                WARNINGA(&quot;WE'RE DIALING, let's take the earlymedia\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx"> tech_pvt-&gt;interface_state = CALLFLOW_STATUS_EARLYMEDIA;
</span><span class="cx">                                 remote_party_is_early_media(tech_pvt);
</span><span class="cx">                                 //new_inbound_channel(tech_pvt);
</span><span class="lines">@@ -2148,7 +2148,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">                         } else if (tech_pvt-&gt;interface_state == CALLFLOW_CALL_REMOTEANSWER) {
</span><del>-                                WARNINGA(&quot;REMOTE PARTY ANSWERED\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                                WARNINGA(&quot;REMOTE PARTY ANSWERED\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                                 outbound_channel_answered(tech_pvt);
</span><span class="cx">                                 //new_inbound_channel(tech_pvt);
</span><span class="cx">                                 //FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
</span><span class="lines">@@ -2158,7 +2158,7 @@
</span><span class="cx">                         usleep(100);                //give other threads a chance
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;Skype is not running, maybe crashed. Please run/restart Skype and relaunch Skypiax\n&quot;, SKYPIAX_P_LOG);
</del><ins>+                ERRORA(&quot;GSM is not running, maybe crashed. Please run/restart GSM and relaunch Celliax\n&quot;, CELLIAX_P_LOG);
</ins><span class="cx">                 running = 0;
</span><span class="cx">                 return NULL;
</span><span class="cx">         }
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>