<!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][16161] </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=16161">16161</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2010-01-05 14:37:16 -0600 (Tue, 05 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>add support for user level auth to esl and fs_cli</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunklibseslfs_clic">freeswitch/trunk/libs/esl/fs_cli.c</a></li>
<li><a href="#freeswitchtrunklibsesljavaesl_wrapcpp">freeswitch/trunk/libs/esl/java/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibsesljavaorgfreeswitcheslESLconnectionjava">freeswitch/trunk/libs/esl/java/org/freeswitch/esl/ESLconnection.java</a></li>
<li><a href="#freeswitchtrunklibsesljavaorgfreeswitchesleslJNIjava">freeswitch/trunk/libs/esl/java/org/freeswitch/esl/eslJNI.java</a></li>
<li><a href="#freeswitchtrunklibseslluaesl_wrapcpp">freeswitch/trunk/libs/esl/lua/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibseslmanagedESLPINVOKEcs">freeswitch/trunk/libs/esl/managed/ESLPINVOKE.cs</a></li>
<li><a href="#freeswitchtrunklibseslmanagedESLconnectioncs">freeswitch/trunk/libs/esl/managed/ESLconnection.cs</a></li>
<li><a href="#freeswitchtrunklibseslmanagedesl_wrapcpp">freeswitch/trunk/libs/esl/managed/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibseslperlesl_wrapcpp">freeswitch/trunk/libs/esl/perl/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibseslphpESLphp">freeswitch/trunk/libs/esl/php/ESL.php</a></li>
<li><a href="#freeswitchtrunklibseslphpesl_wrapcpp">freeswitch/trunk/libs/esl/php/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibseslpythonesl_wrapcpp">freeswitch/trunk/libs/esl/python/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibseslrubyesl_wrapcpp">freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp</a></li>
<li><a href="#freeswitchtrunklibseslsrceslc">freeswitch/trunk/libs/esl/src/esl.c</a></li>
<li><a href="#freeswitchtrunklibseslsrcesl_oopcpp">freeswitch/trunk/libs/esl/src/esl_oop.cpp</a></li>
<li><a href="#freeswitchtrunklibseslsrcincludeeslh">freeswitch/trunk/libs/esl/src/include/esl.h</a></li>
<li><a href="#freeswitchtrunklibseslsrcincludeesl_ooph">freeswitch/trunk/libs/esl/src/include/esl_oop.h</a></li>
<li><a href="#freeswitchtrunklibsesltestclientc">freeswitch/trunk/libs/esl/testclient.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunklibseslfs_clic"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/fs_cli.c (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/fs_cli.c        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/fs_cli.c        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">         char name[128];
</span><span class="cx">         char host[128];
</span><span class="cx">         esl_port_t port;
</span><ins>+        char user[256];
</ins><span class="cx">         char pass[128];
</span><span class="cx">         int debug;
</span><span class="cx">         const char *console_fnkeys[12];
</span><span class="lines">@@ -559,6 +560,7 @@
</span><span class="cx">         printf(&quot;  -?,-h --help                    Usage Information\n&quot;);
</span><span class="cx">         printf(&quot;  -H, --host=hostname             Host to connect\n&quot;);
</span><span class="cx">         printf(&quot;  -P, --port=port                 Port to connect (1 - 65535)\n&quot;);
</span><ins>+        printf(&quot;  -u, --user=user@domain          user@domain\n&quot;);
</ins><span class="cx">         printf(&quot;  -p, --password=password         Password\n&quot;);
</span><span class="cx">         printf(&quot;  -x, --execute=command           Execute Command and Exit\n&quot;);
</span><span class="cx">         printf(&quot;  -l, --loglevel=command          Log Level\n&quot;);
</span><span class="lines">@@ -699,11 +701,16 @@
</span><span class="cx">                 printf(&quot;Unknown command [%s]\n&quot;, cmd);
</span><span class="cx">         } else {
</span><span class="cx">                 char cmd_str[1024] = &quot;&quot;;
</span><del>-
</del><ins>+                const char *err = NULL;
+                
</ins><span class="cx">                 snprintf(cmd_str, sizeof(cmd_str), &quot;api %s\n\n&quot;, cmd);
</span><span class="cx">                 esl_send_recv(handle, cmd_str);
</span><del>-                if (handle-&gt;last_sr_event &amp;&amp; handle-&gt;last_sr_event-&gt;body) {
-                        printf(&quot;%s\n&quot;, handle-&gt;last_sr_event-&gt;body);
</del><ins>+                if (handle-&gt;last_sr_event) {
+                        if (handle-&gt;last_sr_event-&gt;body) {
+                                printf(&quot;%s\n&quot;, handle-&gt;last_sr_event-&gt;body);
+                        } else if ((err = esl_event_get_header(handle-&gt;last_sr_event, &quot;reply-text&quot;)) &amp;&amp; !strncasecmp(err, &quot;-err&quot;, 3)) {
+                                printf(&quot;Error: %s!\n&quot;, err + 4);
+                        }
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -958,6 +965,7 @@
</span><span class="cx">                 {&quot;help&quot;, 0, 0, 'h'},
</span><span class="cx">                 {&quot;host&quot;, 1, 0, 'H'},
</span><span class="cx">                 {&quot;port&quot;, 1, 0, 'P'},
</span><ins>+                {&quot;user&quot;, 1, 0, 'u'},
</ins><span class="cx">                 {&quot;password&quot;, 1, 0, 'p'},
</span><span class="cx">                 {&quot;debug&quot;, 1, 0, 'd'},
</span><span class="cx">                 {&quot;execute&quot;, 1, 0, 'x'},
</span><span class="lines">@@ -968,8 +976,10 @@
</span><span class="cx"> 
</span><span class="cx">         char temp_host[128];
</span><span class="cx">         int argv_host = 0;
</span><ins>+        char temp_user[256];
</ins><span class="cx">         char temp_pass[128];
</span><span class="cx">         int argv_pass = 0 ;
</span><ins>+        int argv_user = 0 ;
</ins><span class="cx">         int temp_port = 0;
</span><span class="cx">         int argv_port = 0;
</span><span class="cx">         int temp_log = -1;
</span><span class="lines">@@ -1000,7 +1010,7 @@
</span><span class="cx">         
</span><span class="cx">         for(;;) {
</span><span class="cx">                 int option_index = 0;
</span><del>-                opt = getopt_long(argc, argv, &quot;H:U:P:S:p:d:x:l:qh?&quot;, options, &amp;option_index);
</del><ins>+                opt = getopt_long(argc, argv, &quot;H:U:P:S:u:p:d:x:l:qh?&quot;, options, &amp;option_index);
</ins><span class="cx">                 if (opt == -1) break;
</span><span class="cx">                 switch (opt)
</span><span class="cx">                 {
</span><span class="lines">@@ -1017,6 +1027,10 @@
</span><span class="cx">                                         argv_error = 1;
</span><span class="cx">                                 }
</span><span class="cx">                                 break;
</span><ins>+                        case 'u':
+                                esl_set_string(temp_user, optarg);
+                                argv_user = 1;
+                                break;
</ins><span class="cx">                         case 'p':
</span><span class="cx">                                 esl_set_string(temp_pass, optarg);
</span><span class="cx">                                 argv_pass = 1;
</span><span class="lines">@@ -1078,6 +1092,8 @@
</span><span class="cx">                         
</span><span class="cx">                         if (!strcasecmp(var, &quot;host&quot;)) {
</span><span class="cx">                                 esl_set_string(profiles[pcount-1].host, val);
</span><ins>+                        } else if (!strcasecmp(var, &quot;user&quot;)) {
+                                esl_set_string(profiles[pcount-1].user, val);
</ins><span class="cx">                         } else if (!strcasecmp(var, &quot;password&quot;)) {
</span><span class="cx">                                 esl_set_string(profiles[pcount-1].pass, val);
</span><span class="cx">                         } else if (!strcasecmp(var, &quot;port&quot;)) {
</span><span class="lines">@@ -1130,6 +1146,11 @@
</span><span class="cx">         if (argv_port) {
</span><span class="cx">                 profile-&gt;port = (esl_port_t)temp_port;
</span><span class="cx">         }
</span><ins>+
+        if (argv_user) {
+                esl_set_string(profile-&gt;user, temp_user);
+        }
+
</ins><span class="cx">         if (argv_pass) {
</span><span class="cx">                 esl_set_string(profile-&gt;pass, temp_pass);
</span><span class="cx">         }
</span><span class="lines">@@ -1151,7 +1172,7 @@
</span><span class="cx">                 snprintf(prompt_str, sizeof(prompt_str), &quot;freeswitch@%s&gt; &quot;, profile-&gt;name);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (esl_connect(&amp;handle, profile-&gt;host, profile-&gt;port, profile-&gt;pass)) {
</del><ins>+        if (esl_connect(&amp;handle, profile-&gt;host, profile-&gt;port, profile-&gt;user, profile-&gt;pass)) {
</ins><span class="cx">                 esl_global_set_default_logger(7);
</span><span class="cx">                 esl_log(ESL_LOG_ERROR, &quot;Error Connecting [%s]\n&quot;, handle.err);
</span><span class="cx">                 if (!argv_exec) usage(argv[0]);
</span><span class="lines">@@ -1160,11 +1181,18 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         if (argv_exec){
</span><ins>+                const char *err = NULL;
+
</ins><span class="cx">                 snprintf(cmd_str, sizeof(cmd_str), &quot;api %s\n\n&quot;, argv_command);
</span><span class="cx">                 esl_send_recv(&amp;handle, cmd_str);
</span><del>-                if (handle.last_sr_event &amp;&amp; handle.last_sr_event-&gt;body) {
-                        printf(&quot;%s\n&quot;, handle.last_sr_event-&gt;body);
</del><ins>+                if (handle.last_sr_event) {
+                        if (handle.last_sr_event-&gt;body) {
+                                printf(&quot;%s\n&quot;, handle.last_sr_event-&gt;body);
+                        } else if ((err = esl_event_get_header(handle.last_sr_event, &quot;reply-text&quot;)) &amp;&amp; !strncasecmp(err, &quot;-err&quot;, 3)) {
+                                printf(&quot;Error: %s!\n&quot;, err + 4);
+                        }
</ins><span class="cx">                 }
</span><ins>+
</ins><span class="cx">                 esl_disconnect(&amp;handle);
</span><span class="cx">                 return 0;
</span><span class="cx">         } 
</span></span></pre></div>
<a id="freeswitchtrunklibsesljavaesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/java/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/java/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/java/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -574,11 +574,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
</del><ins>+SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jstring jarg4) {
</ins><span class="cx">   jlong jresult = 0 ;
</span><span class="cx">   char *arg1 = (char *) 0 ;
</span><span class="cx">   char *arg2 = (char *) 0 ;
</span><span class="cx">   char *arg3 = (char *) 0 ;
</span><ins>+  char *arg4 = (char *) 0 ;
</ins><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   
</span><span class="cx">   (void)jenv;
</span><span class="lines">@@ -598,6 +599,45 @@
</span><span class="cx">     arg3 = (char *)jenv-&gt;GetStringUTFChars(jarg3, 0);
</span><span class="cx">     if (!arg3) return 0;
</span><span class="cx">   }
</span><ins>+  arg4 = 0;
+  if (jarg4) {
+    arg4 = (char *)jenv-&gt;GetStringUTFChars(jarg4, 0);
+    if (!arg4) return 0;
+  }
+  result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
+  *(ESLconnection **)&amp;jresult = result; 
+  if (arg1) jenv-&gt;ReleaseStringUTFChars(jarg1, (const char *)arg1);
+  if (arg2) jenv-&gt;ReleaseStringUTFChars(jarg2, (const char *)arg2);
+  if (arg3) jenv-&gt;ReleaseStringUTFChars(jarg3, (const char *)arg3);
+  if (arg4) jenv-&gt;ReleaseStringUTFChars(jarg4, (const char *)arg4);
+  return jresult;
+}
+
+
+SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
+  jlong jresult = 0 ;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  ESLconnection *result = 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  arg1 = 0;
+  if (jarg1) {
+    arg1 = (char *)jenv-&gt;GetStringUTFChars(jarg1, 0);
+    if (!arg1) return 0;
+  }
+  arg2 = 0;
+  if (jarg2) {
+    arg2 = (char *)jenv-&gt;GetStringUTFChars(jarg2, 0);
+    if (!arg2) return 0;
+  }
+  arg3 = 0;
+  if (jarg3) {
+    arg3 = (char *)jenv-&gt;GetStringUTFChars(jarg3, 0);
+    if (!arg3) return 0;
+  }
</ins><span class="cx">   result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
</span><span class="cx">   *(ESLconnection **)&amp;jresult = result; 
</span><span class="cx">   if (arg1) jenv-&gt;ReleaseStringUTFChars(jarg1, (const char *)arg1);
</span><span class="lines">@@ -607,7 +647,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1) {
</del><ins>+SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jint jarg1) {
</ins><span class="cx">   jlong jresult = 0 ;
</span><span class="cx">   int arg1 ;
</span><span class="cx">   ESLconnection *result = 0 ;
</span></span></pre></div>
<a id="freeswitchtrunklibsesljavaorgfreeswitcheslESLconnectionjava"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/java/org/freeswitch/esl/ESLconnection.java (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/java/org/freeswitch/esl/ESLconnection.java        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/java/org/freeswitch/esl/ESLconnection.java        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -33,12 +33,16 @@
</span><span class="cx">     swigCPtr = 0;
</span><span class="cx">   }
</span><span class="cx"> 
</span><ins>+  public ESLconnection(String host, String port, String user, String password) {
+    this(eslJNI.new_ESLconnection__SWIG_0(host, port, user, password), true);
+  }
+
</ins><span class="cx">   public ESLconnection(String host, String port, String password) {
</span><del>-    this(eslJNI.new_ESLconnection__SWIG_0(host, port, password), true);
</del><ins>+    this(eslJNI.new_ESLconnection__SWIG_1(host, port, password), true);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   public ESLconnection(int socket) {
</span><del>-    this(eslJNI.new_ESLconnection__SWIG_1(socket), true);
</del><ins>+    this(eslJNI.new_ESLconnection__SWIG_2(socket), true);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   public int socketDescriptor() {
</span></span></pre></div>
<a id="freeswitchtrunklibsesljavaorgfreeswitchesleslJNIjava"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/java/org/freeswitch/esl/eslJNI.java (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/java/org/freeswitch/esl/eslJNI.java        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/java/org/freeswitch/esl/eslJNI.java        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -29,8 +29,9 @@
</span><span class="cx">   public final static native boolean ESLevent_delHeader(long jarg1, ESLevent jarg1_, String jarg2);
</span><span class="cx">   public final static native String ESLevent_firstHeader(long jarg1, ESLevent jarg1_);
</span><span class="cx">   public final static native String ESLevent_nextHeader(long jarg1, ESLevent jarg1_);
</span><del>-  public final static native long new_ESLconnection__SWIG_0(String jarg1, String jarg2, String jarg3);
-  public final static native long new_ESLconnection__SWIG_1(int jarg1);
</del><ins>+  public final static native long new_ESLconnection__SWIG_0(String jarg1, String jarg2, String jarg3, String jarg4);
+  public final static native long new_ESLconnection__SWIG_1(String jarg1, String jarg2, String jarg3);
+  public final static native long new_ESLconnection__SWIG_2(int jarg1);
</ins><span class="cx">   public final static native void delete_ESLconnection(long jarg1);
</span><span class="cx">   public final static native int ESLconnection_socketDescriptor(long jarg1, ESLconnection jarg1_);
</span><span class="cx">   public final static native int ESLconnection_connected(long jarg1, ESLconnection jarg1_);
</span></span></pre></div>
<a id="freeswitchtrunklibseslluaesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/lua/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/lua/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/lua/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -2166,8 +2166,38 @@
</span><span class="cx">   char *arg1 = (char *) 0 ;
</span><span class="cx">   char *arg2 = (char *) 0 ;
</span><span class="cx">   char *arg3 = (char *) 0 ;
</span><ins>+  char *arg4 = (char *) 0 ;
</ins><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   
</span><ins>+  SWIG_check_num_args(&quot;ESLconnection&quot;,4,4)
+  if(!lua_isstring(L,1)) SWIG_fail_arg(&quot;ESLconnection&quot;,1,&quot;char const *&quot;);
+  if(!lua_isstring(L,2)) SWIG_fail_arg(&quot;ESLconnection&quot;,2,&quot;char const *&quot;);
+  if(!lua_isstring(L,3)) SWIG_fail_arg(&quot;ESLconnection&quot;,3,&quot;char const *&quot;);
+  if(!lua_isstring(L,4)) SWIG_fail_arg(&quot;ESLconnection&quot;,4,&quot;char const *&quot;);
+  arg1 = (char *)lua_tostring(L, 1);
+  arg2 = (char *)lua_tostring(L, 2);
+  arg3 = (char *)lua_tostring(L, 3);
+  arg4 = (char *)lua_tostring(L, 4);
+  result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
+  SWIG_arg=0;
+  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++; 
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_new_ESLconnection__SWIG_1(lua_State* L) {
+  int SWIG_arg = -1;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  ESLconnection *result = 0 ;
+  
</ins><span class="cx">   SWIG_check_num_args(&quot;ESLconnection&quot;,3,3)
</span><span class="cx">   if(!lua_isstring(L,1)) SWIG_fail_arg(&quot;ESLconnection&quot;,1,&quot;char const *&quot;);
</span><span class="cx">   if(!lua_isstring(L,2)) SWIG_fail_arg(&quot;ESLconnection&quot;,2,&quot;char const *&quot;);
</span><span class="lines">@@ -2188,7 +2218,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static int _wrap_new_ESLconnection__SWIG_1(lua_State* L) {
</del><ins>+static int _wrap_new_ESLconnection__SWIG_2(lua_State* L) {
</ins><span class="cx">   int SWIG_arg = -1;
</span><span class="cx">   int arg1 ;
</span><span class="cx">   ESLconnection *result = 0 ;
</span><span class="lines">@@ -2211,8 +2241,8 @@
</span><span class="cx"> 
</span><span class="cx"> static int _wrap_new_ESLconnection(lua_State* L) {
</span><span class="cx">   int argc;
</span><del>-  int argv[4]={
-    1,2,3,4
</del><ins>+  int argv[5]={
+    1,2,3,4,5
</ins><span class="cx">   };
</span><span class="cx">   
</span><span class="cx">   argc = lua_gettop(L);
</span><span class="lines">@@ -2222,7 +2252,7 @@
</span><span class="cx">       _v = lua_isnumber(L,argv[0]);
</span><span class="cx">     }
</span><span class="cx">     if (_v) {
</span><del>-      return _wrap_new_ESLconnection__SWIG_1(L);
</del><ins>+      return _wrap_new_ESLconnection__SWIG_2(L);
</ins><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx">   if (argc == 3) {
</span><span class="lines">@@ -2239,11 +2269,35 @@
</span><span class="cx">           _v = lua_isstring(L,argv[2]);
</span><span class="cx">         }
</span><span class="cx">         if (_v) {
</span><del>-          return _wrap_new_ESLconnection__SWIG_0(L);
</del><ins>+          return _wrap_new_ESLconnection__SWIG_1(L);
</ins><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">     }
</span><span class="cx">   }
</span><ins>+  if (argc == 4) {
+    int _v;
+    {
+      _v = lua_isstring(L,argv[0]);
+    }
+    if (_v) {
+      {
+        _v = lua_isstring(L,argv[1]);
+      }
+      if (_v) {
+        {
+          _v = lua_isstring(L,argv[2]);
+        }
+        if (_v) {
+          {
+            _v = lua_isstring(L,argv[3]);
+          }
+          if (_v) {
+            return _wrap_new_ESLconnection__SWIG_0(L);
+          }
+        }
+      }
+    }
+  }
</ins><span class="cx">   
</span><span class="cx">   lua_pushstring(L,&quot;No matching function for overloaded 'new_ESLconnection'&quot;);
</span><span class="cx">   lua_error(L);return 0;
</span></span></pre></div>
<a id="freeswitchtrunklibseslmanagedESLPINVOKEcs"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/managed/ESLPINVOKE.cs (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/managed/ESLPINVOKE.cs        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/managed/ESLPINVOKE.cs        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -245,11 +245,14 @@
</span><span class="cx">   public static extern string ESLevent_nextHeader(HandleRef jarg1);
</span><span class="cx"> 
</span><span class="cx">   [DllImport(&quot;ESL&quot;, EntryPoint=&quot;CSharp_new_ESLconnection__SWIG_0&quot;)]
</span><del>-  public static extern IntPtr new_ESLconnection__SWIG_0(string jarg1, string jarg2, string jarg3);
</del><ins>+  public static extern IntPtr new_ESLconnection__SWIG_0(string jarg1, string jarg2, string jarg3, string jarg4);
</ins><span class="cx"> 
</span><span class="cx">   [DllImport(&quot;ESL&quot;, EntryPoint=&quot;CSharp_new_ESLconnection__SWIG_1&quot;)]
</span><del>-  public static extern IntPtr new_ESLconnection__SWIG_1(int jarg1);
</del><ins>+  public static extern IntPtr new_ESLconnection__SWIG_1(string jarg1, string jarg2, string jarg3);
</ins><span class="cx"> 
</span><ins>+  [DllImport(&quot;ESL&quot;, EntryPoint=&quot;CSharp_new_ESLconnection__SWIG_2&quot;)]
+  public static extern IntPtr new_ESLconnection__SWIG_2(int jarg1);
+
</ins><span class="cx">   [DllImport(&quot;ESL&quot;, EntryPoint=&quot;CSharp_delete_ESLconnection&quot;)]
</span><span class="cx">   public static extern void delete_ESLconnection(HandleRef jarg1);
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunklibseslmanagedESLconnectioncs"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/managed/ESLconnection.cs (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/managed/ESLconnection.cs        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/managed/ESLconnection.cs        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -38,12 +38,15 @@
</span><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx"> 
</span><del>-  public ESLconnection(string host, string port, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_0(host, port, password), true) {
</del><ins>+  public ESLconnection(string host, string port, string user, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_0(host, port, user, password), true) {
</ins><span class="cx">   }
</span><span class="cx"> 
</span><del>-  public ESLconnection(int socket) : this(ESLPINVOKE.new_ESLconnection__SWIG_1(socket), true) {
</del><ins>+  public ESLconnection(string host, string port, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_1(host, port, password), true) {
</ins><span class="cx">   }
</span><span class="cx"> 
</span><ins>+  public ESLconnection(int socket) : this(ESLPINVOKE.new_ESLconnection__SWIG_2(socket), true) {
+  }
+
</ins><span class="cx">   public int socketDescriptor() {
</span><span class="cx">     int ret = ESLPINVOKE.ESLconnection_socketDescriptor(swigCPtr);
</span><span class="cx">     return ret;
</span></span></pre></div>
<a id="freeswitchtrunklibseslmanagedesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/managed/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/managed/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/managed/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -542,23 +542,41 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_0(char * jarg1, char * jarg2, char * jarg3) {
</del><ins>+SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_0(char * jarg1, char * jarg2, char * jarg3, char * jarg4) {
</ins><span class="cx">   void * jresult ;
</span><span class="cx">   char *arg1 = (char *) 0 ;
</span><span class="cx">   char *arg2 = (char *) 0 ;
</span><span class="cx">   char *arg3 = (char *) 0 ;
</span><ins>+  char *arg4 = (char *) 0 ;
</ins><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   
</span><span class="cx">   arg1 = (char *)jarg1; 
</span><span class="cx">   arg2 = (char *)jarg2; 
</span><span class="cx">   arg3 = (char *)jarg3; 
</span><ins>+  arg4 = (char *)jarg4; 
+  result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
+  jresult = (void *)result; 
+  return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_1(char * jarg1, char * jarg2, char * jarg3) {
+  void * jresult ;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  ESLconnection *result = 0 ;
+  
+  arg1 = (char *)jarg1; 
+  arg2 = (char *)jarg2; 
+  arg3 = (char *)jarg3; 
</ins><span class="cx">   result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
</span><span class="cx">   jresult = (void *)result; 
</span><span class="cx">   return jresult;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_1(int jarg1) {
</del><ins>+SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_2(int jarg1) {
</ins><span class="cx">   void * jresult ;
</span><span class="cx">   int arg1 ;
</span><span class="cx">   ESLconnection *result = 0 ;
</span></span></pre></div>
<a id="freeswitchtrunklibseslperlesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/perl/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/perl/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/perl/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -2565,6 +2565,7 @@
</span><span class="cx">     char *arg1 = (char *) 0 ;
</span><span class="cx">     char *arg2 = (char *) 0 ;
</span><span class="cx">     char *arg3 = (char *) 0 ;
</span><ins>+    char *arg4 = (char *) 0 ;
</ins><span class="cx">     ESLconnection *result = 0 ;
</span><span class="cx">     int res1 ;
</span><span class="cx">     char *buf1 = 0 ;
</span><span class="lines">@@ -2575,9 +2576,70 @@
</span><span class="cx">     int res3 ;
</span><span class="cx">     char *buf3 = 0 ;
</span><span class="cx">     int alloc3 = 0 ;
</span><ins>+    int res4 ;
+    char *buf4 = 0 ;
+    int alloc4 = 0 ;
</ins><span class="cx">     int argvi = 0;
</span><span class="cx">     dXSARGS;
</span><span class="cx">     
</span><ins>+    if ((items &lt; 4) || (items &gt; 4)) {
+      SWIG_croak(&quot;Usage: new_ESLconnection(host,port,user,password);&quot;);
+    }
+    res1 = SWIG_AsCharPtrAndSize(ST(0), &amp;buf1, NULL, &amp;alloc1);
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+    }
+    arg1 = reinterpret_cast&lt; char * &gt;(buf1);
+    res2 = SWIG_AsCharPtrAndSize(ST(1), &amp;buf2, NULL, &amp;alloc2);
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;2&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+    }
+    arg2 = reinterpret_cast&lt; char * &gt;(buf2);
+    res3 = SWIG_AsCharPtrAndSize(ST(2), &amp;buf3, NULL, &amp;alloc3);
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;3&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+    }
+    arg3 = reinterpret_cast&lt; char * &gt;(buf3);
+    res4 = SWIG_AsCharPtrAndSize(ST(3), &amp;buf4, NULL, &amp;alloc4);
+    if (!SWIG_IsOK(res4)) {
+      SWIG_exception_fail(SWIG_ArgError(res4), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;4&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+    }
+    arg4 = reinterpret_cast&lt; char * &gt;(buf4);
+    result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
+    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
+    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+    if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
+    XSRETURN(argvi);
+  fail:
+    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+    if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
+    SWIG_croak_null();
+  }
+}
+
+
+XS(_wrap_new_ESLconnection__SWIG_1) {
+  {
+    char *arg1 = (char *) 0 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    ESLconnection *result = 0 ;
+    int res1 ;
+    char *buf1 = 0 ;
+    int alloc1 = 0 ;
+    int res2 ;
+    char *buf2 = 0 ;
+    int alloc2 = 0 ;
+    int res3 ;
+    char *buf3 = 0 ;
+    int alloc3 = 0 ;
+    int argvi = 0;
+    dXSARGS;
+    
</ins><span class="cx">     if ((items &lt; 3) || (items &gt; 3)) {
</span><span class="cx">       SWIG_croak(&quot;Usage: new_ESLconnection(host,port,password);&quot;);
</span><span class="cx">     }
</span><span class="lines">@@ -2611,7 +2673,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-XS(_wrap_new_ESLconnection__SWIG_1) {
</del><ins>+XS(_wrap_new_ESLconnection__SWIG_2) {
</ins><span class="cx">   {
</span><span class="cx">     int arg1 ;
</span><span class="cx">     ESLconnection *result = 0 ;
</span><span class="lines">@@ -2703,11 +2765,57 @@
</span><span class="cx">     }
</span><span class="cx">   check_2:
</span><span class="cx">     
</span><ins>+    if (items == 4) {
+      SWIG_TypeRank _ranki = 0;
+      SWIG_TypeRank _rankm = 0;
+      SWIG_TypeRank _pi = 1;
+      int _v = 0;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_3;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_3;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_3;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_3;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      if (!_index || (_ranki &lt; _rank)) {
+        _rank = _ranki; _index = 3;
+        if (_rank == _rankm) goto dispatch;
+      }
+    }
+  check_3:
+    
</ins><span class="cx">   dispatch:
</span><span class="cx">     switch(_index) {
</span><span class="cx">     case 1:
</span><ins>+      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return;
+    case 2:
</ins><span class="cx">       ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_1); return;
</span><del>-    case 2:
</del><ins>+    case 3:
</ins><span class="cx">       ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_0); return;
</span><span class="cx">     }
</span><span class="cx">   }
</span></span></pre></div>
<a id="freeswitchtrunklibseslphpESLphp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/php/ESL.php (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/php/ESL.php        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/php/ESL.php        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -112,11 +112,12 @@
</span><span class="cx"> class ESLconnection {
</span><span class="cx">         public $_cPtr=null;
</span><span class="cx"> 
</span><del>-        function __construct($host_or_socket,$port=null,$password=null) {
</del><ins>+        function __construct($host_or_socket,$port=null,$user_or_password=null,$password=null) {
</ins><span class="cx">                 switch (func_num_args()) {
</span><span class="cx">                 case 1: $r=new_ESLconnection($host_or_socket); break;
</span><span class="cx">                 case 2: $r=new_ESLconnection($host_or_socket,$port); break;
</span><del>-                default: $r=new_ESLconnection($host_or_socket,$port,$password);
</del><ins>+                case 3: $r=new_ESLconnection($host_or_socket,$port,$user_or_password); break;
+                default: $r=new_ESLconnection($host_or_socket,$port,$user_or_password,$password);
</ins><span class="cx">                 }
</span><span class="cx">                 $this-&gt;_cPtr=$r;
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchtrunklibseslphpesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/php/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/php/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/php/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -1709,7 +1709,54 @@
</span><span class="cx">   char *arg1 = (char *) 0 ;
</span><span class="cx">   char *arg2 = (char *) 0 ;
</span><span class="cx">   char *arg3 = (char *) 0 ;
</span><ins>+  char *arg4 = (char *) 0 ;
</ins><span class="cx">   ESLconnection *result = 0 ;
</span><ins>+  zval **args[4];
+  
+  SWIG_ResetError();
+  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
+    WRONG_PARAM_COUNT;
+  }
+  
+  
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  convert_to_string_ex(args[0]);
+  arg1 = (char *) Z_STRVAL_PP(args[0]);
+  /*@SWIG@*/;
+  
+  
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  convert_to_string_ex(args[1]);
+  arg2 = (char *) Z_STRVAL_PP(args[1]);
+  /*@SWIG@*/;
+  
+  
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  convert_to_string_ex(args[2]);
+  arg3 = (char *) Z_STRVAL_PP(args[2]);
+  /*@SWIG@*/;
+  
+  
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  convert_to_string_ex(args[3]);
+  arg4 = (char *) Z_STRVAL_PP(args[3]);
+  /*@SWIG@*/;
+  
+  result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
+  {
+    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLconnection, 1);
+  }
+  return;
+fail:
+  zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
+}
+
+
+ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_1) {
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  ESLconnection *result = 0 ;
</ins><span class="cx">   zval **args[3];
</span><span class="cx">   
</span><span class="cx">   SWIG_ResetError();
</span><span class="lines">@@ -1745,7 +1792,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_1) {
</del><ins>+ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection__SWIG_2) {
</ins><span class="cx">   int arg1 ;
</span><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   zval **args[1];
</span><span class="lines">@@ -1773,7 +1820,7 @@
</span><span class="cx"> 
</span><span class="cx"> ZEND_NAMED_FUNCTION(_wrap_new_ESLconnection) {
</span><span class="cx">   int argc;
</span><del>-  zval **argv[3];
</del><ins>+  zval **argv[4];
</ins><span class="cx">   
</span><span class="cx">   argc = ZEND_NUM_ARGS();
</span><span class="cx">   zend_get_parameters_array_ex(argc,argv);
</span><span class="lines">@@ -1781,7 +1828,7 @@
</span><span class="cx">     int _v;
</span><span class="cx">     _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
</span><span class="cx">     if (_v) {
</span><del>-      return _wrap_new_ESLconnection__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
</del><ins>+      return _wrap_new_ESLconnection__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU);
</ins><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx">   if (argc == 3) {
</span><span class="lines">@@ -1792,11 +1839,27 @@
</span><span class="cx">       if (_v) {
</span><span class="cx">         _v = (Z_TYPE_PP(argv[2]) == IS_STRING); 
</span><span class="cx">         if (_v) {
</span><del>-          return _wrap_new_ESLconnection__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
</del><ins>+          return _wrap_new_ESLconnection__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
</ins><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">     }
</span><span class="cx">   }
</span><ins>+  if (argc == 4) {
+    int _v;
+    _v = (Z_TYPE_PP(argv[0]) == IS_STRING); 
+    if (_v) {
+      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
+      if (_v) {
+        _v = (Z_TYPE_PP(argv[2]) == IS_STRING); 
+        if (_v) {
+          _v = (Z_TYPE_PP(argv[3]) == IS_STRING); 
+          if (_v) {
+            return _wrap_new_ESLconnection__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+          }
+        }
+      }
+    }
+  }
</ins><span class="cx">   
</span><span class="cx">   SWIG_ErrorCode() = E_ERROR;
</span><span class="cx">   SWIG_ErrorMsg() = &quot;No matching function for overloaded 'new_ESLconnection'&quot;;
</span></span></pre></div>
<a id="freeswitchtrunklibseslpythonesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/python/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/python/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/python/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -3525,6 +3525,7 @@
</span><span class="cx">   char *arg1 = (char *) 0 ;
</span><span class="cx">   char *arg2 = (char *) 0 ;
</span><span class="cx">   char *arg3 = (char *) 0 ;
</span><ins>+  char *arg4 = (char *) 0 ;
</ins><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   int res1 ;
</span><span class="cx">   char *buf1 = 0 ;
</span><span class="lines">@@ -3535,10 +3536,70 @@
</span><span class="cx">   int res3 ;
</span><span class="cx">   char *buf3 = 0 ;
</span><span class="cx">   int alloc3 = 0 ;
</span><ins>+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
</ins><span class="cx">   PyObject * obj0 = 0 ;
</span><span class="cx">   PyObject * obj1 = 0 ;
</span><span class="cx">   PyObject * obj2 = 0 ;
</span><ins>+  PyObject * obj3 = 0 ;
</ins><span class="cx">   
</span><ins>+  if (!PyArg_ParseTuple(args,(char *)&quot;OOOO:new_ESLconnection&quot;,&amp;obj0,&amp;obj1,&amp;obj2,&amp;obj3)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &amp;buf1, NULL, &amp;alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;1&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+  }
+  arg1 = reinterpret_cast&lt; char * &gt;(buf1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &amp;buf2, NULL, &amp;alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;2&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+  }
+  arg2 = reinterpret_cast&lt; char * &gt;(buf2);
+  res3 = SWIG_AsCharPtrAndSize(obj2, &amp;buf3, NULL, &amp;alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;3&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+  }
+  arg3 = reinterpret_cast&lt; char * &gt;(buf3);
+  res4 = SWIG_AsCharPtrAndSize(obj3, &amp;buf4, NULL, &amp;alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), &quot;in method '&quot; &quot;new_ESLconnection&quot; &quot;', argument &quot; &quot;4&quot;&quot; of type '&quot; &quot;char const *&quot;&quot;'&quot;);
+  }
+  arg4 = reinterpret_cast&lt; char * &gt;(buf4);
+  result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW |  0 );
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  ESLconnection *result = 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  PyObject * obj2 = 0 ;
+  
</ins><span class="cx">   if (!PyArg_ParseTuple(args,(char *)&quot;OOO:new_ESLconnection&quot;,&amp;obj0,&amp;obj1,&amp;obj2)) SWIG_fail;
</span><span class="cx">   res1 = SWIG_AsCharPtrAndSize(obj0, &amp;buf1, NULL, &amp;alloc1);
</span><span class="cx">   if (!SWIG_IsOK(res1)) {
</span><span class="lines">@@ -3569,7 +3630,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
</del><ins>+SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
</ins><span class="cx">   PyObject *resultobj = 0;
</span><span class="cx">   int arg1 ;
</span><span class="cx">   ESLconnection *result = 0 ;
</span><span class="lines">@@ -3593,12 +3654,12 @@
</span><span class="cx"> 
</span><span class="cx"> SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) {
</span><span class="cx">   int argc;
</span><del>-  PyObject *argv[4];
</del><ins>+  PyObject *argv[5];
</ins><span class="cx">   int ii;
</span><span class="cx">   
</span><span class="cx">   if (!PyTuple_Check(args)) SWIG_fail;
</span><span class="cx">   argc = (int)PyObject_Length(args);
</span><del>-  for (ii = 0; (ii &lt; argc) &amp;&amp; (ii &lt; 3); ii++) {
</del><ins>+  for (ii = 0; (ii &lt; argc) &amp;&amp; (ii &lt; 4); ii++) {
</ins><span class="cx">     argv[ii] = PyTuple_GET_ITEM(args,ii);
</span><span class="cx">   }
</span><span class="cx">   if (argc == 1) {
</span><span class="lines">@@ -3608,7 +3669,7 @@
</span><span class="cx">       _v = SWIG_CheckState(res);
</span><span class="cx">     }
</span><span class="cx">     if (_v) {
</span><del>-      return _wrap_new_ESLconnection__SWIG_1(self, args);
</del><ins>+      return _wrap_new_ESLconnection__SWIG_2(self, args);
</ins><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx">   if (argc == 3) {
</span><span class="lines">@@ -3622,15 +3683,36 @@
</span><span class="cx">         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
</span><span class="cx">         _v = SWIG_CheckState(res);
</span><span class="cx">         if (_v) {
</span><del>-          return _wrap_new_ESLconnection__SWIG_0(self, args);
</del><ins>+          return _wrap_new_ESLconnection__SWIG_1(self, args);
</ins><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">     }
</span><span class="cx">   }
</span><ins>+  if (argc == 4) {
+    int _v;
+    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
+          _v = SWIG_CheckState(res);
+          if (_v) {
+            return _wrap_new_ESLconnection__SWIG_0(self, args);
+          }
+        }
+      }
+    }
+  }
</ins><span class="cx">   
</span><span class="cx"> fail:
</span><span class="cx">   SWIG_SetErrorMsg(PyExc_NotImplementedError,&quot;Wrong number of arguments for overloaded function 'new_ESLconnection'.\n&quot;
</span><span class="cx">     &quot;  Possible C/C++ prototypes are:\n&quot;
</span><ins>+    &quot;    ESLconnection(char const *,char const *,char const *,char const *)\n&quot;
</ins><span class="cx">     &quot;    ESLconnection(char const *,char const *,char const *)\n&quot;
</span><span class="cx">     &quot;    ESLconnection(int)\n&quot;);
</span><span class="cx">   return NULL;
</span></span></pre></div>
<a id="freeswitchtrunklibseslrubyesl_wrapcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -2646,6 +2646,7 @@
</span><span class="cx">   char *arg1 = (char *) 0 ;
</span><span class="cx">   char *arg2 = (char *) 0 ;
</span><span class="cx">   char *arg3 = (char *) 0 ;
</span><ins>+  char *arg4 = (char *) 0 ;
</ins><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   int res1 ;
</span><span class="cx">   char *buf1 = 0 ;
</span><span class="lines">@@ -2656,7 +2657,65 @@
</span><span class="cx">   int res3 ;
</span><span class="cx">   char *buf3 = 0 ;
</span><span class="cx">   int alloc3 = 0 ;
</span><ins>+  int res4 ;
+  char *buf4 = 0 ;
+  int alloc4 = 0 ;
</ins><span class="cx">   
</span><ins>+  if ((argc &lt; 4) || (argc &gt; 4)) {
+    rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 4)&quot;,argc); SWIG_fail;
+  }
+  res1 = SWIG_AsCharPtrAndSize(argv[0], &amp;buf1, NULL, &amp;alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( &quot;&quot;, &quot;char const *&quot;,&quot;ESLconnection&quot;, 1, argv[0] ));
+  }
+  arg1 = reinterpret_cast&lt; char * &gt;(buf1);
+  res2 = SWIG_AsCharPtrAndSize(argv[1], &amp;buf2, NULL, &amp;alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( &quot;&quot;, &quot;char const *&quot;,&quot;ESLconnection&quot;, 2, argv[1] ));
+  }
+  arg2 = reinterpret_cast&lt; char * &gt;(buf2);
+  res3 = SWIG_AsCharPtrAndSize(argv[2], &amp;buf3, NULL, &amp;alloc3);
+  if (!SWIG_IsOK(res3)) {
+    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( &quot;&quot;, &quot;char const *&quot;,&quot;ESLconnection&quot;, 3, argv[2] ));
+  }
+  arg3 = reinterpret_cast&lt; char * &gt;(buf3);
+  res4 = SWIG_AsCharPtrAndSize(argv[3], &amp;buf4, NULL, &amp;alloc4);
+  if (!SWIG_IsOK(res4)) {
+    SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( &quot;&quot;, &quot;char const *&quot;,&quot;ESLconnection&quot;, 4, argv[3] ));
+  }
+  arg4 = reinterpret_cast&lt; char * &gt;(buf4);
+  result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);DATA_PTR(self) = result;
+  
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
+  return self;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
+  return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) {
+  char *arg1 = (char *) 0 ;
+  char *arg2 = (char *) 0 ;
+  char *arg3 = (char *) 0 ;
+  ESLconnection *result = 0 ;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  int res3 ;
+  char *buf3 = 0 ;
+  int alloc3 = 0 ;
+  
</ins><span class="cx">   if ((argc &lt; 3) || (argc &gt; 3)) {
</span><span class="cx">     rb_raise(rb_eArgError, &quot;wrong # of arguments(%d for 3)&quot;,argc); SWIG_fail;
</span><span class="cx">   }
</span><span class="lines">@@ -2707,7 +2766,7 @@
</span><span class="cx">   
</span><span class="cx"> 
</span><span class="cx"> SWIGINTERN VALUE
</span><del>-_wrap_new_ESLconnection__SWIG_1(int argc, VALUE *argv, VALUE self) {
</del><ins>+_wrap_new_ESLconnection__SWIG_2(int argc, VALUE *argv, VALUE self) {
</ins><span class="cx">   int arg1 ;
</span><span class="cx">   ESLconnection *result = 0 ;
</span><span class="cx">   int val1 ;
</span><span class="lines">@@ -2731,11 +2790,11 @@
</span><span class="cx"> 
</span><span class="cx"> SWIGINTERN VALUE _wrap_new_ESLconnection(int nargs, VALUE *args, VALUE self) {
</span><span class="cx">   int argc;
</span><del>-  VALUE argv[3];
</del><ins>+  VALUE argv[4];
</ins><span class="cx">   int ii;
</span><span class="cx">   
</span><span class="cx">   argc = nargs;
</span><del>-  if (argc &gt; 3) SWIG_fail;
</del><ins>+  if (argc &gt; 4) SWIG_fail;
</ins><span class="cx">   for (ii = 0; (ii &lt; argc); ++ii) {
</span><span class="cx">     argv[ii] = args[ii];
</span><span class="cx">   }
</span><span class="lines">@@ -2746,7 +2805,7 @@
</span><span class="cx">       _v = SWIG_CheckState(res);
</span><span class="cx">     }
</span><span class="cx">     if (_v) {
</span><del>-      return _wrap_new_ESLconnection__SWIG_1(nargs, args, self);
</del><ins>+      return _wrap_new_ESLconnection__SWIG_2(nargs, args, self);
</ins><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx">   if (argc == 3) {
</span><span class="lines">@@ -2760,14 +2819,35 @@
</span><span class="cx">         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
</span><span class="cx">         _v = SWIG_CheckState(res);
</span><span class="cx">         if (_v) {
</span><del>-          return _wrap_new_ESLconnection__SWIG_0(nargs, args, self);
</del><ins>+          return _wrap_new_ESLconnection__SWIG_1(nargs, args, self);
</ins><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">     }
</span><span class="cx">   }
</span><ins>+  if (argc == 4) {
+    int _v;
+    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
+          _v = SWIG_CheckState(res);
+          if (_v) {
+            return _wrap_new_ESLconnection__SWIG_0(nargs, args, self);
+          }
+        }
+      }
+    }
+  }
</ins><span class="cx">   
</span><span class="cx"> fail:
</span><del>-  Ruby_Format_OverloadedError( argc, 3, &quot;ESLconnection.new&quot;, 
</del><ins>+  Ruby_Format_OverloadedError( argc, 4, &quot;ESLconnection.new&quot;, 
+    &quot;    ESLconnection.new(char const *host, char const *port, char const *user, char const *password)\n&quot;
</ins><span class="cx">     &quot;    ESLconnection.new(char const *host, char const *port, char const *password)\n&quot;
</span><span class="cx">     &quot;    ESLconnection.new(int socket)\n&quot;);
</span><span class="cx">   
</span></span></pre></div>
<a id="freeswitchtrunklibseslsrceslc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/src/esl.c (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/src/esl.c        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/src/esl.c        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -580,7 +580,7 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ESL_DECLARE(esl_status_t) esl_connect(esl_handle_t *handle, const char *host, esl_port_t port, const char *password)
</del><ins>+ESL_DECLARE(esl_status_t) esl_connect(esl_handle_t *handle, const char *host, esl_port_t port, const char *user, const char *password)
</ins><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx">         struct hostent *result;
</span><span class="lines">@@ -651,7 +651,12 @@
</span><span class="cx">                 goto fail;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        snprintf(sendbuf, sizeof(sendbuf), &quot;auth %s\n\n&quot;, password);
</del><ins>+        if (esl_strlen_zero(user)) {
+                snprintf(sendbuf, sizeof(sendbuf), &quot;auth %s\n\n&quot;, password);
+        } else {
+                snprintf(sendbuf, sizeof(sendbuf), &quot;userauth %s:%s\n\n&quot;, user,  password);
+        }
+
</ins><span class="cx">         esl_send(handle, sendbuf);
</span><span class="cx"> 
</span><span class="cx">         
</span></span></pre></div>
<a id="freeswitchtrunklibseslsrcesl_oopcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/src/esl_oop.cpp (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/src/esl_oop.cpp        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/src/esl_oop.cpp        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -14,10 +14,18 @@
</span><span class="cx">         connection_construct_common();
</span><span class="cx">         int x_port = atoi(port);
</span><span class="cx"> 
</span><del>-        esl_connect(&amp;handle, host, x_port, password);
</del><ins>+        esl_connect(&amp;handle, host, x_port, NULL, password);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ESLconnection::ESLconnection(const char *host, const char *port, const char *user, const char *password)
+{
+        connection_construct_common();
+        int x_port = atoi(port);
</ins><span class="cx"> 
</span><ins>+        esl_connect(&amp;handle, host, x_port, user, password);
+}
+
+
</ins><span class="cx"> ESLconnection::ESLconnection(int socket)
</span><span class="cx"> {
</span><span class="cx">         connection_construct_common();
</span></span></pre></div>
<a id="freeswitchtrunklibseslsrcincludeeslh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/src/include/esl.h (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/src/include/esl.h        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/src/include/esl.h        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -379,9 +379,10 @@
</span><span class="cx">     \param handle Handle to connect
</span><span class="cx">     \param host Host to be connected
</span><span class="cx">     \param port Port to be connected
</span><ins>+    \param password FreeSWITCH server username (optional)
</ins><span class="cx">     \param password FreeSWITCH server password
</span><span class="cx"> */
</span><del>-ESL_DECLARE(esl_status_t) esl_connect(esl_handle_t *handle, const char *host, esl_port_t port, const char *password);
</del><ins>+ESL_DECLARE(esl_status_t) esl_connect(esl_handle_t *handle, const char *host, esl_port_t port, const char *user, const char *password);
</ins><span class="cx"> /*!
</span><span class="cx">     \brief Disconnect a handle
</span><span class="cx">     \param handle Handle to be disconnected
</span></span></pre></div>
<a id="freeswitchtrunklibseslsrcincludeesl_ooph"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/src/include/esl_oop.h (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/src/include/esl_oop.h        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/src/include/esl_oop.h        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">  private:
</span><span class="cx">         esl_handle_t handle;
</span><span class="cx">  public:
</span><ins>+        ESLconnection(const char *host, const char *port, const char *user, const char *password);
</ins><span class="cx">         ESLconnection(const char *host, const char *port, const char *password);
</span><span class="cx">         ESLconnection(int socket);
</span><span class="cx">         virtual ~ESLconnection();
</span></span></pre></div>
<a id="freeswitchtrunklibsesltestclientc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/esl/testclient.c (16160 => 16161)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/esl/testclient.c        2010-01-05 19:47:49 UTC (rev 16160)
+++ freeswitch/trunk/libs/esl/testclient.c        2010-01-05 20:37:16 UTC (rev 16161)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> {
</span><span class="cx">         esl_handle_t handle = {{0}};
</span><span class="cx"> 
</span><del>-        esl_connect(&amp;handle, &quot;localhost&quot;, 8021, &quot;ClueCon&quot;);
</del><ins>+        esl_connect(&amp;handle, &quot;localhost&quot;, 8021, NULL, &quot;ClueCon&quot;);
</ins><span class="cx"> 
</span><span class="cx">         esl_send_recv(&amp;handle, &quot;api status\n\n&quot;);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>