<!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][15046] </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=15046">15046</a></dd>
<dt>Author</dt> <dd>gmaruzz</dd>
<dt>Date</dt> <dd>2009-10-02 08:17:39 -0500 (Fri, 02 Oct 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>gsmopen: internals renaming to gsmopen</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchbranchesgmaruzzmod_gsmopenMakefile">freeswitch/branches/gmaruzz/mod_gsmopen/Makefile</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_gsmopenREADME">freeswitch/branches/gmaruzz/mod_gsmopen/README</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_gsmopencelliaxconfxml">freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_gsmopencelliaxh">freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_gsmopencelliax_protocolc">freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_gsmopenmod_celliaxc">freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchbranchesgmaruzzmod_gsmopenMakefile"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_gsmopen/Makefile (15045 => 15046)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_gsmopen/Makefile        2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/Makefile        2009-10-02 13:17:39 UTC (rev 15046)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>-MODNAME=mod_celliax
-SVNDEF := -D'CELLIAX_SVN_VERSION=&quot;$(shell svnversion -n .)&quot;'
</del><ins>+MODNAME=mod_gsmopen
+SVNDEF := -D'GSMOPEN_SVN_VERSION=&quot;$(shell svnversion -n .)&quot;'
</ins><span class="cx"> LOCAL_CFLAGS += $(SVNDEF)
</span><span class="cx"> LOCAL_LDFLAGS=-lX11 -lasound
</span><del>-LOCAL_OBJS=celliax_protocol.o
</del><ins>+LOCAL_OBJS=gsmopen_protocol.o
</ins><span class="cx"> include ../../../../build/modmake.rules
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_gsmopenREADME"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_gsmopen/README (15045 => 15046)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_gsmopen/README        2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/README        2009-10-02 13:17:39 UTC (rev 15046)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-Celliax, GSM Endpoint and Trunk
</del><ins>+GSMopen, GSM Endpoint and Trunk
</ins><span class="cx"> 
</span><span class="cx"> This is just a prototype.
</span><span class="cx"> 
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> 
</span><span class="cx"> Is not getting its configuration from the configuration file, it's all hardcoded but it needs the configuration file.
</span><span class="cx"> 
</span><del>-Copy celliax.conf.xml in /usr/local/freeswitch/conf/autoload_configs/
</del><ins>+Copy gsmopen.conf.xml in /usr/local/freeswitch/conf/autoload_configs/
</ins><span class="cx"> 
</span><span class="cx"> You must have the device on serial port /dev/ttyACM0 and the audio as second soundcard plughw:1 (if you do not have a first soundcard, just modprobe snd-dummy before to connect the usb thingy).
</span><span class="cx"> 
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> All documentation on compiling, using, configuring, 
</span><span class="cx"> tricks and tweaks, possible problems at: 
</span><span class="cx"> 
</span><del>-http://wiki.freeswitch.org/wiki/Celliax_GSM_Endpoint_and_Trunk
</del><ins>+http://wiki.freeswitch.org/wiki/GSMopen_GSM_Endpoint_and_Trunk
</ins><span class="cx"> 
</span><span class="cx"> Enjoy
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_gsmopencelliaxconfxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml (15045 => 15046)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml        2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/celliax.conf.xml        2009-10-02 13:17:39 UTC (rev 15046)
</span><span class="lines">@@ -1,214 +1,20 @@
</span><del>-&lt;configuration name=&quot;celliax.conf&quot; description=&quot;Skypiax Configuration&quot;&gt;
</del><ins>+&lt;configuration name=&quot;gsmopen.conf&quot; description=&quot;GSMopen Configuration&quot;&gt;
</ins><span class="cx">   &lt;global_settings&gt;
</span><span class="cx">     &lt;param name=&quot;debug&quot; value=&quot;8&quot;/&gt;
</span><del>-    &lt;xparam name=&quot;codec-master&quot; value=&quot;us&quot;/&gt;
</del><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><del>-    &lt;xparam name=&quot;context&quot; value=&quot;default&quot;/&gt;
-    &lt;xparam name=&quot;codec-prefs&quot; value=&quot;gsm,ulaw&quot;/&gt;
-    &lt;xparam name=&quot;codec-rates&quot; value=&quot;8000,16000&quot;/&gt;
</del><ins>+    &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;destination&quot; value=&quot;9999&quot;/&gt;
</span><span class="cx">   &lt;/global_settings&gt;
</span><del>-  &lt;!-- one entry here per celliax interface --&gt;
</del><ins>+  &lt;!-- one entry here per gsmopen interface --&gt;
</ins><span class="cx">   &lt;per_interface_settings&gt;
</span><span class="cx">     &lt;interface id=&quot;1&quot; name=&quot;interface1&quot;&gt;
</span><span class="cx">         &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
</span><span class="cx">         &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">         &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
</span><del>-        &lt;param name=&quot;X11-display&quot; value=&quot;:101&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15556&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15557&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
</del><span class="cx">             &lt;param name=&quot;destination&quot; value=&quot;5000&quot;/&gt;
</span><span class="cx">     &lt;/interface&gt;
</span><span class="cx">     &lt;!-- following interfaces are commented out!
</span><del>-    &lt;interface id=&quot;2&quot; name=&quot;interface2&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:102&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15558&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15559&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-            &lt;param name=&quot;destination&quot; value=&quot;9999&quot;/&gt;
-    &lt;/interface&gt;
-    &lt;interface id=&quot;3&quot; name=&quot;interface3&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:103&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15560&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15561&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;4&quot; name=&quot;interface4&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:104&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15562&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15563&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;5&quot; name=&quot;interface5&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:105&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15564&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15565&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-    &lt;interface id=&quot;6&quot; name=&quot;interface6&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:106&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15566&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15567&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-    &lt;interface id=&quot;7&quot; name=&quot;interface7&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:107&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15568&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15569&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;8&quot; name=&quot;interface8&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:108&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15570&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15571&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;9&quot; name=&quot;interface9&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:109&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15572&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15573&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;10&quot; name=&quot;interface10&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:110&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15574&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15575&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;11&quot; name=&quot;interface11&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:111&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15576&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15577&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;12&quot; name=&quot;interface12&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:112&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15578&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15579&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;13&quot; name=&quot;interface13&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:113&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15580&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15581&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;14&quot; name=&quot;interface14&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:114&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15582&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15583&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;15&quot; name=&quot;interface15&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:115&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15584&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15585&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;16&quot; name=&quot;interface16&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:116&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15586&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15587&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;17&quot; name=&quot;interface17&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:117&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15588&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15589&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;18&quot; name=&quot;interface18&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:118&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15590&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15591&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;19&quot; name=&quot;interface19&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:119&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15592&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15593&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
-
-    &lt;interface id=&quot;20&quot; name=&quot;interface20&quot;&gt;
-        &lt;param name=&quot;hold-music&quot; value=&quot;$${moh_uri}&quot;/&gt;
-        &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
-        &lt;param name=&quot;context&quot; value=&quot;default&quot;/&gt;
-        &lt;param name=&quot;X11-display&quot; value=&quot;:120&quot;/&gt;
-        &lt;param name=&quot;tcp_cli_port&quot; value=&quot;15594&quot;/&gt;
-        &lt;param name=&quot;tcp_srv_port&quot; value=&quot;15595&quot;/&gt;
-        &lt;param name=&quot;celliax_user&quot; value=&quot;skypiax1&quot;/&gt;
-    &lt;/interface&gt;
</del><span class="cx">     --&gt;
</span><span class="cx">   &lt;/per_interface_settings&gt;
</span><span class="cx"> &lt;/configuration&gt;
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_gsmopencelliaxh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h (15045 => 15046)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h        2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/celliax.h        2009-10-02 13:17:39 UTC (rev 15046)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">  * Portions created by the Initial Developer are Copyright (C)
</span><span class="cx">  * the Initial Developer. All Rights Reserved.
</span><span class="cx">  *
</span><del>- * This module (mod_celliax) has been contributed by:
</del><ins>+ * This module (mod_gsmopen) has been contributed by:
</ins><span class="cx">  *
</span><span class="cx">  * Giovanni Maruzzelli (gmaruzz@gmail.com)
</span><span class="cx">  *
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx">  *
</span><span class="cx">  *
</span><span class="cx">  *
</span><del>- * mod_celliax.c -- GSM compatible Endpoint Module
</del><ins>+ * mod_gsmopen.c -- GSM compatible Endpoint Module
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#define MY_EVENT_INCOMING_SMS &quot;celliax::incoming_sms&quot;
</del><ins>+#define MY_EVENT_INCOMING_SMS &quot;gsmopen::incoming_sms&quot;
</ins><span class="cx"> 
</span><span class="cx"> #undef GIOVA48
</span><span class="cx"> 
</span><span class="lines">@@ -46,13 +46,13 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #ifndef GIOVA48
</span><del>-#define     CELLIAX_FRAME_SIZE   160
</del><ins>+#define     GSMOPEN_FRAME_SIZE   160
</ins><span class="cx"> #else //GIOVA48
</span><del>-#define     CELLIAX_FRAME_SIZE   960
</del><ins>+#define     GSMOPEN_FRAME_SIZE   960
</ins><span class="cx"> #endif //GIOVA48
</span><del>-#define     SAMPLERATE_CELLIAX   8000
</del><ins>+#define     SAMPLERATE_GSMOPEN   8000
</ins><span class="cx"> 
</span><del>-#define CELLIAX_ALSA
</del><ins>+#define GSMOPEN_ALSA
</ins><span class="cx"> #include &lt;switch.h&gt;
</span><span class="cx"> #include &lt;switch_version.h&gt;
</span><span class="cx"> #include &lt;termios.h&gt;
</span><span class="lines">@@ -60,11 +60,11 @@
</span><span class="cx"> #include &lt;iconv.h&gt;
</span><span class="cx"> #include &lt;libteletone.h&gt;
</span><span class="cx"> 
</span><del>-#ifdef CELLIAX_ALSA
</del><ins>+#ifdef GSMOPEN_ALSA
</ins><span class="cx"> #define ALSA_PCM_NEW_HW_PARAMS_API
</span><span class="cx"> #define ALSA_PCM_NEW_SW_PARAMS_API
</span><span class="cx"> #include &lt;alsa/asoundlib.h&gt;
</span><del>-#endif /* CELLIAX_ALSA */
</del><ins>+#endif /* GSMOPEN_ALSA */
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #ifndef WIN32
</span><span class="lines">@@ -91,12 +91,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_CELLIAX 16000
-//#define SAMPLES_PER_FRAME SAMPLERATE_CELLIAX/50
</del><ins>+//#define SAMPLERATE_GSMOPEN 16000
+//#define SAMPLES_PER_FRAME SAMPLERATE_GSMOPEN/50
</ins><span class="cx"> 
</span><del>-#ifndef CELLIAX_SVN_VERSION
-#define CELLIAX_SVN_VERSION SWITCH_VERSION_REVISION
-#endif /* CELLIAX_SVN_VERSION */
</del><ins>+#ifndef GSMOPEN_SVN_VERSION
+#define GSMOPEN_SVN_VERSION SWITCH_VERSION_REVISION
+#endif /* GSMOPEN_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">@@ -114,40 +114,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_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__ );
</del><ins>+#define DEBUGA_GSMOPEN(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;GSMOPEN_SVN_VERSION &quot;[%p|%-7lx][DEBUG_GSMOPEN  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
+#define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,                 &quot;rev &quot;GSMOPEN_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;GSMOPEN_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;GSMOPEN_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;GSMOPEN_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;GSMOPEN_SVN_VERSION &quot;[%p|%-7lx][NOTICA  %-5d][%-10s][%2d,%2d,%2d] &quot; __VA_ARGS__ );
</ins><span class="cx"> 
</span><del>-#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
</del><ins>+#define GSMOPEN_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 CELLIAX_CAUSE_NORMAL                1
-#define CELLIAX_CAUSE_FAILURE                2
-#define CELLIAX_CAUSE_NO_ANSWER                3
</del><ins>+#define GSMOPEN_CAUSE_NORMAL                1
+#define GSMOPEN_CAUSE_FAILURE                2
+#define GSMOPEN_CAUSE_NO_ANSWER                3
</ins><span class="cx"> /*********************************/
</span><del>-#define CELLIAX_FRAME_DTMF                1
</del><ins>+#define GSMOPEN_FRAME_DTMF                1
</ins><span class="cx"> /*********************************/
</span><del>-#define CELLIAX_CONTROL_RINGING                1
-#define CELLIAX_CONTROL_ANSWER                2
-#define CELLIAX_CONTROL_HANGUP                3
-#define CELLIAX_CONTROL_BUSY                4
</del><ins>+#define GSMOPEN_CONTROL_RINGING                1
+#define GSMOPEN_CONTROL_ANSWER                2
+#define GSMOPEN_CONTROL_HANGUP                3
+#define GSMOPEN_CONTROL_BUSY                4
</ins><span class="cx"> 
</span><span class="cx"> /*********************************/
</span><del>-#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
</del><ins>+#define                GSMOPEN_STATE_IDLE                                0
+#define                GSMOPEN_STATE_DOWN                                1
+#define                GSMOPEN_STATE_RING                                2
+#define                GSMOPEN_STATE_DIALING                                3
+#define                GSMOPEN_STATE_BUSY                                4
+#define                GSMOPEN_STATE_UP                                5
+#define                GSMOPEN_STATE_RINGING                                6
+#define                GSMOPEN_STATE_PRERING                                7
+#define                GSMOPEN_STATE_ERROR_DOUBLE_CALL                        8
+#define                GSMOPEN_STATE_SELECTED                                9
+#define         GSMOPEN_STATE_HANGUP_REQUESTED                        10
+#define                GSMOPEN_STATE_PREANSWER                                11
</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">@@ -185,11 +185,11 @@
</span><span class="cx"> #define         AT_OK   0
</span><span class="cx"> #define         AT_ERROR   1
</span><span class="cx"> 
</span><del>-#define CELLIAX_MAX_INTERFACES 64
</del><ins>+#define GSMOPEN_MAX_INTERFACES 64
</ins><span class="cx"> 
</span><span class="cx"> #ifndef WIN32
</span><del>-struct CelliaxHandles {
-        Window celliax_win;
</del><ins>+struct GSMopenHandles {
+        Window gsmopen_win;
</ins><span class="cx">         Display *disp;
</span><span class="cx">         Window win;
</span><span class="cx">         int currentuserhandle;
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx"> };
</span><span class="cx"> #else //WIN32
</span><span class="cx"> 
</span><del>-struct CelliaxHandles {
</del><ins>+struct GSMopenHandles {
</ins><span class="cx">         HWND win32_hInit_MainWindowHandle;
</span><span class="cx">         HWND win32_hGlobal_GSMAPIWindowHandle;
</span><span class="cx">         HINSTANCE win32_hInit_ProcessHandle;
</span><span class="lines">@@ -253,38 +253,38 @@
</span><span class="cx">         int tcp_cli_port;
</span><span class="cx">         int tcp_srv_port;
</span><span class="cx"> #endif
</span><del>-        struct CelliaxHandles CelliaxHandles;
</del><ins>+        struct GSMopenHandles GSMopenHandles;
</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="cx">         char exten[80];                                /*!&lt; \brief default Asterisk dialplan extension for this interface */
</span><del>-        int celliax_sound_rate;                /*!&lt; \brief rate of the sound device, in Hz, eg: 8000 */
</del><ins>+        int gsmopen_sound_rate;                /*!&lt; \brief rate of the sound device, in Hz, eg: 8000 */
</ins><span class="cx">         char callid_name[50];
</span><span class="cx">         char callid_number[50];
</span><span class="cx">         double playback_boost;
</span><span class="cx">         double capture_boost;
</span><span class="cx">         int stripmsd;
</span><del>-        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) */
</del><ins>+        char gsmopen_call_id[512];
+        int gsmopen_call_ongoing;
+        char gsmopen_friends[4096];
+        char gsmopen_fullname[512];
+        char gsmopen_displayname[512];
+        int phone_callflow;                        /*!&lt; \brief 'callflow' of the gsmopen interface (as opposed to phone interface) */
+        int gsmopen;                                /*!&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 *audiocelliaxpipe[2];
-        switch_file_t *celliax_sound_capt_fd;        /*!&lt; \brief file descriptor for sound capture dev */
</del><ins>+        switch_file_t *audiogsmopenpipe[2];
+        switch_file_t *gsmopen_sound_capt_fd;        /*!&lt; \brief file descriptor for sound capture dev */
</ins><span class="cx"> #else                                                        /* WIN32 */
</span><span class="cx">         int audiopipe[2];
</span><del>-        int audiocelliaxpipe[2];
-        int celliax_sound_capt_fd;        /*!&lt; \brief file descriptor for sound capture dev */
</del><ins>+        int audiogsmopenpipe[2];
+        int gsmopen_sound_capt_fd;        /*!&lt; \brief file descriptor for sound capture dev */
</ins><span class="cx"> #endif                                                        /* WIN32 */
</span><span class="cx">         switch_thread_t *tcp_srv_thread;
</span><span class="cx">         switch_thread_t *tcp_cli_thread;
</span><del>-        switch_thread_t *celliax_signaling_thread;
-        switch_thread_t *celliax_api_thread;
</del><ins>+        switch_thread_t *gsmopen_signaling_thread;
+        switch_thread_t *gsmopen_api_thread;
</ins><span class="cx">         //short audiobuf[SAMPLES_PER_FRAME];
</span><span class="cx">         //int audiobuf_is_loaded;
</span><span class="cx"> 
</span><span class="lines">@@ -296,15 +296,15 @@
</span><span class="cx">         //int phonebook_last_entry;
</span><span class="cx">         //int phonebook_number_lenght;
</span><span class="cx">         //int phonebook_text_lenght;
</span><del>-        int celliax_dir_entry_extension_prefix;
-        char celliax_user[256];
-        char celliax_password[256];
</del><ins>+        int gsmopen_dir_entry_extension_prefix;
+        char gsmopen_user[256];
+        char gsmopen_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 celliax_transfer_call_id[512];
</del><ins>+        char gsmopen_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">@@ -389,9 +389,9 @@
</span><span class="cx"> 
</span><span class="cx">         char at_cmgw[16];
</span><span class="cx">         int no_ucs2;
</span><del>-        time_t celliax_serial_sync_period;
</del><ins>+        time_t gsmopen_serial_sync_period;
</ins><span class="cx"> 
</span><del>-        time_t celliax_serial_synced_timestamp;
</del><ins>+        time_t gsmopen_serial_synced_timestamp;
</ins><span class="cx">         struct s_result line_array;
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx"> 
</span><span class="cx">         struct timeval ringtime;
</span><span class="cx">         ciapa_t *owner;
</span><del>-#ifdef CELLIAX_ALSA
</del><ins>+#ifdef GSMOPEN_ALSA
</ins><span class="cx">         snd_pcm_t *alsac;                        /*!&lt; \brief handle of the ALSA capture audio device */
</span><span class="cx">         snd_pcm_t *alsap;                        /*!&lt; \brief handle of the ALSA playback audio device */
</span><span class="cx">         char alsacname[50];                        /*!&lt; \brief name of the ALSA capture audio device */
</span><span class="lines">@@ -432,7 +432,7 @@
</span><span class="cx">         int alsa_capture_is_mono;
</span><span class="cx">         int alsa_play_is_mono;
</span><span class="cx">         struct pollfd pfd;
</span><del>-#endif                                                        // CELLIAX_ALSA
</del><ins>+#endif                                                        // GSMOPEN_ALSA
</ins><span class="cx"> 
</span><span class="cx">         time_t audio_play_reset_timestamp;
</span><span class="cx">         int audio_play_reset_period;
</span><span class="lines">@@ -446,120 +446,120 @@
</span><span class="cx"> 
</span><span class="cx"> typedef struct private_object private_t;
</span><span class="cx"> 
</span><del>-void *SWITCH_THREAD_FUNC celliax_api_thread_func(switch_thread_t *thread, void *obj);
-int celliax_audio_read(private_t * tech_pvt);
-int celliax_audio_init(private_t * tech_pvt);
-int celliax_signaling_read(private_t * tech_pvt);
</del><ins>+void *SWITCH_THREAD_FUNC gsmopen_api_thread_func(switch_thread_t *thread, void *obj);
+int gsmopen_audio_read(private_t * tech_pvt);
+int gsmopen_audio_init(private_t * tech_pvt);
+int gsmopen_signaling_read(private_t * tech_pvt);
</ins><span class="cx"> 
</span><del>-int celliax_call(private_t * tech_pvt, char *idest, int timeout);
-int celliax_senddigit(private_t * tech_pvt, char digit);
</del><ins>+int gsmopen_call(private_t * tech_pvt, char *idest, int timeout);
+int gsmopen_senddigit(private_t * tech_pvt, char digit);
</ins><span class="cx"> 
</span><del>-void *celliax_do_tcp_srv_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_tcp_srv_thread(switch_thread_t *thread, void *obj);
</del><ins>+void *gsmopen_do_tcp_srv_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC gsmopen_do_tcp_srv_thread(switch_thread_t *thread, void *obj);
</ins><span class="cx"> 
</span><del>-void *celliax_do_tcp_cli_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_tcp_cli_thread(switch_thread_t *thread, void *obj);
</del><ins>+void *gsmopen_do_tcp_cli_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC gsmopen_do_tcp_cli_thread(switch_thread_t *thread, void *obj);
</ins><span class="cx"> 
</span><del>-void *celliax_do_celliaxapi_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC celliax_do_celliaxapi_thread(switch_thread_t *thread, void *obj);
</del><ins>+void *gsmopen_do_gsmopenapi_thread_func(void *obj);
+void *SWITCH_THREAD_FUNC gsmopen_do_gsmopenapi_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_celliax);
</del><ins>+//int gsmopen_signaling_write(private_t * tech_pvt, char *msg_to_gsmopen);
</ins><span class="cx"> #if defined(WIN32) &amp;&amp; !defined(__CYGWIN__)
</span><del>-int celliax_pipe_read(switch_file_t *pipe, short *buf, int howmany);
-int celliax_pipe_write(switch_file_t *pipe, short *buf, int howmany);
</del><ins>+int gsmopen_pipe_read(switch_file_t *pipe, short *buf, int howmany);
+int gsmopen_pipe_write(switch_file_t *pipe, short *buf, int howmany);
</ins><span class="cx"> /* Visual C do not have strsep ? */
</span><span class="cx"> char *strsep(char **stringp, const char *delim);
</span><span class="cx"> #else
</span><del>-int celliax_pipe_read(int pipe, short *buf, int howmany);
-int celliax_pipe_write(int pipe, short *buf, int howmany);
</del><ins>+int gsmopen_pipe_read(int pipe, short *buf, int howmany);
+int gsmopen_pipe_write(int pipe, short *buf, int howmany);
</ins><span class="cx"> #endif /* WIN32 */
</span><del>-int celliax_close_socket(unsigned int fd);
-private_t *find_available_celliax_interface_rr(private_t * tech_pvt_calling);
</del><ins>+int gsmopen_close_socket(unsigned int fd);
+private_t *find_available_gsmopen_interface_rr(private_t * tech_pvt_calling);
</ins><span class="cx"> int remote_party_is_ringing(private_t * tech_pvt);
</span><span class="cx"> int remote_party_is_early_media(private_t * tech_pvt);
</span><del>-//int celliax_answer(private_t * tech_pvt, char *id, char *value);
-int celliax_transfer(private_t * tech_pvt, char *id, char *value);
-int celliax_socket_create_and_bind(private_t * tech_pvt, int *which_port);
</del><ins>+//int gsmopen_answer(private_t * tech_pvt, char *id, char *value);
+int gsmopen_transfer(private_t * tech_pvt, char *id, char *value);
+int gsmopen_socket_create_and_bind(private_t * tech_pvt, int *which_port);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void *celliax_do_controldev_thread(void *data);
-int celliax_serial_init(private_t * tech_pvt, speed_t controldevice_speed);
-int celliax_serial_monitor(private_t * tech_pvt);
-int celliax_serial_sync(private_t * tech_pvt);
-int celliax_serial_sync_AT(private_t * tech_pvt);
-int celliax_serial_config(private_t * tech_pvt);
-int celliax_serial_config_AT(private_t * tech_pvt);
</del><ins>+void *gsmopen_do_controldev_thread(void *data);
+int gsmopen_serial_init(private_t * tech_pvt, speed_t controldevice_speed);
+int gsmopen_serial_monitor(private_t * tech_pvt);
+int gsmopen_serial_sync(private_t * tech_pvt);
+int gsmopen_serial_sync_AT(private_t * tech_pvt);
+int gsmopen_serial_config(private_t * tech_pvt);
+int gsmopen_serial_config_AT(private_t * tech_pvt);
</ins><span class="cx"> 
</span><del>-#define celliax_serial_write_AT_expect(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 1, 2)
-#define celliax_serial_write_AT_expect_noexpcr(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 0, 2)
-#define celliax_serial_write_AT_expect_noexpcr_tout(P, D, S, T) celliax_serial_write_AT_expect1(P, D, S, 0, T)
</del><ins>+#define gsmopen_serial_write_AT_expect(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 2)
+#define gsmopen_serial_write_AT_expect_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 2)
+#define gsmopen_serial_write_AT_expect_noexpcr_tout(P, D, S, T) gsmopen_serial_write_AT_expect1(P, D, S, 0, T)
</ins><span class="cx"> // 20.5 sec timeout, used for querying the SIM and sending SMSs
</span><del>-#define celliax_serial_write_AT_expect_longtime(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 1, 20)
-#define celliax_serial_write_AT_expect_longtime_noexpcr(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 0, 20)
-int celliax_serial_write_AT(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_nocr(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_ack(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_noack(private_t * tech_pvt, const char *data);
-int celliax_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds);
-int celliax_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds);
-int celliax_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf);
-int celliax_serial_read(private_t * tech_pvt);
</del><ins>+#define gsmopen_serial_write_AT_expect_longtime(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 1, 20)
+#define gsmopen_serial_write_AT_expect_longtime_noexpcr(P, D, S) gsmopen_serial_write_AT_expect1(P, D, S, 0, 20)
+int gsmopen_serial_write_AT(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_nocr(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_ack(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_noack(private_t * tech_pvt, const char *data);
+int gsmopen_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds);
+int gsmopen_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds);
+int gsmopen_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf);
+int gsmopen_serial_read(private_t * tech_pvt);
</ins><span class="cx"> #ifdef NOTDEF
</span><del>-int celliax_serial_getstatus(private_t * tech_pvt);
-int celliax_serial_hangup(private_t * tech_pvt);
-int celliax_serial_answer(private_t * tech_pvt);
-int celliax_serial_answer_AT(private_t * tech_pvt);
-int celliax_serial_hangup_AT(private_t * tech_pvt);
-int celliax_serial_call_AT(private_t * tech_pvt, char *dstr);
-int celliax_serial_getstatus_AT(private_t * tech_pvt);
</del><ins>+int gsmopen_serial_getstatus(private_t * tech_pvt);
+int gsmopen_serial_hangup(private_t * tech_pvt);
+int gsmopen_serial_answer(private_t * tech_pvt);
+int gsmopen_serial_answer_AT(private_t * tech_pvt);
+int gsmopen_serial_hangup_AT(private_t * tech_pvt);
+int gsmopen_serial_call_AT(private_t * tech_pvt, char *dstr);
+int gsmopen_serial_getstatus_AT(private_t * tech_pvt);
</ins><span class="cx"> #endif // NOTDEF
</span><span class="cx"> #define RESULT_FAILURE 0
</span><span class="cx"> #define RESULT_SUCCESS 1
</span><span class="cx"> int utf_to_ucs2(private_t * tech_pvt, char *utf_in, size_t inbytesleft, char *ucs2_out, size_t outbytesleft);
</span><span class="cx"> int ucs2_to_utf8(private_t * tech_pvt, char *ucs2_in, char *utf8_out, size_t outbytesleft);
</span><del>-//#define PUSHA_UNLOCKA(x)    pthread_cleanup_push(celliax_unlocka_log, (void *) x);
</del><ins>+//#define PUSHA_UNLOCKA(x)    pthread_cleanup_push(gsmopen_unlocka_log, (void *) x);
</ins><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;, 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);
</del><ins>+#define PUSHA_UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;PUSHA_UNLOCKA: %p\n&quot;, GSMOPEN_P_LOG, (void *)x);
+#define POPPA_UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;POPPA_UNLOCKA: %p\n&quot;, GSMOPEN_P_LOG, (void *)x);
+//#define LOKKA(x)    if(option_debug &gt; 100) ERRORA(&quot;LOKKA: %p\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, (void *)x);
</del><ins>+//#define UNLOCKA(x)    if(option_debug &gt; 100) ERRORA(&quot;UNLOCKA: %p\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, (void *)x, y);
</del><ins>+#define gsmopen_queue_control(x, y) ERRORA(&quot;gsmopen_queue_control: %p, %d\n&quot;, GSMOPEN_P_LOG, (void *)x, y);
</ins><span class="cx"> 
</span><del>-#define ast_setstate(x, y) ERRORA(&quot;ast_setstate: %p, %d\n&quot;, CELLIAX_P_LOG, (void *)x, y);
</del><ins>+#define ast_setstate(x, y) ERRORA(&quot;ast_setstate: %p, %d\n&quot;, GSMOPEN_P_LOG, (void *)x, y);
</ins><span class="cx"> 
</span><del>-int celliax_serial_read(private_t * tech_pvt);
-int celliax_answer(private_t * tech_pvt);
-int celliax_serial_answer(private_t * tech_pvt);
-int celliax_serial_answer_AT(private_t * tech_pvt);
-int celliax_serial_hangup(private_t * tech_pvt);
-int celliax_serial_hangup_AT(private_t * tech_pvt);
-int celliax_hangup(private_t * tech_pvt);
-int celliax_serial_call(private_t * tech_pvt, char *dstr);
-int celliax_serial_call_AT(private_t * tech_pvt, char *dstr);
-int celliax_sendsms(private_t * tech_pvt, char *dest, char *text);
</del><ins>+int gsmopen_serial_read(private_t * tech_pvt);
+int gsmopen_answer(private_t * tech_pvt);
+int gsmopen_serial_answer(private_t * tech_pvt);
+int gsmopen_serial_answer_AT(private_t * tech_pvt);
+int gsmopen_serial_hangup(private_t * tech_pvt);
+int gsmopen_serial_hangup_AT(private_t * tech_pvt);
+int gsmopen_hangup(private_t * tech_pvt);
+int gsmopen_serial_call(private_t * tech_pvt, char *dstr);
+int gsmopen_serial_call_AT(private_t * tech_pvt, char *dstr);
+int gsmopen_sendsms(private_t * tech_pvt, char *dest, char *text);
</ins><span class="cx"> 
</span><del>-#ifdef CELLIAX_ALSA
</del><ins>+#ifdef GSMOPEN_ALSA
</ins><span class="cx"> int alsa_init(private_t * tech_pvt);
</span><span class="cx"> int alsa_shutdown(private_t * tech_pvt);
</span><span class="cx"> snd_pcm_t *alsa_open_dev(private_t * tech_pvt, snd_pcm_stream_t stream);
</span><span class="cx"> int alsa_write(private_t * tech_pvt, short *data, int datalen);
</span><span class="cx"> int alsa_read(private_t * tech_pvt, short *data, int datalen);
</span><span class="cx"> 
</span><del>-#endif /* CELLIAX_ALSA */
</del><ins>+#endif /* GSMOPEN_ALSA */
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-void celliax_store_boost(char *s, double *boost);
-int celliax_sound_boost(void *data, int samples_num, double boost);
</del><ins>+void gsmopen_store_boost(char *s, double *boost);
+int gsmopen_sound_boost(void *data, int samples_num, double boost);
</ins><span class="cx"> int sms_incoming(private_t * tech_pvt, char *value);
</span><del>-int celliax_ring(private_t * tech_pvt);
</del><ins>+int gsmopen_ring(private_t * tech_pvt);
</ins></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_gsmopencelliax_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c (15045 => 15046)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c        2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/celliax_protocol.c        2009-10-02 13:17:39 UTC (rev 15046)
</span><span class="lines">@@ -1,27 +1,27 @@
</span><del>-#include &quot;celliax.h&quot;
</del><ins>+#include &quot;gsmopen.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #ifdef ASTERISK
</span><del>-#define celliax_sleep usleep
-#define celliax_strncpy strncpy
</del><ins>+#define gsmopen_sleep usleep
+#define gsmopen_strncpy strncpy
</ins><span class="cx"> #define tech_pvt p
</span><del>-extern int celliax_debug;
-extern char *celliax_console_active;
</del><ins>+extern int gsmopen_debug;
+extern char *gsmopen_console_active;
</ins><span class="cx"> #else /* FREESWITCH */
</span><del>-#define celliax_sleep switch_sleep
-#define celliax_strncpy switch_copy_string
-extern switch_memory_pool_t *celliax_module_pool;
-extern switch_endpoint_interface_t *celliax_endpoint_interface;
</del><ins>+#define gsmopen_sleep switch_sleep
+#define gsmopen_strncpy switch_copy_string
+extern switch_memory_pool_t *gsmopen_module_pool;
+extern switch_endpoint_interface_t *gsmopen_endpoint_interface;
</ins><span class="cx"> #endif /* ASTERISK */
</span><del>-//int samplerate_celliax = SAMPLERATE_CELLIAX;
</del><ins>+//int samplerate_gsmopen = SAMPLERATE_GSMOPEN;
</ins><span class="cx"> 
</span><span class="cx"> extern int running;
</span><del>-int celliax_dir_entry_extension = 1;
</del><ins>+int gsmopen_dir_entry_extension = 1;
</ins><span class="cx"> 
</span><span class="cx"> int option_debug = 100;
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_serial_init(private_t * tech_pvt, speed_t controldevice_speed)
</del><ins>+int gsmopen_serial_init(private_t * tech_pvt, speed_t controldevice_speed)
</ins><span class="cx"> {
</span><span class="cx">         int fd;
</span><span class="cx">         int rt;
</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_CELLIAX(&quot;serial error: %s\n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                DEBUGA_GSMOPEN(&quot;serial error: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, GSMOPEN_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;, CELLIAX_P_LOG, strerror(errno), tech_pvt-&gt;controldevice_speed);
</del><ins>+                ERRORA(&quot;serial error: %s, speed was: %d&quot;, GSMOPEN_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;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, GSMOPEN_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;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, GSMOPEN_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;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;serial error: %s&quot;, GSMOPEN_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,69 +93,69 @@
</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_CELLIAX(&quot;Syncing Serial\n&quot;, CELLIAX_P_LOG);
-        rt = celliax_serial_sync(tech_pvt);
</del><ins>+        DEBUGA_GSMOPEN(&quot;Syncing Serial\n&quot;, GSMOPEN_P_LOG);
+        rt = gsmopen_serial_sync(tech_pvt);
</ins><span class="cx">         if (rt == -1) {
</span><del>-                ERRORA(&quot;Serial init error\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Serial init error\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx">         return (fd);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_read(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_read(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
</span><del>-                return celliax_serial_read_AT(tech_pvt, 0, 100000, 0, NULL, 1);        // a 10th of a second timeout
-#ifdef CELLIAX_FBUS2
</del><ins>+                return gsmopen_serial_read_AT(tech_pvt, 0, 100000, 0, NULL, 1);        // a 10th of a second timeout
+#ifdef GSMOPEN_FBUS2
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
</span><del>-                return celliax_serial_read_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
</del><ins>+                return gsmopen_serial_read_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_CVM_BUSMAIL)
</span><del>-                return celliax_serial_read_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
</del><ins>+                return gsmopen_serial_read_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
</ins><span class="cx">         return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_serial_sync(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_sync(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
</span><del>-                return celliax_serial_sync_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
</del><ins>+                return gsmopen_serial_sync_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
</span><del>-                return celliax_serial_sync_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
</del><ins>+                return gsmopen_serial_sync_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_CVM_BUSMAIL)
</span><del>-                return celliax_serial_sync_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
</del><ins>+                return gsmopen_serial_sync_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
</ins><span class="cx"> 
</span><span class="cx">         return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_config(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_config(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
</span><del>-                return celliax_serial_config_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
</del><ins>+                return gsmopen_serial_config_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
</span><del>-                return celliax_serial_config_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
</del><ins>+                return gsmopen_serial_config_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_CVM_BUSMAIL)
</span><del>-                return celliax_serial_config_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
</del><ins>+                return gsmopen_serial_config_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
</ins><span class="cx">         return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_config_AT(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_config_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         int res;
</span><span class="cx"> 
</span><span class="cx"> /* initial_pause? */
</span><span class="cx">         if (tech_pvt-&gt;at_initial_pause) {
</span><del>-                DEBUGA_CELLIAX(&quot;sleeping for %d usec\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_initial_pause);
</del><ins>+                DEBUGA_GSMOPEN(&quot;sleeping for %d usec\n&quot;, GSMOPEN_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">@@ -163,45 +163,45 @@
</span><span class="cx">         while (1) {
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_1)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_2)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_3)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_4)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_preinit_5)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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,40 +212,40 @@
</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_CELLIAX(&quot;sleeping for %d usec\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;at_after_preinit_pause);
</del><ins>+                DEBUGA_GSMOPEN(&quot;sleeping for %d usec\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                ERRORA(&quot;no response to AT\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no response to AT\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+mode=0&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+mode=0&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                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);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+mode=0 does not get OK from the phone. If it is NOT Motorola,&quot; &quot; no problem.\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         usleep(50000);
</span><span class="cx">         /* for motorola end */
</span><span class="cx"> 
</span><span class="cx">         /* reset AT configuration to phone default */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;ATZ&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;ATZ&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;ATZ failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ATZ failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* disable AT command echo */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;ATE0&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;ATE0&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;ATE0 failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ATE0 failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* disable extended error reporting */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMEE=0&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CMEE=0&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CMEE failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CMEE failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* various phone manufacturer identifier */
</span><span class="lines">@@ -254,135 +254,135 @@
</span><span class="cx">         for (i = 0; i &lt; 10; i++) {
</span><span class="cx">                 memset(at_command, 0, sizeof(at_command));
</span><span class="cx">                 sprintf(at_command, &quot;ATI%d&quot;, i);
</span><del>-                res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</del><ins>+                res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
</ins><span class="cx">                 if (res) {
</span><del>-                        DEBUGA_CELLIAX(&quot;ATI%d command failed, continue\n&quot;, CELLIAX_P_LOG, i);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;ATI%d command failed, continue\n&quot;, GSMOPEN_P_LOG, i);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* phone manufacturer */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGMI&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CGMI&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CGMI failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CGMI failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* phone model */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGMM&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CGMM&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CGMM failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CGMM failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGSN&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CGSN&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CGSN failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CGSN failed\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CNMI=3,1,0,0,0&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CNMI=3,1,0,0,0&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 tech_pvt-&gt;sms_cnmi_not_supported = 1;
</span><del>-                tech_pvt-&gt;celliax_serial_sync_period = 30;
</del><ins>+                tech_pvt-&gt;gsmopen_serial_sync_period = 30;
</ins><span class="cx">         }
</span><span class="cx">         /* what is the Message Center address (number) to which the SMS has to be sent? */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCA?&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCA?&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CSCA? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CSCA? failed, continue\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* what is the Message Format of SMSs? */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF?&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF?&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CMGF? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CMGF? failed, continue\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF=1&quot;);        //TODO: support phones that only accept pdu mode
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF=1&quot;);        //TODO: support phones that only accept pdu mode
</ins><span class="cx">         if (res) {
</span><del>-                ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return RESULT_FAILURE;
</span><span class="cx">         }
</span><span class="cx">         /* what is the Charset of SMSs? */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS?&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS?&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CSCS? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CSCS? failed, continue\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         tech_pvt-&gt;no_ucs2 = 0;
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</ins><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;, CELLIAX_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;, GSMOPEN_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><del>-                res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</del><ins>+                res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</ins><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;, CELLIAX_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;, GSMOPEN_P_LOG);
</ins><span class="cx">                 }
</span><del>-                //res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,16&quot;); //&quot;flash&quot;, class 0  sms 7 bit
-                res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,0&quot;);        //normal, 7 bit message
</del><ins>+                //res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,16&quot;); //&quot;flash&quot;, class 0  sms 7 bit
+                res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,0&quot;);        //normal, 7 bit message
</ins><span class="cx">                 if (res) {
</span><del>-                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                //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
-                res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,8&quot;);        //unicode, 16 bit message
</del><ins>+                //res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,20&quot;); //&quot;flash&quot;, class 0 sms 16 bit unicode
+                res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,8&quot;);        //unicode, 16 bit message
</ins><span class="cx">                 if (res) {
</span><del>-                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=?&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=?&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CMER=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CMER=? failed, continue\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=3,0,0,1&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=3,0,0,1&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CMER=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CMER=? failed, continue\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CIND=?&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CIND=?&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CIND=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CIND=? failed, continue\n&quot;, GSMOPEN_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><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=?&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=?&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT*ECAM=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT*ECAM=? failed, continue\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* enable the unsolicited reporting of call monitoring. sony-ericsson specific */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=1&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=1&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT*ECAM=1 failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT*ECAM=1 failed, continue\n&quot;, GSMOPEN_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="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* disable unsolicited signaling of call list */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CLCC=0&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CLCC=0&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CLCC=0 failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CLCC=0 failed, continue\n&quot;, GSMOPEN_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="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /* give unsolicited caller id when incoming call */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CLIP=1&quot;);
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CLIP=1&quot;);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX(&quot;AT+CLIP failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+CLIP failed, continue\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* for motorola */
</span><del>-        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+MCST=1&quot;);        /* motorola call control codes
</del><ins>+        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+MCST=1&quot;);        /* motorola call control codes
</ins><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_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);
</del><ins>+                DEBUGA_GSMOPEN(&quot;AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,&quot; &quot; no problem.\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         /* for motorola end */
</span><span class="cx"> 
</span><span class="lines">@@ -390,45 +390,45 @@
</span><span class="cx">         while (1) {
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_1)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_2)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_3)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_4)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (strlen(tech_pvt-&gt;at_postinit_5)) {
</span><del>-                        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
</del><ins>+                        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;%s does not get %s from the phone. Continuing.\n&quot;, GSMOPEN_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">@@ -441,13 +441,13 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_serial_sync_AT(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_sync_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         usleep(10000);                                /* 10msec */
</span><del>-        time(&amp;tech_pvt-&gt;celliax_serial_synced_timestamp);
</del><ins>+        time(&amp;tech_pvt-&gt;gsmopen_serial_synced_timestamp);
</ins><span class="cx">         return 0;
</span><span class="cx"> }
</span><del>-int celliax_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf)
</del><ins>+int gsmopen_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec, int timeout_sec, const char *expected_string, int expect_crlf)
</ins><span class="cx"> {
</span><span class="cx">         int select_err=1;
</span><span class="cx">         int res;
</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;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+        //NOTICA (&quot; INSIDE this gsmopen_serial_device %s \n&quot;, GSMOPEN_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">@@ -482,21 +482,21 @@
</span><span class="cx"> 
</span><span class="cx">                 if (read_count == 0) {
</span><span class="cx">                         ERRORA
</span><del>-                                (&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;,
-                                 CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+                                (&quot;read 0 bytes!!! Nenormalno! Marking this gsmopen_serial_device %s as dead, andif it is owned by a channel, hanging up. Maybe the phone is stuck, switched off, power down or battery exhausted\n&quot;,
+                                 GSMOPEN_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 = CELLIAX_CAUSE_FAILURE;
-                                celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</del><ins>+                                tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_FAILURE;
+                                gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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_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);
</del><ins>+                        //DEBUGA_GSMOPEN(&quot;1 read %d bytes, --|%s|--\n&quot;, GSMOPEN_P_LOG, read_count, tmp_answer_ptr);
+                        //DEBUGA_GSMOPEN(&quot;2 read %d bytes, --|%s|--\n&quot;, GSMOPEN_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>-                                         CELLIAX_P_LOG, token_ptr, tech_pvt-&gt;line_array.result[la_counter]);
</del><ins>+                                         GSMOPEN_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>-                                                 CELLIAX_P_LOG, token_ptr, tech_pvt-&gt;line_array.result[la_counter]);
</del><ins>+                                                 GSMOPEN_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_CELLIAX
</del><ins>+                        DEBUGA_GSMOPEN
</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>-                                 CELLIAX_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr, expected_string, strlen(expected_string)));
</del><ins>+                                 GSMOPEN_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_CELLIAX(&quot;Read line %d: |%s|\n&quot;, CELLIAX_P_LOG, i, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;Read line %d: |%s|\n&quot;, GSMOPEN_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">@@ -559,9 +559,9 @@
</span><span class="cx">                                 gettimeofday(&amp;(tech_pvt-&gt;ringtime), NULL);
</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><del>-                                        /* we're at the second ring, set the interface state, will be answered by celliax_do_monitor */
-                                        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;
</del><ins>+                                        /* we're at the second ring, set the interface state, will be answered by gsmopen_do_monitor */
+                                        DEBUGA_GSMOPEN(&quot;|%s| got second RING\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                        tech_pvt-&gt;interface_state = GSMOPEN_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_CELLIAX(&quot;|%s| got first RING, sending AT+CLCC?\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
-                                                res = celliax_serial_write_AT_noack(tech_pvt, &quot;AT+CLCC?&quot;);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;|%s| got first RING, sending AT+CLCC?\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                                res = gsmopen_serial_write_AT_noack(tech_pvt, &quot;AT+CLCC?&quot;);
</ins><span class="cx">                                                 if (res) {
</span><del>-                                                        ERRORA(&quot;AT+CLCC? (call list) was not correctly sent to the phone\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                                        ERRORA(&quot;AT+CLCC? (call list) was not correctly sent to the phone\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                                 }
</span><span class="cx">                                         } else {
</span><del>-                                                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]);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;|%s| got first RING, but not sending AT+CLCC? as this device &quot;
+                                                                           &quot;seems not to support\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| CLCC CALLID: name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+                                DEBUGA_GSMOPEN(&quot;|%s| CLCC CALLID: name is %s, number is %s\n&quot;, GSMOPEN_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 != CELLIAX_STATE_RING) {
</del><ins>+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_RING) {
</ins><span class="cx">                                         gettimeofday(&amp;(tech_pvt-&gt;call_incoming_time), NULL);
</span><del>-                                        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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;GSMOPEN_STATE_RING call_incoming_time.tv_sec=%ld\n&quot;, GSMOPEN_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 = CELLIAX_STATE_RING;
</del><ins>+                                tech_pvt-&gt;interface_state = GSMOPEN_STATE_RING;
</ins><span class="cx">                                 tech_pvt-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>-                                DEBUGA_CELLIAX(&quot;|%s| CLIP INCOMING CALLID: name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+                                DEBUGA_GSMOPEN(&quot;|%s| CLIP INCOMING CALLID: name is %s, number is %s\n&quot;, GSMOPEN_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">@@ -666,58 +666,58 @@
</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><span class="cx">                                         //strncpy(tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number, sizeof(tech_pvt-&gt;callid_name)) ;
</span><del>-                                        snprintf(tech_pvt-&gt;callid_name, sizeof(tech_pvt-&gt;callid_name), &quot;Celliax: %s&quot;, tech_pvt-&gt;callid_number);
</del><ins>+                                        snprintf(tech_pvt-&gt;callid_name, sizeof(tech_pvt-&gt;callid_name), &quot;GSMopen: %s&quot;, tech_pvt-&gt;callid_number);
</ins><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                DEBUGA_CELLIAX(&quot;|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+                                DEBUGA_GSMOPEN(&quot;|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n&quot;, GSMOPEN_P_LOG,
</ins><span class="cx">                                                            tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number);
</span><span class="cx">                         }
</span><span class="cx"> 
</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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_LINEBUSY\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        ast_setstate(tech_pvt-&gt;owner, GSMOPEN_STATE_BUSY);
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_BUSY);
</ins><span class="cx">                                 } else {
</span><del>-                                        ERRORA(&quot;Why BUSY now?\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                        ERRORA(&quot;Why BUSY now?\n&quot;, GSMOPEN_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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_NOANSWER\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_NO_ANSWER;
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_HANGUP);
</ins><span class="cx">                                 } else {
</span><del>-                                        ERRORA(&quot;Why NO ANSWER now?\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                        ERRORA(&quot;Why NO ANSWER now?\n&quot;, GSMOPEN_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_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) {
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_NOCARRIER\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN) {
</ins><span class="cx">                                         //cicopet
</span><span class="cx">                                         switch_core_session_t *session = NULL;
</span><span class="cx">                                         switch_channel_t *channel = NULL;
</span><span class="cx"> 
</span><del>-tech_pvt-&gt;interface_state = CELLIAX_STATE_DOWN;
</del><ins>+tech_pvt-&gt;interface_state = GSMOPEN_STATE_DOWN;
</ins><span class="cx"> 
</span><span class="cx">                                         session = switch_core_session_locate(tech_pvt-&gt;session_uuid_str);
</span><span class="cx">                                         if(session){
</span><span class="cx">                                                 channel = switch_core_session_get_channel(session);
</span><del>-                                                //celliax_hangup(tech_pvt);
</del><ins>+                                                //gsmopen_hangup(tech_pvt);
</ins><span class="cx">                                                 switch_core_session_rwunlock(session);
</span><span class="cx">                                                 switch_channel_hangup(channel, 0);
</span><span class="cx">                                         }
</span><span class="cx">                                         //
</span><del>-                                        //tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
-                                        //celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</del><ins>+                                        //tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_FAILURE;
+                                        //gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_HANGUP);
</ins><span class="cx">                                 } else {
</span><del>-                                        ERRORA(&quot;Why NO CARRIER now?\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                        ERRORA(&quot;Why NO CARRIER now?\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -728,27 +728,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_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]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| is not formatted as: |+CBC:xx,yy| giving up\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| is not formatted as: |+CBC:xx,yy| giving up\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        ERRORA(&quot;|%s| BATTERY ALMOST EXHAUSTED\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        WARNINGA(&quot;|%s| BATTERY LOW\n&quot;, GSMOPEN_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">@@ -764,16 +764,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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+CSQ: xx,yy|\n&quot;, GSMOPEN_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>-                                                         CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                         GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                WARNINGA(&quot;|%s| CELLPHONE GETS SIGNAL LOW\n&quot;, GSMOPEN_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">@@ -784,9 +784,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_CELLIAX(&quot;|%s| +CMGW: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i], tech_pvt-&gt;at_cmgw);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;|%s| +CMGW: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+CMGW: xxxx|\n&quot;, GSMOPEN_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">@@ -795,12 +795,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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_IDLE\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        DEBUGA_GSMOPEN(&quot;just received a remote HANGUP\n&quot;, GSMOPEN_P_LOG);
+                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_NORMAL;
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_HANGUP);
+                                        DEBUGA_GSMOPEN(&quot;just sent GSMOPEN_CONTROL_HANGUP\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -809,60 +809,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_CELLIAX(&quot;|%s| CALLFLOW_CALL_INCOMING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_INCOMING\n&quot;, GSMOPEN_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_CELLIAX(&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| CALLFLOW_CALL_ACTIVE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_ACTIVE\n&quot;, GSMOPEN_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;, 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);
</del><ins>+                                        DEBUGA_PBX(&quot;just received a remote ANSWER\n&quot;, GSMOPEN_P_LOG);
+                                        if (tech_pvt-&gt;phone_callflow == GSMOPEN_STATE_UP) {
+                                                //gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_RINGING);
+                                                DEBUGA_PBX(&quot;just sent GSMOPEN_CONTROL_RINGING\n&quot;, GSMOPEN_P_LOG);
+                                                DEBUGA_PBX(&quot;going to send GSMOPEN_CONTROL_ANSWER\n&quot;, GSMOPEN_P_LOG);
+                                                //gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_ANSWER);
</ins><span class="cx">                                                 tech_pvt-&gt;interface_state = CALLFLOW_CALL_REMOTEANSWER;
</span><del>-                                                DEBUGA_PBX(&quot;just sent CELLIAX_CONTROL_ANSWER\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                                DEBUGA_PBX(&quot;just sent GSMOPEN_CONTROL_ANSWER\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><span class="cx">                                 }
</span><del>-                                //tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
-                                //DEBUGA_PBX(&quot;just interface_state UP\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                //tech_pvt-&gt;interface_state = GSMOPEN_STATE_UP;
+                                //DEBUGA_PBX(&quot;just interface_state UP\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| CALLFLOW_CALL_DIALING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_DIALING\n&quot;, GSMOPEN_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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_FAILED\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_FAILURE;
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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_CELLIAX(&quot;|%s| +CSCA: Message Center Address!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CSCA: Message Center Address!\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CMGF: Message Format!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMGF: Message Format!\n&quot;, GSMOPEN_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">@@ -871,13 +871,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_CELLIAX(&quot;|%s| +CMTI: Incoming SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMTI: Incoming SMS!\n&quot;, GSMOPEN_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;, CELLIAX_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;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
</ins><span class="cx">                                 } else {
</span><del>-                                        DEBUGA_CELLIAX(&quot;|%s| +CMTI: Incoming SMS in position: %d!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i], pos);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMTI: Incoming SMS in position: %d!\n&quot;, GSMOPEN_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">@@ -885,9 +885,9 @@
</span><span class="cx">                                                 char at_command[256];
</span><span class="cx"> 
</span><span class="cx">                                                 if (tech_pvt-&gt;no_ucs2 == 0) {
</span><del>-                                                        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</del><ins>+                                                        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</ins><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;, CELLIAX_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;, GSMOPEN_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">@@ -897,25 +897,25 @@
</span><span class="cx">                                                 memset(tech_pvt-&gt;sms_message, 0, sizeof(tech_pvt-&gt;sms_message));
</span><span class="cx"> 
</span><span class="cx">                                                 tech_pvt-&gt;reading_sms_msg = 1;
</span><del>-                                                res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</del><ins>+                                                res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
</ins><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;, CELLIAX_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;, GSMOPEN_P_LOG, at_command);
</ins><span class="cx">                                                 }
</span><del>-                                                res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</del><ins>+                                                res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</ins><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;, CELLIAX_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;, GSMOPEN_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><del>-                                                res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</del><ins>+                                                res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
</ins><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;, CELLIAX_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;, GSMOPEN_P_LOG, at_command);
</ins><span class="cx">                                                 }
</span><span class="cx"> 
</span><span class="cx">                                                 if (strlen(tech_pvt-&gt;sms_message)) {
</span><del>-                                                        //FIXME manager_event(EVENT_FLAG_SYSTEM, &quot;CELLIAXincomingsms&quot;,
</del><ins>+                                                        //FIXME manager_event(EVENT_FLAG_SYSTEM, &quot;GSMOPENincomingsms&quot;,
</ins><span class="cx">                                                         //FIXME &quot;Interface: %s\r\nSMS_Message: %s\r\n&quot;, tech_pvt-&gt;name,
</span><span class="cx">                                                         //FIXME tech_pvt-&gt;sms_message);
</span><span class="cx"> 
</span><span class="lines">@@ -927,7 +927,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>-                                                                DEBUGA_CELLIAX(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;sms_message);
</del><ins>+                                                                DEBUGA_GSMOPEN(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;sms_message);
</ins><span class="cx">                                                                 res=pipe(fd1);
</span><span class="cx">                                                                 pid1 = fork();
</span><span class="cx"> 
</span><span class="lines">@@ -942,7 +942,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>-                                                                                         CELLIAX_P_LOG, tech_pvt-&gt;sms_receiving_program, err, strerror(errno), tech_pvt-&gt;sms_message);
</del><ins>+                                                                                         GSMOPEN_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">@@ -956,15 +956,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>-                                                                         CELLIAX_P_LOG, tech_pvt-&gt;sms_message);
</del><ins>+                                                                         GSMOPEN_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 == CELLIAX_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 == GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner == NULL) {
</ins><span class="cx">                                                         /* we're not in a call, neither calling */
</span><del>-                                                        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</del><ins>+                                                        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</ins><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;, CELLIAX_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;, GSMOPEN_P_LOG);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx"> #endif
</span><span class="lines">@@ -979,35 +979,35 @@
</span><span class="cx">                                 //int unread_msg_id=0;
</span><span class="cx"> 
</span><span class="cx">                                 if (option_debug)
</span><del>-                                        DEBUGA_CELLIAX(&quot;|%s| +MMGL: Listing Motorola SMSs!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +MMGL: Listing Motorola SMSs!\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| is not formatted as: |+MMGL: xx|\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CMGL: Listing SMSs!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMGL: Listing SMSs!\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +MMGR: Reading Motorola SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +MMGR: Reading Motorola SMS!\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CMGR: Reading stored UNSENT SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMGR: Reading stored UNSENT SMS!\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CMGR: Reading stored SENT SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMGR: Reading stored SENT SMS!\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CMGR: Reading received READ SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMGR: Reading received READ SMS!\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| +CMGR: Reading received UNREAD SMS!\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| +CMGR: Reading received UNREAD SMS!\n&quot;, GSMOPEN_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">@@ -1015,34 +1015,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_CELLIAX(&quot;|%s| CALLFLOW_CALL_INFLUX\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_INFLUX\n&quot;, GSMOPEN_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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_NOSERVICE\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_FAILURE;
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_FAILURE;
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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_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);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| CALLFLOW_CALL_SECURITYFAIL\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;line_array.result[i]);
+                                if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN &amp;&amp; tech_pvt-&gt;owner) {
+                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_FAILURE;
+                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_HANGUP);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1052,7 +1052,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_CELLIAX(&quot;phonebook struct: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;phonebook struct: |%s|\n&quot;, GSMOPEN_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">@@ -1063,13 +1063,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>-                                                         CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                         GSMOPEN_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_CELLIAX
</del><ins>+                                                        DEBUGA_GSMOPEN
</ins><span class="cx">                                                                 (&quot;First entry: %d, last entry: %d, phone number max lenght: %d, text max lenght: %d\n&quot;,
</span><del>-                                                                 CELLIAX_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
</del><ins>+                                                                 GSMOPEN_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">@@ -1085,30 +1085,30 @@
</span><span class="cx">                                                 char entry_text[256];
</span><span class="cx"> 
</span><span class="cx">                                                 if (option_debug)
</span><del>-                                                        DEBUGA_CELLIAX(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;phonebook entry: |%s|\n&quot;, GSMOPEN_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>-                                                                 CELLIAX_P_LOG, err, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                                 GSMOPEN_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_CELLIAX(&quot;Number: %s, Text: %s, Type: %d\n&quot;, CELLIAX_P_LOG, entry_number, entry_text, entry_type);
</del><ins>+                                                                DEBUGA_GSMOPEN(&quot;Number: %s, Text: %s, Type: %d\n&quot;, GSMOPEN_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><del>-                                                                celliax_dir_entry_extension++;
</del><ins>+                                                                gsmopen_dir_entry_extension++;
</ins><span class="cx"> 
</span><span class="cx">                                                                 fprintf(tech_pvt-&gt;phonebook_writing_fp,
</span><span class="cx">                                                                                 &quot;%s  =&gt; ,%sSKO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromcell=%s|phonebook_entry_owner=%s\n&quot;,
</span><span class="cx">                                                                                 entry_number, entry_text, &quot;no&quot;,
</span><del>-                                                                                tech_pvt-&gt;celliax_dir_entry_extension_prefix, &quot;2&quot;, celliax_dir_entry_extension, &quot;yes&quot;, &quot;not_specified&quot;);
</del><ins>+                                                                                tech_pvt-&gt;gsmopen_dir_entry_extension_prefix, &quot;2&quot;, gsmopen_dir_entry_extension, &quot;yes&quot;, &quot;not_specified&quot;);
</ins><span class="cx">                                                                 fprintf(tech_pvt-&gt;phonebook_writing_fp,
</span><span class="cx">                                                                                 &quot;%s  =&gt; ,%sDO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromcell=%s|phonebook_entry_owner=%s\n&quot;,
</span><span class="cx">                                                                                 entry_number, entry_text, &quot;no&quot;,
</span><del>-                                                                                tech_pvt-&gt;celliax_dir_entry_extension_prefix, &quot;3&quot;, celliax_dir_entry_extension, &quot;yes&quot;, &quot;not_specified&quot;);
</del><ins>+                                                                                tech_pvt-&gt;gsmopen_dir_entry_extension_prefix, &quot;3&quot;, gsmopen_dir_entry_extension, &quot;yes&quot;, &quot;not_specified&quot;);
</ins><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx"> 
</span><span class="lines">@@ -1121,34 +1121,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_CELLIAX(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;phonebook entry: |%s|\n&quot;, GSMOPEN_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>-                                                                 CELLIAX_P_LOG, err, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                                 GSMOPEN_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_CELLIAX(&quot;Number: %s, Text: %s, Type: %d\n&quot;, CELLIAX_P_LOG, entry_number, entry_text, entry_type);
</del><ins>+                                                                DEBUGA_GSMOPEN(&quot;Number: %s, Text: %s, Type: %d\n&quot;, GSMOPEN_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_CELLIAX(&quot;incoming callid: Text: %s, Number: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number);
</del><ins>+                                                                DEBUGA_GSMOPEN(&quot;incoming callid: Text: %s, Number: %s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;callid_name, tech_pvt-&gt;callid_number);
</ins><span class="cx"> 
</span><del>-                                                        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],
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;|%s| CPBR INCOMING CALLID: name is %s, number is %s\n&quot;,
+                                                                                   GSMOPEN_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 = CELLIAX_STATE_RING;
</del><ins>+                                                        tech_pvt-&gt;interface_state = GSMOPEN_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">@@ -1156,7 +1156,7 @@
</span><span class="cx">                                         }
</span><span class="cx"> 
</span><span class="cx">                                         else {
</span><del>-                                                DEBUGA_CELLIAX(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;phonebook entry: |%s|\n&quot;, GSMOPEN_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">@@ -1172,66 +1172,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, CELLIAX_STATE_DOWN);
-                                                        tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_NORMAL;
-                                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_HANGUP);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, GSMOPEN_STATE_DOWN);
+                                                        tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_CAUSE_NORMAL;
+                                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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 = CELLIAX_STATE_DOWN;
</del><ins>+                                                tech_pvt-&gt;interface_state = GSMOPEN_STATE_DOWN;
</ins><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n&quot;, GSMOPEN_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, CELLIAX_STATE_DIALING);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, GSMOPEN_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_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n&quot;, GSMOPEN_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, CELLIAX_STATE_UP);
-                                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_ANSWER);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, GSMOPEN_STATE_UP);
+                                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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 = CELLIAX_STATE_UP;
</del><ins>+                                                tech_pvt-&gt;interface_state = GSMOPEN_STATE_UP;
</ins><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n&quot;, GSMOPEN_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_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]);
</del><ins>+                                                        DEBUGA_GSMOPEN
+                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n&quot;, GSMOPEN_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_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]);
</del><ins>+                                                        DEBUGA_GSMOPEN
+                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n&quot;, GSMOPEN_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_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]);
</del><ins>+                                                        DEBUGA_GSMOPEN
+                                                                (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n&quot;, GSMOPEN_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, CELLIAX_STATE_BUSY);
-                                                        celliax_queue_control(tech_pvt-&gt;owner, CELLIAX_CONTROL_BUSY);
</del><ins>+                                                        ast_setstate(tech_pvt-&gt;owner, GSMOPEN_STATE_BUSY);
+                                                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_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 = CELLIAX_STATE_BUSY;
</del><ins>+                                                tech_pvt-&gt;interface_state = GSMOPEN_STATE_BUSY;
</ins><span class="cx">                                                 if (option_debug &gt; 1)
</span><del>-                                                        DEBUGA_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                        DEBUGA_GSMOPEN(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n&quot;, GSMOPEN_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">@@ -1239,58 +1239,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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| at_indicator_noservice_string\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| at_indicator_nosignal_string\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        WARNINGA(&quot;|%s| at_indicator_lowsignal_string\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        WARNINGA(&quot;|%s| at_indicator_lowbattchg_string\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        ERRORA(&quot;|%s| at_indicator_nobattchg_string\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| at_indicator_callactive_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| at_indicator_callactive_string\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| at_indicator_nocallactive_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| at_indicator_nocallactive_string\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| at_indicator_nocallsetup_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| at_indicator_nocallsetup_string\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| at_indicator_callsetupincoming_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| at_indicator_callsetupincoming_string\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| at_indicator_callsetupoutgoing_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| at_indicator_callsetupoutgoing_string\n&quot;, GSMOPEN_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_CELLIAX(&quot;|%s| at_indicator_callsetupremoteringing_string\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;|%s| at_indicator_callsetupremoteringing_string\n&quot;, GSMOPEN_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">@@ -1301,19 +1301,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_CELLIAX(&quot;|%s| got what EXPECTED\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;line_array.result[i]);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;|%s| got what EXPECTED\n&quot;, GSMOPEN_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_CELLIAX(&quot;got OK\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;got OK\n&quot;, GSMOPEN_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_CELLIAX(&quot;got ERROR\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;got ERROR\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 at_ack = AT_ERROR;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1338,17 +1338,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;, CELLIAX_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;, GSMOPEN_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;, CELLIAX_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;, GSMOPEN_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;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
-                                                                DEBUGA_CELLIAX(&quot;%d content=%s\n&quot;, CELLIAX_P_LOG, which_field, content);
</del><ins>+                                                                //ERRORA(&quot;END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, GSMOPEN_P_LOG, inside_comma, inside_quote, &amp;tech_pvt-&gt;line_array.result[i][c]);
+                                                                DEBUGA_GSMOPEN(&quot;%d content=%s\n&quot;, GSMOPEN_P_LOG, which_field, 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">@@ -1374,12 +1374,12 @@
</span><span class="cx">                                                                 } else if(which_field==2){
</span><span class="cx">                                                                         strncpy(tech_pvt-&gt;sms_date, content2, sizeof(tech_pvt-&gt;sms_date));
</span><span class="cx">                                                                 } else if(which_field &gt; 2){
</span><del>-                                                                WARNINGA(&quot;WHY which_field is &gt; 2 ? (which_field is %d)\n&quot;, CELLIAX_P_LOG, which_field);
</del><ins>+                                                                WARNINGA(&quot;WHY which_field is &gt; 2 ? (which_field is %d)\n&quot;, GSMOPEN_P_LOG, which_field);
</ins><span class="cx">                                                                 }
</span><span class="cx">                                                                 which_field++;
</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;, CELLIAX_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;, GSMOPEN_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">@@ -1392,14 +1392,14 @@
</span><span class="cx">                                         }
</span><span class="cx">                                 }                                //it was the +CMGR answer from the cellphone
</span><span class="cx">                                 else {
</span><del>-                                        DEBUGA_CELLIAX(&quot;body=%s\n&quot;, CELLIAX_P_LOG, sms_body);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;body=%s\n&quot;, GSMOPEN_P_LOG, sms_body);
</ins><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, tech_pvt-&gt;line_array.result[i], ((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><span class="cx">                                         memset(sms_body, '\0', sizeof(sms_body));
</span><span class="cx">                                         err = ucs2_to_utf8(tech_pvt, tech_pvt-&gt;line_array.result[i], sms_body, sizeof(sms_body));
</span><del>-                                        DEBUGA_CELLIAX(&quot;body=%s\n&quot;, CELLIAX_P_LOG, sms_body);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;body=%s\n&quot;, GSMOPEN_P_LOG, sms_body);
</ins><span class="cx">                                         strncpy(tech_pvt-&gt;sms_body, sms_body, sizeof(tech_pvt-&gt;sms_body));
</span><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="lines">@@ -1407,7 +1407,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_CELLIAX(&quot;sms_message=%s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;sms_message);
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;sms_message=%s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;sms_message);
</ins><span class="cx">                                 }                                //it was the UCS2 from cellphone
</span><span class="cx"> 
</span><span class="cx">                         }                                        //we were reading the SMS
</span><span class="lines">@@ -1420,7 +1420,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;, CELLIAX_P_LOG, AT_MESG_MAX_LINES);
</del><ins>+                        ERRORA(&quot;Too many lines in result (&gt;%d). Stopping reader.\n&quot;, GSMOPEN_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">@@ -1429,11 +1429,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;, CELLIAX_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;, GSMOPEN_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, CELLIAX_CONTROL_HANGUP);
</del><ins>+                        gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_HANGUP);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1442,31 +1442,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_CELLIAX
</del><ins>+                DEBUGA_GSMOPEN
</ins><span class="cx">                         (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                         CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                         GSMOPEN_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_CELLIAX
</del><ins>+                        DEBUGA_GSMOPEN
</ins><span class="cx">                                 (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                                 CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
-                        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CPBS=RC&quot;);
</del><ins>+                                 GSMOPEN_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
+                        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CPBS=RC&quot;);
</ins><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;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                         tech_pvt-&gt;phonebook_querying = 1;
</span><del>-                        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CPBR=?&quot;);
</del><ins>+                        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CPBR=?&quot;);
</ins><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;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;, GSMOPEN_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><del>-                        res = celliax_serial_write_AT_expect_longtime(tech_pvt, list_command, &quot;OK&quot;);
</del><ins>+                        res = gsmopen_serial_write_AT_expect_longtime(tech_pvt, list_command, &quot;OK&quot;);
</ins><span class="cx">                         if (res) {
</span><del>-                                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);
</del><ins>+                                WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, GSMOPEN_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">@@ -1476,29 +1476,29 @@
</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_CELLIAX
</del><ins>+                DEBUGA_GSMOPEN
</ins><span class="cx">                         (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                         CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                         GSMOPEN_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;, CELLIAX_P_LOG);
-                        DEBUGA_CELLIAX
</del><ins>+                        ERRORA(&quot;Ringing stopped and I have not answered. Why?\n&quot;, GSMOPEN_P_LOG);
+                        DEBUGA_GSMOPEN
</ins><span class="cx">                                 (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-                                 CELLIAX_P_LOG, tech_pvt-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+                                 GSMOPEN_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, CELLIAX_CONTROL_HANGUP);
-                                tech_pvt-&gt;owner-&gt;hangupcause = CELLIAX_CAUSE_FAILURE;
</del><ins>+                                gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_HANGUP);
+                                tech_pvt-&gt;owner-&gt;hangupcause = GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+        //NOTICA (&quot; OUTSIDE this gsmopen_serial_device %s \n&quot;, GSMOPEN_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="cx">                 return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_write_AT(private_t * tech_pvt, const char *data)
</del><ins>+int gsmopen_serial_write_AT(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx">         int howmany;
</span><span class="cx">         int i;
</span><span class="lines">@@ -1511,57 +1511,57 @@
</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_CELLIAX(&quot;Error sending (%.1s): %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], res, strerror(errno));
</del><ins>+                        DEBUGA_GSMOPEN(&quot;Error sending (%.1s): %d (%s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;Successfully RE-sent (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;Successfully RE-sent (%.1s): %d %d (%s)\n&quot;, GSMOPEN_P_LOG, &amp;data[i], count, res, strerror(errno));
</ins><span class="cx">                                         break;
</span><span class="cx">                                 } else
</span><del>-                                        DEBUGA_CELLIAX(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;sent data... (%.1s)\n&quot;, CELLIAX_P_LOG, &amp;data[i]);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;sent data... (%.1s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;Error sending (carriage return): %d (%s)\n&quot;, CELLIAX_P_LOG, res, strerror(errno));
</del><ins>+                DEBUGA_GSMOPEN(&quot;Error sending (carriage return): %d (%s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;Successfully RE-sent carriage return: %d %d (%s)\n&quot;, CELLIAX_P_LOG, count, res, strerror(errno));
</del><ins>+                                DEBUGA_GSMOPEN(&quot;Successfully RE-sent carriage return: %d %d (%s)\n&quot;, GSMOPEN_P_LOG, count, res, strerror(errno));
</ins><span class="cx">                                 break;
</span><span class="cx">                         } else
</span><del>-                                DEBUGA_CELLIAX(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, CELLIAX_P_LOG, count, res, strerror(errno));
</del><ins>+                                DEBUGA_GSMOPEN(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, count, res, strerror(errno));
</del><ins>+                        ERRORA(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;sent (carriage return)\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;sent (carriage return)\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         usleep(1000);                                /* release the cpu */
</span><span class="cx"> 
</span><span class="cx">         return howmany;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_write_AT_nocr(private_t * tech_pvt, const char *data)
</del><ins>+int gsmopen_serial_write_AT_nocr(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx">         int howmany;
</span><span class="cx">         int i;
</span><span class="lines">@@ -1574,24 +1574,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_CELLIAX(&quot;Error sending (%.1s): %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], res, strerror(errno));
</del><ins>+                        DEBUGA_GSMOPEN(&quot;Error sending (%.1s): %d (%s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, &amp;data[i], count, res, strerror(errno));
</del><ins>+                                ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, GSMOPEN_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_CELLIAX(&quot;sent data... (%.1s)\n&quot;, CELLIAX_P_LOG, &amp;data[i]);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;sent data... (%.1s)\n&quot;, GSMOPEN_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">@@ -1600,17 +1600,17 @@
</span><span class="cx">         return howmany;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_write_AT_noack(private_t * tech_pvt, const char *data)
</del><ins>+int gsmopen_serial_write_AT_noack(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-                DEBUGA_CELLIAX(&quot;celliax_serial_write_AT_noack: %s\n&quot;, CELLIAX_P_LOG, data);
</del><ins>+                DEBUGA_GSMOPEN(&quot;gsmopen_serial_write_AT_noack: %s\n&quot;, GSMOPEN_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><del>-        if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
</del><ins>+        if (gsmopen_serial_write_AT(tech_pvt, data) != strlen(data)) {
</ins><span class="cx"> 
</span><del>-                ERRORA(&quot;Error sending data... (%s)\n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;Error sending data... (%s)\n&quot;, GSMOPEN_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">@@ -1620,21 +1620,21 @@
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_write_AT_ack(private_t * tech_pvt, const char *data)
</del><ins>+int gsmopen_serial_write_AT_ack(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx">         int at_result = AT_ERROR;
</span><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 (option_debug &gt; 1)
</span><del>-                DEBUGA_CELLIAX(&quot;sending: %s\n&quot;, CELLIAX_P_LOG, data);
-        if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
-                ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                DEBUGA_GSMOPEN(&quot;sending: %s\n&quot;, GSMOPEN_P_LOG, data);
+        if (gsmopen_serial_write_AT(tech_pvt, data) != strlen(data)) {
+                ERRORA(&quot;Error sending data... (%s) \n&quot;, GSMOPEN_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="cx"> 
</span><del>-        at_result = celliax_serial_read_AT(tech_pvt, 1, 500000, 2, NULL, 1);        // 2.5 sec timeout
</del><ins>+        at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, 2, NULL, 1);        // 2.5 sec timeout
</ins><span class="cx">         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         POPPA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx"> 
</span><span class="lines">@@ -1642,21 +1642,21 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data)
</del><ins>+int gsmopen_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx">         int at_result = AT_ERROR;
</span><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 (option_debug &gt; 1)
</span><del>-                DEBUGA_CELLIAX(&quot;sending: %s\n&quot;, CELLIAX_P_LOG, data);
-        if (celliax_serial_write_AT_nocr(tech_pvt, data) != strlen(data)) {
-                ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                DEBUGA_GSMOPEN(&quot;sending: %s\n&quot;, GSMOPEN_P_LOG, data);
+        if (gsmopen_serial_write_AT_nocr(tech_pvt, data) != strlen(data)) {
+                ERRORA(&quot;Error sending data... (%s) \n&quot;, GSMOPEN_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="cx"> 
</span><del>-        at_result = celliax_serial_read_AT(tech_pvt, 1, 500000, 20, NULL, 1);        // 20.5 sec timeout
</del><ins>+        at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, 20, NULL, 1);        // 20.5 sec timeout
</ins><span class="cx">         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         POPPA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx"> 
</span><span class="lines">@@ -1664,21 +1664,21 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds)
</del><ins>+int gsmopen_serial_write_AT_expect1(private_t * tech_pvt, const char *data, const char *expected_string, int expect_crlf, int seconds)
</ins><span class="cx"> {
</span><span class="cx">         int at_result = AT_ERROR;
</span><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 (option_debug &gt; 1)
</span><del>-                DEBUGA_CELLIAX(&quot;sending: %s, expecting: %s\n&quot;, CELLIAX_P_LOG, data, expected_string);
-        if (celliax_serial_write_AT(tech_pvt, data) != strlen(data)) {
-                ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                DEBUGA_GSMOPEN(&quot;sending: %s, expecting: %s\n&quot;, GSMOPEN_P_LOG, data, expected_string);
+        if (gsmopen_serial_write_AT(tech_pvt, data) != strlen(data)) {
+                ERRORA(&quot;Error sending data... (%s) \n&quot;, GSMOPEN_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="cx"> 
</span><del>-        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
</del><ins>+        at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, seconds, expected_string, expect_crlf);        // 20.5 sec timeout, used for querying the SIM and sending SMSs
</ins><span class="cx">         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         POPPA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx"> 
</span><span class="lines">@@ -1686,16 +1686,16 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds)
</del><ins>+int gsmopen_serial_AT_expect(private_t * tech_pvt, const char *expected_string, int expect_crlf, int seconds)
</ins><span class="cx"> {
</span><span class="cx">         int at_result = AT_ERROR;
</span><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 (option_debug &gt; 1)
</span><del>-                DEBUGA_CELLIAX(&quot;expecting: %s\n&quot;, CELLIAX_P_LOG, expected_string);
</del><ins>+                DEBUGA_GSMOPEN(&quot;expecting: %s\n&quot;, GSMOPEN_P_LOG, expected_string);
</ins><span class="cx"> 
</span><del>-        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
</del><ins>+        at_result = gsmopen_serial_read_AT(tech_pvt, 1, 500000, seconds, expected_string, expect_crlf);        // 20.5 sec timeout, used for querying the SIM and sending SMSs
</ins><span class="cx">         UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx">         POPPA_UNLOCKA(tech_pvt-&gt;controldev_lock);
</span><span class="cx"> 
</span><span class="lines">@@ -1703,123 +1703,123 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_answer(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_answer(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
</span><del>-                return celliax_serial_answer_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
</del><ins>+                return gsmopen_serial_answer_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
</span><del>-                return celliax_serial_answer_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
</del><ins>+                return gsmopen_serial_answer_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_CVM_BUSMAIL)
</span><del>-                return celliax_serial_answer_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
</del><ins>+                return gsmopen_serial_answer_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
</ins><span class="cx">         return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_serial_answer_AT(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_answer_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         int res;
</span><span class="cx"> 
</span><del>-        res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</del><ins>+        res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</ins><span class="cx">         if (res) {
</span><del>-                DEBUGA_CELLIAX
</del><ins>+                DEBUGA_GSMOPEN
</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>-                         CELLIAX_P_LOG, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</del><ins>+                         GSMOPEN_P_LOG, tech_pvt-&gt;at_answer, tech_pvt-&gt;at_answer_expect);
</ins><span class="cx"> 
</span><del>-                res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;S\&quot;&quot;);
</del><ins>+                res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;S\&quot;&quot;);
</ins><span class="cx">                 if (res) {
</span><del>-                        ERRORA(&quot;at_answer command failed, command used: 'AT+CKPD=\&quot;S\&quot;', giving up\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;at_answer command failed, command used: 'AT+CKPD=\&quot;S\&quot;', giving up\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        //tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
</del><ins>+        //tech_pvt-&gt;interface_state = GSMOPEN_STATE_UP;
</ins><span class="cx">         //tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><del>-        DEBUGA_CELLIAX(&quot;AT: call answered\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;AT: call answered\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_hangup(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_hangup(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
</span><del>-                return celliax_serial_hangup_AT(tech_pvt);
-#ifdef CELLIAX_FBUS2
</del><ins>+                return gsmopen_serial_hangup_AT(tech_pvt);
+#ifdef GSMOPEN_FBUS2
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
</span><del>-                return celliax_serial_hangup_FBUS2(tech_pvt);
-#endif /* CELLIAX_FBUS2 */
-#ifdef CELLIAX_CVM
</del><ins>+                return gsmopen_serial_hangup_FBUS2(tech_pvt);
+#endif /* GSMOPEN_FBUS2 */
+#ifdef GSMOPEN_CVM
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_CVM_BUSMAIL)
</span><del>-                return celliax_serial_hangup_CVM_BUSMAIL(tech_pvt);
-#endif /* CELLIAX_CVM */
</del><ins>+                return gsmopen_serial_hangup_CVM_BUSMAIL(tech_pvt);
+#endif /* GSMOPEN_CVM */
</ins><span class="cx">         return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_serial_hangup_AT(private_t * tech_pvt)
</del><ins>+int gsmopen_serial_hangup_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         int res;
</span><span class="cx"> 
</span><del>-        if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
-                res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_hangup, tech_pvt-&gt;at_hangup_expect);
</del><ins>+        if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN) {
+                res = gsmopen_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_hangup, tech_pvt-&gt;at_hangup_expect);
</ins><span class="cx">                 if (res) {
</span><del>-                        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);
-                        res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;at_hangup command failed, command used: %s, trying to use AT+CKPD=\&quot;EEE\&quot;\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;at_hangup);
+                        res = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</ins><span class="cx">                         if (res) {
</span><del>-                                ERRORA(&quot;at_hangup command failed, command used: 'AT+CKPD=\&quot;EEE\&quot;'\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;at_hangup command failed, command used: 'AT+CKPD=\&quot;EEE\&quot;'\n&quot;, GSMOPEN_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 = CELLIAX_STATE_DOWN;
</del><ins>+        tech_pvt-&gt;interface_state = GSMOPEN_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="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_serial_call(private_t * tech_pvt, char *dstr)
</del><ins>+int gsmopen_serial_call(private_t * tech_pvt, char *dstr)
</ins><span class="cx"> {
</span><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
</span><del>-                return celliax_serial_call_AT(tech_pvt, dstr);
-#ifdef CELLIAX_FBUS2
</del><ins>+                return gsmopen_serial_call_AT(tech_pvt, dstr);
+#ifdef GSMOPEN_FBUS2
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
</span><del>-                return celliax_serial_call_FBUS2(tech_pvt, dstr);
-#endif /* CELLIAX_FBUS2 */
</del><ins>+                return gsmopen_serial_call_FBUS2(tech_pvt, dstr);
+#endif /* GSMOPEN_FBUS2 */
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_NO_SERIAL)
</span><span class="cx">                 return 0;
</span><del>-#ifdef CELLIAX_CVM
</del><ins>+#ifdef GSMOPEN_CVM
</ins><span class="cx">         if (tech_pvt-&gt;controldevprotocol == PROTOCOL_CVM_BUSMAIL)
</span><del>-                return celliax_serial_call_CVM_BUSMAIL(tech_pvt, dstr);
-#endif /* CELLIAX_CVM */
</del><ins>+                return gsmopen_serial_call_CVM_BUSMAIL(tech_pvt, dstr);
+#endif /* GSMOPEN_CVM */
</ins><span class="cx">         return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int celliax_serial_call_AT(private_t * tech_pvt, char *dstr)
</del><ins>+int gsmopen_serial_call_AT(private_t * tech_pvt, char *dstr)
</ins><span class="cx"> {
</span><span class="cx">         int res;
</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;, CELLIAX_P_LOG, dstr);
</del><ins>+                DEBUGA_PBX(&quot;Dialing %s\n&quot;, GSMOPEN_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 = CELLIAX_STATE_DIALING;
</del><ins>+        tech_pvt-&gt;interface_state = GSMOPEN_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>-           CELLIAX_P_LOG, dstr);
</del><ins>+           GSMOPEN_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;, CELLIAX_P_LOG, at_command);
-        res = celliax_serial_write_AT_expect(tech_pvt, at_command, tech_pvt-&gt;at_dial_expect);
</del><ins>+        DEBUGA_PBX(&quot;Dialstring %s\n&quot;, GSMOPEN_P_LOG, at_command);
+        res = gsmopen_serial_write_AT_expect(tech_pvt, at_command, tech_pvt-&gt;at_dial_expect);
</ins><span class="cx">         if (res) {
</span><del>-                ERRORA(&quot;dial command failed, dial string was: %s\n&quot;, CELLIAX_P_LOG, at_command);
</del><ins>+                ERRORA(&quot;dial command failed, dial string was: %s\n&quot;, GSMOPEN_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">@@ -1845,7 +1845,7 @@
</span><span class="cx"> 
</span><span class="cx">         memset(converted, '\0', sizeof(converted));
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;ucs2_in=%s\n&quot;, CELLIAX_P_LOG, ucs2_in);
</del><ins>+        DEBUGA_GSMOPEN(&quot;ucs2_in=%s\n&quot;, GSMOPEN_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">@@ -1860,21 +1860,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;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;error: %s\n&quot;, GSMOPEN_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_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);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
+                                           GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+                DEBUGA_GSMOPEN(&quot;error: %s %d\n&quot;, GSMOPEN_P_LOG, strerror(errno), errno);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><del>-        DEBUGA_CELLIAX
</del><ins>+        DEBUGA_GSMOPEN
</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>-                 CELLIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
</del><ins>+                 GSMOPEN_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">@@ -1899,32 +1899,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;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+                ERRORA(&quot;error: %s\n&quot;, GSMOPEN_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_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);
</del><ins>+        DEBUGA_GSMOPEN(&quot;in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
+                                   GSMOPEN_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;, CELLIAX_P_LOG, strerror(errno), errno);
</del><ins>+                ERRORA(&quot;error: %s %d\n&quot;, GSMOPEN_P_LOG, strerror(errno), errno);
</ins><span class="cx">                 return -1;
</span><span class="cx">         }
</span><del>-        DEBUGA_CELLIAX
</del><ins>+        DEBUGA_GSMOPEN
</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>-                 CELLIAX_P_LOG, iconv_res, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</del><ins>+                 GSMOPEN_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_CELLIAX(&quot;character is |%02X|\n&quot;, CELLIAX_P_LOG, converted[i]);
</del><ins>+                DEBUGA_GSMOPEN(&quot;character is |%02X|\n&quot;, GSMOPEN_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_CELLIAX(&quot;stringa=%s, stringa2=%s, ucs2_out=%s\n&quot;, CELLIAX_P_LOG, stringa, stringa2, ucs2_out);
</del><ins>+                DEBUGA_GSMOPEN(&quot;stringa=%s, stringa2=%s, ucs2_out=%s\n&quot;, GSMOPEN_P_LOG, stringa, stringa2, ucs2_out);
</ins><span class="cx">         }
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1932,62 +1932,62 @@
</span><span class="cx"> 
</span><span class="cx"> /*! \brief  Answer incoming call,
</span><span class="cx">  * Part of PBX interface */
</span><del>-int celliax_answer(private_t * tech_pvt)
</del><ins>+int gsmopen_answer(private_t * tech_pvt)
</ins><span class="cx"> {
</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;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;ENTERING FUNC\n&quot;, GSMOPEN_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><del>-                if (celliax_serial_answer(tech_pvt)) {
-                        ERRORA(&quot;celliax_answer FAILED\n&quot;, CELLIAX_P_LOG);
</del><ins>+                if (gsmopen_serial_answer(tech_pvt)) {
+                        ERRORA(&quot;gsmopen_answer FAILED\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         if (option_debug) {
</span><del>-                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, GSMOPEN_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 = CELLIAX_STATE_UP;
</del><ins>+        tech_pvt-&gt;interface_state = GSMOPEN_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 == CELLIAX_STATE_RING) {
</del><ins>+        while (tech_pvt-&gt;interface_state == GSMOPEN_STATE_RING) {
</ins><span class="cx">                 usleep(10000);                        //10msec
</span><span class="cx">         }
</span><del>-        if (tech_pvt-&gt;interface_state != CELLIAX_STATE_UP) {
-                ERRORA(&quot;call answering failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+        if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_UP) {
+                ERRORA(&quot;call answering failed\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                        DEBUGA_PBX(&quot;call answered\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 res = 0;
</span><del>-#ifdef CELLIAX_PORTAUDIO
</del><ins>+#ifdef GSMOPEN_PORTAUDIO
</ins><span class="cx">                 speex_echo_state_reset(tech_pvt-&gt;stream-&gt;echo_state);
</span><del>-#endif // CELLIAX_PORTAUDIO
</del><ins>+#endif // GSMOPEN_PORTAUDIO
</ins><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 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);
</del><ins>+                        DEBUGA_PBX(&quot;going to send GSMOPEN_STATE_UP\n&quot;, GSMOPEN_P_LOG);
+                        ast_setstate(tech_pvt-&gt;owner, GSMOPEN_STATE_UP);
+                        //ast_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_ANSWER);
+                        //gsmopen_queue_control(tech_pvt-&gt;owner, GSMOPEN_CONTROL_ANSWER);
+                        DEBUGA_PBX(&quot;just sent GSMOPEN_STATE_UP\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         return res;
</span><span class="cx"> }
</span><del>-int celliax_ring(private_t * tech_pvt)
</del><ins>+int gsmopen_ring(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">         int res=0;
</span><span class="cx">         switch_core_session_t *session = NULL;
</span><span class="cx">         switch_channel_t *channel = NULL;
</span><span class="cx"> 
</span><span class="cx">         if (option_debug) {
</span><del>-                DEBUGA_PBX(&quot;ENTERING FUNC\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;ENTERING FUNC\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         session = switch_core_session_locate(tech_pvt-&gt;session_uuid_str);
</span><span class="lines">@@ -2008,88 +2008,88 @@
</span><span class="cx">                 if(channel){
</span><span class="cx">                         switch_channel_mark_ring_ready(channel);
</span><span class="cx">                 } else {
</span><del>-                        ERRORA(&quot;no session\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;no session\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_core_session_rwunlock(session);
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;no session\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no session\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         if (option_debug) {
</span><del>-                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">         return res;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-/*! \brief  Hangup celliax call
</del><ins>+/*! \brief  Hangup gsmopen call
</ins><span class="cx">  * Part of PBX interface, called from ast_hangup */
</span><span class="cx"> 
</span><del>-int celliax_hangup(private_t * tech_pvt)
</del><ins>+int gsmopen_hangup(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><del>-        /* if there is not celliax pvt why we are here ? */
</del><ins>+        /* if there is not gsmopen pvt why we are here ? */
</ins><span class="cx">         if (!tech_pvt) {
</span><del>-                ERRORA(&quot;Asked to hangup channel not connected\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Asked to hangup channel not connected\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return 0;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;ENTERING FUNC\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;ENTERING FUNC\n&quot;, GSMOPEN_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 != CELLIAX_STATE_DOWN) {
</del><ins>+                if (tech_pvt-&gt;interface_state != GSMOPEN_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><del>-                                res = celliax_serial_hangup(tech_pvt);
</del><ins>+                                res = gsmopen_serial_hangup(tech_pvt);
</ins><span class="cx">                                 if (res) {
</span><del>-                                        ERRORA(&quot;celliax_serial_hangup error: %d\n&quot;, CELLIAX_P_LOG, res);
</del><ins>+                                        ERRORA(&quot;gsmopen_serial_hangup error: %d\n&quot;, GSMOPEN_P_LOG, res);
</ins><span class="cx">                                         if (option_debug) {
</span><del>-                                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, GSMOPEN_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 != CELLIAX_STATE_DOWN) {
</del><ins>+                        while (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN) {
</ins><span class="cx">                                 usleep(10000);        //10msec
</span><span class="cx">                         }
</span><del>-                        if (tech_pvt-&gt;interface_state != CELLIAX_STATE_DOWN) {
-                                ERRORA(&quot;call hangup failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        if (tech_pvt-&gt;interface_state != GSMOPEN_STATE_DOWN) {
+                                ERRORA(&quot;call hangup failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 return -1;
</span><span class="cx">                         } else {
</span><del>-                                DEBUGA_CELLIAX(&quot;call hungup\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;call hungup\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                tech_pvt-&gt;interface_state = CELLIAX_STATE_DOWN;
</del><ins>+                tech_pvt-&gt;interface_state = GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_PBX(&quot;EXITING FUNC\n&quot;, GSMOPEN_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 CELLIAX_ALSA
-#ifdef CELLIAX_ALSA
</del><ins>+#define GSMOPEN_ALSA
+#ifdef GSMOPEN_ALSA
</ins><span class="cx"> /*! \brief ALSA pcm format, according to endianess  */
</span><span class="cx"> #if __BYTE_ORDER == __LITTLE_ENDIAN
</span><del>-snd_pcm_format_t celliax_format = SND_PCM_FORMAT_S16_LE;
</del><ins>+snd_pcm_format_t gsmopen_format = SND_PCM_FORMAT_S16_LE;
</ins><span class="cx"> #else
</span><del>-snd_pcm_format_t celliax_format = SND_PCM_FORMAT_S16_BE;
</del><ins>+snd_pcm_format_t gsmopen_format = SND_PCM_FORMAT_S16_BE;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><span class="cx">  * \brief Initialize the ALSA soundcard channels (capture AND playback) used by one interface (a multichannel soundcard can be used by multiple interfaces) 
</span><del>- * \param p the celliax_pvt of the interface
</del><ins>+ * \param p the gsmopen_pvt of the interface
</ins><span class="cx">  *
</span><span class="cx">  * This function call alsa_open_dev to initialize the ALSA soundcard for each channel (capture AND playback) used by one interface (a multichannel soundcard can be used by multiple interfaces). Called by sound_init
</span><span class="cx">  *
</span><span class="lines">@@ -2099,18 +2099,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;, CELLIAX_P_LOG, tech_pvt-&gt;alsacname);
</del><ins>+                ERRORA(&quot;Failed opening ALSA capture device: %s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;alsacname);
</ins><span class="cx">                 if (alsa_shutdown(tech_pvt)) {
</span><del>-                        ERRORA(&quot;alsa_shutdown failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;alsa_shutdown failed\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;alsapname);
</del><ins>+                ERRORA(&quot;Failed opening ALSA playback device: %s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;alsapname);
</ins><span class="cx">                 if (alsa_shutdown(tech_pvt)) {
</span><del>-                        ERRORA(&quot;alsa_shutdown failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;alsa_shutdown failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         return -1;
</span><span class="cx">                 }
</span><span class="cx">                 return -1;
</span><span class="lines">@@ -2123,7 +2123,7 @@
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><span class="cx">  * \brief Shutdown the ALSA soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces) 
</span><del>- * \param p the celliax_pvt of the interface
</del><ins>+ * \param p the gsmopen_pvt of the interface
</ins><span class="cx">  *
</span><span class="cx">  * This function shutdown the ALSA soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). Called by sound_init
</span><span class="cx">  *
</span><span class="lines">@@ -2138,12 +2138,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;, CELLIAX_P_LOG, tech_pvt-&gt;alsapname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;alsapname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, GSMOPEN_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">@@ -2151,12 +2151,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;, CELLIAX_P_LOG, tech_pvt-&gt;alsacname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, tech_pvt-&gt;alsacname, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, GSMOPEN_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">@@ -2167,7 +2167,7 @@
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><span class="cx">  * \brief Setup and open the ALSA device (capture OR playback) 
</span><del>- * \param p the celliax_pvt of the interface
</del><ins>+ * \param p the gsmopen_pvt of the interface
</ins><span class="cx">  * \param stream the ALSA capture/playback definition
</span><span class="cx">  *
</span><span class="cx">  * This function setup and open the ALSA device (capture OR playback). Called by alsa_init
</span><span class="lines">@@ -2206,53 +2206,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;, CELLIAX_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;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;info error: %s&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;nonblock setting error: %s&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Broken configuration for this PCM, no configurations available: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Access type not available: %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><del>-        err = snd_pcm_hw_params_set_format(handle, params, celliax_format);
</del><ins>+        err = snd_pcm_hw_params_set_format(handle, params, gsmopen_format);
</ins><span class="cx">         if (err &lt; 0) {
</span><del>-                ERRORA(&quot;Sample format non available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Sample format non available: %s\n&quot;, GSMOPEN_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_CELLIAX(&quot;Channels count set failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                DEBUGA_GSMOPEN(&quot;Channels count set failed: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Channels count non available: %s\n&quot;, GSMOPEN_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;, 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);
</del><ins>+                ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d\n&quot;, GSMOPEN_P_LOG, chan_num);
+                ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d on %s %s\n&quot;, GSMOPEN_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">@@ -2273,22 +2273,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if 1
</span><del>-        rate = tech_pvt-&gt;celliax_sound_rate;
</del><ins>+        rate = tech_pvt-&gt;gsmopen_sound_rate;
</ins><span class="cx">         err = snd_pcm_hw_params_set_rate_near(handle, params, &amp;rate, 0);
</span><del>-        if ((float) tech_pvt-&gt;celliax_sound_rate * 1.05 &lt; rate || (float) tech_pvt-&gt;celliax_sound_rate * 0.95 &gt; rate) {
-                WARNINGA(&quot;Rate is not accurate (requested = %iHz, got = %iHz)\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;celliax_sound_rate, rate);
</del><ins>+        if ((float) tech_pvt-&gt;gsmopen_sound_rate * 1.05 &lt; rate || (float) tech_pvt-&gt;gsmopen_sound_rate * 0.95 &gt; rate) {
+                WARNINGA(&quot;Rate is not accurate (requested = %iHz, got = %iHz)\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;gsmopen_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting rate: %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><del>-        tech_pvt-&gt;celliax_sound_rate = rate;
</del><ins>+        tech_pvt-&gt;gsmopen_sound_rate = rate;
</ins><span class="cx"> 
</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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting period_size: %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2299,21 +2299,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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting buffer_size: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Unable to install hw params: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, chunk_size, buffer_size);
</del><ins>+                ERRORA(&quot;Can't use period equal to buffer size (%lu == %lu)\n&quot;, GSMOPEN_P_LOG, chunk_size, buffer_size);
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2326,13 +2326,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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+           ERRORA(&quot;Error setting slep_min: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting avail_min: %s\n&quot;, GSMOPEN_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">@@ -2348,7 +2348,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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting start_threshold: %s\n&quot;, GSMOPEN_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">@@ -2363,33 +2363,33 @@
</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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error setting stop_threshold: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Error installing software parameters: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;Unable to get a poll descriptors count, error is %s\n&quot;, GSMOPEN_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_CELLIAX(&quot;Can't handle more than one device\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;Can't handle more than one device\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                ERRORA(&quot;snd_pcm_poll_descriptors failed, %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(err));
</ins><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><del>-        DEBUGA_CELLIAX(&quot;Acquired fd %d from the poll descriptor\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;pfd.fd);
</del><ins>+        DEBUGA_GSMOPEN(&quot;Acquired fd %d from the poll descriptor\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;pfd.fd);
</ins><span class="cx"> 
</span><span class="cx">         if (stream == SND_PCM_STREAM_CAPTURE) {
</span><del>-                tech_pvt-&gt;celliax_sound_capt_fd = tech_pvt-&gt;pfd.fd;
</del><ins>+                tech_pvt-&gt;gsmopen_sound_capt_fd = tech_pvt-&gt;pfd.fd;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         state = snd_pcm_state(handle);
</span><span class="lines">@@ -2398,68 +2398,68 @@
</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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                                ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(err));
</ins><span class="cx">                                 return NULL;
</span><span class="cx">                         }
</span><del>-                        DEBUGA_CELLIAX(&quot;prepared!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;prepared!\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                                ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(err));
</ins><span class="cx">                                 return NULL;
</span><span class="cx">                         }
</span><del>-                        DEBUGA_CELLIAX(&quot;started!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;started!\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+                        ERRORA(&quot;snd_output_stdio_attach failed: %s\n&quot;, GSMOPEN_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_CELLIAX(&quot;ALSA handle = %ld\n&quot;, CELLIAX_P_LOG, (long int) handle);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ALSA handle = %ld\n&quot;, GSMOPEN_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 /* CELLIAX_ALSA */
</del><ins>+#endif /* GSMOPEN_ALSA */
</ins><span class="cx"> 
</span><del>-int celliax_call(private_t * tech_pvt, char *rdest, int timeout)
</del><ins>+int gsmopen_call(private_t * tech_pvt, char *rdest, int timeout)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><del>-        //celliax_sleep(5000);
-        DEBUGA_CELLIAX(&quot;Calling GSM, rdest is: %s\n&quot;, CELLIAX_P_LOG, rdest);
-        //celliax_signaling_write(tech_pvt, &quot;SET AGC OFF&quot;);
-        //celliax_sleep(10000);
-        //celliax_signaling_write(tech_pvt, &quot;SET AEC OFF&quot;);
-        //celliax_sleep(10000);
</del><ins>+        //gsmopen_sleep(5000);
+        DEBUGA_GSMOPEN(&quot;Calling GSM, rdest is: %s\n&quot;, GSMOPEN_P_LOG, rdest);
+        //gsmopen_signaling_write(tech_pvt, &quot;SET AGC OFF&quot;);
+        //gsmopen_sleep(10000);
+        //gsmopen_signaling_write(tech_pvt, &quot;SET AEC OFF&quot;);
+        //gsmopen_sleep(10000);
</ins><span class="cx"> 
</span><del>-        celliax_serial_call(tech_pvt, rdest);
-        //ERRORA(&quot;failed to communicate with GSM client, now exit\n&quot;, CELLIAX_P_LOG);
</del><ins>+        gsmopen_serial_call(tech_pvt, rdest);
+        //ERRORA(&quot;failed to communicate with GSM client, now exit\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         //return -1;
</span><span class="cx">         //}
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_senddigit(private_t * tech_pvt, char digit)
</del><ins>+int gsmopen_senddigit(private_t * tech_pvt, char digit)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;DIGIT received: %c\n&quot;, CELLIAX_P_LOG, digit);
</del><ins>+        DEBUGA_GSMOPEN(&quot;DIGIT received: %c\n&quot;, GSMOPEN_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="cx"> 
</span><span class="cx">                 memset(at_command, '\0', 256);
</span><span class="cx">                 sprintf(at_command, &quot;%s=\&quot;%c\&quot;&quot;, tech_pvt-&gt;at_send_dtmf, digit);
</span><del>-                res = celliax_serial_write_AT_ack(tech_pvt, at_command);
</del><ins>+                res = gsmopen_serial_write_AT_ack(tech_pvt, at_command);
</ins><span class="cx">                 if (res) {
</span><del>-                        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);
</del><ins>+                        ERRORA(&quot;senddigit command failed, command used: '%s=\&quot;%c\&quot;', giving up\n&quot;, GSMOPEN_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">@@ -2482,10 +2482,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;, CELLIAX_P_LOG, (void *)data, datalen);
</del><ins>+        //ERRORA(&quot;data=%p, datalen=%d\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Frame too large\n&quot;, GSMOPEN_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">@@ -2498,25 +2498,25 @@
</span><span class="cx">                 if (state == SND_PCM_STATE_XRUN) {
</span><span class="cx">                         int i;
</span><span class="cx"> 
</span><del>-                        DEBUGA_CELLIAX
-                                (&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;,
-                                 CELLIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer);
</del><ins>+                        DEBUGA_GSMOPEN
+                                (&quot;You've got an ALSA write XRUN in the past (gsmopen can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file\n&quot;,
+                                 GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(res));
</ins><span class="cx">                         } else {
</span><del>-                                res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
</del><ins>+                                res = snd_pcm_format_set_silence(gsmopen_format, silencebuf, len / 2);
</ins><span class="cx">                                 if (res &lt; 0) {
</span><del>-                                        DEBUGA_CELLIAX(&quot;Silence error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;Silence error %s\n&quot;, GSMOPEN_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_CELLIAX(&quot;Write returned a different quantity: %d\n&quot;, CELLIAX_P_LOG, res);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;Write returned a different quantity: %d\n&quot;, GSMOPEN_P_LOG, res);
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         } else if (res &lt; 0) {
</span><del>-                                                DEBUGA_CELLIAX(&quot;Write error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;Write error %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(res));
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="lines">@@ -2526,21 +2526,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_CELLIAX(&quot;Error %d on snd_pcm_delay: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, res, snd_strerror(res));
</del><ins>+                        DEBUGA_GSMOPEN(&quot;Error %d on snd_pcm_delay: \&quot;%s\&quot;\n&quot;, GSMOPEN_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_CELLIAX(&quot;snd_pcm_prepare failed: '%s'\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                DEBUGA_GSMOPEN(&quot;snd_pcm_prepare failed: '%s'\n&quot;, GSMOPEN_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_CELLIAX(&quot;Error %d on snd_pcm_avail_update: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, (int) delayp2, snd_strerror(delayp2));
</del><ins>+                        DEBUGA_GSMOPEN(&quot;Error %d on snd_pcm_avail_update: \&quot;%s\&quot;\n&quot;, GSMOPEN_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_CELLIAX(&quot;snd_pcm_prepare failed: '%s'\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                DEBUGA_GSMOPEN(&quot;snd_pcm_prepare failed: '%s'\n&quot;, GSMOPEN_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">@@ -2550,31 +2550,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_CELLIAX
</del><ins>+                                DEBUGA_GSMOPEN
</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>-                                         CELLIAX_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
</del><ins>+                                         GSMOPEN_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><del>-                                        res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
</del><ins>+                                        res = snd_pcm_format_set_silence(gsmopen_format, silencebuf, len / 2);
</ins><span class="cx">                                         if (res &lt; 0) {
</span><del>-                                                DEBUGA_CELLIAX(&quot;Silence error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;Silence error %s\n&quot;, GSMOPEN_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_CELLIAX(&quot;Write error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;Write error %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(res));
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         } else if (res != len / 2) {
</span><del>-                                                DEBUGA_CELLIAX(&quot;Write returned a different quantity: %d\n&quot;, CELLIAX_P_LOG, res);
</del><ins>+                                                DEBUGA_GSMOPEN(&quot;Write returned a different quantity: %d\n&quot;, GSMOPEN_P_LOG, res);
</ins><span class="cx">                                                 res = -1;
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                DEBUGA_CELLIAX
-                                        (&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;,
-                                         CELLIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+                                DEBUGA_GSMOPEN
+                                        (&quot;PREVENTING an ALSA write XRUN (gsmopen can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n&quot;,
+                                         GSMOPEN_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">@@ -2602,12 +2602,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_CELLIAX
-                                (&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;,
-                                 CELLIAX_P_LOG, tech_pvt-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+                        DEBUGA_GSMOPEN
+                                (&quot;ALSA write EPIPE (XRUN) (gsmopen can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n&quot;,
+                                 GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, GSMOPEN_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">@@ -2636,11 +2636,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;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;You've got some big problems\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, res, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;Error %d on audio write: \&quot;%s\&quot;\n&quot;, GSMOPEN_P_LOG, res, snd_strerror(res));
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -2649,22 +2649,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_CELLIAX(&quot;reset audio play\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;reset audio play\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play wait failed: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play drop failed: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play prepare failed: %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+                                ERRORA(&quot;audio play wait failed: %s\n&quot;, GSMOPEN_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">@@ -2679,12 +2679,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[CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
-        static short __buf2[(CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2];
</del><ins>+        static short __buf[GSMOPEN_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
+        static short __buf2[(GSMOPEN_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 = CELLIAX_FRAME_SIZE;
</del><ins>+        //static int left = GSMOPEN_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">@@ -2692,7 +2692,7 @@
</span><span class="cx">         int error = 0;
</span><span class="cx">         //time_t now_timestamp;
</span><span class="cx"> 
</span><del>-        //DEBUGA_CELLIAX(&quot;buf=%p, datalen=%d, left=%d\n&quot;, CELLIAX_P_LOG, (void *)buf, datalen, left);
</del><ins>+        //DEBUGA_GSMOPEN(&quot;buf=%p, datalen=%d, left=%d\n&quot;, GSMOPEN_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">@@ -2703,23 +2703,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_CELLIAX(&quot;ALSA read state is not SND_PCM_STATE_RUNNING\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ALSA read state is not SND_PCM_STATE_RUNNING\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(error));
</del><ins>+                                ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(error));
</ins><span class="cx">                                 return r;
</span><span class="cx">                         }
</span><del>-                        DEBUGA_CELLIAX(&quot;prepared!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;prepared!\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, snd_strerror(error));
</del><ins>+                        ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(error));
</ins><span class="cx">                         return r;
</span><span class="cx">                 }
</span><del>-                DEBUGA_CELLIAX(&quot;started!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;started!\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 usleep(1000);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2728,13 +2728,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_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);
</del><ins>+                //DEBUGA_GSMOPEN(&quot;r=%d, buf=%p, buf+readpos=%p, datalen=%d, left=%d\n&quot;, GSMOPEN_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; (CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
</del><ins>+                for (i = 0; i &lt; (GSMOPEN_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">@@ -2744,14 +2744,14 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (r == -EPIPE) {
</span><del>-                DEBUGA_CELLIAX(&quot;ALSA XRUN on read\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ALSA XRUN on read\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return r;
</span><span class="cx">         } else if (r == -ESTRPIPE) {
</span><del>-                ERRORA(&quot;-ESTRPIPE\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;-ESTRPIPE\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return r;
</span><span class="cx"> 
</span><span class="cx">         } else if (r == -EAGAIN) {
</span><del>-                DEBUGA_CELLIAX(&quot;ALSA read -EAGAIN, the soundcard is not ready to be read by celliax\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;ALSA read -EAGAIN, the soundcard is not ready to be read by gsmopen\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 while (r == -EAGAIN) {
</span><span class="cx">                         usleep(1000);
</span><span class="cx"> 
</span><span class="lines">@@ -2762,7 +2762,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; (CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2) * 2;) {
</del><ins>+                                for (i = 0; i &lt; (GSMOPEN_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">@@ -2772,19 +2772,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;, CELLIAX_P_LOG, snd_strerror(r));
</del><ins>+                WARNINGA(&quot;ALSA Read error: %s\n&quot;, GSMOPEN_P_LOG, snd_strerror(r));
</ins><span class="cx">         } else if (r &gt;= 0) {
</span><del>-                //DEBUGA_CELLIAX(&quot;read: r=%d, readpos=%d, left=%d, off=%d\n&quot;, CELLIAX_P_LOG, r, readpos, left, off);
</del><ins>+                //DEBUGA_GSMOPEN(&quot;read: r=%d, readpos=%d, left=%d, off=%d\n&quot;, GSMOPEN_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;= CELLIAX_FRAME_SIZE) {
</del><ins>+        if (readpos &gt;= GSMOPEN_FRAME_SIZE) {
</ins><span class="cx">                 /* A real frame */
</span><span class="cx">                 readpos = 0;
</span><del>-                left = CELLIAX_FRAME_SIZE;
</del><ins>+                left = GSMOPEN_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">@@ -2798,11 +2798,11 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_sendsms(private_t * tech_pvt, char *dest, char *text)
</del><ins>+int gsmopen_sendsms(private_t * tech_pvt, char *dest, char *text)
</ins><span class="cx"> {
</span><span class="cx">         //char *idest = data;
</span><span class="cx">         //char rdest[256];
</span><del>-        //struct celliax_pvt *p = NULL;
</del><ins>+        //struct gsmopen_pvt *p = NULL;
</ins><span class="cx">         //char *device;
</span><span class="cx">         //char *dest;
</span><span class="cx">         //char *text;
</span><span class="lines">@@ -2811,14 +2811,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_CELLIAX(&quot;CelliaxSendsms: dest=%s text=%s\n&quot;, CELLIAX_P_LOG, dest, text);
-        DEBUGA_CELLIAX(&quot;START\n&quot;, CELLIAX_P_LOG);
-        /* we can use celliax_request to get the channel, but celliax_request would look for onowned channels, and probably we can send SMSs while a call is ongoing
</del><ins>+        DEBUGA_GSMOPEN(&quot;GSMopenSendsms: dest=%s text=%s\n&quot;, GSMOPEN_P_LOG, dest, text);
+        DEBUGA_GSMOPEN(&quot;START\n&quot;, GSMOPEN_P_LOG);
+        /* we can use gsmopen_request to get the channel, but gsmopen_request would look for onowned channels, and probably we can send SMSs while a call is ongoing
</ins><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;, CELLIAX_P_LOGCelliaxSendsms supports only AT command cellphones at the moment :-( !\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;, GSMOPEN_P_LOGGSMopenSendsms supports only AT command cellphones at the moment :-( !\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return RESULT_FAILURE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2835,9 +2835,9 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         char dest2[1048];
</span><span class="cx"> 
</span><del>-                        err = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</del><ins>+                        err = gsmopen_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
</ins><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;, CELLIAX_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;, GSMOPEN_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         memset(dest2, '\0', sizeof(dest2));
</span><span class="lines">@@ -2846,34 +2846,34 @@
</span><span class="cx">                 }
</span><span class="cx">                 //TODO: support phones that only accept pdu mode
</span><span class="cx">                 //TODO would be better to lock controldev here
</span><del>-                err = celliax_serial_write_AT_noack(tech_pvt, smscommand);
</del><ins>+                err = gsmopen_serial_write_AT_noack(tech_pvt, smscommand);
</ins><span class="cx">                 if (err) {
</span><del>-                        ERRORA(&quot;Error sending SMS\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Error sending SMS\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         failed = 1;
</span><span class="cx">                         goto uscita;
</span><span class="cx">                 }
</span><del>-                err = celliax_serial_AT_expect(tech_pvt, &quot;&gt; &quot;, 0, 1);        // wait 1.5s for the prompt, no  crlf
</del><ins>+                err = gsmopen_serial_AT_expect(tech_pvt, &quot;&gt; &quot;, 0, 1);        // wait 1.5s for the prompt, no  crlf
</ins><span class="cx"> #if 1
</span><span class="cx">                 if (err) {
</span><del>-                        DEBUGA_CELLIAX
</del><ins>+                        DEBUGA_GSMOPEN
</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>-                                 CELLIAX_P_LOG);
</del><ins>+                                 GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><del>-                        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!!!!
</del><ins>+                        err = gsmopen_serial_write_AT_ack(tech_pvt, &quot;ATE1&quot;);        //motorola (at least c350) do not echo the '&gt;' prompt when in ATE0... go figure!!!!
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error activating echo from modem\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error activating echo from modem\n&quot;, GSMOPEN_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><del>-                        err = celliax_serial_write_AT_noack(tech_pvt, smscommand);
</del><ins>+                        err = gsmopen_serial_write_AT_noack(tech_pvt, smscommand);
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error writing SMS destination to the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error writing SMS destination to the cellphone memory\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 failed = 1;
</span><span class="cx">                                 goto uscita;
</span><span class="cx">                         }
</span><del>-                        err = celliax_serial_AT_expect(tech_pvt, &quot;&gt; &quot;, 0, 1);        // wait 1.5s for the prompt, no  crlf
</del><ins>+                        err = gsmopen_serial_AT_expect(tech_pvt, &quot;&gt; &quot;, 0, 1);        // wait 1.5s for the prompt, no  crlf
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error or timeout getting prompt '&gt; ' for writing sms text in cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error or timeout getting prompt '&gt; ' for writing sms text in cellphone memory\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 failed = 1;
</span><span class="cx">                                 goto uscita;
</span><span class="cx">                         }
</span><span class="lines">@@ -2889,29 +2889,29 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 smscommand[strlen(smscommand)] = 0x1A;
</span><del>-                DEBUGA_CELLIAX(&quot;smscommand len is: %d, text is:|||%s|||\n&quot;, CELLIAX_P_LOG, strlen(smscommand), smscommand);
</del><ins>+                DEBUGA_GSMOPEN(&quot;smscommand len is: %d, text is:|||%s|||\n&quot;, GSMOPEN_P_LOG, strlen(smscommand), smscommand);
</ins><span class="cx"> 
</span><del>-                err = celliax_serial_write_AT_ack_nocr_longtime(tech_pvt, smscommand);
</del><ins>+                err = gsmopen_serial_write_AT_ack_nocr_longtime(tech_pvt, smscommand);
</ins><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;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Error writing SMS text to the cellphone memory\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         //return RESULT_FAILURE;
</span><span class="cx">                         failed = 1;
</span><span class="cx">                         goto uscita;
</span><span class="cx">                 }
</span><span class="cx">                 if (tech_pvt-&gt;at_cmgw[0]) {
</span><span class="cx">                         sprintf(smscommand, &quot;AT+CMSS=%s&quot;, tech_pvt-&gt;at_cmgw);
</span><del>-                        err = celliax_serial_write_AT_expect_longtime(tech_pvt, smscommand, &quot;OK&quot;);
</del><ins>+                        err = gsmopen_serial_write_AT_expect_longtime(tech_pvt, smscommand, &quot;OK&quot;);
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error sending SMS from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error sending SMS from the cellphone memory\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 //return RESULT_FAILURE;
</span><span class="cx">                                 failed = 1;
</span><span class="cx">                                 goto uscita;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        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!!!!
</del><ins>+                        err = gsmopen_serial_write_AT_ack(tech_pvt, &quot;ATE0&quot;);        //motorola (at least c350) do not echo the '&gt;' prompt when in ATE0... go figure!!!!
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error de-activating echo from modem\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error de-activating echo from modem\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">           uscita:
</span><span class="lines">@@ -2921,16 +2921,16 @@
</span><span class="cx"> 
</span><span class="cx">                         /* let's see what we've sent, just for check TODO: Motorola it's not reliable! Motorola c350 tells that all was sent, but is not true! It just sends how much it fits into one SMS FIXME: need an algorithm to calculate how many ucs2 chars fits into an SMS. It make difference based, probably, on the GSM alphabet translation, or so */
</span><span class="cx">                         sprintf(smscommand, &quot;AT+CMGR=%s&quot;, tech_pvt-&gt;at_cmgw);
</span><del>-                        err = celliax_serial_write_AT_ack(tech_pvt, smscommand);
</del><ins>+                        err = gsmopen_serial_write_AT_ack(tech_pvt, smscommand);
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error reading SMS back from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error reading SMS back from the cellphone memory\n&quot;, GSMOPEN_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><del>-                        err = celliax_serial_write_AT_ack(tech_pvt, smscommand);
</del><ins>+                        err = gsmopen_serial_write_AT_ack(tech_pvt, smscommand);
</ins><span class="cx">                         if (err) {
</span><del>-                                ERRORA(&quot;Error deleting SMS from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;Error deleting SMS from the cellphone memory\n&quot;, GSMOPEN_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">@@ -2940,7 +2940,7 @@
</span><span class="cx">                 POPPA_UNLOCKA(&amp;tech_pvt-&gt;controldev_lock);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;FINISH\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;FINISH\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         if (failed)
</span><span class="cx">                 return -1;
</span><span class="cx">         else
</span><span class="lines">@@ -2959,28 +2959,28 @@
</span><span class="cx"> /*
</span><span class="cx">  * store the boost factor
</span><span class="cx">  */
</span><del>-void celliax_store_boost(char *s, double *boost)
</del><ins>+void gsmopen_store_boost(char *s, double *boost)
</ins><span class="cx"> {
</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;, CELLIAX_P_LOG, s);
</del><ins>+                ERRORA(&quot;invalid boost &lt;%s&gt;\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, s, -BOOST_MAX);
</del><ins>+                WARNINGA(&quot;boost %s too small, using %d\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, s, BOOST_MAX);
</del><ins>+                WARNINGA(&quot;boost %s too large, using %d\n&quot;, GSMOPEN_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_CELLIAX(&quot;setting boost %s to %f\n&quot;, CELLIAX_P_LOG, s, *boost);
</del><ins>+                DEBUGA_GSMOPEN(&quot;setting boost %s to %f\n&quot;, GSMOPEN_P_LOG, s, *boost);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-int celliax_sound_boost(void *data, int samples_num, double boost)
</del><ins>+int gsmopen_sound_boost(void *data, int samples_num, double boost)
</ins><span class="cx"> {
</span><span class="cx"> /* LUIGI RIZZO's magic */
</span><span class="cx">         if (boost != 0) {                        /* scale and clip values */
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_gsmopenmod_celliaxc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c (15045 => 15046)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c        2009-10-02 13:08:31 UTC (rev 15045)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/mod_celliax.c        2009-10-02 13:17:39 UTC (rev 15046)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">  * Portions created by the Initial Developer are Copyright (C)
</span><span class="cx">  * the Initial Developer. All Rights Reserved.
</span><span class="cx">  *
</span><del>- * This module (mod_celliax) has been contributed by:
</del><ins>+ * This module (mod_gsmopen) has been contributed by:
</ins><span class="cx">  *
</span><span class="cx">  * Giovanni Maruzzelli (gmaruzz@gmail.com)
</span><span class="cx">  *
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx">  *
</span><span class="cx">  *
</span><span class="cx">  *
</span><del>- * mod_celliax.c -- GSM compatible Endpoint Module
</del><ins>+ * mod_gsmopen.c -- GSM compatible Endpoint Module
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#include &quot;celliax.h&quot;
</del><ins>+#include &quot;gsmopen.h&quot;
</ins><span class="cx"> #define MDL_CHAT_PROTO &quot;SMS&quot;
</span><span class="cx"> 
</span><span class="cx"> #ifdef WIN32
</span><span class="lines">@@ -82,26 +82,26 @@
</span><span class="cx"> 
</span><span class="cx"> /***************/
</span><span class="cx"> #endif /* WIN32 */
</span><del>-SWITCH_MODULE_LOAD_FUNCTION(mod_celliax_load);
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_celliax_shutdown);
-SWITCH_MODULE_DEFINITION(mod_celliax, mod_celliax_load, mod_celliax_shutdown, NULL);
</del><ins>+SWITCH_MODULE_LOAD_FUNCTION(mod_gsmopen_load);
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_gsmopen_shutdown);
+SWITCH_MODULE_DEFINITION(mod_gsmopen, mod_gsmopen_load, mod_gsmopen_shutdown, NULL);
</ins><span class="cx"> #if 0
</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 || celliax_API_msg || remove &lt; celliaxusername | #interface_name | #interface_id &gt; || reload&quot;
</del><ins>+#define SK_SYNTAX &quot;list [full] || console || gsmopen_API_msg || remove &lt; gsmopenusername | #interface_name | #interface_id &gt; || reload&quot;
</ins><span class="cx"> /* END: Changes heres */
</span><del>-SWITCH_STANDARD_API(celliax_function);
-#define CELLIAX_SYNTAX &quot;interface_name celliax_API_msg&quot;
</del><ins>+SWITCH_STANDARD_API(gsmopen_function);
+#define GSMOPEN_SYNTAX &quot;interface_name gsmopen_API_msg&quot;
</ins><span class="cx"> #endif //0
</span><span class="cx"> 
</span><span class="cx"> SWITCH_STANDARD_API(sendsms_function);
</span><del>-#define SENDSMS_SYNTAX &quot;celliax_sendsms interface_name destination_number SMS_text&quot;
</del><ins>+#define SENDSMS_SYNTAX &quot;gsmopen_sendsms interface_name destination_number SMS_text&quot;
</ins><span class="cx"> /* BEGIN: Changes here */
</span><span class="cx"> #define FULL_RELOAD 0
</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 CELLIAX_STATE_xxx in celliax.h */
</del><ins>+char *interface_status[] = {        /* should match GSMOPEN_STATE_xxx in gsmopen.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">@@ -115,7 +115,7 @@
</span><span class="cx">         &quot;HANG_RQ&quot;,
</span><span class="cx">         &quot;PREANSW&quot;
</span><span class="cx"> };
</span><del>-char *phone_callflow[] = {                /* should match CALLFLOW_XXX in celliax.h */
</del><ins>+char *phone_callflow[] = {                /* should match CALLFLOW_XXX in gsmopen.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">@@ -165,13 +165,13 @@
</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 CELLIAX_INTERFACES[CELLIAX_MAX_INTERFACES];
</del><ins>+        private_t GSMOPEN_INTERFACES[GSMOPEN_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="cx"> 
</span><del>-switch_endpoint_interface_t *celliax_endpoint_interface;
-switch_memory_pool_t *celliax_module_pool = NULL;
</del><ins>+switch_endpoint_interface_t *gsmopen_endpoint_interface;
+switch_memory_pool_t *gsmopen_module_pool = NULL;
</ins><span class="cx"> int running = 0;
</span><span class="cx"> 
</span><span class="cx"> SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
</span><span class="lines">@@ -201,23 +201,23 @@
</span><span class="cx"> static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
</span><span class="cx"> static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
</span><span class="cx"> static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
</span><del>-static switch_status_t celliax_tech_init(private_t * tech_pvt, switch_core_session_t *session);
</del><ins>+static switch_status_t gsmopen_tech_init(private_t * tech_pvt, switch_core_session_t *session);
</ins><span class="cx"> 
</span><del>-static switch_status_t celliax_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
</del><ins>+static switch_status_t gsmopen_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
</ins><span class="cx"> {
</span><span class="cx">         switch_core_session_t *session = NULL;
</span><span class="cx"> 
</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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Can't load codec?\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Can't load codec?\n&quot;, GSMOPEN_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">@@ -232,7 +232,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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no session\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-switch_status_t celliax_tech_init(private_t * tech_pvt, switch_core_session_t *session)
</del><ins>+switch_status_t gsmopen_tech_init(private_t * tech_pvt, switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="lines">@@ -252,32 +252,32 @@
</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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;no tech_pvt-&gt;session_uuid_str\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><del>-        if (celliax_codec(tech_pvt, SAMPLERATE_CELLIAX, 20) != SWITCH_STATUS_SUCCESS) {
-                ERRORA(&quot;celliax_codec FAILED\n&quot;, CELLIAX_P_LOG);
</del><ins>+        if (gsmopen_codec(tech_pvt, SAMPLERATE_GSMOPEN, 20) != SWITCH_STATUS_SUCCESS) {
+                ERRORA(&quot;gsmopen_codec FAILED\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;alsa_init failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx"> 
</span><span class="cx">         }
</span><del>-        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) !=
</del><ins>+        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, gsmopen_module_pool) !=
</ins><span class="cx">                 SWITCH_STATUS_SUCCESS) {
</span><del>-                ERRORA(&quot;setup timer failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;setup timer failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_core_timer_sync(&amp;tech_pvt-&gt;timer_read);
</span><span class="cx"> 
</span><del>-        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) !=
</del><ins>+        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, gsmopen_module_pool) !=
</ins><span class="cx">                 SWITCH_STATUS_SUCCESS) {
</span><del>-                ERRORA(&quot;setup timer failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;setup timer failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -285,7 +285,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         switch_clear_flag(tech_pvt, TFLAG_HANGUP);
</span><del>-        DEBUGA_CELLIAX(&quot;celliax_codec SUCCESS\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;gsmopen_codec SUCCESS\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -302,24 +302,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.CELLIAX_INTERFACES[interface_id].name)) {
</del><ins>+                        if (strlen(globals.GSMOPEN_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; CELLIAX_MAX_INTERFACES; interface_id++) {
-                                if (strcmp(globals.CELLIAX_INTERFACES[interface_id].name, the_interface) == 0) {
</del><ins>+                        for (interface_id = 0; interface_id &lt; GSMOPEN_MAX_INTERFACES; interface_id++) {
+                                if (strcmp(globals.GSMOPEN_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 celliax_user */
</del><ins>+        } else {                                        /* look by gsmopen_user */
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                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) {
</del><ins>+                for (i = 0; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
+                        if (strlen(globals.GSMOPEN_INTERFACES[i].gsmopen_user)) {
+                                if (strcmp(globals.GSMOPEN_INTERFACES[i].gsmopen_user, the_interface) == 0) {
</ins><span class="cx">                                         return SWITCH_STATUS_SUCCESS;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -347,63 +347,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.CELLIAX_INTERFACES[interface_id];
</del><ins>+                        tech_pvt = &amp;globals.GSMOPEN_INTERFACES[interface_id];
</ins><span class="cx">                 } else {
</span><span class="cx"> 
</span><del>-                        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];
</del><ins>+                        for (interface_id = 0; interface_id &lt; GSMOPEN_MAX_INTERFACES; interface_id++) {
+                                if (strcmp(globals.GSMOPEN_INTERFACES[interface_id].name, the_interface) == 0) {
+                                        tech_pvt = &amp;globals.GSMOPEN_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 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];
</del><ins>+        } else {                                        /* remove by gsmopen_user */
+                for (interface_id = 0; interface_id &lt; GSMOPEN_MAX_INTERFACES; interface_id++) {
+                        if (strcmp(globals.GSMOPEN_INTERFACES[interface_id].gsmopen_user, the_interface) == 0) {
+                                tech_pvt = &amp;globals.GSMOPEN_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_CELLIAX(&quot;interface '%s' does not exist\n&quot;, CELLIAX_P_LOG, the_interface);
</del><ins>+                DEBUGA_GSMOPEN(&quot;interface '%s' does not exist\n&quot;, GSMOPEN_P_LOG, the_interface);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (strlen(globals.CELLIAX_INTERFACES[interface_id].session_uuid_str)) {
-                DEBUGA_CELLIAX(&quot;interface '%s' is busy\n&quot;, CELLIAX_P_LOG, the_interface);
</del><ins>+        if (strlen(globals.GSMOPEN_INTERFACES[interface_id].session_uuid_str)) {
+                DEBUGA_GSMOPEN(&quot;interface '%s' is busy\n&quot;, GSMOPEN_P_LOG, the_interface);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        globals.CELLIAX_INTERFACES[interface_id].running = 0;
</del><ins>+        globals.GSMOPEN_INTERFACES[interface_id].running = 0;
</ins><span class="cx"> 
</span><del>-        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
</del><ins>+        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
</ins><span class="cx"> #ifdef WIN32
</span><del>-                switch_file_write(tech_pvt-&gt;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, &amp;howmany);        // let's the controldev_thread die
</del><ins>+                switch_file_write(tech_pvt-&gt;GSMopenHandles.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;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</del><ins>+                howmany = write(tech_pvt-&gt;GSMopenHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</ins><span class="cx"> #endif /* WIN32 */
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
</del><ins>+        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
</ins><span class="cx"> #ifdef WIN32
</span><del>-                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;
</del><ins>+                if (SendMessage(tech_pvt-&gt;GSMopenHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {        // let's the gsmopen_api_thread_func die
+                        DEBUGA_GSMOPEN(&quot;got FALSE here, thread probably was already dead. GetLastError returned: %d\n&quot;, GSMOPEN_P_LOG, GetLastError());
+                        globals.GSMOPEN_INTERFACES[interface_id].gsmopen_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;CelliaxHandles.disp, &quot;CELLIAXCONTROLAPI_MESSAGE_BEGIN&quot;, False);
</del><ins>+                Atom atom1 = XInternAtom(tech_pvt-&gt;GSMopenHandles.disp, &quot;GSMOPENCONTROLAPI_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;CelliaxHandles.disp;
-                e.xclient.window = tech_pvt-&gt;CelliaxHandles.celliax_win;
</del><ins>+                e.xclient.display = tech_pvt-&gt;GSMopenHandles.disp;
+                e.xclient.window = tech_pvt-&gt;GSMopenHandles.gsmopen_win;
</ins><span class="cx">                 e.xclient.format = 8;
</span><span class="cx"> 
</span><del>-                XSendEvent(tech_pvt-&gt;CelliaxHandles.disp, tech_pvt-&gt;CelliaxHandles.win, False, 0, &amp;e);
-                XSync(tech_pvt-&gt;CelliaxHandles.disp, False);
</del><ins>+                XSendEvent(tech_pvt-&gt;GSMopenHandles.disp, tech_pvt-&gt;GSMopenHandles.win, False, 0, &amp;e);
+                XSync(tech_pvt-&gt;GSMopenHandles.disp, False);
</ins><span class="cx"> #endif
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -412,27 +412,27 @@
</span><span class="cx">                 switch_yield(50000);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
-                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread);
</del><ins>+        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
+                switch_thread_join(&amp;status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
-                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread);
</del><ins>+        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
+                switch_thread_join(&amp;status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_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.CELLIAX_INTERFACES[interface_id]) {
-                DEBUGA_CELLIAX(&quot;interface '%s' no more console\n&quot;, CELLIAX_P_LOG, the_interface);
</del><ins>+        if (globals.sk_console == &amp;globals.GSMOPEN_INTERFACES[interface_id]) {
+                DEBUGA_GSMOPEN(&quot;interface '%s' no more console\n&quot;, GSMOPEN_P_LOG, the_interface);
</ins><span class="cx">                 globals.sk_console = NULL;
</span><span class="cx">         } else {
</span><del>-                DEBUGA_CELLIAX(&quot;interface '%s' STILL console\n&quot;, CELLIAX_P_LOG, the_interface);
</del><ins>+                DEBUGA_GSMOPEN(&quot;interface '%s' STILL console\n&quot;, GSMOPEN_P_LOG, the_interface);
</ins><span class="cx">         }
</span><del>-        memset(&amp;globals.CELLIAX_INTERFACES[interface_id], '\0', sizeof(private_t));
</del><ins>+        memset(&amp;globals.GSMOPEN_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_CELLIAX(&quot;interface '%s' deleted successfully\n&quot;, CELLIAX_P_LOG, the_interface);
-        globals.CELLIAX_INTERFACES[interface_id].running = 1;
</del><ins>+        DEBUGA_GSMOPEN(&quot;interface '%s' deleted successfully\n&quot;, GSMOPEN_P_LOG, the_interface);
+        globals.GSMOPEN_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">@@ -456,7 +456,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;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        //ERRORA(&quot;%s CHANNEL INIT\n&quot;, GSMOPEN_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">@@ -468,7 +468,7 @@
</span><span class="cx">         globals.calls++;
</span><span class="cx"> 
</span><span class="cx">         switch_mutex_unlock(globals.mutex);
</span><del>-        DEBUGA_CELLIAX(&quot;%s CHANNEL INIT %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL INIT %s\n&quot;, GSMOPEN_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">@@ -481,7 +481,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         if (tech_pvt) {
</span><del>-                DEBUGA_CELLIAX(&quot;%s CHANNEL DESTROY %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</del><ins>+                DEBUGA_GSMOPEN(&quot;%s CHANNEL DESTROY %s\n&quot;, GSMOPEN_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">@@ -497,13 +497,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 = CELLIAX_STATE_IDLE;
</del><ins>+                tech_pvt-&gt;interface_state = GSMOPEN_STATE_IDLE;
</ins><span class="cx">                 if (tech_pvt-&gt;phone_callflow == CALLFLOW_STATUS_FINISHED) {
</span><span class="cx">                         tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">                 }
</span><span class="cx">                 switch_core_session_set_private(session, NULL);
</span><span class="cx">         } else {
</span><del>-                DEBUGA_CELLIAX(&quot;!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(session));
</del><ins>+                DEBUGA_GSMOPEN(&quot;!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n&quot;, GSMOPEN_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">@@ -532,23 +532,23 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;%s CHANNEL HANGUP\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL HANGUP\n&quot;, GSMOPEN_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="cx"> 
</span><del>-        celliax_hangup(tech_pvt);
</del><ins>+        gsmopen_hangup(tech_pvt);
</ins><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_CELLIAX(&quot;%s CHANNEL HANGUP\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL HANGUP\n&quot;, GSMOPEN_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 = CELLIAX_STATE_IDLE;
</del><ins>+        tech_pvt-&gt;interface_state = GSMOPEN_STATE_IDLE;
</ins><span class="cx">         if (tech_pvt-&gt;phone_callflow == CALLFLOW_STATUS_FINISHED) {
</span><span class="cx">                 tech_pvt-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">         }
</span><span class="lines">@@ -568,7 +568,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_CELLIAX(&quot;%s CHANNEL ROUTING\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL ROUTING\n&quot;, GSMOPEN_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">@@ -585,7 +585,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_CELLIAX(&quot;%s CHANNEL EXECUTE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL EXECUTE\n&quot;, GSMOPEN_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">@@ -601,10 +601,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_CELLIAX(&quot;%s CHANNEL KILL_CHANNEL\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL KILL_CHANNEL\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         switch (sig) {
</span><span class="cx">         case SWITCH_SIG_KILL:
</span><del>-                DEBUGA_CELLIAX(&quot;%s CHANNEL got SWITCH_SIG_KILL\n&quot;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                DEBUGA_GSMOPEN(&quot;%s CHANNEL got SWITCH_SIG_KILL\n&quot;, GSMOPEN_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">@@ -612,7 +612,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_CELLIAX(&quot;%s CHANNEL got SWITCH_SIG_BREAK\n&quot;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                DEBUGA_GSMOPEN(&quot;%s CHANNEL got SWITCH_SIG_BREAK\n&quot;, GSMOPEN_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">@@ -630,7 +630,7 @@
</span><span class="cx"> 
</span><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;%s CHANNEL CONSUME_MEDIA\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL CONSUME_MEDIA\n&quot;, GSMOPEN_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">@@ -639,7 +639,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_CELLIAX(&quot;%s CHANNEL EXCHANGE_MEDIA\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL EXCHANGE_MEDIA\n&quot;, GSMOPEN_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">@@ -647,7 +647,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_CELLIAX(&quot;%s CHANNEL SOFT_EXECUTE\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL SOFT_EXECUTE\n&quot;, GSMOPEN_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">@@ -656,10 +656,10 @@
</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_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);
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL SEND_DTMF\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name);
+        DEBUGA_GSMOPEN(&quot;DTMF: %c\n&quot;, GSMOPEN_P_LOG, dtmf-&gt;digit);
</ins><span class="cx"> 
</span><del>-        celliax_senddigit(tech_pvt, dtmf-&gt;digit);
</del><ins>+        gsmopen_senddigit(tech_pvt, dtmf-&gt;digit);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -677,7 +677,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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;channel not ready \n&quot;, GSMOPEN_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">@@ -704,7 +704,7 @@
</span><span class="cx">                 //switch_core_timer_check(&amp;tech_pvt-&gt;timer, SWITCH_TRUE);
</span><span class="cx">                 tech_pvt-&gt;read_frame.timestamp = tech_pvt-&gt;timer_read.samplecount;
</span><span class="cx"> 
</span><del>-                celliax_sound_boost(tech_pvt-&gt;read_frame.data, tech_pvt-&gt;read_frame.samples, tech_pvt-&gt;capture_boost);
</del><ins>+                gsmopen_sound_boost(tech_pvt-&gt;read_frame.data, tech_pvt-&gt;read_frame.samples, tech_pvt-&gt;capture_boost);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -716,10 +716,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (samples != 160) {
</span><del>-                ERRORA(&quot;samples=%d\n&quot;, CELLIAX_P_LOG, samples);
</del><ins>+                ERRORA(&quot;samples=%d\n&quot;, GSMOPEN_P_LOG, samples);
</ins><span class="cx">                 goto cng;
</span><span class="cx">         }
</span><del>-//DEBUGA_CELLIAX(&quot;samples=%d tech_pvt-&gt;read_frame.timestamp=%d\n&quot;, CELLIAX_P_LOG, samples, tech_pvt-&gt;read_frame.timestamp);
</del><ins>+//DEBUGA_GSMOPEN(&quot;samples=%d tech_pvt-&gt;read_frame.timestamp=%d\n&quot;, GSMOPEN_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">@@ -746,7 +746,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;, CELLIAX_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;, GSMOPEN_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">@@ -754,19 +754,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_CELLIAX(&quot;CHANNEL READ FRAME goto CNG\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;CHANNEL READ FRAME goto CNG\n&quot;, GSMOPEN_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_CELLIAX(&quot;CHANNEL READ FRAME not IO\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;CHANNEL READ FRAME not IO\n&quot;, GSMOPEN_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_CELLIAX(&quot;CHANNEL READ CONTINUE\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;CHANNEL READ CONTINUE\n&quot;, GSMOPEN_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">@@ -775,17 +775,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;, CELLIAX_P_LOG);
</del><ins>+                        //WARNINGA(&quot;HERE\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
-                DEBUGA_CELLIAX(&quot;CHANNEL READ no TFLAG_VOICE\n&quot;, CELLIAX_P_LOG);
</del><ins>+                WARNINGA(&quot;HERE\n&quot;, GSMOPEN_P_LOG);
+                DEBUGA_GSMOPEN(&quot;CHANNEL READ no TFLAG_VOICE\n&quot;, GSMOPEN_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_CELLIAX(&quot;CHANNEL READ FALSE\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;CHANNEL READ FALSE\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         return SWITCH_STATUS_FALSE;
</span><span class="cx"> 
</span><span class="cx">   cng:
</span><span class="lines">@@ -812,7 +812,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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;channel not ready \n&quot;, GSMOPEN_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">@@ -825,17 +825,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;, CELLIAX_P_LOG);
</del><ins>+        //ERRORA(&quot;PLAY \n&quot;, GSMOPEN_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><del>-        celliax_sound_boost(frame-&gt;data, frame-&gt;samples, tech_pvt-&gt;playback_boost);
</del><ins>+        gsmopen_sound_boost(frame-&gt;data, frame-&gt;samples, tech_pvt-&gt;playback_boost);
</ins><span class="cx">         sent = alsa_write(tech_pvt, frame-&gt;data, (int) (frame-&gt;datalen));
</span><del>-//DEBUGA_CELLIAX(&quot;sent=%d \n&quot;, CELLIAX_P_LOG, sent);
</del><ins>+//DEBUGA_GSMOPEN(&quot;sent=%d \n&quot;, GSMOPEN_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_CELLIAX(&quot;sent %d\n&quot;, CELLIAX_P_LOG, sent);
</del><ins>+                DEBUGA_GSMOPEN(&quot;sent %d\n&quot;, GSMOPEN_P_LOG, sent);
</ins><span class="cx">         }
</span><del>-        //NOTICA(&quot;sent=%d\n&quot;, CELLIAX_P_LOG, sent);
</del><ins>+        //NOTICA(&quot;sent=%d\n&quot;, GSMOPEN_P_LOG, sent);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -850,9 +850,9 @@
</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>-        //ERRORA(&quot;%s CHANNEL INIT\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+        //ERRORA(&quot;%s CHANNEL INIT\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         switch_set_flag(tech_pvt, TFLAG_IO);
</span><del>-celliax_serial_answer(tech_pvt);
</del><ins>+gsmopen_serial_answer(tech_pvt);
</ins><span class="cx"> 
</span><span class="cx">         /* Move channel's state machine to ROUTING. This means the call is trying
</span><span class="cx">            to get from the initial start where the call because, to the point
</span><span class="lines">@@ -863,7 +863,7 @@
</span><span class="cx">         globals.calls++;
</span><span class="cx"> 
</span><span class="cx">         switch_mutex_unlock(globals.mutex);
</span><del>-        DEBUGA_CELLIAX(&quot;%s CHANNEL ANSWER %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</del><ins>+        DEBUGA_GSMOPEN(&quot;%s CHANNEL ANSWER %s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name, switch_core_session_get_uuid(session));
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -880,7 +880,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;ANSWERED! \n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;ANSWERED! \n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -901,15 +901,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_CELLIAX(&quot;MSG_ID=%d, TO BE ANSWERED!\n&quot;, CELLIAX_P_LOG, msg-&gt;message_id);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;MSG_ID=%d, TO BE ANSWERED!\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, switch_channel_get_name(channel));
</del><ins>+                WARNINGA(&quot;%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, samples);
</del><ins>+                        WARNINGA(&quot;read %d samples\n&quot;, GSMOPEN_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">@@ -919,7 +919,7 @@
</span><span class="cx"> 
</span><span class="cx">         default:
</span><span class="cx">                 {
</span><del>-                        DEBUGA_CELLIAX(&quot;MSG_ID=%d\n&quot;, CELLIAX_P_LOG, msg-&gt;message_id);
</del><ins>+                        DEBUGA_GSMOPEN(&quot;MSG_ID=%d\n&quot;, GSMOPEN_P_LOG, msg-&gt;message_id);
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -937,12 +937,12 @@
</span><span class="cx">                 body = &quot;&quot;;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        WARNINGA(&quot;event: |||%s|||\n&quot;, CELLIAX_P_LOG, body);
</del><ins>+        WARNINGA(&quot;event: |||%s|||\n&quot;, GSMOPEN_P_LOG, body);
</ins><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-switch_state_handler_table_t celliax_state_handlers = {
</del><ins>+switch_state_handler_table_t gsmopen_state_handlers = {
</ins><span class="cx">         /*.on_init */ channel_on_init,
</span><span class="cx">         /*.on_routing */ channel_on_routing,
</span><span class="cx">         /*.on_execute */ channel_on_execute,
</span><span class="lines">@@ -957,7 +957,7 @@
</span><span class="cx">         /*.on_destroy */ channel_on_destroy
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-switch_io_routines_t celliax_io_routines = {
</del><ins>+switch_io_routines_t gsmopen_io_routines = {
</ins><span class="cx">         /*.outgoing_channel */ channel_outgoing_channel,
</span><span class="cx">         /*.read_frame */ channel_read_frame,
</span><span class="cx">         /*.write_frame */ channel_write_frame,
</span><span class="lines">@@ -973,14 +973,14 @@
</span><span class="cx">                                                                                                         switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
</span><span class="cx"> {
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><del>-        if ((*new_session = switch_core_session_request(celliax_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
</del><ins>+        if ((*new_session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
</ins><span class="cx">                 switch_channel_t *channel = NULL;
</span><span class="cx">                 switch_caller_profile_t *caller_profile;
</span><span class="cx">                 char *rdest;
</span><span class="cx">                 int found = 0;
</span><span class="cx">                 char interface_name[256];
</span><span class="cx"> 
</span><del>-                DEBUGA_CELLIAX(&quot;1 SESSION_REQUEST %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(*new_session));
</del><ins>+                DEBUGA_GSMOPEN(&quot;1 SESSION_REQUEST %s\n&quot;, GSMOPEN_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">@@ -995,35 +995,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_CELLIAX(&quot;Finding one available celliax interface\n&quot;, CELLIAX_P_LOG);
-                                //tech_pvt = find_available_celliax_interface(NULL);
</del><ins>+                                //DEBUGA_GSMOPEN(&quot;Finding one available gsmopen interface\n&quot;, GSMOPEN_P_LOG);
+                                //tech_pvt = find_available_gsmopen_interface(NULL);
</ins><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_CELLIAX(&quot;Finding one available celliax interface RR\n&quot;, CELLIAX_P_LOG);
-                                tech_pvt = find_available_celliax_interface_rr(NULL);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;Finding one available gsmopen interface RR\n&quot;, GSMOPEN_P_LOG);
+                                tech_pvt = find_available_gsmopen_interface_rr(NULL);
</ins><span class="cx">                                 if (tech_pvt)
</span><span class="cx">                                         found = 1;
</span><del>-                                DEBUGA_CELLIAX(&quot;FOUND one available celliax interface RR\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;FOUND one available gsmopen interface RR\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+                        for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_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.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));
</del><ins>+                                if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                                        &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].name, interface_name, strlen(interface_name)) == 0)) {
+                                        if (strlen(globals.GSMOPEN_INTERFACES[i].session_uuid_str)) {
+                                                DEBUGA_GSMOPEN
+                                                        (&quot;globals.GSMOPEN_INTERFACES[%d].name=|||%s||| session_uuid_str=|||%s||| is BUSY\n&quot;,
+                                                         GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name, globals.GSMOPEN_INTERFACES[i].session_uuid_str);
+                                                DEBUGA_GSMOPEN(&quot;1 SESSION_DESTROY %s\n&quot;, GSMOPEN_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_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];
</del><ins>+                                        DEBUGA_GSMOPEN(&quot;globals.GSMOPEN_INTERFACES[%d].name=|||%s|||?\n&quot;, GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name);
+                                        tech_pvt = &amp;globals.GSMOPEN_INTERFACES[i];
</ins><span class="cx">                                         found = 1;
</span><span class="cx">                                         break;
</span><span class="cx">                                 }
</span><span class="lines">@@ -1031,14 +1031,14 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                 } else {
</span><del>-                        ERRORA(&quot;Doh! no destination number?\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no destination number?\n&quot;, GSMOPEN_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_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));
</del><ins>+                        DEBUGA_GSMOPEN(&quot;Doh! no available interface for |||%s|||?\n&quot;, GSMOPEN_P_LOG, interface_name);
+                        DEBUGA_GSMOPEN(&quot;2 SESSION_DESTROY %s\n&quot;, GSMOPEN_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">@@ -1047,13 +1047,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;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no channel?\n&quot;, GSMOPEN_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><del>-                if (celliax_tech_init(tech_pvt, *new_session) != SWITCH_STATUS_SUCCESS) {
-                        ERRORA(&quot;Doh! no tech_init?\n&quot;, CELLIAX_P_LOG);
</del><ins>+                if (gsmopen_tech_init(tech_pvt, *new_session) != SWITCH_STATUS_SUCCESS) {
+                        ERRORA(&quot;Doh! no tech_init?\n&quot;, GSMOPEN_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">@@ -1063,14 +1063,14 @@
</span><span class="cx">                 if (outbound_profile) {
</span><span class="cx">                         char name[128];
</span><span class="cx"> 
</span><del>-                        snprintf(name, sizeof(name), &quot;celliax/%s&quot;, outbound_profile-&gt;destination_number);
-                        //snprintf(name, sizeof(name), &quot;celliax/%s&quot;, tech_pvt-&gt;name);
</del><ins>+                        snprintf(name, sizeof(name), &quot;gsmopen/%s&quot;, outbound_profile-&gt;destination_number);
+                        //snprintf(name, sizeof(name), &quot;gsmopen/%s&quot;, tech_pvt-&gt;name);
</ins><span class="cx">                         switch_channel_set_name(channel, name);
</span><span class="cx">                         caller_profile = switch_caller_profile_clone(*new_session, outbound_profile);
</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;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no caller profile\n&quot;, GSMOPEN_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">@@ -1081,7 +1081,7 @@
</span><span class="cx">                 rdest = strchr(caller_profile-&gt;destination_number, '/');
</span><span class="cx">                 *rdest++ = '\0';
</span><span class="cx"> 
</span><del>-                //celliax_call(tech_pvt, rdest, 30);
</del><ins>+                //gsmopen_call(tech_pvt, rdest, 30);
</ins><span class="cx"> 
</span><span class="cx">                 switch_copy_string(tech_pvt-&gt;session_uuid_str, switch_core_session_get_uuid(*new_session), sizeof(tech_pvt-&gt;session_uuid_str));
</span><span class="cx">                 caller_profile = tech_pvt-&gt;caller_profile;
</span><span class="lines">@@ -1090,17 +1090,17 @@
</span><span class="cx">                 switch_channel_set_flag(channel, CF_OUTBOUND);
</span><span class="cx">                 switch_set_flag(tech_pvt, TFLAG_OUTBOUND);
</span><span class="cx">                 switch_channel_set_state(channel, CS_INIT);
</span><del>-                celliax_call(tech_pvt, rdest, 30);
</del><ins>+                gsmopen_call(tech_pvt, rdest, 30);
</ins><span class="cx">                 switch_mutex_unlock(globals.mutex);
</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;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Doh! no new_session\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><del>- * \brief This thread runs during a call, and monitor the interface for signaling, like hangup, caller id, etc most of signaling is handled inside the celliax_signaling_read function
</del><ins>+ * \brief This thread runs during a call, and monitor the interface for signaling, like hangup, caller id, etc most of signaling is handled inside the gsmopen_signaling_read function
</ins><span class="cx">  *
</span><span class="cx">  */
</span><span class="cx"> /* BEGIN: Changes heres */
</span><span class="lines">@@ -1109,13 +1109,13 @@
</span><span class="cx"> static switch_status_t load_config(int reload_type)
</span><span class="cx"> /* END: Changes heres */
</span><span class="cx"> {
</span><del>-        char *cf = &quot;celliax.conf&quot;;
</del><ins>+        char *cf = &quot;gsmopen.conf&quot;;
</ins><span class="cx">         switch_xml_t cfg, xml, global_settings, param, interfaces, myinterface;
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx"> 
</span><del>-        switch_mutex_init(&amp;globals.mutex, SWITCH_MUTEX_NESTED, celliax_module_pool);
</del><ins>+        switch_mutex_init(&amp;globals.mutex, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
</ins><span class="cx">         if (!(xml = switch_xml_open_cfg(cf, &amp;cfg, NULL))) {
</span><del>-                ERRORA(&quot;open of %s failed\n&quot;, CELLIAX_P_LOG, cf);
</del><ins>+                ERRORA(&quot;open of %s failed\n&quot;, GSMOPEN_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">@@ -1128,21 +1128,21 @@
</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_CELLIAX(&quot;globals.debug=%d\n&quot;, CELLIAX_P_LOG, globals.debug);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;globals.debug=%d\n&quot;, GSMOPEN_P_LOG, globals.debug);
</ins><span class="cx">                                 globals.debug = atoi(val);
</span><del>-                                DEBUGA_CELLIAX(&quot;globals.debug=%d\n&quot;, CELLIAX_P_LOG, globals.debug);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;globals.debug=%d\n&quot;, GSMOPEN_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_CELLIAX(&quot;globals.hold_music=%s\n&quot;, CELLIAX_P_LOG, globals.hold_music);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;globals.hold_music=%s\n&quot;, GSMOPEN_P_LOG, globals.hold_music);
</ins><span class="cx">                         } else if (!strcmp(var, &quot;dialplan&quot;)) {
</span><span class="cx">                                 set_global_dialplan(val);
</span><del>-                                DEBUGA_CELLIAX(&quot;globals.dialplan=%s\n&quot;, CELLIAX_P_LOG, globals.dialplan);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;globals.dialplan=%s\n&quot;, GSMOPEN_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_CELLIAX(&quot;globals.destination=%s\n&quot;, CELLIAX_P_LOG, globals.destination);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;globals.destination=%s\n&quot;, GSMOPEN_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_CELLIAX(&quot;globals.context=%s\n&quot;, CELLIAX_P_LOG, globals.context);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;globals.context=%s\n&quot;, GSMOPEN_P_LOG, globals.context);
</ins><span class="cx"> 
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1226,7 +1226,7 @@
</span><span class="cx">                         char *at_has_ecam=&quot;0&quot;;
</span><span class="cx">                         char *alsa_period_size=&quot;160&quot;;
</span><span class="cx">                         char *alsa_periods_in_buffer=&quot;4&quot;;
</span><del>-                        char *celliax_sound_rate=&quot;8000&quot;;
</del><ins>+                        char *gsmopen_sound_rate=&quot;8000&quot;;
</ins><span class="cx">                         char *alsa_play_is_mono=&quot;1&quot;;
</span><span class="cx">                         char *alsa_capture_is_mono=&quot;1&quot;;
</span><span class="cx">                         char *capture_boost=&quot;5&quot;;
</span><span class="lines">@@ -1391,8 +1391,8 @@
</span><span class="cx">                                         alsa_period_size = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;alsa_periods_in_buffer&quot;)) {
</span><span class="cx">                                         alsa_periods_in_buffer = val;
</span><del>-                                } else if (!strcasecmp(var, &quot;celliax_sound_rate&quot;)) {
-                                        celliax_sound_rate = val;
</del><ins>+                                } else if (!strcasecmp(var, &quot;gsmopen_sound_rate&quot;)) {
+                                        gsmopen_sound_rate = val;
</ins><span class="cx">                                 } else if (!strcasecmp(var, &quot;alsa_play_is_mono&quot;)) {
</span><span class="cx">                                         alsa_play_is_mono = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;alsa_capture_is_mono&quot;)) {
</span><span class="lines">@@ -1419,63 +1419,63 @@
</span><span class="cx">                         /* END: Changes here */
</span><span class="cx"> 
</span><span class="cx">                         if (!id) {
</span><del>-                                ERRORA(&quot;interface missing REQUIRED param 'id'\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                ERRORA(&quot;interface missing REQUIRED param 'id'\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (switch_is_number(id)) {
</span><span class="cx">                                 interface_id = atoi(id);
</span><span class="cx">                         } else {
</span><del>-                                ERRORA(&quot;interface param 'id' MUST be a number, now id='%s'\n&quot;, CELLIAX_P_LOG, id);
</del><ins>+                                ERRORA(&quot;interface param 'id' MUST be a number, now id='%s'\n&quot;, GSMOPEN_P_LOG, id);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if(!switch_is_number(at_early_audio)) {
</span><del>-                                ERRORA(&quot;interface param 'at_early_audio' MUST be a number, now at_early_audio='%s'\n&quot;, CELLIAX_P_LOG, at_early_audio);
</del><ins>+                                ERRORA(&quot;interface param 'at_early_audio' MUST be a number, now at_early_audio='%s'\n&quot;, GSMOPEN_P_LOG, at_early_audio);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(at_after_preinit_pause)) {
</span><del>-                                ERRORA(&quot;interface param 'at_after_preinit_pause' MUST be a number, now at_after_preinit_pause='%s'\n&quot;, CELLIAX_P_LOG, at_after_preinit_pause);
</del><ins>+                                ERRORA(&quot;interface param 'at_after_preinit_pause' MUST be a number, now at_after_preinit_pause='%s'\n&quot;, GSMOPEN_P_LOG, at_after_preinit_pause);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(at_initial_pause)) {
</span><del>-                                ERRORA(&quot;interface param 'at_initial_pause' MUST be a number, now at_initial_pause='%s'\n&quot;, CELLIAX_P_LOG, at_initial_pause);
</del><ins>+                                ERRORA(&quot;interface param 'at_initial_pause' MUST be a number, now at_initial_pause='%s'\n&quot;, GSMOPEN_P_LOG, at_initial_pause);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(at_has_clcc)) {
</span><del>-                                ERRORA(&quot;interface param 'at_has_clcc' MUST be a number, now at_has_clcc='%s'\n&quot;, CELLIAX_P_LOG, at_has_clcc);
</del><ins>+                                ERRORA(&quot;interface param 'at_has_clcc' MUST be a number, now at_has_clcc='%s'\n&quot;, GSMOPEN_P_LOG, at_has_clcc);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(at_has_ecam)) {
</span><del>-                                ERRORA(&quot;interface param 'at_has_ecam' MUST be a number, now at_has_ecam='%s'\n&quot;, CELLIAX_P_LOG, at_has_ecam);
</del><ins>+                                ERRORA(&quot;interface param 'at_has_ecam' MUST be a number, now at_has_ecam='%s'\n&quot;, GSMOPEN_P_LOG, at_has_ecam);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(alsa_period_size)) {
</span><del>-                                ERRORA(&quot;interface param 'alsa_period_size' MUST be a number, now alsa_period_size='%s'\n&quot;, CELLIAX_P_LOG, alsa_period_size);
</del><ins>+                                ERRORA(&quot;interface param 'alsa_period_size' MUST be a number, now alsa_period_size='%s'\n&quot;, GSMOPEN_P_LOG, alsa_period_size);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(alsa_periods_in_buffer)) {
</span><del>-                                ERRORA(&quot;interface param 'alsa_periods_in_buffer' MUST be a number, now alsa_periods_in_buffer='%s'\n&quot;, CELLIAX_P_LOG, alsa_periods_in_buffer);
</del><ins>+                                ERRORA(&quot;interface param 'alsa_periods_in_buffer' MUST be a number, now alsa_periods_in_buffer='%s'\n&quot;, GSMOPEN_P_LOG, alsa_periods_in_buffer);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><del>-                        if(!switch_is_number(celliax_sound_rate)) {
-                                ERRORA(&quot;interface param 'celliax_sound_rate' MUST be a number, now celliax_sound_rate='%s'\n&quot;, CELLIAX_P_LOG, celliax_sound_rate);
</del><ins>+                        if(!switch_is_number(gsmopen_sound_rate)) {
+                                ERRORA(&quot;interface param 'gsmopen_sound_rate' MUST be a number, now gsmopen_sound_rate='%s'\n&quot;, GSMOPEN_P_LOG, gsmopen_sound_rate);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(alsa_play_is_mono)) {
</span><del>-                                ERRORA(&quot;interface param 'alsa_play_is_mono' MUST be a number, now alsa_play_is_mono='%s'\n&quot;, CELLIAX_P_LOG, alsa_play_is_mono);
</del><ins>+                                ERRORA(&quot;interface param 'alsa_play_is_mono' MUST be a number, now alsa_play_is_mono='%s'\n&quot;, GSMOPEN_P_LOG, alsa_play_is_mono);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(alsa_capture_is_mono)) {
</span><del>-                                ERRORA(&quot;interface param 'alsa_capture_is_mono' MUST be a number, now alsa_capture_is_mono='%s'\n&quot;, CELLIAX_P_LOG, alsa_capture_is_mono);
</del><ins>+                                ERRORA(&quot;interface param 'alsa_capture_is_mono' MUST be a number, now alsa_capture_is_mono='%s'\n&quot;, GSMOPEN_P_LOG, alsa_capture_is_mono);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(capture_boost)) {
</span><del>-                                ERRORA(&quot;interface param 'capture_boost' MUST be a number, now capture_boost='%s'\n&quot;, CELLIAX_P_LOG, capture_boost);
</del><ins>+                                ERRORA(&quot;interface param 'capture_boost' MUST be a number, now capture_boost='%s'\n&quot;, GSMOPEN_P_LOG, capture_boost);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                         if(!switch_is_number(playback_boost)) {
</span><del>-                                ERRORA(&quot;interface param 'playback_boost' MUST be a number, now playback_boost='%s'\n&quot;, CELLIAX_P_LOG, playback_boost);
</del><ins>+                                ERRORA(&quot;interface param 'playback_boost' MUST be a number, now playback_boost='%s'\n&quot;, GSMOPEN_P_LOG, playback_boost);
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="lines">@@ -1487,144 +1487,144 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">                         if (name) {
</span><del>-                                DEBUGA_CELLIAX(&quot;name=%s\n&quot;, CELLIAX_P_LOG, name);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;name=%s\n&quot;, GSMOPEN_P_LOG, name);
</ins><span class="cx">                         }
</span><del>-                        if (interface_id &amp;&amp; interface_id &lt; CELLIAX_MAX_INTERFACES) {
</del><ins>+                        if (interface_id &amp;&amp; interface_id &lt; GSMOPEN_MAX_INTERFACES) {
</ins><span class="cx">                                 private_t newconf;
</span><del>-                                switch_threadattr_t *celliax_api_thread_attr = NULL;
</del><ins>+                                switch_threadattr_t *gsmopen_api_thread_attr = NULL;
</ins><span class="cx"> 
</span><span class="cx">                                 memset(&amp;newconf, '\0', sizeof(newconf));
</span><del>-                                globals.CELLIAX_INTERFACES[interface_id] = newconf;
</del><ins>+                                globals.GSMOPEN_INTERFACES[interface_id] = newconf;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</del><ins>+                                tech_pvt = &amp;globals.GSMOPEN_INTERFACES[interface_id];
</ins><span class="cx"> 
</span><del>-                                switch_mutex_init(&amp;globals.CELLIAX_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, celliax_module_pool);
</del><ins>+                                switch_mutex_init(&amp;globals.GSMOPEN_INTERFACES[interface_id].controldev_lock, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                //FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].id , id );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].name , name );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].context , context );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].dialplan , dialplan );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].destination , destination );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].controldevice_name , controldevice_name );
-                                //FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].digit_timeout , digit_timeout );
-                                //FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].max_digits , max_digits );
-                                //FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].hotline , hotline );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].dial_regex , dial_regex );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].hold_music , hold_music );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].fail_dial_regex , fail_dial_regex );
-                                //FIXME switch_set_string(globals.CELLIAX_INTERFACES[interface_id].enable_callerid , enable_callerid );
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_pre_number, at_dial_pre_number);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_post_number, at_dial_post_number);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_dial_expect, at_dial_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_hangup, at_hangup);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_hangup_expect, at_hangup_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_answer, at_answer);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_answer_expect, at_answer_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_send_dtmf, at_send_dtmf);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_1, at_preinit_1);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_1_expect, at_preinit_1_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_2, at_preinit_2);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_2_expect, at_preinit_2_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_3, at_preinit_3);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_3_expect, at_preinit_3_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_4, at_preinit_4);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_4_expect, at_preinit_4_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_5, at_preinit_5);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_preinit_5_expect, at_preinit_5_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_1, at_postinit_1);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_1_expect, at_postinit_1_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_2, at_postinit_2);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_2_expect, at_postinit_2_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_3, at_postinit_3);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_3_expect, at_postinit_3_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_4, at_postinit_4);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_4_expect, at_postinit_4_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_5, at_postinit_5);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_postinit_5_expect, at_postinit_5_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_battchg, at_query_battchg);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_battchg_expect, at_query_battchg_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_signal, at_query_signal);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_query_signal_expect, at_query_signal_expect);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_idle, at_call_idle);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_incoming, at_call_incoming);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_active, at_call_active);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_failed, at_call_failed);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_call_calling, at_call_calling);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_noservice_string, at_indicator_noservice_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nosignal_string, at_indicator_nosignal_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_lowsignal_string, at_indicator_lowsignal_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_lowbattchg_string, at_indicator_lowbattchg_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nobattchg_string, at_indicator_nobattchg_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callactive_string, at_indicator_callactive_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nocallactive_string, at_indicator_nocallactive_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_nocallsetup_string, at_indicator_nocallsetup_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupincoming_string, at_indicator_callsetupincoming_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupoutgoing_string, at_indicator_callsetupoutgoing_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].at_indicator_callsetupremoteringing_string, at_indicator_callsetupremoteringing_string);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].sms_receiving_program, sms_receiving_program);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].alsacname, alsacname);
-                                switch_set_string(globals.CELLIAX_INTERFACES[interface_id].alsapname, alsapname);
</del><ins>+                                //FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].id , id );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].name , name );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].context , context );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].dialplan , dialplan );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].destination , destination );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].controldevice_name , controldevice_name );
+                                //FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].digit_timeout , digit_timeout );
+                                //FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].max_digits , max_digits );
+                                //FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].hotline , hotline );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].dial_regex , dial_regex );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].hold_music , hold_music );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].fail_dial_regex , fail_dial_regex );
+                                //FIXME switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].enable_callerid , enable_callerid );
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_dial_pre_number, at_dial_pre_number);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_dial_post_number, at_dial_post_number);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_dial_expect, at_dial_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_hangup, at_hangup);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_hangup_expect, at_hangup_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_answer, at_answer);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_answer_expect, at_answer_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_send_dtmf, at_send_dtmf);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_1, at_preinit_1);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_1_expect, at_preinit_1_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_2, at_preinit_2);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_2_expect, at_preinit_2_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_3, at_preinit_3);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_3_expect, at_preinit_3_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_4, at_preinit_4);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_4_expect, at_preinit_4_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_5, at_preinit_5);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_preinit_5_expect, at_preinit_5_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_1, at_postinit_1);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_1_expect, at_postinit_1_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_2, at_postinit_2);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_2_expect, at_postinit_2_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_3, at_postinit_3);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_3_expect, at_postinit_3_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_4, at_postinit_4);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_4_expect, at_postinit_4_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_5, at_postinit_5);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_postinit_5_expect, at_postinit_5_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_battchg, at_query_battchg);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_battchg_expect, at_query_battchg_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_signal, at_query_signal);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_query_signal_expect, at_query_signal_expect);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_idle, at_call_idle);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_incoming, at_call_incoming);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_active, at_call_active);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_failed, at_call_failed);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_call_calling, at_call_calling);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_noservice_string, at_indicator_noservice_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nosignal_string, at_indicator_nosignal_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_lowsignal_string, at_indicator_lowsignal_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_lowbattchg_string, at_indicator_lowbattchg_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nobattchg_string, at_indicator_nobattchg_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callactive_string, at_indicator_callactive_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nocallactive_string, at_indicator_nocallactive_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_nocallsetup_string, at_indicator_nocallsetup_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callsetupincoming_string, at_indicator_callsetupincoming_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callsetupoutgoing_string, at_indicator_callsetupoutgoing_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].at_indicator_callsetupremoteringing_string, at_indicator_callsetupremoteringing_string);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].sms_receiving_program, sms_receiving_program);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].alsacname, alsacname);
+                                switch_set_string(globals.GSMOPEN_INTERFACES[interface_id].alsapname, alsapname);
</ins><span class="cx"> 
</span><del>-                                globals.CELLIAX_INTERFACES[interface_id].at_early_audio = atoi(at_early_audio);
-                                globals.CELLIAX_INTERFACES[interface_id].at_after_preinit_pause = atoi(at_after_preinit_pause);
-                                globals.CELLIAX_INTERFACES[interface_id].at_initial_pause = atoi(at_initial_pause);
-                                globals.CELLIAX_INTERFACES[interface_id].at_has_clcc = atoi(at_has_clcc);
-                                globals.CELLIAX_INTERFACES[interface_id].at_has_ecam = atoi(at_has_ecam);
-                                globals.CELLIAX_INTERFACES[interface_id].alsa_period_size = atoi(alsa_period_size);
-                                globals.CELLIAX_INTERFACES[interface_id].alsa_periods_in_buffer = atoi(alsa_periods_in_buffer);
-                                globals.CELLIAX_INTERFACES[interface_id].celliax_sound_rate = atoi(celliax_sound_rate);
-                                globals.CELLIAX_INTERFACES[interface_id].alsa_play_is_mono = atoi(alsa_play_is_mono);
-                                globals.CELLIAX_INTERFACES[interface_id].alsa_capture_is_mono = atoi(alsa_capture_is_mono);
-                                globals.CELLIAX_INTERFACES[interface_id].capture_boost = atoi(capture_boost);
-                                globals.CELLIAX_INTERFACES[interface_id].playback_boost = atoi(playback_boost);
</del><ins>+                                globals.GSMOPEN_INTERFACES[interface_id].at_early_audio = atoi(at_early_audio);
+                                globals.GSMOPEN_INTERFACES[interface_id].at_after_preinit_pause = atoi(at_after_preinit_pause);
+                                globals.GSMOPEN_INTERFACES[interface_id].at_initial_pause = atoi(at_initial_pause);
+                                globals.GSMOPEN_INTERFACES[interface_id].at_has_clcc = atoi(at_has_clcc);
+                                globals.GSMOPEN_INTERFACES[interface_id].at_has_ecam = atoi(at_has_ecam);
+                                globals.GSMOPEN_INTERFACES[interface_id].alsa_period_size = atoi(alsa_period_size);
+                                globals.GSMOPEN_INTERFACES[interface_id].alsa_periods_in_buffer = atoi(alsa_periods_in_buffer);
+                                globals.GSMOPEN_INTERFACES[interface_id].gsmopen_sound_rate = atoi(gsmopen_sound_rate);
+                                globals.GSMOPEN_INTERFACES[interface_id].alsa_play_is_mono = atoi(alsa_play_is_mono);
+                                globals.GSMOPEN_INTERFACES[interface_id].alsa_capture_is_mono = atoi(alsa_capture_is_mono);
+                                globals.GSMOPEN_INTERFACES[interface_id].capture_boost = atoi(capture_boost);
+                                globals.GSMOPEN_INTERFACES[interface_id].playback_boost = atoi(playback_boost);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                globals.CELLIAX_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
-                                globals.CELLIAX_INTERFACES[interface_id].controldevprotocol = controldevprotocol;
-                                //globals.CELLIAX_INTERFACES[interface_id].at_early_audio = at_early_audio;
-                                //globals.CELLIAX_INTERFACES[interface_id].at_after_preinit_pause = at_after_preinit_pause;
-                                //globals.CELLIAX_INTERFACES[interface_id].at_initial_pause = at_initial_pause;
-                                //globals.CELLIAX_INTERFACES[interface_id].at_has_clcc = at_has_clcc;
-                                //globals.CELLIAX_INTERFACES[interface_id].at_has_ecam = at_has_ecam;
-                                //globals.CELLIAX_INTERFACES[interface_id].alsa_period_size = alsa_period_size;
-                                //globals.CELLIAX_INTERFACES[interface_id].alsa_periods_in_buffer = alsa_periods_in_buffer;
-                                //globals.CELLIAX_INTERFACES[interface_id].celliax_sound_rate = celliax_sound_rate;
-                                //globals.CELLIAX_INTERFACES[interface_id].alsa_play_is_mono = alsa_play_is_mono;
-                                //globals.CELLIAX_INTERFACES[interface_id].alsa_capture_is_mono = alsa_capture_is_mono;
-                                //globals.CELLIAX_INTERFACES[interface_id].capture_boost = capture_boost;
-                                //globals.CELLIAX_INTERFACES[interface_id].playback_boost = playback_boost;
-                                globals.CELLIAX_INTERFACES[interface_id].running = running; //FIXME
</del><ins>+                                globals.GSMOPEN_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
+                                globals.GSMOPEN_INTERFACES[interface_id].controldevprotocol = controldevprotocol;
+                                //globals.GSMOPEN_INTERFACES[interface_id].at_early_audio = at_early_audio;
+                                //globals.GSMOPEN_INTERFACES[interface_id].at_after_preinit_pause = at_after_preinit_pause;
+                                //globals.GSMOPEN_INTERFACES[interface_id].at_initial_pause = at_initial_pause;
+                                //globals.GSMOPEN_INTERFACES[interface_id].at_has_clcc = at_has_clcc;
+                                //globals.GSMOPEN_INTERFACES[interface_id].at_has_ecam = at_has_ecam;
+                                //globals.GSMOPEN_INTERFACES[interface_id].alsa_period_size = alsa_period_size;
+                                //globals.GSMOPEN_INTERFACES[interface_id].alsa_periods_in_buffer = alsa_periods_in_buffer;
+                                //globals.GSMOPEN_INTERFACES[interface_id].gsmopen_sound_rate = gsmopen_sound_rate;
+                                //globals.GSMOPEN_INTERFACES[interface_id].alsa_play_is_mono = alsa_play_is_mono;
+                                //globals.GSMOPEN_INTERFACES[interface_id].alsa_capture_is_mono = alsa_capture_is_mono;
+                                //globals.GSMOPEN_INTERFACES[interface_id].capture_boost = capture_boost;
+                                //globals.GSMOPEN_INTERFACES[interface_id].playback_boost = playback_boost;
+                                globals.GSMOPEN_INTERFACES[interface_id].running = running; //FIXME
</ins><span class="cx"> 
</span><del>-                                celliax_store_boost(&quot;5&quot;, &amp;globals.CELLIAX_INTERFACES[interface_id].capture_boost); //FIXME
-                                celliax_store_boost(&quot;10&quot;, &amp;globals.CELLIAX_INTERFACES[interface_id].playback_boost); //FIXME
</del><ins>+                                gsmopen_store_boost(&quot;5&quot;, &amp;globals.GSMOPEN_INTERFACES[interface_id].capture_boost); //FIXME
+                                gsmopen_store_boost(&quot;10&quot;, &amp;globals.GSMOPEN_INTERFACES[interface_id].playback_boost); //FIXME
</ins><span class="cx"> 
</span><span class="cx"> 
</span><del>-                                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].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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].name=%s\n&quot;,
+                                                GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].name);
+                                DEBUGA_GSMOPEN
+                                        (&quot;interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].dialplan=%s\n&quot;,
+                                         GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].dialplan);
+                                DEBUGA_GSMOPEN
+                                        (&quot;interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].destination=%s\n&quot;,
+                                         GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].destination);
+                                DEBUGA_GSMOPEN
+                                        (&quot;interface_id=%d globals.GSMOPEN_INTERFACES[interface_id].context=%s\n&quot;,
+                                         GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].context);
+                                WARNINGA(&quot;STARTING interface_id=%d\n&quot;, GSMOPEN_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.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);
</del><ins>+                                if (globals.GSMOPEN_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
+                                        globals.GSMOPEN_INTERFACES[interface_id].controldevfd =
+                                                gsmopen_serial_init(&amp;globals.GSMOPEN_INTERFACES[interface_id], globals.GSMOPEN_INTERFACES[interface_id].controldevice_speed);
+                                        if (globals.GSMOPEN_INTERFACES[interface_id].controldevfd &lt; 1) {
+                                                ERRORA(&quot;gsmopen_serial_init failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                                 return SWITCH_STATUS_FALSE;
</span><del>-                                                //celliax_sound_shutdown(tmp);
</del><ins>+                                                //gsmopen_sound_shutdown(tmp);
</ins><span class="cx">                                                 //if (tmp)
</span><span class="cx">                                                 //free(tmp);
</span><span class="cx">                                                 //return NULL;
</span><span class="lines">@@ -1632,13 +1632,13 @@
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 /* config the phone/modem on the serial port */
</span><del>-                                if (globals.CELLIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
</del><ins>+                                if (globals.GSMOPEN_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
</ins><span class="cx">                                         //int res;
</span><del>-                                        res = celliax_serial_config(&amp;globals.CELLIAX_INTERFACES[interface_id]);
</del><ins>+                                        res = gsmopen_serial_config(&amp;globals.GSMOPEN_INTERFACES[interface_id]);
</ins><span class="cx">                                         if (res) {
</span><del>-                                                ERRORA(&quot;celliax_serial_config failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                                ERRORA(&quot;gsmopen_serial_config failed\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                                 return SWITCH_STATUS_FALSE;
</span><del>-                                                //celliax_sound_shutdown(tmp);
</del><ins>+                                                //gsmopen_sound_shutdown(tmp);
</ins><span class="cx">                                                 //if (tmp)
</span><span class="cx">                                                 //free(tmp);
</span><span class="cx">                                                 //return NULL;
</span><span class="lines">@@ -1647,32 +1647,32 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">                                 switch_sleep(100000);
</span><del>-                                switch_threadattr_create(&amp;celliax_api_thread_attr, celliax_module_pool);
-                                switch_threadattr_stacksize_set(celliax_api_thread_attr, SWITCH_THREAD_STACKSIZE);
-                                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);
</del><ins>+                                switch_threadattr_create(&amp;gsmopen_api_thread_attr, gsmopen_module_pool);
+                                switch_threadattr_stacksize_set(gsmopen_api_thread_attr, SWITCH_THREAD_STACKSIZE);
+                                switch_thread_create(&amp;globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread, gsmopen_api_thread_attr, gsmopen_do_gsmopenapi_thread,
+                                                &amp;globals.GSMOPEN_INTERFACES[interface_id], gsmopen_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 CELLIAX_MAX_INTERFACES (%d)\n&quot;, CELLIAX_P_LOG, interface_id, CELLIAX_MAX_INTERFACES);
</del><ins>+                                ERRORA(&quot;interface id %d is higher than GSMOPEN_MAX_INTERFACES (%d)\n&quot;, GSMOPEN_P_LOG, interface_id, GSMOPEN_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; CELLIAX_MAX_INTERFACES; i++) {
-                        if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</del><ins>+                for (i = 0; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
+                        if (strlen(globals.GSMOPEN_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.CELLIAX_INTERFACES[i];
</del><ins>+                                tech_pvt = &amp;globals.GSMOPEN_INTERFACES[i];
</ins><span class="cx"> 
</span><del>-                                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].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);
</del><ins>+                                DEBUGA_GSMOPEN(&quot;i=%d globals.GSMOPEN_INTERFACES[%d].interface_id=%s\n&quot;, GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].interface_id);
+                                DEBUGA_GSMOPEN(&quot;i=%d globals.GSMOPEN_INTERFACES[%d].name=%s\n&quot;, GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].name);
+                                DEBUGA_GSMOPEN(&quot;i=%d globals.GSMOPEN_INTERFACES[%d].context=%s\n&quot;, GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].context);
+                                DEBUGA_GSMOPEN(&quot;i=%d globals.GSMOPEN_INTERFACES[%d].dialplan=%s\n&quot;, GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].dialplan);
+                                DEBUGA_GSMOPEN(&quot;i=%d globals.GSMOPEN_INTERFACES[%d].destination=%s\n&quot;, GSMOPEN_P_LOG, i, i, globals.GSMOPEN_INTERFACES[i].destination);
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -1691,15 +1691,15 @@
</span><span class="cx"> 
</span><span class="cx">         switch_assert(proto != NULL);
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n&quot;, CELLIAX_P_LOG, proto, from, to, subject, body, type, hint?hint:&quot;NULL&quot;);
</del><ins>+        DEBUGA_GSMOPEN(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n&quot;, GSMOPEN_P_LOG, proto, from, to, subject, body, type, hint?hint:&quot;NULL&quot;);
</ins><span class="cx"> 
</span><span class="cx">         if (!to || !strlen(to)) {
</span><del>-                ERRORA(&quot;Missing To: header.\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Missing To: header.\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ((!from &amp;&amp; !hint) || (!strlen(from) &amp;&amp; !strlen(hint)) ) {
</span><del>-                ERRORA(&quot;Missing From: AND Hint: headers.\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;Missing From: AND Hint: headers.\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1720,25 +1720,25 @@
</span><span class="cx">                         *host++ = '\0';
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                DEBUGA_CELLIAX(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n&quot;, CELLIAX_P_LOG, proto, from, to, subject, body, type, hint?hint:&quot;NULL&quot;);
</del><ins>+                DEBUGA_GSMOPEN(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n&quot;, GSMOPEN_P_LOG, proto, from, to, subject, body, type, hint?hint:&quot;NULL&quot;);
</ins><span class="cx">                 if (hint &amp;&amp; strlen(hint)) {
</span><span class="cx">                         //in hint we receive the interface name to use
</span><del>-                        for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
-                                if (strlen(globals.CELLIAX_INTERFACES[i].name)
-                                                &amp;&amp; (strncmp(globals.CELLIAX_INTERFACES[i].name, hint, strlen(hint)) == 0)) {
-                                        tech_pvt = &amp;globals.CELLIAX_INTERFACES[i];
-                                        DEBUGA_CELLIAX(&quot;Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n&quot;, CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name);
</del><ins>+                        for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
+                                if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                                                &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].name, hint, strlen(hint)) == 0)) {
+                                        tech_pvt = &amp;globals.GSMOPEN_INTERFACES[i];
+                                        DEBUGA_GSMOPEN(&quot;Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n&quot;, GSMOPEN_P_LOG, i, globals.GSMOPEN_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">                 } /* FIXME add a tech_pvt member for the SIM telephone number //else {
</span><span class="cx">                 //we have no a predefined interface name to use (hint is NULL), so let's choose an interface from the username (from)
</span><del>-                for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
-                if (strlen(globals.CELLIAX_INTERFACES[i].name)
-                &amp;&amp; (strncmp(globals.CELLIAX_INTERFACES[i].skype_user, from, strlen(from)) == 0)) {
-                tech_pvt = &amp;globals.CELLIAX_INTERFACES[i];
-                DEBUGA_CELLIAX(&quot;Using interface: globals.CELLIAX_INTERFACES[%d].name=|||%s|||\n&quot;, CELLIAX_P_LOG, i, globals.CELLIAX_INTERFACES[i].name);
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
+                if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].skype_user, from, strlen(from)) == 0)) {
+                tech_pvt = &amp;globals.GSMOPEN_INTERFACES[i];
+                DEBUGA_GSMOPEN(&quot;Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n&quot;, GSMOPEN_P_LOG, i, globals.GSMOPEN_INTERFACES[i].name);
</ins><span class="cx">                 found = 1;
</span><span class="cx">                 break;
</span><span class="cx">                 }
</span><span class="lines">@@ -1746,10 +1746,10 @@
</span><span class="cx">                 }
</span><span class="cx">                 */
</span><span class="cx">                 if (!found) {
</span><del>-                        ERRORA(&quot;ERROR: A Celliax interface with name='%s' or one with SIM_number='%s' was not found\n&quot;, CELLIAX_P_LOG, hint?hint:&quot;NULL&quot;, from?from:&quot;NULL&quot;);
</del><ins>+                        ERRORA(&quot;ERROR: A GSMopen interface with name='%s' or one with SIM_number='%s' was not found\n&quot;, GSMOPEN_P_LOG, hint?hint:&quot;NULL&quot;, from?from:&quot;NULL&quot;);
</ins><span class="cx">                         goto end;
</span><span class="cx">                 } else {
</span><del>-                        celliax_sendsms(tech_pvt, (char *)to, (char *)body);
</del><ins>+                        gsmopen_sendsms(tech_pvt, (char *)to, (char *)body);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> end:
</span><span class="lines">@@ -1759,12 +1759,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-SWITCH_MODULE_LOAD_FUNCTION(mod_celliax_load)
</del><ins>+SWITCH_MODULE_LOAD_FUNCTION(mod_gsmopen_load)
</ins><span class="cx"> {
</span><span class="cx">         switch_api_interface_t *commands_api_interface;
</span><span class="cx">         switch_chat_interface_t *chat_interface;
</span><span class="cx"> 
</span><del>-        celliax_module_pool = pool;
</del><ins>+        gsmopen_module_pool = pool;
</ins><span class="cx">         memset(&amp;globals, '\0', sizeof(globals));
</span><span class="cx"> 
</span><span class="cx">         running = 1;
</span><span class="lines">@@ -1780,18 +1780,18 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         *module_interface = switch_loadable_module_create_module_interface(pool, modname);
</span><del>-        celliax_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
-        celliax_endpoint_interface-&gt;interface_name = &quot;celliax&quot;;
-        celliax_endpoint_interface-&gt;io_routines = &amp;celliax_io_routines;
-        celliax_endpoint_interface-&gt;state_handler = &amp;celliax_state_handlers;
</del><ins>+        gsmopen_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+        gsmopen_endpoint_interface-&gt;interface_name = &quot;gsmopen&quot;;
+        gsmopen_endpoint_interface-&gt;io_routines = &amp;gsmopen_io_routines;
+        gsmopen_endpoint_interface-&gt;state_handler = &amp;gsmopen_state_handlers;
</ins><span class="cx"> 
</span><span class="cx">         if (running) {
</span><span class="cx"> 
</span><span class="cx"> #if 0
</span><del>-                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);
</del><ins>+                SWITCH_ADD_API(commands_api_interface, &quot;sk&quot;, &quot;GSMopen console commands&quot;, sk_function, SK_SYNTAX);
+                SWITCH_ADD_API(commands_api_interface, &quot;gsmopen&quot;, &quot;GSMopen interface commands&quot;, gsmopen_function, GSMOPEN_SYNTAX);
</ins><span class="cx"> #endif //0
</span><del>-                SWITCH_ADD_API(commands_api_interface, &quot;celliax_sendsms&quot;, &quot;celliax_sendsms interface destination_number SMS_text&quot;, sendsms_function, SENDSMS_SYNTAX);
</del><ins>+                SWITCH_ADD_API(commands_api_interface, &quot;gsmopen_sendsms&quot;, &quot;gsmopen_sendsms interface destination_number SMS_text&quot;, sendsms_function, SENDSMS_SYNTAX);
</ins><span class="cx">                 SWITCH_ADD_CHAT(chat_interface, MDL_CHAT_PROTO, chat_send);
</span><span class="cx"> 
</span><span class="cx">                 /* indicate that the module should continue to be loaded */
</span><span class="lines">@@ -1800,7 +1800,7 @@
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_celliax_shutdown)
</del><ins>+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_gsmopen_shutdown)
</ins><span class="cx"> {
</span><span class="cx">         int x;
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="lines">@@ -1810,19 +1810,19 @@
</span><span class="cx"> 
</span><span class="cx">         running = 0;
</span><span class="cx"> 
</span><del>-        for (interface_id = 0; interface_id &lt; CELLIAX_MAX_INTERFACES; interface_id++) {
-                tech_pvt = &amp;globals.CELLIAX_INTERFACES[interface_id];
</del><ins>+        for (interface_id = 0; interface_id &lt; GSMOPEN_MAX_INTERFACES; interface_id++) {
+                tech_pvt = &amp;globals.GSMOPEN_INTERFACES[interface_id];
</ins><span class="cx"> 
</span><del>-                if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
</del><ins>+                if (strlen(globals.GSMOPEN_INTERFACES[interface_id].name)) {
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-                        //alsa_shutdown(&amp;globals.CELLIAX_INTERFACES[interface_id]);
-                        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
</del><ins>+                        //alsa_shutdown(&amp;globals.GSMOPEN_INTERFACES[interface_id]);
+                        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
</ins><span class="cx"> #ifdef WIN32
</span><del>-                                switch_file_write(tech_pvt-&gt;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, &amp;howmany);        // let's the controldev_thread die
</del><ins>+                                switch_file_write(tech_pvt-&gt;GSMopenHandles.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;CelliaxHandles.fdesc[1], &quot;sciutati&quot;, howmany);
</del><ins>+                                howmany = write(tech_pvt-&gt;GSMopenHandles.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">@@ -1830,26 +1830,26 @@
</span><span class="cx">                                 x--;
</span><span class="cx">                                 switch_yield(50000);
</span><span class="cx">                         }
</span><del>-                        if (globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread) {
-                                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_signaling_thread);
</del><ins>+                        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread) {
+                                switch_thread_join(&amp;status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_signaling_thread);
</ins><span class="cx">                         }
</span><del>-                        if (globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread) {
-                                switch_thread_join(&amp;status, globals.CELLIAX_INTERFACES[interface_id].celliax_api_thread);
</del><ins>+                        if (globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread) {
+                                switch_thread_join(&amp;status, globals.GSMOPEN_INTERFACES[interface_id].gsmopen_api_thread);
</ins><span class="cx">                         }
</span><span class="cx"> #ifndef WIN32
</span><del>-                        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]);
</del><ins>+                        WARNINGA(&quot;SHUTDOWN interface_id=%d\n&quot;, GSMOPEN_P_LOG, interface_id);
+                        shutdown(tech_pvt-&gt;audiogsmopenpipe[0], 2);
+                        close(tech_pvt-&gt;audiogsmopenpipe[0]);
+                        shutdown(tech_pvt-&gt;audiogsmopenpipe[1], 2);
+                        close(tech_pvt-&gt;audiogsmopenpipe[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;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]);
</del><ins>+                        shutdown(tech_pvt-&gt;GSMopenHandles.fdesc[0], 2);
+                        close(tech_pvt-&gt;GSMopenHandles.fdesc[0]);
+                        shutdown(tech_pvt-&gt;GSMopenHandles.fdesc[1], 2);
+                        close(tech_pvt-&gt;GSMopenHandles.fdesc[1]);
</ins><span class="cx"> #endif /* WIN32 */
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -1867,9 +1867,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void *SWITCH_THREAD_FUNC celliax_do_celliaxapi_thread(switch_thread_t *thread, void *obj)
</del><ins>+void *SWITCH_THREAD_FUNC gsmopen_do_gsmopenapi_thread(switch_thread_t *thread, void *obj)
</ins><span class="cx"> {
</span><del>-        return celliax_do_celliaxapi_thread_func(obj);
</del><ins>+        return gsmopen_do_gsmopenapi_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">@@ -1885,18 +1885,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_CELLIAX(&quot;received DTMF %c on channel %s\n&quot;, CELLIAX_P_LOG, dtmf.digit, switch_channel_get_name(channel));
</del><ins>+                        DEBUGA_GSMOPEN(&quot;received DTMF %c on channel %s\n&quot;, GSMOPEN_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_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));
</del><ins>+                        DEBUGA_GSMOPEN
+                                (&quot;received a DTMF on channel %s, but we're BRIDGED, so let's NOT relay it out of band\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG, value[0]);
</del><ins>+                WARNINGA(&quot;received %c DTMF, but no channel?\n&quot;, GSMOPEN_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">@@ -1908,34 +1908,34 @@
</span><span class="cx">         switch_core_session_t *session = NULL;
</span><span class="cx">         switch_channel_t *channel = NULL;
</span><span class="cx"> 
</span><del>-        if ((session = switch_core_session_request(celliax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
-                DEBUGA_CELLIAX(&quot;2 SESSION_REQUEST %s\n&quot;, CELLIAX_P_LOG, switch_core_session_get_uuid(session));
</del><ins>+        if ((session = switch_core_session_request(gsmopen_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
+                DEBUGA_GSMOPEN(&quot;2 SESSION_REQUEST %s\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Doh! no channel?\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                         switch_core_session_destroy(&amp;session);
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><del>-                if (celliax_tech_init(tech_pvt, session) != SWITCH_STATUS_SUCCESS) {
-                        ERRORA(&quot;Doh! no tech_init?\n&quot;, CELLIAX_P_LOG);
</del><ins>+                if (gsmopen_tech_init(tech_pvt, session) != SWITCH_STATUS_SUCCESS) {
+                        ERRORA(&quot;Doh! no tech_init?\n&quot;, GSMOPEN_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"> 
</span><span class="cx">                 if ((tech_pvt-&gt;caller_profile =
</span><del>-                         switch_caller_profile_new(switch_core_session_get_pool(session), &quot;celliax&quot;,
</del><ins>+                         switch_caller_profile_new(switch_core_session_get_pool(session), &quot;gsmopen&quot;,
</ins><span class="cx">                                                                            tech_pvt-&gt;dialplan, tech_pvt-&gt;callid_name,
</span><del>-                                                                           tech_pvt-&gt;callid_number, NULL, NULL, NULL, NULL, &quot;mod_celliax&quot;, tech_pvt-&gt;context, tech_pvt-&gt;destination)) != 0) {
</del><ins>+                                                                           tech_pvt-&gt;callid_number, NULL, NULL, NULL, NULL, &quot;mod_gsmopen&quot;, tech_pvt-&gt;context, tech_pvt-&gt;destination)) != 0) {
</ins><span class="cx">                         char name[128];
</span><del>-                        //switch_snprintf(name, sizeof(name), &quot;celliax/%s/%s&quot;, tech_pvt-&gt;name, tech_pvt-&gt;caller_profile-&gt;destination_number);
-                        switch_snprintf(name, sizeof(name), &quot;celliax/%s&quot;, tech_pvt-&gt;name);
</del><ins>+                        //switch_snprintf(name, sizeof(name), &quot;gsmopen/%s/%s&quot;, tech_pvt-&gt;name, tech_pvt-&gt;caller_profile-&gt;destination_number);
+                        switch_snprintf(name, sizeof(name), &quot;gsmopen/%s&quot;, tech_pvt-&gt;name);
</ins><span class="cx">                         switch_channel_set_name(channel, name);
</span><span class="cx">                         switch_channel_set_caller_profile(channel, tech_pvt-&gt;caller_profile);
</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;, CELLIAX_P_LOG);
</del><ins>+                        ERRORA(&quot;Error spawning thread\n&quot;, GSMOPEN_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">@@ -1944,7 +1944,7 @@
</span><span class="cx">                 //switch_channel_mark_answered(channel);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;new_inbound_channel\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;new_inbound_channel\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1957,20 +1957,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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, GSMOPEN_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_CELLIAX(&quot;celliax_call: REMOTE PARTY RINGING\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;gsmopen_call: REMOTE PARTY RINGING\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_core_session_rwunlock(session);
</span><span class="lines">@@ -1987,7 +1987,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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n\n\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">                 goto done;
</span><span class="cx">         }
</span><span class="lines">@@ -1995,15 +1995,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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, GSMOPEN_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_CELLIAX(&quot;celliax_call: REMOTE PARTY EARLY MEDIA\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;gsmopen_call: REMOTE PARTY EARLY MEDIA\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 //TODO: kill the bastard
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2021,37 +2021,37 @@
</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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No session???\n&quot;, GSMOPEN_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;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, GSMOPEN_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 = CELLIAX_STATE_UP;
-                tech_pvt-&gt;interface_state = CELLIAX_STATE_UP;
-                //DEBUGA_CELLIAX(&quot;celliax_call: %s, answered\n&quot;, CELLIAX_P_LOG, id);
</del><ins>+                tech_pvt-&gt;phone_callflow = GSMOPEN_STATE_UP;
+                tech_pvt-&gt;interface_state = GSMOPEN_STATE_UP;
+                //DEBUGA_GSMOPEN(&quot;gsmopen_call: %s, answered\n&quot;, GSMOPEN_P_LOG, id);
</ins><span class="cx">         } else {
</span><del>-                ERRORA(&quot;No channel???\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;No channel???\n&quot;, GSMOPEN_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_CELLIAX(&quot;outbound_channel_answered!\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;outbound_channel_answered!\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-private_t *find_available_celliax_interface_rr(private_t * tech_pvt_calling)
</del><ins>+private_t *find_available_gsmopen_interface_rr(private_t * tech_pvt_calling)
</ins><span class="cx"> {
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">         int i;
</span><del>-        //int num_interfaces = CELLIAX_MAX_INTERFACES; 
</del><ins>+        //int num_interfaces = GSMOPEN_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">@@ -2060,35 +2060,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; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+        for (i = 0; i &lt; GSMOPEN_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; 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;
</del><ins>+                //interface_id = interface_id &lt; GSMOPEN_MAX_INTERFACES ? interface_id : interface_id - GSMOPEN_MAX_INTERFACES + 1;
+                globals.next_interface = interface_id + 1 &lt; GSMOPEN_MAX_INTERFACES ? interface_id + 1 : 0;
</ins><span class="cx"> 
</span><del>-                if (strlen(globals.CELLIAX_INTERFACES[interface_id].name)) {
-                        int celliax_state = 0;
</del><ins>+                if (strlen(globals.GSMOPEN_INTERFACES[interface_id].name)) {
+                        int gsmopen_state = 0;
</ins><span class="cx"> 
</span><del>-                        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
</del><ins>+                        tech_pvt = &amp;globals.GSMOPEN_INTERFACES[interface_id];
+                        gsmopen_state = tech_pvt-&gt;interface_state;
+                        //DEBUGA_GSMOPEN(&quot;gsmopen interface: %d, name: %s, state: %d\n&quot;, GSMOPEN_P_LOG, interface_id, globals.GSMOPEN_INTERFACES[interface_id].name, gsmopen_state);
+                        if ((tech_pvt_calling ? strcmp(tech_pvt-&gt;gsmopen_user, tech_pvt_calling-&gt;gsmopen_user) : 1)
+                                &amp;&amp; (GSMOPEN_STATE_DOWN == gsmopen_state || 0 == gsmopen_state) &amp;&amp; (tech_pvt-&gt;phone_callflow == CALLFLOW_STATUS_FINISHED
</ins><span class="cx">                                                                                                                                                                    || 0 == tech_pvt-&gt;phone_callflow)) {
</span><del>-                                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,
</del><ins>+                                DEBUGA_GSMOPEN(&quot;returning as available gsmopen interface name: %s, state: %d callflow: %d\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name, gsmopen_state,
</ins><span class="cx">                                                            tech_pvt-&gt;phone_callflow);
</span><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 = CELLIAX_STATE_SELECTED;
</del><ins>+                                        tech_pvt-&gt;interface_state = GSMOPEN_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_CELLIAX(&quot;GSM interface: %d blank!! A hole here means we cannot hunt the last interface.\n&quot;, CELLIAX_P_LOG, interface_id);
</del><ins>+                //DEBUGA_GSMOPEN(&quot;GSM interface: %d blank!! A hole here means we cannot hunt the last interface.\n&quot;, GSMOPEN_P_LOG, interface_id);
</ins><span class="cx">                 //}
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2123,20 +2123,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; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
</ins><span class="cx">                         next_flag_char = i == globals.next_interface ? '*' : ' ';
</span><span class="cx"> 
</span><del>-                        if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</del><ins>+                        if (strlen(globals.GSMOPEN_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.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);
</del><ins>+                                                                           i, globals.GSMOPEN_INTERFACES[i].name,
+                                                                           globals.GSMOPEN_INTERFACES[i].ib_failed_calls,
+                                                                           globals.GSMOPEN_INTERFACES[i].ib_calls,
+                                                                           globals.GSMOPEN_INTERFACES[i].ob_failed_calls,
+                                                                           globals.GSMOPEN_INTERFACES[i].ob_calls,
+                                                                           interface_status[globals.GSMOPEN_INTERFACES[i].interface_state],
+                                                                           phone_callflow[globals.GSMOPEN_INTERFACES[i].phone_callflow], globals.GSMOPEN_INTERFACES[i].session_uuid_str);
</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">@@ -2149,12 +2149,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; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+                        for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_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.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);
</del><ins>+                                if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                                        &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[1], strlen(argv[1])) == 0)) {
+                                        globals.sk_console = &amp;globals.GSMOPEN_INTERFACES[i];
+                                        stream-&gt;write_function(stream, &quot;sk console is now: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.GSMOPEN_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">@@ -2162,7 +2162,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 Celliax interface with name='%s' was not found\n&quot;, argv[1]);
</del><ins>+                                stream-&gt;write_function(stream, &quot;ERROR: A GSMopen 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">@@ -2201,7 +2201,7 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SWITCH_STANDARD_API(celliax_function)
</del><ins>+SWITCH_STANDARD_API(gsmopen_function)
</ins><span class="cx"> {
</span><span class="cx">         char *mycmd = NULL, *argv[10] = { 0 };
</span><span class="cx">         int argc = 0;
</span><span class="lines">@@ -2212,12 +2212,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;, CELLIAX_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, GSMOPEN_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;, CELLIAX_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, GSMOPEN_SYNTAX);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2225,27 +2225,27 @@
</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; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_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.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);
</del><ins>+                        if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                                &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+                                tech_pvt = &amp;globals.GSMOPEN_INTERFACES[i];
+                                stream-&gt;write_function(stream, &quot;Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.GSMOPEN_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 Celliax interface with name='%s' was not found\n&quot;, argv[0]);
</del><ins>+                        stream-&gt;write_function(stream, &quot;ERROR: A GSMopen 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="cx">                 } else {
</span><del>-                        //celliax_signaling_write(tech_pvt, (char *) &amp;cmd[strlen(argv[0]) + 1]);
</del><ins>+                        //gsmopen_signaling_write(tech_pvt, (char *) &amp;cmd[strlen(argv[0]) + 1]);
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, CELLIAX_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, GSMOPEN_SYNTAX);
</ins><span class="cx">         }
</span><span class="cx">   end:
</span><span class="cx">         switch_safe_free(mycmd);
</span><span class="lines">@@ -2254,9 +2254,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif //0
</span><span class="cx"> 
</span><del>-int celliax_transfer(private_t * tech_pvt, char *id, char *value)
</del><ins>+int gsmopen_transfer(private_t * tech_pvt, char *id, char *value)
</ins><span class="cx"> {
</span><del>-        char msg_to_celliax[1024];
</del><ins>+        char msg_to_gsmopen[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">@@ -2265,17 +2265,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; CELLIAX_MAX_INTERFACES; i++) {
-                if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</del><ins>+        for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
+                if (strlen(globals.GSMOPEN_INTERFACES[i].name)) {
</ins><span class="cx"> 
</span><del>-                        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);
</del><ins>+                        giovatech = &amp;globals.GSMOPEN_INTERFACES[i];
+                        //NOTICA(&quot;gsmopen interface: %d, name: %s, state: %d, value=%s, giovatech-&gt;callid_number=%s, giovatech-&gt;gsmopen_user=%s\n&quot;, GSMOPEN_P_LOG, i, giovatech-&gt;name, giovatech-&gt;interface_state, value, giovatech-&gt;callid_number, giovatech-&gt;gsmopen_user);
</ins><span class="cx">                         //FIXME check a timestamp here
</span><del>-                        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
</del><ins>+                        if (strlen(giovatech-&gt;gsmopen_call_id) &amp;&amp; (giovatech-&gt;interface_state != GSMOPEN_STATE_DOWN) &amp;&amp; (!strcmp(giovatech-&gt;gsmopen_user, tech_pvt-&gt;gsmopen_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_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,
</del><ins>+                                DEBUGA_GSMOPEN
+                                        (&quot;FOUND  (name=%s, giovatech-&gt;interface_state=%d != GSMOPEN_STATE_DOWN) &amp;&amp; (giovatech-&gt;gsmopen_user=%s == tech_pvt-&gt;gsmopen_user=%s) &amp;&amp; (giovatech-&gt;callid_number=%s == value=%s)\n&quot;,
+                                         GSMOPEN_P_LOG, giovatech-&gt;name, giovatech-&gt;interface_state, giovatech-&gt;gsmopen_user, tech_pvt-&gt;gsmopen_user, giovatech-&gt;callid_number,
</ins><span class="cx">                                          value)
</span><span class="cx">                                         break;
</span><span class="cx">                         }
</span><span class="lines">@@ -2284,16 +2284,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_celliax, &quot;ALTER CALL %s END HANGUP&quot;, id);
-                //celliax_signaling_write(tech_pvt, msg_to_celliax);
</del><ins>+                //sprintf(msg_to_gsmopen, &quot;ALTER CALL %s END HANGUP&quot;, id);
+                //gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
</ins><span class="cx">                 switch_mutex_unlock(globals.mutex);
</span><span class="cx">                 return 0;
</span><span class="cx">         }
</span><del>-        DEBUGA_CELLIAX(&quot;NOT FOUND\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_GSMOPEN(&quot;NOT FOUND\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><del>-        if (!tech_pvt || !tech_pvt-&gt;celliax_call_id || !strlen(tech_pvt-&gt;celliax_call_id)) {
</del><ins>+        if (!tech_pvt || !tech_pvt-&gt;gsmopen_call_id || !strlen(tech_pvt-&gt;gsmopen_call_id)) {
</ins><span class="cx">                 /* we are not inside an active call */
</span><del>-                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;);
</del><ins>+                DEBUGA_GSMOPEN(&quot;We're NO MORE in a call now %s\n&quot;, GSMOPEN_P_LOG, (tech_pvt &amp;&amp; tech_pvt-&gt;gsmopen_call_id) ? tech_pvt-&gt;gsmopen_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">@@ -2305,21 +2305,21 @@
</span><span class="cx">                   &lt;- CALL 288 CAN_TRANSFER test2 TRUE
</span><span class="cx">                  **********************************/
</span><span class="cx"> 
</span><del>-                private_t *available_celliax_interface = NULL;
</del><ins>+                private_t *available_gsmopen_interface = NULL;
</ins><span class="cx"> 
</span><span class="cx">                 gettimeofday(&amp;timenow, NULL);
</span><del>-                for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
-                        if (strlen(globals.CELLIAX_INTERFACES[i].name)) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_MAX_INTERFACES; i++) {
+                        if (strlen(globals.GSMOPEN_INTERFACES[i].name)) {
</ins><span class="cx"> 
</span><del>-                                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);
</del><ins>+                                giovatech = &amp;globals.GSMOPEN_INTERFACES[i];
+                                //NOTICA(&quot;gsmopen interface: %d, name: %s, state: %d, value=%s, giovatech-&gt;callid_number=%s, giovatech-&gt;gsmopen_user=%s\n&quot;, GSMOPEN_P_LOG, i, giovatech-&gt;name, giovatech-&gt;interface_state, value, giovatech-&gt;callid_number, giovatech-&gt;gsmopen_user);
</ins><span class="cx">                                 //FIXME check a timestamp here
</span><del>-                                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
</del><ins>+                                if (strlen(giovatech-&gt;gsmopen_transfer_call_id) &amp;&amp; (giovatech-&gt;interface_state != GSMOPEN_STATE_DOWN) &amp;&amp; (!strcmp(giovatech-&gt;gsmopen_user, tech_pvt-&gt;gsmopen_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_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)
</del><ins>+                                        DEBUGA_GSMOPEN
+                                                (&quot;FOUND  (name=%s, giovatech-&gt;interface_state=%d != GSMOPEN_STATE_DOWN) &amp;&amp; (giovatech-&gt;gsmopen_user=%s == tech_pvt-&gt;gsmopen_user=%s) &amp;&amp; (giovatech-&gt;transfer_callid_number=%s == value=%s)\n&quot;,
+                                                 GSMOPEN_P_LOG, giovatech-&gt;name, giovatech-&gt;interface_state,
+                                                 giovatech-&gt;gsmopen_user, tech_pvt-&gt;gsmopen_user, giovatech-&gt;transfer_callid_number, value)
</ins><span class="cx">                                                 break;
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -2327,105 +2327,105 @@
</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_celliax, &quot;ALTER CALL %s END HANGUP&quot;, id);
-                        //celliax_signaling_write(tech_pvt, msg_to_celliax);
</del><ins>+                        //sprintf(msg_to_gsmopen, &quot;ALTER CALL %s END HANGUP&quot;, id);
+                        //gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
</ins><span class="cx">                         switch_mutex_unlock(globals.mutex);
</span><span class="cx">                         return 0;
</span><span class="cx">                 }
</span><del>-                DEBUGA_CELLIAX(&quot;NOT FOUND\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_GSMOPEN(&quot;NOT FOUND\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><del>-                available_celliax_interface = find_available_celliax_interface_rr(tech_pvt);
-                if (available_celliax_interface) {
-                        /* there is a celliax interface idle, let's transfer the call to it */
</del><ins>+                available_gsmopen_interface = find_available_gsmopen_interface_rr(tech_pvt);
+                if (available_gsmopen_interface) {
+                        /* there is a gsmopen interface idle, let's transfer the call to it */
</ins><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;celliax_transfer_call_id, id, sizeof(tech_pvt-&gt;celliax_transfer_call_id) - 1);
</del><ins>+                        switch_copy_string(tech_pvt-&gt;gsmopen_transfer_call_id, id, sizeof(tech_pvt-&gt;gsmopen_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_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);
</del><ins>+                        DEBUGA_GSMOPEN
+                                (&quot;Let's transfer the gsmopen_call %s to %s interface (with gsmopen_user: %s), because we are already in a gsmopen call(%s)\n&quot;,
+                                 GSMOPEN_P_LOG, tech_pvt-&gt;gsmopen_call_id, available_gsmopen_interface-&gt;name, available_gsmopen_interface-&gt;gsmopen_user, id);
</ins><span class="cx"> 
</span><span class="cx">                         //FIXME why this? the inbound call will come, eventually, on that other interface
</span><del>-                        //available_celliax_interface-&gt;ib_calls++;
</del><ins>+                        //available_gsmopen_interface-&gt;ib_calls++;
</ins><span class="cx"> 
</span><del>-                        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
</del><ins>+                        sprintf(msg_to_gsmopen, &quot;ALTER CALL %s TRANSFER %s&quot;, id, available_gsmopen_interface-&gt;gsmopen_user);
+                        //gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
+                        if (tech_pvt-&gt;interface_state == GSMOPEN_STATE_SELECTED) {
+                                tech_pvt-&gt;interface_state = GSMOPEN_STATE_IDLE;        //we marked it GSMOPEN_STATE_SELECTED just in case it has to make an outbound call
</ins><span class="cx">                         }
</span><span class="cx">                 } else {
</span><del>-                        /* no celliax interfaces idle, do nothing */
-                        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);
</del><ins>+                        /* no gsmopen interfaces idle, do nothing */
+                        DEBUGA_GSMOPEN
+                                (&quot;Not answering the gsmopen_call %s, because we are already in a gsmopen call(%s) and not transferring, because no other gsmopen interfaces are available\n&quot;,
+                                 GSMOPEN_P_LOG, id, tech_pvt-&gt;gsmopen_call_id);
+                        sprintf(msg_to_gsmopen, &quot;ALTER CALL %s END HANGUP&quot;, id);
+                        //gsmopen_signaling_write(tech_pvt, msg_to_gsmopen);
</ins><span class="cx">                 }
</span><span class="cx">                 switch_sleep(10000);
</span><del>-                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);
</del><ins>+                DEBUGA_GSMOPEN
+                        (&quot;We have NOT answered a GSM RING from gsmopen_call %s, because we are already in a gsmopen call (%s)\n&quot;,
+                         GSMOPEN_P_LOG, id, tech_pvt-&gt;gsmopen_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_celliaxapi_thread_func(void *obj)
</del><ins>+void *gsmopen_do_gsmopenapi_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(CelliaxHandles)) 
</del><ins>+        //if (gsmopen_present(GSMopenHandles)) 
</ins><span class="cx">         if (1) {
</span><span class="cx">                 while (running) {
</span><span class="cx">                         int res;
</span><del>-                        //celliax_sleep(1000000); //1 sec
-                        //DEBUGA_CELLIAX(&quot;ciao!\n&quot;, CELLIAX_P_LOG);
-                        res = celliax_serial_read(tech_pvt);
</del><ins>+                        //gsmopen_sleep(1000000); //1 sec
+                        //DEBUGA_GSMOPEN(&quot;ciao!\n&quot;, GSMOPEN_P_LOG);
+                        res = gsmopen_serial_read(tech_pvt);
</ins><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;, CELLIAX_P_LOG, tech_pvt-&gt;controldevice_name);
</del><ins>+                                ERRORA(&quot;gsmopen_serial_monitor failed, declaring %s dead\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;controldevice_name);
</ins><span class="cx">                                 switch_sleep(1000000);
</span><del>-                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == CELLIAX_STATE_RING &amp;&amp; tech_pvt-&gt;phone_callflow != CALLFLOW_CALL_HANGUP_REQUESTED ) {
-                                WARNINGA(&quot;INCOMING RING\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == GSMOPEN_STATE_RING &amp;&amp; tech_pvt-&gt;phone_callflow != CALLFLOW_CALL_HANGUP_REQUESTED ) {
+                                WARNINGA(&quot;INCOMING RING\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx"> 
</span><del>-                                celliax_ring(tech_pvt);
</del><ins>+                                gsmopen_ring(tech_pvt);
</ins><span class="cx"> 
</span><del>-                                //FIXME celliax_answer(tech_pvt);
</del><ins>+                                //FIXME gsmopen_answer(tech_pvt);
</ins><span class="cx">                                 //new_inbound_channel(tech_pvt);
</span><del>-                                //FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
-                                //FIXME ERRORA(&quot;celliax_new failed! BAD BAD BAD\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                //FIXME if (!gsmopen_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
+                                //FIXME ERRORA(&quot;gsmopen_new failed! BAD BAD BAD\n&quot;, GSMOPEN_P_LOG);
</ins><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 == CELLIAX_STATE_DIALING) {
-                                WARNINGA(&quot;WE'RE DIALING, let's take the earlymedia\n&quot;, CELLIAX_P_LOG);
</del><ins>+                        } else if (tech_pvt-&gt;controldevprotocol != PROTOCOL_NO_SERIAL &amp;&amp; tech_pvt-&gt;interface_state == GSMOPEN_STATE_DIALING) {
+                                WARNINGA(&quot;WE'RE DIALING, let's take the earlymedia\n&quot;, GSMOPEN_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><del>-                                //FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
-                                //FIXME ERRORA(&quot;celliax_new failed! BAD BAD BAD\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                //FIXME if (!gsmopen_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
+                                //FIXME ERRORA(&quot;gsmopen_new failed! BAD BAD BAD\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 //FIXME }
</span><span class="cx"> 
</span><span class="cx"> 
</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;, CELLIAX_P_LOG);
</del><ins>+                                WARNINGA(&quot;REMOTE PARTY ANSWERED\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 outbound_channel_answered(tech_pvt);
</span><span class="cx">                                 //new_inbound_channel(tech_pvt);
</span><del>-                                //FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
-                                //FIXME ERRORA(&quot;celliax_new failed! BAD BAD BAD\n&quot;, CELLIAX_P_LOG);
</del><ins>+                                //FIXME if (!gsmopen_new(p, AST_STATE_RING, tech_pvt-&gt;context)) {
+                                //FIXME ERRORA(&quot;gsmopen_new failed! BAD BAD BAD\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                                 //FIXME }
</span><span class="cx">                         }
</span><span class="cx">                         usleep(100);                //give other threads a chance
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                ERRORA(&quot;GSM is not running, maybe crashed. Please run/restart GSM and relaunch Celliax\n&quot;, CELLIAX_P_LOG);
</del><ins>+                ERRORA(&quot;GSM is not running, maybe crashed. Please run/restart GSM and relaunch GSMopen\n&quot;, GSMOPEN_P_LOG);
</ins><span class="cx">                 running = 0;
</span><span class="cx">                 return NULL;
</span><span class="cx">         }
</span><span class="lines">@@ -2439,7 +2439,7 @@
</span><span class="cx">         char sms_buf[512];
</span><span class="cx">         switch_event_t *event;
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;received SMS &gt;&gt;&gt;%s&lt;&lt;&lt; on interface %s\n&quot;, CELLIAX_P_LOG, value, tech_pvt-&gt;name);
</del><ins>+        DEBUGA_GSMOPEN(&quot;received SMS &gt;&gt;&gt;%s&lt;&lt;&lt; on interface %s\n&quot;, GSMOPEN_P_LOG, value, tech_pvt-&gt;name);
</ins><span class="cx"> 
</span><span class="cx">         switch_snprintf(sms_buf, sizeof(sms_buf), &quot;incoming SMS on %s\n&quot;, tech_pvt-&gt;name);
</span><span class="cx"> 
</span><span class="lines">@@ -2479,11 +2479,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; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_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.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];
</del><ins>+                        if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                                &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+                                tech_pvt = &amp;globals.GSMOPEN_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">@@ -2491,13 +2491,13 @@
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx">                 if (!found) {
</span><del>-                        stream-&gt;write_function(stream, &quot;ERROR: A Celliax interface with name='%s' was not found\n&quot;, argv[0]);
</del><ins>+                        stream-&gt;write_function(stream, &quot;ERROR: A GSMopen 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="cx">                 } else {
</span><del>-                        //celliax_sendsms(tech_pvt, (char *) argv[1], (char *) argv[2]);
-                        NOTICA(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n&quot;, CELLIAX_P_LOG, MDL_CHAT_PROTO, tech_pvt-&gt;name, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil(argv[2]), tech_pvt-&gt;name);
</del><ins>+                        //gsmopen_sendsms(tech_pvt, (char *) argv[1], (char *) argv[2]);
+                        NOTICA(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n&quot;, GSMOPEN_P_LOG, MDL_CHAT_PROTO, tech_pvt-&gt;name, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil(argv[2]), tech_pvt-&gt;name);
</ins><span class="cx"> 
</span><span class="cx">                         chat_send(MDL_CHAT_PROTO, tech_pvt-&gt;name, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil(argv[2]), NULL, tech_pvt-&gt;name);
</span><span class="cx">                 }
</span><span class="lines">@@ -2518,8 +2518,8 @@
</span><span class="cx">         switch_core_session_t *session = NULL;
</span><span class="cx">         int event_sent_to_esl = 0;
</span><span class="cx"> 
</span><del>-        DEBUGA_CELLIAX(&quot;received SMS on interface %s: %s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, tech_pvt-&gt;sms_message);
-        DEBUGA_CELLIAX(&quot;received SMS on interface %s: DATE=%s, SENDER=%s, BODY=%s\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name, tech_pvt-&gt;sms_date, tech_pvt-&gt;sms_sender, tech_pvt-&gt;sms_body);
</del><ins>+        DEBUGA_GSMOPEN(&quot;received SMS on interface %s: %s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name, tech_pvt-&gt;sms_message);
+        DEBUGA_GSMOPEN(&quot;received SMS on interface %s: DATE=%s, SENDER=%s, BODY=%s\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name, tech_pvt-&gt;sms_date, tech_pvt-&gt;sms_sender, tech_pvt-&gt;sms_body);
</ins><span class="cx"> 
</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="lines">@@ -2547,7 +2547,7 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">         }else{
</span><del>-                ERRORA(&quot;cannot create event on interface %s. WHY?????\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+                ERRORA(&quot;cannot create event on interface %s. WHY?????\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if(!event_sent_to_esl){
</span><span class="lines">@@ -2570,7 +2570,7 @@
</span><span class="cx">                         }
</span><span class="cx">                         switch_event_fire(&amp;event);
</span><span class="cx">                 } else{
</span><del>-                        ERRORA(&quot;cannot create event on interface %s. WHY?????\n&quot;, CELLIAX_P_LOG, tech_pvt-&gt;name);
</del><ins>+                        ERRORA(&quot;cannot create event on interface %s. WHY?????\n&quot;, GSMOPEN_P_LOG, tech_pvt-&gt;name);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -2599,22 +2599,22 @@
</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;, CELLIAX_CHAT_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, GSMOPEN_CHAT_SYNTAX);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (argc &lt; 3) {
</span><del>-                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, CELLIAX_CHAT_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, GSMOPEN_CHAT_SYNTAX);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (argv[0]) {
</span><del>-                for (i = 0; !found &amp;&amp; i &lt; CELLIAX_MAX_INTERFACES; i++) {
</del><ins>+                for (i = 0; !found &amp;&amp; i &lt; GSMOPEN_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.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);
</del><ins>+                        if (strlen(globals.GSMOPEN_INTERFACES[i].name)
+                                        &amp;&amp; (strncmp(globals.GSMOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
+                                tech_pvt = &amp;globals.GSMOPEN_INTERFACES[i];
+                                stream-&gt;write_function(stream, &quot;Using interface: globals.GSMOPEN_INTERFACES[%d].name=|||%s|||\n&quot;, i, globals.GSMOPEN_INTERFACES[i].name);
</ins><span class="cx">                                 found = 1;
</span><span class="cx">                                 break;
</span><span class="cx">                         }
</span><span class="lines">@@ -2629,17 +2629,17 @@
</span><span class="cx">                         //chat_send(p*roto, const char *from, const char *to, const char *subject, const char *body, const char *type, const char *hint);
</span><span class="cx">                         //chat_send(MDL_CHAT_PROTO, tech_pvt-&gt;skype_user, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil((char *) &amp;cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), NULL, hint);
</span><span class="cx"> 
</span><del>-                        NOTICA(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n&quot;, CELLIAX_P_LOG, MDL_CHAT_PROTO, tech_pvt-&gt;skype_user, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil((char *) &amp;cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), tech_pvt-&gt;name);
</del><ins>+                        NOTICA(&quot;chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n&quot;, GSMOPEN_P_LOG, MDL_CHAT_PROTO, tech_pvt-&gt;skype_user, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil((char *) &amp;cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), tech_pvt-&gt;name);
</ins><span class="cx"> 
</span><span class="cx">                         chat_send(MDL_CHAT_PROTO, tech_pvt-&gt;skype_user, argv[1], &quot;SIMPLE MESSAGE&quot;, switch_str_nil((char *) &amp;cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), NULL, tech_pvt-&gt;name);
</span><span class="cx"> 
</span><del>-                        //NOTICA(&quot;TEXT is: %s\n&quot;, CELLIAX_P_LOG, (char *) &amp;cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1] );
</del><ins>+                        //NOTICA(&quot;TEXT is: %s\n&quot;, GSMOPEN_P_LOG, (char *) &amp;cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1] );
</ins><span class="cx">                         //snprintf(skype_msg, sizeof(skype_msg), &quot;CHAT CREATE %s&quot;, argv[1]);
</span><span class="cx">                         //skypiax_signaling_write(tech_pvt, skype_msg);
</span><span class="cx">                         //switch_sleep(100);
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, CELLIAX_CHAT_SYNTAX);
</del><ins>+                stream-&gt;write_function(stream, &quot;ERROR, usage: %s&quot;, GSMOPEN_CHAT_SYNTAX);
</ins><span class="cx">                 goto end;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>