mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
Merge branch 'master' into smgmaster
Conflicts: build/modules.conf.in
This commit is contained in:
commit
2a9046fdb8
608 files changed
+33546
-20511
No files matched your search
+14
-3
@@ -276,6 +276,17 @@
|
||||
/ldns/packaging/ldns-config
|
||||
/ldns/packaging/libldns.pc
|
||||
/ldns-1.6.9/
|
||||
/libcodec2/src/c2dec
|
||||
/libcodec2/src/c2enc
|
||||
/libcodec2/src/c2sim
|
||||
/libcodec2/unittest/extract
|
||||
/libcodec2/unittest/genlsp
|
||||
/libcodec2/unittest/genres
|
||||
/libcodec2/unittest/tcodec2
|
||||
/libcodec2/unittest/tinterp
|
||||
/libcodec2/unittest/tnlp
|
||||
/libcodec2/unittest/tquant
|
||||
/libcodec2/unittest/vqtrain
|
||||
/libdingaling/Makefile
|
||||
/libdingaling/Makefile.in
|
||||
/libdingaling/aclocal.m4
|
||||
@@ -986,6 +997,7 @@
|
||||
/xmlrpc-c/stamp-h2
|
||||
/xmlrpc-c/xmlrpc_amconfig.h
|
||||
/xmlrpc-c/xmlrpc_config.h
|
||||
/zeromq-*/
|
||||
/apr/build/install-sh
|
||||
/js/install-sh
|
||||
/js/nsprpub/lib/ds/libplds4.dylib
|
||||
@@ -1035,7 +1047,7 @@
|
||||
/libshout-2.2.2/
|
||||
/mpg123/
|
||||
/openldap-2.4.19/
|
||||
/pocketsphinx-0.5.99/
|
||||
/pocketsphinx-0.7/
|
||||
/portaudio/bin-stamp
|
||||
/portaudio/bin/
|
||||
/portaudio/lib-stamp
|
||||
@@ -1043,7 +1055,7 @@
|
||||
/silk/Encoder
|
||||
/silk/signalCompare
|
||||
/soundtouch-1.3.1/
|
||||
/sphinxbase-0.4.99/
|
||||
/sphinxbase-0.7/
|
||||
/unimrcp/platforms/asr-client/asrclient
|
||||
/unimrcp/platforms/umc/umc
|
||||
/unimrcp/platforms/unimrcp-client/unimrcpclient
|
||||
@@ -1067,7 +1079,6 @@
|
||||
/libogg-1.1.3/
|
||||
/pthreads-w32-2-7-0-release/
|
||||
/sounds/
|
||||
/sphinxbase-0.4.99/
|
||||
/sofia-sip/libsofia-sip-ua/http/http_tag_dll.c
|
||||
/sofia-sip/libsofia-sip-ua/iptsec/auth_tag_dll.c
|
||||
/sofia-sip/libsofia-sip-ua/msg/msg_tag_dll.c
|
||||
|
||||
+2
-2
@@ -34,10 +34,10 @@ testclient: $(MYLIB) testclient.c
|
||||
fs_cli: $(MYLIB) fs_cli.c
|
||||
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs $(LIBS) -ledit
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c $(HEADERS)
|
||||
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp $(HEADERS)
|
||||
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
|
||||
+20
-5
@@ -572,7 +572,7 @@ COLORS[] = { ESL_SEQ_DEFAULT_COLOR, ESL_SEQ_FRED, ESL_SEQ_FRED,
|
||||
ESL_SEQ_FRED, ESL_SEQ_FMAGEN, ESL_SEQ_FCYAN, ESL_SEQ_FGREEN, ESL_SEQ_FYELLOW };
|
||||
|
||||
static int usage(char *name){
|
||||
printf("Usage: %s [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [profile]\n\n", name);
|
||||
printf("Usage: %s [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [-t <timeout_ms>] [profile]\n\n", name);
|
||||
printf(" -?,-h --help Usage Information\n");
|
||||
printf(" -H, --host=hostname Host to connect\n");
|
||||
printf(" -P, --port=port Port to connect (1 - 65535)\n");
|
||||
@@ -584,7 +584,8 @@ static int usage(char *name){
|
||||
printf(" -q, --quiet Disable logging\n");
|
||||
printf(" -r, --retry Retry connection on failure\n");
|
||||
printf(" -R, --reconnect Reconnect if disconnected\n");
|
||||
printf(" -d, --debug=level Debug Level (0 - 7)\n\n");
|
||||
printf(" -d, --debug=level Debug Level (0 - 7)\n");
|
||||
printf(" -t, --timeout Timeout for API commands (in miliseconds)\n\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1026,6 +1027,7 @@ int main(int argc, char *argv[])
|
||||
{"retry", 0, 0, 'r'},
|
||||
{"interrupt", 0, 0, 'i'},
|
||||
{"reconnect", 0, 0, 'R'},
|
||||
{"timeout", 1, 0, 't'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -1044,7 +1046,7 @@ int main(int argc, char *argv[])
|
||||
char argv_command[1024] = "";
|
||||
char argv_loglevel[128] = "";
|
||||
int argv_quiet = 0;
|
||||
int loops = 2, reconnect = 0;
|
||||
int loops = 2, reconnect = 0, timeout = 0;
|
||||
|
||||
strncpy(internal_profile.host, "127.0.0.1", sizeof(internal_profile.host));
|
||||
strncpy(internal_profile.pass, "ClueCon", sizeof(internal_profile.pass));
|
||||
@@ -1069,7 +1071,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for(;;) {
|
||||
int option_index = 0;
|
||||
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:qrRhi?", options, &option_index);
|
||||
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:t:qrRhi?", options, &option_index);
|
||||
if (opt == -1) break;
|
||||
switch (opt)
|
||||
{
|
||||
@@ -1122,6 +1124,9 @@ int main(int argc, char *argv[])
|
||||
case 'R':
|
||||
reconnect = 1;
|
||||
break;
|
||||
case 't':
|
||||
timeout = atoi(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
print_banner(stdout);
|
||||
@@ -1278,7 +1283,17 @@ int main(int argc, char *argv[])
|
||||
const char *err = NULL;
|
||||
|
||||
snprintf(cmd_str, sizeof(cmd_str), "api %s\n\n", argv_command);
|
||||
esl_send_recv(&handle, cmd_str);
|
||||
if (timeout) {
|
||||
esl_status_t status = esl_send_recv_timed(&handle, cmd_str, timeout);
|
||||
if (status != ESL_SUCCESS) {
|
||||
printf("Request timed out.\n");
|
||||
esl_disconnect(&handle);
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
esl_send_recv(&handle, cmd_str);
|
||||
}
|
||||
|
||||
if (handle.last_sr_event) {
|
||||
if (handle.last_sr_event->body) {
|
||||
printf("%s\n", handle.last_sr_event->body);
|
||||
|
||||
@@ -419,10 +419,11 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1setPriority
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
|
||||
jstring jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
@@ -434,7 +435,8 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JN
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
arg3 = (int)jarg3;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
if(result) jresult = jenv->NewStringUTF((const char *)result);
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
return jresult;
|
||||
@@ -522,6 +524,64 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1addHeader(J
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1pushHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ESLevent **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return 0;
|
||||
}
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = (jboolean)result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1unshiftHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
|
||||
jboolean jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ESLevent **)&jarg1;
|
||||
arg2 = 0;
|
||||
if (jarg2) {
|
||||
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
|
||||
if (!arg2) return 0;
|
||||
}
|
||||
arg3 = 0;
|
||||
if (jarg3) {
|
||||
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
|
||||
if (!arg3) return 0;
|
||||
}
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = (jboolean)result;
|
||||
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
|
||||
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1delHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
|
||||
jboolean jresult = 0 ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
||||
@@ -78,8 +78,8 @@ public class ESLevent {
|
||||
return eslJNI.ESLevent_setPriority(swigCPtr, this, SWIGTYPE_p_esl_priority_t.getCPtr(priority));
|
||||
}
|
||||
|
||||
public String getHeader(String header_name) {
|
||||
return eslJNI.ESLevent_getHeader(swigCPtr, this, header_name);
|
||||
public String getHeader(String header_name, int idx) {
|
||||
return eslJNI.ESLevent_getHeader(swigCPtr, this, header_name, idx);
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
@@ -98,6 +98,14 @@ public class ESLevent {
|
||||
return eslJNI.ESLevent_addHeader(swigCPtr, this, header_name, value);
|
||||
}
|
||||
|
||||
public boolean pushHeader(String header_name, String value) {
|
||||
return eslJNI.ESLevent_pushHeader(swigCPtr, this, header_name, value);
|
||||
}
|
||||
|
||||
public boolean unshiftHeader(String header_name, String value) {
|
||||
return eslJNI.ESLevent_unshiftHeader(swigCPtr, this, header_name, value);
|
||||
}
|
||||
|
||||
public boolean delHeader(String header_name) {
|
||||
return eslJNI.ESLevent_delHeader(swigCPtr, this, header_name);
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@ class eslJNI {
|
||||
public final static native void delete_ESLevent(long jarg1);
|
||||
public final static native String ESLevent_serialize(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native boolean ESLevent_setPriority(long jarg1, ESLevent jarg1_, long jarg2);
|
||||
public final static native String ESLevent_getHeader(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native String ESLevent_getHeader(long jarg1, ESLevent jarg1_, String jarg2, int jarg3);
|
||||
public final static native String ESLevent_getBody(long jarg1, ESLevent jarg1_);
|
||||
public final static native String ESLevent_getType(long jarg1, ESLevent jarg1_);
|
||||
public final static native boolean ESLevent_addBody(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native boolean ESLevent_addHeader(long jarg1, ESLevent jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ESLevent_pushHeader(long jarg1, ESLevent jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ESLevent_unshiftHeader(long jarg1, ESLevent jarg1_, String jarg2, String jarg3);
|
||||
public final static native boolean ESLevent_delHeader(long jarg1, ESLevent jarg1_, String jarg2);
|
||||
public final static native String ESLevent_firstHeader(long jarg1, ESLevent jarg1_);
|
||||
public final static native String ESLevent_nextHeader(long jarg1, ESLevent jarg1_);
|
||||
|
||||
@@ -1923,18 +1923,23 @@ static int _wrap_ESLevent_getHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
|
||||
SWIG_check_num_args("getHeader",2,2)
|
||||
SWIG_check_num_args("getHeader",2,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getHeader",1,"ESLevent *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("getHeader",2,"char const *");
|
||||
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("getHeader",3,"int");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
|
||||
SWIG_fail_ptr("ESLevent_getHeader",1,SWIGTYPE_p_ESLevent);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if(lua_gettop(L)>=3){
|
||||
arg3 = (int)lua_tonumber(L, 3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
SWIG_arg=0;
|
||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
@@ -2056,6 +2061,68 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_ESLevent_pushHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
SWIG_check_num_args("pushHeader",3,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("pushHeader",1,"ESLevent *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("pushHeader",2,"char const *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("pushHeader",3,"char const *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
|
||||
SWIG_fail_ptr("ESLevent_pushHeader",1,SWIGTYPE_p_ESLevent);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_arg=0;
|
||||
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_ESLevent_unshiftHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
SWIG_check_num_args("unshiftHeader",3,3)
|
||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("unshiftHeader",1,"ESLevent *");
|
||||
if(!lua_isstring(L,2)) SWIG_fail_arg("unshiftHeader",2,"char const *");
|
||||
if(!lua_isstring(L,3)) SWIG_fail_arg("unshiftHeader",3,"char const *");
|
||||
|
||||
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
|
||||
SWIG_fail_ptr("ESLevent_unshiftHeader",1,SWIGTYPE_p_ESLevent);
|
||||
}
|
||||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
arg3 = (char *)lua_tostring(L, 3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_arg=0;
|
||||
lua_pushboolean(L,(int)(result==true)); SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if(0) SWIG_fail;
|
||||
|
||||
fail:
|
||||
lua_error(L);
|
||||
return SWIG_arg;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_ESLevent_delHeader(lua_State* L) {
|
||||
int SWIG_arg = -1;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
@@ -2146,6 +2213,8 @@ static swig_lua_method swig_ESLevent_methods[] = {
|
||||
{"getType", _wrap_ESLevent_getType},
|
||||
{"addBody", _wrap_ESLevent_addBody},
|
||||
{"addHeader", _wrap_ESLevent_addHeader},
|
||||
{"pushHeader", _wrap_ESLevent_pushHeader},
|
||||
{"unshiftHeader", _wrap_ESLevent_unshiftHeader},
|
||||
{"delHeader", _wrap_ESLevent_delHeader},
|
||||
{"firstHeader", _wrap_ESLevent_firstHeader},
|
||||
{"nextHeader", _wrap_ESLevent_nextHeader},
|
||||
|
||||
@@ -221,7 +221,7 @@ class ESLPINVOKE {
|
||||
public static extern bool ESLevent_SetPriority(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_GetHeader")]
|
||||
public static extern string ESLevent_GetHeader(HandleRef jarg1, string jarg2);
|
||||
public static extern string ESLevent_GetHeader(HandleRef jarg1, string jarg2, int jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_GetBody")]
|
||||
public static extern string ESLevent_GetBody(HandleRef jarg1);
|
||||
@@ -235,6 +235,12 @@ class ESLPINVOKE {
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_AddHeader")]
|
||||
public static extern bool ESLevent_AddHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_pushHeader")]
|
||||
public static extern bool ESLevent_pushHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_unshiftHeader")]
|
||||
public static extern bool ESLevent_unshiftHeader(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("ESL", EntryPoint="CSharp_ESLevent_DelHeader")]
|
||||
public static extern bool ESLevent_DelHeader(HandleRef jarg1, string jarg2);
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ public class ESLevent : IDisposable {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string GetHeader(string header_name) {
|
||||
string ret = ESLPINVOKE.ESLevent_GetHeader(swigCPtr, header_name);
|
||||
public string GetHeader(string header_name, int idx) {
|
||||
string ret = ESLPINVOKE.ESLevent_GetHeader(swigCPtr, header_name, idx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -114,6 +114,16 @@ public class ESLevent : IDisposable {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool pushHeader(string header_name, string value) {
|
||||
bool ret = ESLPINVOKE.ESLevent_pushHeader(swigCPtr, header_name, value);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool unshiftHeader(string header_name, string value) {
|
||||
bool ret = ESLPINVOKE.ESLevent_unshiftHeader(swigCPtr, header_name, value);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public bool DelHeader(string header_name) {
|
||||
bool ret = ESLPINVOKE.ESLevent_DelHeader(swigCPtr, header_name);
|
||||
return ret;
|
||||
|
||||
@@ -436,15 +436,17 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_SetPriority(void * jarg1, vo
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_GetHeader(void * jarg1, char * jarg2) {
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_GetHeader(void * jarg1, char * jarg2, int jarg3) {
|
||||
char * jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
|
||||
arg1 = (ESLevent *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
arg3 = (int)jarg3;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
@@ -504,6 +506,38 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_AddHeader(void * jarg1, char
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_pushHeader(void * jarg1, char * jarg2, char * jarg3) {
|
||||
unsigned int jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (ESLevent *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_unshiftHeader(void * jarg1, char * jarg2, char * jarg3) {
|
||||
unsigned int jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (ESLevent *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_DelHeader(void * jarg1, char * jarg2) {
|
||||
unsigned int jresult ;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
|
||||
@@ -88,6 +88,8 @@ sub DESTROY {
|
||||
*getType = *ESLc::ESLevent_getType;
|
||||
*addBody = *ESLc::ESLevent_addBody;
|
||||
*addHeader = *ESLc::ESLevent_addHeader;
|
||||
*pushHeader = *ESLc::ESLevent_pushHeader;
|
||||
*unshiftHeader = *ESLc::ESLevent_unshiftHeader;
|
||||
*delHeader = *ESLc::ESLevent_delHeader;
|
||||
*firstHeader = *ESLc::ESLevent_firstHeader;
|
||||
*nextHeader = *ESLc::ESLevent_nextHeader;
|
||||
|
||||
+117
-3
@@ -2285,17 +2285,20 @@ XS(_wrap_ESLevent_getHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 2) || (items > 2)) {
|
||||
SWIG_croak("Usage: ESLevent_getHeader(self,header_name);");
|
||||
if ((items < 2) || (items > 3)) {
|
||||
SWIG_croak("Usage: ESLevent_getHeader(self,header_name,idx);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
@@ -2307,14 +2310,23 @@ XS(_wrap_ESLevent_getHeader) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if (items > 2) {
|
||||
ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
@@ -2465,6 +2477,106 @@ XS(_wrap_ESLevent_addHeader) {
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ESLevent_pushHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 3) || (items > 3)) {
|
||||
SWIG_croak("Usage: ESLevent_pushHeader(self,header_name,value);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ESLevent_unshiftHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 3) || (items > 3)) {
|
||||
SWIG_croak("Usage: ESLevent_unshiftHeader(self,header_name,value);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ESLevent_delHeader) {
|
||||
{
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
@@ -3658,6 +3770,8 @@ static swig_command_info swig_commands[] = {
|
||||
{"ESLc::ESLevent_getType", _wrap_ESLevent_getType},
|
||||
{"ESLc::ESLevent_addBody", _wrap_ESLevent_addBody},
|
||||
{"ESLc::ESLevent_addHeader", _wrap_ESLevent_addHeader},
|
||||
{"ESLc::ESLevent_pushHeader", _wrap_ESLevent_pushHeader},
|
||||
{"ESLc::ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader},
|
||||
{"ESLc::ESLevent_delHeader", _wrap_ESLevent_delHeader},
|
||||
{"ESLc::ESLevent_firstHeader", _wrap_ESLevent_firstHeader},
|
||||
{"ESLc::ESLevent_nextHeader", _wrap_ESLevent_nextHeader},
|
||||
|
||||
+10
-2
@@ -76,8 +76,8 @@ class ESLevent {
|
||||
return $r;
|
||||
}
|
||||
|
||||
function getHeader($header_name) {
|
||||
return ESLevent_getHeader($this->_cPtr,$header_name);
|
||||
function getHeader($header_name,$idx=-1) {
|
||||
return ESLevent_getHeader($this->_cPtr,$header_name,$idx);
|
||||
}
|
||||
|
||||
function getBody() {
|
||||
@@ -96,6 +96,14 @@ class ESLevent {
|
||||
return ESLevent_addHeader($this->_cPtr,$header_name,$value);
|
||||
}
|
||||
|
||||
function pushHeader($header_name,$value) {
|
||||
return ESLevent_pushHeader($this->_cPtr,$header_name,$value);
|
||||
}
|
||||
|
||||
function unshiftHeader($header_name,$value) {
|
||||
return ESLevent_unshiftHeader($this->_cPtr,$header_name,$value);
|
||||
}
|
||||
|
||||
function delHeader($header_name) {
|
||||
return ESLevent_delHeader($this->_cPtr,$header_name);
|
||||
}
|
||||
|
||||
@@ -1445,13 +1445,16 @@ fail:
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_getHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
zval **args[2];
|
||||
zval **args[3];
|
||||
int arg_count;
|
||||
|
||||
SWIG_ResetError();
|
||||
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
arg_count = ZEND_NUM_ARGS();
|
||||
if(arg_count<2 || arg_count>3 ||
|
||||
zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
|
||||
WRONG_PARAM_COUNT;
|
||||
|
||||
{
|
||||
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLevent, 0) < 0) {
|
||||
@@ -1465,7 +1468,14 @@ ZEND_NAMED_FUNCTION(_wrap_ESLevent_getHeader) {
|
||||
arg2 = (char *) Z_STRVAL_PP(args[1]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if(arg_count > 2) {
|
||||
/*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
|
||||
convert_to_long_ex(args[2]);
|
||||
arg3 = (int) Z_LVAL_PP(args[2]);
|
||||
/*@SWIG@*/;
|
||||
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
{
|
||||
if(!result) {
|
||||
ZVAL_NULL(return_value);
|
||||
@@ -1612,6 +1622,86 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_pushHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
zval **args[3];
|
||||
|
||||
SWIG_ResetError();
|
||||
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
{
|
||||
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLevent, 0) < 0) {
|
||||
SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLevent_pushHeader. Expected SWIGTYPE_p_ESLevent");
|
||||
}
|
||||
}
|
||||
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
|
||||
|
||||
/*@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@*/;
|
||||
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
{
|
||||
ZVAL_BOOL(return_value,(result)?1:0);
|
||||
}
|
||||
return;
|
||||
fail:
|
||||
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
|
||||
}
|
||||
|
||||
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_unshiftHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
zval **args[3];
|
||||
|
||||
SWIG_ResetError();
|
||||
if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
{
|
||||
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLevent, 0) < 0) {
|
||||
SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLevent_unshiftHeader. Expected SWIGTYPE_p_ESLevent");
|
||||
}
|
||||
}
|
||||
if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
|
||||
|
||||
/*@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@*/;
|
||||
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
{
|
||||
ZVAL_BOOL(return_value,(result)?1:0);
|
||||
}
|
||||
return;
|
||||
fail:
|
||||
zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
|
||||
}
|
||||
|
||||
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_delHeader) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
@@ -2547,6 +2637,8 @@ static zend_function_entry ESL_functions[] = {
|
||||
SWIG_ZEND_NAMED_FE(eslevent_gettype,_wrap_ESLevent_getType,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_addbody,_wrap_ESLevent_addBody,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_addheader,_wrap_ESLevent_addHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_pushheader,_wrap_ESLevent_pushHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_unshiftheader,_wrap_ESLevent_unshiftHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_delheader,_wrap_ESLevent_delHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_firstheader,_wrap_ESLevent_firstHeader,NULL)
|
||||
SWIG_ZEND_NAMED_FE(eslevent_nextheader,_wrap_ESLevent_nextHeader,NULL)
|
||||
|
||||
@@ -46,6 +46,8 @@ ZEND_NAMED_FUNCTION(_wrap_ESLevent_getBody);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_getType);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_addBody);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_addHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_pushHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_unshiftHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_delHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_firstHeader);
|
||||
ZEND_NAMED_FUNCTION(_wrap_ESLevent_nextHeader);
|
||||
|
||||
@@ -59,6 +59,8 @@ class ESLevent:
|
||||
def getType(*args): return apply(_ESL.ESLevent_getType, args)
|
||||
def addBody(*args): return apply(_ESL.ESLevent_addBody, args)
|
||||
def addHeader(*args): return apply(_ESL.ESLevent_addHeader, args)
|
||||
def pushHeader(*args): return apply(_ESL.ESLevent_pushHeader, args)
|
||||
def unshiftHeader(*args): return apply(_ESL.ESLevent_unshiftHeader, args)
|
||||
def delHeader(*args): return apply(_ESL.ESLevent_delHeader, args)
|
||||
def firstHeader(*args): return apply(_ESL.ESLevent_firstHeader, args)
|
||||
def nextHeader(*args): return apply(_ESL.ESLevent_nextHeader, args)
|
||||
|
||||
@@ -3373,17 +3373,21 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_getHeader",&obj0,&obj1)) SWIG_fail;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLevent_getHeader",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
@@ -3394,9 +3398,16 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
if (obj2) {
|
||||
ecode3 = SWIG_AsVal_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
{
|
||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||
}
|
||||
resultobj = SWIG_FromCharPtr((const char *)result);
|
||||
@@ -3562,6 +3573,112 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ESLevent_pushHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 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 ;
|
||||
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_pushHeader",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
{
|
||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||
}
|
||||
resultobj = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ESLevent_unshiftHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 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 ;
|
||||
|
||||
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
||||
if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_unshiftHeader",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
{
|
||||
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
SWIG_PYTHON_THREAD_END_ALLOW;
|
||||
}
|
||||
resultobj = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
SWIG_PYTHON_THREAD_END_BLOCK;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ESLevent_delHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
@@ -4726,6 +4843,8 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"ESLevent_getType", _wrap_ESLevent_getType, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_addBody", _wrap_ESLevent_addBody, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_addHeader", _wrap_ESLevent_addHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_pushHeader", _wrap_ESLevent_pushHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_delHeader", _wrap_ESLevent_delHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_firstHeader", _wrap_ESLevent_firstHeader, METH_VARARGS, NULL},
|
||||
{ (char *)"ESLevent_nextHeader", _wrap_ESLevent_nextHeader, METH_VARARGS, NULL},
|
||||
|
||||
+106
-2
@@ -2396,15 +2396,18 @@ SWIGINTERN VALUE
|
||||
_wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 = (int) -1 ;
|
||||
char *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 1) || (argc > 1)) {
|
||||
if ((argc < 1) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
@@ -2417,7 +2420,14 @@ _wrap_ESLevent_getHeader(int argc, VALUE *argv, VALUE self) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","getHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2);
|
||||
if (argc > 1) {
|
||||
ecode3 = SWIG_AsVal_int(argv[1], &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","getHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
}
|
||||
result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
|
||||
vresult = SWIG_FromCharPtr((const char *)result);
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
return vresult;
|
||||
@@ -2556,6 +2566,98 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_pushHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 2) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","pushHeader", 1, self ));
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pushHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pushHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
|
||||
vresult = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return vresult;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_unshiftHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
int res3 ;
|
||||
char *buf3 = 0 ;
|
||||
int alloc3 = 0 ;
|
||||
VALUE vresult = Qnil;
|
||||
|
||||
if ((argc < 2) || (argc > 2)) {
|
||||
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLevent *","unshiftHeader", 1, self ));
|
||||
}
|
||||
arg1 = reinterpret_cast< ESLevent * >(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","unshiftHeader", 2, argv[0] ));
|
||||
}
|
||||
arg2 = reinterpret_cast< char * >(buf2);
|
||||
res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","unshiftHeader", 3, argv[1] ));
|
||||
}
|
||||
arg3 = reinterpret_cast< char * >(buf3);
|
||||
result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
|
||||
vresult = SWIG_From_bool(static_cast< bool >(result));
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return vresult;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN VALUE
|
||||
_wrap_ESLevent_delHeader(int argc, VALUE *argv, VALUE self) {
|
||||
ESLevent *arg1 = (ESLevent *) 0 ;
|
||||
@@ -3835,6 +3937,8 @@ SWIGEXPORT void Init_ESL(void) {
|
||||
rb_define_method(cESLevent.klass, "getType", VALUEFUNC(_wrap_ESLevent_getType), -1);
|
||||
rb_define_method(cESLevent.klass, "addBody", VALUEFUNC(_wrap_ESLevent_addBody), -1);
|
||||
rb_define_method(cESLevent.klass, "addHeader", VALUEFUNC(_wrap_ESLevent_addHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "pushHeader", VALUEFUNC(_wrap_ESLevent_pushHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "unshiftHeader", VALUEFUNC(_wrap_ESLevent_unshiftHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "delHeader", VALUEFUNC(_wrap_ESLevent_delHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "firstHeader", VALUEFUNC(_wrap_ESLevent_firstHeader), -1);
|
||||
rb_define_method(cESLevent.klass, "nextHeader", VALUEFUNC(_wrap_ESLevent_nextHeader), -1);
|
||||
|
||||
+29
-2
@@ -1088,7 +1088,11 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
||||
if (hname && hval) {
|
||||
esl_url_decode(hval);
|
||||
esl_log(ESL_LOG_DEBUG, "RECV HEADER [%s] = [%s]\n", hname, hval);
|
||||
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, hname, hval);
|
||||
if (!strncmp(hval, "ARRAY::", 7)) {
|
||||
esl_event_add_array(revent, hname, hval);
|
||||
} else {
|
||||
esl_event_add_header_string(revent, ESL_STACK_BOTTOM, hname, hval);
|
||||
}
|
||||
}
|
||||
|
||||
p = e;
|
||||
@@ -1217,7 +1221,12 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
||||
esl_event_del_header(handle->last_ievent, "event-name");
|
||||
esl_name_event(hval, &handle->last_ievent->event_id);
|
||||
}
|
||||
esl_event_add_header_string(handle->last_ievent, ESL_STACK_BOTTOM, hname, hval);
|
||||
|
||||
if (!strncmp(hval, "ARRAY::", 7)) {
|
||||
esl_event_add_array(handle->last_ievent, hname, hval);
|
||||
} else {
|
||||
esl_event_add_header_string(handle->last_ievent, ESL_STACK_BOTTOM, hname, hval);
|
||||
}
|
||||
}
|
||||
|
||||
beg = c + 1;
|
||||
@@ -1371,5 +1380,23 @@ ESL_DECLARE(esl_status_t) esl_send_recv_timed(esl_handle_t *handle, const char *
|
||||
}
|
||||
|
||||
|
||||
ESL_DECLARE(unsigned int) esl_separate_string_string(char *buf, const char *delim, char **array, unsigned int arraylen)
|
||||
{
|
||||
unsigned int count = 0;
|
||||
char *d;
|
||||
size_t dlen = strlen(delim);
|
||||
|
||||
array[count++] = buf;
|
||||
|
||||
while (count < arraylen && array[count - 1]) {
|
||||
if ((d = strstr(array[count - 1], delim))) {
|
||||
*d = '\0';
|
||||
d += dlen;
|
||||
array[count++] = d;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
+469
-160
@@ -235,8 +235,7 @@ static unsigned int esl_ci_hashfunc_default(const char *char_key, esl_ssize_t *k
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_name)
|
||||
ESL_DECLARE(esl_event_header_t *) esl_event_get_header_ptr(esl_event_t *event, const char *header_name)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
esl_ssize_t hlen = -1;
|
||||
@@ -244,18 +243,39 @@ ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_n
|
||||
|
||||
esl_assert(event);
|
||||
|
||||
if (!header_name) return NULL;
|
||||
|
||||
if (!header_name)
|
||||
return NULL;
|
||||
|
||||
hash = esl_ci_hashfunc_default(header_name, &hlen);
|
||||
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
if ((!hp->hash || hash == hp->hash) && !strcasecmp(hp->name, header_name) ) {
|
||||
return hp->value;
|
||||
if ((!hp->hash || hash == hp->hash) && !strcasecmp(hp->name, header_name)) {
|
||||
return hp;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *header_name, int idx)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
|
||||
if ((hp = esl_event_get_header_ptr(event, header_name))) {
|
||||
if (idx > -1) {
|
||||
if (idx < hp->idx) {
|
||||
return hp->array[idx];
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return hp->value;
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
|
||||
{
|
||||
return (event ? event->body : NULL);
|
||||
@@ -264,7 +284,7 @@ ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event)
|
||||
ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const char *header_name, const char *val)
|
||||
{
|
||||
esl_event_header_t *hp, *lp = NULL, *tp;
|
||||
esl_status_t status = ESL_FAIL;
|
||||
esl_status_t status = ESL_FALSE;
|
||||
int x = 0;
|
||||
esl_ssize_t hlen = -1;
|
||||
unsigned long hash = 0;
|
||||
@@ -273,12 +293,12 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
||||
while (tp) {
|
||||
hp = tp;
|
||||
tp = tp->next;
|
||||
|
||||
|
||||
x++;
|
||||
esl_assert(x < 1000);
|
||||
esl_assert(x < 1000000);
|
||||
hash = esl_ci_hashfunc_default(header_name, &hlen);
|
||||
|
||||
if (hp->name && (!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
|
||||
if ((!hp->hash || hash == hp->hash) && (hp->name && !strcasecmp(header_name, hp->name)) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
|
||||
if (lp) {
|
||||
lp->next = hp->next;
|
||||
} else {
|
||||
@@ -288,10 +308,27 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
||||
event->last_header = lp;
|
||||
}
|
||||
FREE(hp->name);
|
||||
FREE(hp->value);
|
||||
memset(hp, 0, sizeof(*hp));
|
||||
FREE(hp);
|
||||
|
||||
if (hp->idx) {
|
||||
int i = 0;
|
||||
hp->value = NULL;
|
||||
|
||||
for (i = 0; i < hp->idx; i++) {
|
||||
FREE(hp->array[i]);
|
||||
}
|
||||
FREE(hp->array);
|
||||
}
|
||||
|
||||
FREE(hp->value);
|
||||
|
||||
memset(hp, 0, sizeof(*hp));
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
if (esl_queue_trypush(EVENT_HEADER_RECYCLE_QUEUE, hp) != ESL_SUCCESS) {
|
||||
FREE(hp);
|
||||
}
|
||||
#else
|
||||
FREE(hp);
|
||||
#endif
|
||||
status = ESL_SUCCESS;
|
||||
} else {
|
||||
lp = hp;
|
||||
@@ -301,40 +338,245 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
||||
return status;
|
||||
}
|
||||
|
||||
static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t stack, const char *header_name, char *data)
|
||||
static esl_event_header_t *new_header(const char *header_name)
|
||||
{
|
||||
esl_event_header_t *header;
|
||||
esl_ssize_t hlen = -1;
|
||||
|
||||
header = ALLOC(sizeof(*header));
|
||||
esl_assert(header);
|
||||
|
||||
if ((event->flags & ESL_UNIQ_HEADERS)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
void *pop;
|
||||
if (esl_queue_trypop(EVENT_HEADER_RECYCLE_QUEUE, &pop) == ESL_SUCCESS) {
|
||||
header = (esl_event_header_t *) pop;
|
||||
} else {
|
||||
#endif
|
||||
header = ALLOC(sizeof(*header));
|
||||
esl_assert(header);
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(header, 0, sizeof(*header));
|
||||
header->name = DUP(header_name);
|
||||
|
||||
return header;
|
||||
|
||||
}
|
||||
|
||||
ESL_DECLARE(int) esl_event_add_array(esl_event_t *event, const char *var, const char *val)
|
||||
{
|
||||
char *data;
|
||||
char **array;
|
||||
int max = 0;
|
||||
int len;
|
||||
const char *p;
|
||||
int i;
|
||||
|
||||
if (strlen(val) < 8) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(header, 0, sizeof(*header));
|
||||
p = val + 7;
|
||||
|
||||
header->name = DUP(header_name);
|
||||
header->value = data;
|
||||
header->hash = esl_ci_hashfunc_default(header->name, &hlen);
|
||||
max = 1;
|
||||
|
||||
while((p = strstr(p, "|:"))) {
|
||||
max++;
|
||||
p += 2;
|
||||
}
|
||||
|
||||
if (!max) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
data = strdup(val + 7);
|
||||
|
||||
if (stack == ESL_STACK_TOP) {
|
||||
header->next = event->headers;
|
||||
event->headers = header;
|
||||
if (!event->last_header) {
|
||||
len = (sizeof(char *) * max) + 1;
|
||||
array = malloc(len);
|
||||
esl_assert(array);
|
||||
memset(array, 0, len);
|
||||
|
||||
esl_separate_string_string(data, "|:", array, max);
|
||||
|
||||
for(i = 0; i < max; i++) {
|
||||
esl_event_add_header_string(event, ESL_STACK_PUSH, var, array[i]);
|
||||
}
|
||||
|
||||
free(array);
|
||||
free(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t stack, const char *header_name, char *data)
|
||||
{
|
||||
esl_event_header_t *header = NULL;
|
||||
esl_ssize_t hlen = -1;
|
||||
int exists = 0, fly = 0;
|
||||
char *index_ptr;
|
||||
int index = 0;
|
||||
char *real_header_name = NULL;
|
||||
|
||||
if ((index_ptr = strchr(header_name, '['))) {
|
||||
index_ptr++;
|
||||
index = atoi(index_ptr);
|
||||
real_header_name = DUP(header_name);
|
||||
if ((index_ptr = strchr(real_header_name, '['))) {
|
||||
*index_ptr++ = '\0';
|
||||
}
|
||||
header_name = real_header_name;
|
||||
}
|
||||
|
||||
if (index_ptr || (stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
|
||||
|
||||
if (!(header = esl_event_get_header_ptr(event, header_name)) && index_ptr) {
|
||||
|
||||
header = new_header(header_name);
|
||||
|
||||
if (esl_test_flag(event, ESL_EF_UNIQ_HEADERS)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
}
|
||||
|
||||
fly++;
|
||||
}
|
||||
|
||||
if ((header = esl_event_get_header_ptr(event, header_name))) {
|
||||
|
||||
if (index_ptr) {
|
||||
if (index > -1 && index <= 4000) {
|
||||
if (index < header->idx) {
|
||||
FREE(header->array[index]);
|
||||
header->array[index] = DUP(data);
|
||||
} else {
|
||||
int i;
|
||||
char **m;
|
||||
|
||||
m = realloc(header->array, sizeof(char *) * (index + 1));
|
||||
esl_assert(m);
|
||||
header->array = m;
|
||||
for (i = header->idx; i < index; i++) {
|
||||
m[i] = DUP("");
|
||||
}
|
||||
m[index] = DUP(data);
|
||||
header->idx = index + 1;
|
||||
if (!fly) {
|
||||
exists = 1;
|
||||
}
|
||||
|
||||
goto redraw;
|
||||
}
|
||||
}
|
||||
goto end;
|
||||
} else {
|
||||
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
|
||||
exists++;
|
||||
stack &= ~(ESL_STACK_TOP | ESL_STACK_BOTTOM);
|
||||
} else {
|
||||
header = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!header) {
|
||||
|
||||
if (esl_strlen_zero(data)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
FREE(data);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (esl_test_flag(event, ESL_EF_UNIQ_HEADERS)) {
|
||||
esl_event_del_header(event, header_name);
|
||||
}
|
||||
|
||||
if (strstr(data, "ARRAY::")) {
|
||||
esl_event_add_array(event, header_name, data);
|
||||
FREE(data);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
header = new_header(header_name);
|
||||
}
|
||||
|
||||
if ((stack & ESL_STACK_PUSH) || (stack & ESL_STACK_UNSHIFT)) {
|
||||
char **m = NULL;
|
||||
esl_size_t len = 0;
|
||||
char *hv;
|
||||
int i = 0, j = 0;
|
||||
|
||||
if (header->value && !header->idx) {
|
||||
m = malloc(sizeof(char *));
|
||||
esl_assert(m);
|
||||
m[0] = header->value;
|
||||
header->value = NULL;
|
||||
header->array = m;
|
||||
header->idx++;
|
||||
m = NULL;
|
||||
}
|
||||
|
||||
i = header->idx + 1;
|
||||
m = realloc(header->array, sizeof(char *) * i);
|
||||
esl_assert(m);
|
||||
|
||||
if ((stack & ESL_STACK_PUSH)) {
|
||||
m[header->idx] = data;
|
||||
} else if ((stack & ESL_STACK_UNSHIFT)) {
|
||||
for (j = header->idx; j > 0; j--) {
|
||||
m[j] = m[j-1];
|
||||
}
|
||||
m[0] = data;
|
||||
}
|
||||
|
||||
header->idx++;
|
||||
header->array = m;
|
||||
|
||||
redraw:
|
||||
len = 0;
|
||||
for(j = 0; j < header->idx; j++) {
|
||||
len += strlen(header->array[j]) + 2;
|
||||
}
|
||||
|
||||
if (len) {
|
||||
len += 8;
|
||||
hv = realloc(header->value, len);
|
||||
esl_assert(hv);
|
||||
header->value = hv;
|
||||
|
||||
esl_snprintf(header->value, len, "ARRAY::");
|
||||
for(j = 0; j < header->idx; j++) {
|
||||
esl_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "|:", header->array[j]);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
header->value = data;
|
||||
}
|
||||
|
||||
if (!exists) {
|
||||
header->hash = esl_ci_hashfunc_default(header->name, &hlen);
|
||||
|
||||
if ((stack & ESL_STACK_TOP)) {
|
||||
header->next = event->headers;
|
||||
event->headers = header;
|
||||
if (!event->last_header) {
|
||||
event->last_header = header;
|
||||
}
|
||||
} else {
|
||||
if (event->last_header) {
|
||||
event->last_header->next = header;
|
||||
} else {
|
||||
event->headers = header;
|
||||
header->next = NULL;
|
||||
}
|
||||
event->last_header = header;
|
||||
}
|
||||
} else {
|
||||
if (event->last_header) {
|
||||
event->last_header->next = header;
|
||||
} else {
|
||||
event->headers = header;
|
||||
header->next = NULL;
|
||||
}
|
||||
event->last_header = header;
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
esl_safe_free(real_header_name);
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -386,48 +628,98 @@ ESL_DECLARE(esl_status_t) esl_event_add_body(esl_event_t *event, const char *fmt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ESL_DECLARE(void) esl_event_destroy(esl_event_t **event)
|
||||
{
|
||||
esl_event_t *ep = *event, *this_event;
|
||||
esl_event_header_t *hp, *this_header;
|
||||
esl_event_t *ep = *event;
|
||||
esl_event_header_t *hp, *this;
|
||||
|
||||
for (ep = *event ; ep ;) {
|
||||
this_event = ep;
|
||||
ep = ep->next;
|
||||
|
||||
for (hp = this_event->headers; hp;) {
|
||||
this_header = hp;
|
||||
if (ep) {
|
||||
for (hp = ep->headers; hp;) {
|
||||
this = hp;
|
||||
hp = hp->next;
|
||||
FREE(this_header->name);
|
||||
FREE(this_header->value);
|
||||
memset(this_header, 0, sizeof(*this_header));
|
||||
FREE(this_header);
|
||||
FREE(this->name);
|
||||
|
||||
if (this->idx) {
|
||||
int i = 0;
|
||||
this->value = NULL;
|
||||
for (i = 0; i < this->idx; i++) {
|
||||
FREE(this->array[i]);
|
||||
}
|
||||
FREE(this->array);
|
||||
}
|
||||
|
||||
FREE(this->value);
|
||||
|
||||
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
if (esl_queue_trypush(EVENT_HEADER_RECYCLE_QUEUE, this) != ESL_SUCCESS) {
|
||||
FREE(this);
|
||||
}
|
||||
#else
|
||||
FREE(this);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
FREE(this_event->body);
|
||||
FREE(this_event->subclass_name);
|
||||
memset(this_event, 0, sizeof(*this_event));
|
||||
FREE(this_event);
|
||||
FREE(ep->body);
|
||||
FREE(ep->subclass_name);
|
||||
#ifdef ESL_EVENT_RECYCLE
|
||||
if (esl_queue_trypush(EVENT_RECYCLE_QUEUE, ep) != ESL_SUCCESS) {
|
||||
FREE(ep);
|
||||
}
|
||||
#else
|
||||
FREE(ep);
|
||||
#endif
|
||||
|
||||
}
|
||||
*event = NULL;
|
||||
}
|
||||
|
||||
ESL_DECLARE(void) esl_event_merge(esl_event_t *event, esl_event_t *tomerge)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
|
||||
esl_assert(tomerge && event);
|
||||
|
||||
for (hp = tomerge->headers; hp; hp = hp->next) {
|
||||
if (hp->idx) {
|
||||
int i;
|
||||
|
||||
for(i = 0; i < hp->idx; i++) {
|
||||
esl_event_add_header_string(event, ESL_STACK_PUSH, hp->name, hp->array[i]);
|
||||
}
|
||||
} else {
|
||||
esl_event_add_header_string(event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
|
||||
if (esl_event_create_subclass(event, ESL_EVENT_CLONE, todup->subclass_name) != ESL_SUCCESS) {
|
||||
return ESL_FAIL;
|
||||
return ESL_GENERR;
|
||||
}
|
||||
|
||||
(*event)->event_id = todup->event_id;
|
||||
|
||||
(*event)->event_user_data = todup->event_user_data;
|
||||
(*event)->bind_user_data = todup->bind_user_data;
|
||||
|
||||
(*event)->flags = todup->flags;
|
||||
for (hp = todup->headers; hp; hp = hp->next) {
|
||||
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
if (todup->subclass_name && !strcmp(hp->name, "Event-Subclass")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hp->idx) {
|
||||
int i;
|
||||
for (i = 0; i < hp->idx; i++) {
|
||||
esl_event_add_header_string(*event, ESL_STACK_PUSH, hp->name, hp->array[i]);
|
||||
}
|
||||
} else {
|
||||
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
}
|
||||
}
|
||||
|
||||
if (todup->body) {
|
||||
@@ -439,97 +731,26 @@ ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char *json)
|
||||
{
|
||||
esl_event_t *new_event;
|
||||
cJSON *cj, *cjp;
|
||||
|
||||
|
||||
if (!(cj = cJSON_Parse(json))) {
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
|
||||
cJSON_Delete(cj);
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
for (cjp = cj->child; cjp; cjp = cjp->next) {
|
||||
char *name = cjp->string;
|
||||
char *value = cjp->valuestring;
|
||||
|
||||
if (name && value) {
|
||||
if (!strcasecmp(name, "_body")) {
|
||||
esl_event_add_body(new_event, value);
|
||||
} else {
|
||||
if (!strcasecmp(name, "event-name")) {
|
||||
esl_event_del_header(new_event, "event-name");
|
||||
}
|
||||
|
||||
esl_name_event(value, &new_event->event_id);
|
||||
esl_event_add_header_string(new_event, ESL_STACK_BOTTOM, name, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
cJSON_Delete(cj);
|
||||
*event = new_event;
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_serialize_json(esl_event_t *event, char **str)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
cJSON *cj;
|
||||
|
||||
*str = NULL;
|
||||
|
||||
cj = cJSON_CreateObject();
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
cJSON_AddItemToObject(cj, hp->name, cJSON_CreateString(hp->value));
|
||||
}
|
||||
if (event->body) {
|
||||
int blen = (int) strlen(event->body);
|
||||
char tmp[25];
|
||||
|
||||
esl_snprintf(tmp, sizeof(tmp), "%d", blen);
|
||||
|
||||
cJSON_AddItemToObject(cj, "Content-Length", cJSON_CreateString(tmp));
|
||||
cJSON_AddItemToObject(cj, "_body", cJSON_CreateString(event->body));
|
||||
}
|
||||
|
||||
*str = cJSON_Print(cj);
|
||||
cJSON_Delete(cj);
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, esl_bool_t encode)
|
||||
{
|
||||
size_t len = 0;
|
||||
esl_size_t len = 0;
|
||||
esl_event_header_t *hp;
|
||||
size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
|
||||
esl_size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1536, new_len = 0;
|
||||
char *buf;
|
||||
char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialized copy */
|
||||
int clen = 0;
|
||||
|
||||
if (!event || !event->headers)
|
||||
return ESL_FAIL;
|
||||
|
||||
*str = NULL;
|
||||
|
||||
dlen = blocksize * 2;
|
||||
|
||||
if (!(buf = malloc(dlen))) {
|
||||
return ESL_FAIL;
|
||||
abort();
|
||||
}
|
||||
|
||||
/* go ahead and give ourselves some space to work with, should save a few reallocs */
|
||||
if (!(encode_buf = malloc(encode_len))) {
|
||||
esl_safe_free(buf);
|
||||
return ESL_FAIL;
|
||||
abort();
|
||||
}
|
||||
|
||||
/* esl_log_printf(ESL_CHANNEL_LOG, ESL_LOG_INFO, "hit serialized!.\n"); */
|
||||
@@ -542,54 +763,54 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
|
||||
* destroying loop.
|
||||
*/
|
||||
|
||||
if (!strcasecmp(hp->name, "content-length")) {
|
||||
clen++;
|
||||
if (hp->idx) {
|
||||
int i;
|
||||
new_len = 0;
|
||||
for(i = 0; i < hp->idx; i++) {
|
||||
new_len += (strlen(hp->array[i]) * 3) + 1;
|
||||
}
|
||||
} else {
|
||||
new_len = (strlen(hp->value) * 3) + 1;
|
||||
}
|
||||
|
||||
|
||||
new_len = (strlen(hp->value) * 3) + 1;
|
||||
|
||||
if (encode_len < new_len) {
|
||||
char *tmp;
|
||||
/* esl_log_printf(ESL_CHANNEL_LOG, ESL_LOG_INFO, "Allocing %d was %d.\n", ((strlen(hp->value) * 3) + 1), encode_len); */
|
||||
/* we can use realloc for initial alloc as well, if encode_buf is zero it treats it as a malloc */
|
||||
|
||||
/* keep track of the size of our allocation */
|
||||
encode_len = new_len;
|
||||
|
||||
if (!(tmp = realloc(encode_buf, encode_len))) {
|
||||
/* oh boy, ram's gone, give back what little we grabbed and bail */
|
||||
esl_safe_free(buf);
|
||||
esl_safe_free(encode_buf);
|
||||
return ESL_FAIL;
|
||||
abort();
|
||||
}
|
||||
|
||||
encode_buf = tmp;
|
||||
}
|
||||
|
||||
/* handle any bad things in the string like newlines : etc that screw up the serialized format */
|
||||
|
||||
|
||||
if (encode) {
|
||||
esl_url_encode(hp->value, encode_buf, encode_len);
|
||||
} else {
|
||||
esl_snprintf(encode_buf, encode_len, "%s", hp->value);
|
||||
esl_snprintf(encode_buf, encode_len, "[%s]", hp->value);
|
||||
}
|
||||
|
||||
|
||||
llen = strlen(hp->name) + strlen(encode_buf) + 8;
|
||||
|
||||
if ((len + llen) > dlen) {
|
||||
char *m;
|
||||
char *old = buf;
|
||||
dlen += (blocksize + (len + llen));
|
||||
if ((m = realloc(buf, dlen))) {
|
||||
buf = m;
|
||||
} else {
|
||||
/* we seem to be out of memory trying to resize the serialize string, give back what we already have and give up */
|
||||
esl_safe_free(buf);
|
||||
esl_safe_free(encode_buf);
|
||||
return ESL_FAIL;
|
||||
buf = old;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, *encode_buf == '\0' ? "_undef_" : encode_buf);
|
||||
esl_snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, *encode_buf == '\0' ? "_undef_" : encode_buf);
|
||||
len = strlen(buf);
|
||||
}
|
||||
|
||||
@@ -608,33 +829,121 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
|
||||
|
||||
if ((len + llen) > dlen) {
|
||||
char *m;
|
||||
char *old = buf;
|
||||
dlen += (blocksize + (len + llen));
|
||||
if ((m = realloc(buf, dlen))) {
|
||||
buf = m;
|
||||
} else {
|
||||
esl_safe_free(buf);
|
||||
return ESL_FAIL;
|
||||
buf = old;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (blen) {
|
||||
if (clen) {
|
||||
snprintf(buf + len, dlen - len, "\n%s", event->body);
|
||||
} else {
|
||||
snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", (int)strlen(event->body), event->body);
|
||||
|
||||
}
|
||||
esl_snprintf(buf + len, dlen - len, "Content-Length: %d\n\n%s", blen, event->body);
|
||||
} else {
|
||||
esl_snprintf(buf + len, dlen - len, "\n");
|
||||
}
|
||||
} else {
|
||||
snprintf(buf + len, dlen - len, "\n");
|
||||
esl_snprintf(buf + len, dlen - len, "\n");
|
||||
}
|
||||
|
||||
|
||||
*str = buf;
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_create_json(esl_event_t **event, const char *json)
|
||||
{
|
||||
esl_event_t *new_event;
|
||||
cJSON *cj, *cjp;
|
||||
|
||||
|
||||
if (!(cj = cJSON_Parse(json))) {
|
||||
return ESL_FALSE;
|
||||
}
|
||||
|
||||
if (esl_event_create(&new_event, ESL_EVENT_CLONE) != ESL_SUCCESS) {
|
||||
cJSON_Delete(cj);
|
||||
return ESL_FALSE;
|
||||
}
|
||||
|
||||
for (cjp = cj->child; cjp; cjp = cjp->next) {
|
||||
char *name = cjp->string;
|
||||
char *value = cjp->valuestring;
|
||||
|
||||
if (name && value) {
|
||||
if (!strcasecmp(name, "_body")) {
|
||||
esl_event_add_body(new_event, value, ESL_VA_NONE);
|
||||
} else {
|
||||
if (!strcasecmp(name, "event-name")) {
|
||||
esl_event_del_header(new_event, "event-name");
|
||||
esl_name_event(value, &new_event->event_id);
|
||||
}
|
||||
|
||||
esl_event_add_header_string(new_event, ESL_STACK_BOTTOM, name, value);
|
||||
}
|
||||
|
||||
} else if (name) {
|
||||
if (cjp->type == cJSON_Array) {
|
||||
int i, x = cJSON_GetArraySize(cjp);
|
||||
|
||||
for (i = 0; i < x; i++) {
|
||||
cJSON *item = cJSON_GetArrayItem(cjp, i);
|
||||
|
||||
if (item != NULL && item->type == cJSON_String && item->valuestring) {
|
||||
esl_event_add_header_string(new_event, ESL_STACK_PUSH, name, item->valuestring);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cJSON_Delete(cj);
|
||||
*event = new_event;
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
ESL_DECLARE(esl_status_t) esl_event_serialize_json(esl_event_t *event, char **str)
|
||||
{
|
||||
esl_event_header_t *hp;
|
||||
cJSON *cj;
|
||||
|
||||
*str = NULL;
|
||||
|
||||
cj = cJSON_CreateObject();
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
if (hp->idx) {
|
||||
cJSON *a = cJSON_CreateArray();
|
||||
int i;
|
||||
|
||||
for(i = 0; i < hp->idx; i++) {
|
||||
cJSON_AddItemToArray(a, cJSON_CreateString(hp->array[i]));
|
||||
}
|
||||
|
||||
cJSON_AddItemToObject(cj, hp->name, a);
|
||||
|
||||
} else {
|
||||
cJSON_AddItemToObject(cj, hp->name, cJSON_CreateString(hp->value));
|
||||
}
|
||||
}
|
||||
|
||||
if (event->body) {
|
||||
int blen = (int) strlen(event->body);
|
||||
char tmp[25];
|
||||
|
||||
esl_snprintf(tmp, sizeof(tmp), "%d", blen);
|
||||
|
||||
cJSON_AddItemToObject(cj, "Content-Length", cJSON_CreateString(tmp));
|
||||
cJSON_AddItemToObject(cj, "_body", cJSON_CreateString(event->body));
|
||||
}
|
||||
|
||||
*str = cJSON_Print(cj);
|
||||
cJSON_Delete(cj);
|
||||
|
||||
return ESL_SUCCESS;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
@@ -390,12 +390,12 @@ bool ESLevent::setPriority(esl_priority_t priority)
|
||||
return false;
|
||||
}
|
||||
|
||||
const char *ESLevent::getHeader(const char *header_name)
|
||||
const char *ESLevent::getHeader(const char *header_name, int idx)
|
||||
{
|
||||
this_check("");
|
||||
|
||||
if (event) {
|
||||
return esl_event_get_header(event, header_name);
|
||||
return esl_event_get_header_idx(event, header_name, idx);
|
||||
} else {
|
||||
esl_log(ESL_LOG_ERROR, "Trying to getHeader an event that does not exist!\n");
|
||||
}
|
||||
@@ -415,6 +415,32 @@ bool ESLevent::addHeader(const char *header_name, const char *value)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ESLevent::pushHeader(const char *header_name, const char *value)
|
||||
{
|
||||
this_check(false);
|
||||
|
||||
if (event) {
|
||||
return esl_event_add_header_string(event, ESL_STACK_PUSH, header_name, value) == ESL_SUCCESS ? true : false;
|
||||
} else {
|
||||
esl_log(ESL_LOG_ERROR, "Trying to addHeader an event that does not exist!\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ESLevent::unshiftHeader(const char *header_name, const char *value)
|
||||
{
|
||||
this_check(false);
|
||||
|
||||
if (event) {
|
||||
return esl_event_add_header_string(event, ESL_STACK_UNSHIFT, header_name, value) == ESL_SUCCESS ? true : false;
|
||||
} else {
|
||||
esl_log(ESL_LOG_ERROR, "Trying to addHeader an event that does not exist!\n");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ESLevent::delHeader(const char *header_name)
|
||||
{
|
||||
this_check(false);
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
|
||||
#define esl_copy_string(_x, _y, _z) strncpy(_x, _y, _z - 1)
|
||||
#define esl_set_string(_x, _y) esl_copy_string(_x, _y, sizeof(_x))
|
||||
#define ESL_VA_NONE "%s", ""
|
||||
|
||||
typedef struct esl_event_header esl_event_header_t;
|
||||
typedef struct esl_event esl_event_t;
|
||||
@@ -262,7 +263,8 @@ typedef enum {
|
||||
ESL_SUCCESS,
|
||||
ESL_FAIL,
|
||||
ESL_BREAK,
|
||||
ESL_DISCONNECTED
|
||||
ESL_DISCONNECTED,
|
||||
ESL_GENERR
|
||||
} esl_status_t;
|
||||
|
||||
#define BUF_CHUNK 65536 * 50
|
||||
@@ -309,6 +311,10 @@ typedef struct {
|
||||
int destroyed;
|
||||
} esl_handle_t;
|
||||
|
||||
#define esl_test_flag(obj, flag) ((obj)->flags & flag)
|
||||
#define esl_set_flag(obj, flag) (obj)->flags |= (flag)
|
||||
#define esl_clear_flag(obj, flag) (obj)->flags &= ~(flag)
|
||||
|
||||
/*! \brief Used internally for truth test */
|
||||
typedef enum {
|
||||
ESL_TRUE = 1,
|
||||
@@ -453,6 +459,8 @@ ESL_DECLARE(esl_status_t) esl_events(esl_handle_t *handle, esl_event_type_t etyp
|
||||
|
||||
ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags);
|
||||
|
||||
ESL_DECLARE(unsigned int) esl_separate_string_string(char *buf, const char *delim, char **array, unsigned int arraylen);
|
||||
|
||||
#define esl_recv(_h) esl_recv_event(_h, 0, NULL)
|
||||
#define esl_recv_timed(_h, _ms) esl_recv_event_timed(_h, _ms, 0, NULL)
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ extern "C" {
|
||||
|
||||
typedef enum {
|
||||
ESL_STACK_BOTTOM,
|
||||
ESL_STACK_TOP
|
||||
ESL_STACK_TOP,
|
||||
ESL_STACK_PUSH,
|
||||
ESL_STACK_UNSHIFT
|
||||
} esl_stack_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -141,6 +143,10 @@ typedef enum {
|
||||
char *name;
|
||||
/*! the header value */
|
||||
char *value;
|
||||
/*! array space */
|
||||
char **array;
|
||||
/*! array index */
|
||||
int idx;
|
||||
/*! hash of the header name */
|
||||
unsigned long hash;
|
||||
struct esl_event_header *next;
|
||||
@@ -174,7 +180,7 @@ struct esl_event {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
ESL_UNIQ_HEADERS = (1 << 0)
|
||||
ESL_EF_UNIQ_HEADERS = (1 << 0)
|
||||
} esl_event_flag_t;
|
||||
|
||||
|
||||
@@ -203,7 +209,11 @@ ESL_DECLARE(esl_status_t) esl_event_set_priority(esl_event_t *event, esl_priorit
|
||||
\param header_name the name of the header to read
|
||||
\return the value of the requested header
|
||||
*/
|
||||
ESL_DECLARE(char *)esl_event_get_header(esl_event_t *event, const char *header_name);
|
||||
|
||||
|
||||
ESL_DECLARE(esl_event_header_t *) esl_event_get_header_ptr(esl_event_t *event, const char *header_name);
|
||||
ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *header_name, int idx);
|
||||
#define esl_event_get_header(_e, _h) esl_event_get_header_idx(_e, _h, -1)
|
||||
|
||||
/*!
|
||||
\brief Retrieve the body value from an event
|
||||
@@ -223,6 +233,8 @@ ESL_DECLARE(char *)esl_event_get_body(esl_event_t *event);
|
||||
ESL_DECLARE(esl_status_t) esl_event_add_header(esl_event_t *event, esl_stack_t stack,
|
||||
const char *header_name, const char *fmt, ...); //PRINTF_FUNCTION(4, 5);
|
||||
|
||||
ESL_DECLARE(int) esl_event_add_array(esl_event_t *event, const char *var, const char *val);
|
||||
|
||||
/*!
|
||||
\brief Add a string header to an event
|
||||
\param event the event to add the header to
|
||||
@@ -250,6 +262,7 @@ ESL_DECLARE(void) esl_event_destroy(esl_event_t **event);
|
||||
\return ESL_SUCCESS if the event was duplicated
|
||||
*/
|
||||
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup);
|
||||
ESL_DECLARE(void) esl_event_merge(esl_event_t *event, esl_event_t *tomerge);
|
||||
|
||||
/*!
|
||||
\brief Render the name of an event id enumeration
|
||||
|
||||
@@ -56,11 +56,13 @@ class ESLevent {
|
||||
virtual ~ESLevent();
|
||||
const char *serialize(const char *format = NULL);
|
||||
bool setPriority(esl_priority_t priority = ESL_PRIORITY_NORMAL);
|
||||
const char *getHeader(const char *header_name);
|
||||
const char *getHeader(const char *header_name, int idx = -1);
|
||||
char *getBody(void);
|
||||
const char *getType(void);
|
||||
bool addBody(const char *value);
|
||||
bool addHeader(const char *header_name, const char *value);
|
||||
bool pushHeader(const char *header_name, const char *value);
|
||||
bool unshiftHeader(const char *header_name, const char *value);
|
||||
bool delHeader(const char *header_name);
|
||||
const char *firstHeader(void);
|
||||
const char *nextHeader(void);
|
||||
|
||||
+21
-21
@@ -90,7 +90,7 @@ library_include_HEADERS = \
|
||||
$(SRC)/include/ftdm_dso.h
|
||||
|
||||
lib_LTLIBRARIES = libfreetdm.la
|
||||
libfreetdm_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
libfreetdm_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
libfreetdm_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS)
|
||||
libfreetdm_la_LIBADD = $(LIBS)
|
||||
|
||||
@@ -104,39 +104,39 @@ noinst_PROGRAMS = testtones detect_tones detect_dtmf testpri testr2 testanalog
|
||||
|
||||
testapp_SOURCES = $(SRC)/testapp.c
|
||||
testapp_LDADD = libfreetdm.la
|
||||
testapp_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testapp_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testcid_SOURCES = $(SRC)/testcid.c
|
||||
testcid_LDADD = libfreetdm.la
|
||||
testcid_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testcid_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testtones_SOURCES = $(SRC)/testtones.c
|
||||
testtones_LDADD = libfreetdm.la
|
||||
testtones_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testtones_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
detect_tones_SOURCES = $(SRC)/detect_tones.c
|
||||
detect_tones_LDADD = libfreetdm.la
|
||||
detect_tones_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
detect_tones_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
detect_dtmf_SOURCES = $(SRC)/detect_dtmf.c
|
||||
detect_dtmf_LDADD = libfreetdm.la
|
||||
detect_dtmf_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
detect_dtmf_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
#testisdn_SOURCES = $(SRC)/testisdn.c
|
||||
#testisdn_LDADD = libfreetdm.la
|
||||
#testisdn_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
#testisdn_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testpri_SOURCES = $(SRC)/testpri.c
|
||||
testpri_LDADD = libfreetdm.la
|
||||
testpri_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testpri_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testr2_SOURCES = $(SRC)/testr2.c
|
||||
testr2_LDADD = libfreetdm.la
|
||||
testr2_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testr2_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
testanalog_SOURCES = $(SRC)/testanalog.c
|
||||
testanalog_LDADD = libfreetdm.la
|
||||
testanalog_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
testanalog_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
|
||||
#
|
||||
# ftmod modules
|
||||
@@ -144,22 +144,22 @@ testanalog_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
mod_LTLIBRARIES = ftmod_zt.la ftmod_skel.la ftmod_analog.la ftmod_analog_em.la
|
||||
|
||||
ftmod_zt_la_SOURCES = $(SRC)/ftmod/ftmod_zt/ftmod_zt.c
|
||||
ftmod_zt_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_zt_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_zt_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_zt_la_LIBADD = libfreetdm.la
|
||||
|
||||
ftmod_skel_la_SOURCES = $(SRC)/ftmod/ftmod_skel/ftmod_skel.c
|
||||
ftmod_skel_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_skel_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_skel_la_LDFLAGS = -module -avoid-version
|
||||
ftmod_skel_la_LIBADD = libfreetdm.la
|
||||
|
||||
ftmod_analog_la_SOURCES = $(SRC)/ftmod/ftmod_analog/ftmod_analog.c
|
||||
ftmod_analog_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_analog_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_analog_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_analog_la_LIBADD = libfreetdm.la
|
||||
|
||||
ftmod_analog_em_la_SOURCES = $(SRC)/ftmod/ftmod_analog_em/ftmod_analog_em.c
|
||||
ftmod_analog_em_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_analog_em_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_analog_em_la_LDFLAGS = -shared -module -avoid-version
|
||||
ftmod_analog_em_la_LIBADD = libfreetdm.la
|
||||
|
||||
@@ -168,7 +168,7 @@ mod_LTLIBRARIES += ftmod_wanpipe.la
|
||||
ftmod_wanpipe_la_SOURCES = $(SRC)/ftmod/ftmod_wanpipe/ftmod_wanpipe.c
|
||||
# some structures within Wanpipe drivers are not c99 compatible, so we need to compile ftmod_wanpipe
|
||||
# without c99 flags, use FTDM_COMPAT_CFLAGS instead
|
||||
ftmod_wanpipe_la_CFLAGS = $(AM_CFLAGS) $(FTDM_COMPAT_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
|
||||
ftmod_wanpipe_la_CFLAGS = $(FTDM_COMPAT_CFLAGS) $(AM_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe
|
||||
ftmod_wanpipe_la_LDFLAGS = -shared -module -avoid-version -lsangoma
|
||||
ftmod_wanpipe_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
@@ -176,7 +176,7 @@ endif
|
||||
if HAVE_LIBISDN
|
||||
mod_LTLIBRARIES += ftmod_isdn.la
|
||||
ftmod_isdn_la_SOURCES = $(SRC)/ftmod/ftmod_isdn/ftmod_isdn.c
|
||||
ftmod_isdn_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE $(LIBISDN_CPPFLAGS) $(PCAP_CPPFLAGS)
|
||||
ftmod_isdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE $(LIBISDN_CPPFLAGS) $(PCAP_CPPFLAGS)
|
||||
ftmod_isdn_la_LDFLAGS = -shared -module -avoid-version $(LIBISDN_LDFLAGS) $(PCAP_LDFLAGS)
|
||||
ftmod_isdn_la_LIBADD = libfreetdm.la $(LIBISDN_LIBS) $(PCAP_LIBS)
|
||||
endif
|
||||
@@ -184,7 +184,7 @@ endif
|
||||
if HAVE_LIBPRI
|
||||
mod_LTLIBRARIES += ftmod_libpri.la
|
||||
ftmod_libpri_la_SOURCES = $(SRC)/ftmod/ftmod_libpri/ftmod_libpri.c $(SRC)/ftmod/ftmod_libpri/lpwrap_pri.c
|
||||
ftmod_libpri_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_libpri_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_libpri_la_LDFLAGS = -shared -module -avoid-version -lpri
|
||||
ftmod_libpri_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
@@ -192,7 +192,7 @@ endif
|
||||
if HAVE_PRITAP
|
||||
mod_LTLIBRARIES += ftmod_pritap.la
|
||||
ftmod_pritap_la_SOURCES = $(SRC)/ftmod/ftmod_pritap/ftmod_pritap.c
|
||||
ftmod_pritap_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_pritap_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_pritap_la_LDFLAGS = -shared -module -avoid-version -lpri
|
||||
ftmod_pritap_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
@@ -215,7 +215,7 @@ ftmod_sangoma_ss7_la_SOURCES = \
|
||||
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c \
|
||||
$(SRC)/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
|
||||
|
||||
ftmod_sangoma_ss7_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_ss7_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_ss7_la_LDFLAGS = -shared -module -avoid-version -lsng_ss7
|
||||
ftmod_sangoma_ss7_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
@@ -235,7 +235,7 @@ ftmod_sangoma_isdn_la_SOURCES = \
|
||||
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c \
|
||||
$(SRC)/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c
|
||||
|
||||
ftmod_sangoma_isdn_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_isdn_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS) -D_GNU_SOURCE
|
||||
ftmod_sangoma_isdn_la_LDFLAGS = -shared -module -avoid-version -lsng_isdn
|
||||
ftmod_sangoma_isdn_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
@@ -243,7 +243,7 @@ endif
|
||||
if HAVE_OPENR2
|
||||
mod_LTLIBRARIES += ftmod_r2.la
|
||||
ftmod_r2_la_SOURCES = $(SRC)/ftmod/ftmod_r2/ftmod_r2.c $(SRC)/ftmod/ftmod_r2/ftmod_r2_io_mf_lib.c
|
||||
ftmod_r2_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS)
|
||||
ftmod_r2_la_CFLAGS = $(FTDM_CFLAGS) $(AM_CFLAGS)
|
||||
ftmod_r2_la_LDFLAGS = -shared -module -avoid-version -lopenr2
|
||||
ftmod_r2_la_LIBADD = libfreetdm.la
|
||||
endif
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
#define FREETDM_VAR_PREFIX "freetdm_"
|
||||
#define FREETDM_VAR_PREFIX_LEN (sizeof(FREETDM_VAR_PREFIX)-1)
|
||||
|
||||
/* How many consecutive IO errors before giving up */
|
||||
#define FTDM_MAX_READ_WRITE_ERRORS 10
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_freetdm_load);
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_freetdm_shutdown);
|
||||
SWITCH_MODULE_DEFINITION(mod_freetdm, mod_freetdm_load, mod_freetdm_shutdown, NULL);
|
||||
@@ -110,7 +113,8 @@ struct private_object {
|
||||
switch_mutex_t *mutex;
|
||||
switch_mutex_t *flag_mutex;
|
||||
ftdm_channel_t *ftdmchan;
|
||||
uint32_t wr_error;
|
||||
uint32_t write_error;
|
||||
uint32_t read_error;
|
||||
};
|
||||
|
||||
/* private data attached to FTDM channels (only FXS for now) */
|
||||
@@ -624,12 +628,11 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||
ftdm_status_t status;
|
||||
int total_to;
|
||||
int chunk, do_break = 0;
|
||||
|
||||
uint32_t span_id, chan_id;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
@@ -638,6 +641,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (!tech_pvt->ftdmchan) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
|
||||
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
|
||||
|
||||
/* Digium Cards sometimes timeout several times in a row here.
|
||||
Yes, we support digium cards, ain't we nice.......
|
||||
6 double length intervals should compensate */
|
||||
@@ -697,8 +707,13 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||
|
||||
len = tech_pvt->read_frame.buflen;
|
||||
if (ftdm_channel_read(tech_pvt->ftdmchan, tech_pvt->read_frame.data, &len) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_WARNING, "failed to read from device\n");
|
||||
goto fail;
|
||||
ftdm_log(FTDM_LOG_WARNING, "failed to read from device %d:%d\n", span_id, chan_id);
|
||||
if (++tech_pvt->read_error > FTDM_MAX_READ_WRITE_ERRORS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "too many I/O read errors on device %d:%d!\n", span_id, chan_id);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
tech_pvt->read_error = 0;
|
||||
}
|
||||
|
||||
*frame = &tech_pvt->read_frame;
|
||||
@@ -736,6 +751,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
||||
ftdm_size_t len;
|
||||
unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
|
||||
ftdm_wait_flag_t wflags = FTDM_WRITE;
|
||||
uint32_t span_id, chan_id;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
@@ -743,10 +759,6 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
if (!tech_pvt->ftdmchan) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (switch_test_flag(tech_pvt, TFLAG_DEAD)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
@@ -758,6 +770,14 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
||||
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!tech_pvt->ftdmchan) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
span_id = ftdm_channel_get_span_id(tech_pvt->ftdmchan);
|
||||
chan_id = ftdm_channel_get_id(tech_pvt->ftdmchan);
|
||||
|
||||
|
||||
if (switch_test_flag(frame, SFF_CNG)) {
|
||||
frame->data = data;
|
||||
@@ -779,12 +799,14 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
||||
|
||||
len = frame->datalen;
|
||||
if (ftdm_channel_write(tech_pvt->ftdmchan, frame->data, frame->buflen, &len) != FTDM_SUCCESS) {
|
||||
if (++tech_pvt->wr_error > 10) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "too many I/O write errors!\n");
|
||||
ftdm_log(FTDM_LOG_WARNING, "failed to write to device %d:%d\n", span_id, chan_id);
|
||||
if (++tech_pvt->write_error > FTDM_MAX_READ_WRITE_ERRORS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG,
|
||||
SWITCH_LOG_ERROR, "too many I/O write errors on device %d:%d!\n", span_id, chan_id);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
tech_pvt->wr_error = 0;
|
||||
tech_pvt->write_error = 0;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
@@ -1855,29 +1877,31 @@ static FIO_SIGNAL_CB_FUNCTION(on_common_signal)
|
||||
break;
|
||||
}
|
||||
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-name", "%s", ftdm_channel_get_span_name(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-number", "%d", ftdm_channel_get_span_id(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "chan-number", "%d", ftdm_channel_get_id(sigmsg->channel));
|
||||
if (event) {
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-name", "%s", ftdm_channel_get_span_name(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "span-number", "%d", ftdm_channel_get_span_id(sigmsg->channel));
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "chan-number", "%d", ftdm_channel_get_id(sigmsg->channel));
|
||||
|
||||
if (alarmbits & FTDM_ALARM_RED) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "red");
|
||||
if (alarmbits & FTDM_ALARM_RED) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "red");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_YELLOW) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "yellow");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_RAI) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "rai");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_BLUE) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "blue");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_AIS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "ais");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_GENERAL) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "general");
|
||||
}
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_YELLOW) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "yellow");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_RAI) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "rai");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_BLUE) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "blue");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_AIS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "ais");
|
||||
}
|
||||
if (alarmbits & FTDM_ALARM_GENERAL) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "alarm", "general");
|
||||
}
|
||||
switch_event_fire(&event);
|
||||
|
||||
return FTDM_BREAK;
|
||||
}
|
||||
@@ -2483,10 +2507,10 @@ static uint32_t enable_analog_option(const char *str, uint32_t current_options)
|
||||
|
||||
}
|
||||
|
||||
#define CONFIG_ERROR(...) do { \
|
||||
#define CONFIG_ERROR(...) { \
|
||||
ftdm_log(FTDM_LOG_ERROR, __VA_ARGS__); \
|
||||
globals.config_error = 1; \
|
||||
} while(0)
|
||||
}
|
||||
/* create ftdm_conf_node_t tree based on a fixed pattern XML configuration list
|
||||
* last 2 args are for limited aka dumb recursivity
|
||||
* */
|
||||
@@ -2871,9 +2895,9 @@ static switch_status_t load_config(void)
|
||||
} else if (!strcasecmp(var, "hold-music")) {
|
||||
switch_set_string(globals.hold_music, val);
|
||||
} else if (!strcasecmp(var, "crash-on-assert")) {
|
||||
globals.crash_on_assert = switch_true(val);
|
||||
globals.crash_on_assert = (uint8_t)switch_true(val);
|
||||
} else if (!strcasecmp(var, "fail-on-error")) {
|
||||
globals.fail_on_error = switch_true(val);
|
||||
globals.fail_on_error = (uint8_t)switch_true(val);
|
||||
} else if (!strcasecmp(var, "sip-headers")) {
|
||||
globals.sip_headers = switch_true(val);
|
||||
} else if (!strcasecmp(var, "enable-analog-option")) {
|
||||
|
||||
@@ -1549,6 +1549,7 @@ static ftdm_status_t _ftdm_channel_open_by_group(uint32_t group_id, ftdm_directi
|
||||
int best_rate = 0;
|
||||
uint32_t i = 0;
|
||||
uint32_t count = 0;
|
||||
uint32_t first_channel = 0;
|
||||
|
||||
if (group_id) {
|
||||
ftdm_group_find(group_id, &group);
|
||||
@@ -1573,6 +1574,7 @@ static ftdm_status_t _ftdm_channel_open_by_group(uint32_t group_id, ftdm_directi
|
||||
i = 0;
|
||||
} else if (direction == FTDM_RR_DOWN || direction == FTDM_RR_UP) {
|
||||
i = rr_next(group->last_used_index, 0, group->chan_count - 1, direction);
|
||||
first_channel = i;
|
||||
} else {
|
||||
i = group->chan_count-1;
|
||||
}
|
||||
@@ -1605,6 +1607,9 @@ static ftdm_status_t _ftdm_channel_open_by_group(uint32_t group_id, ftdm_directi
|
||||
group->last_used_index = i;
|
||||
}
|
||||
i = rr_next(i, 0, group->chan_count - 1, direction);
|
||||
if (first_channel == i) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (i == 0) {
|
||||
break;
|
||||
@@ -1663,6 +1668,7 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
||||
int best_rate = 0;
|
||||
uint32_t i = 0;
|
||||
uint32_t count = 0;
|
||||
uint32_t first_channel = 0;
|
||||
|
||||
*ftdmchan = NULL;
|
||||
|
||||
@@ -1696,6 +1702,7 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
||||
i = 1;
|
||||
} else if (direction == FTDM_RR_DOWN || direction == FTDM_RR_UP) {
|
||||
i = rr_next(span->last_used_index, 1, span->chan_count, direction);
|
||||
first_channel = i;
|
||||
} else {
|
||||
i = span->chan_count;
|
||||
}
|
||||
@@ -1706,10 +1713,6 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
||||
if (i > span->chan_count) {
|
||||
break;
|
||||
}
|
||||
} else if (direction == FTDM_RR_DOWN || direction == FTDM_RR_UP) {
|
||||
if (i == span->last_used_index) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (i == 0) {
|
||||
break;
|
||||
@@ -1738,6 +1741,9 @@ static ftdm_status_t _ftdm_channel_open_by_span(uint32_t span_id, ftdm_direction
|
||||
span->last_used_index = i;
|
||||
}
|
||||
i = rr_next(i, 1, span->chan_count, direction);
|
||||
if (first_channel == i) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
@@ -3583,7 +3589,7 @@ skipdebug:
|
||||
return status;
|
||||
}
|
||||
|
||||
FIO_WRITE_FUNCTION(ftdm_raw_write)
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_write (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen)
|
||||
{
|
||||
int dlen = (int) *datalen;
|
||||
|
||||
@@ -3610,7 +3616,7 @@ FIO_WRITE_FUNCTION(ftdm_raw_write)
|
||||
return ftdmchan->fio->write(ftdmchan, data, datalen);
|
||||
}
|
||||
|
||||
FIO_READ_FUNCTION(ftdm_raw_read)
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_read (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen)
|
||||
{
|
||||
ftdm_status_t status;
|
||||
|
||||
|
||||
@@ -1584,6 +1584,13 @@ static int on_dchan_down(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_
|
||||
static int on_anything(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_event *pevent)
|
||||
{
|
||||
ftdm_log(FTDM_LOG_DEBUG, "-- Caught Event span %d %u (%s)\n", ftdm_span_get_id(spri->span), event_type, lpwrap_pri_event_str(event_type));
|
||||
switch (pevent->e) {
|
||||
case PRI_EVENT_CONFIG_ERR:
|
||||
{
|
||||
ftdm_log(FTDM_LOG_WARNING, "-- PRI error event: %s\n", pevent->err.err);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -436,6 +436,13 @@ static __inline openr2_calling_party_category_t ftdm_r2_ftdm_cpc_to_openr2_cpc(f
|
||||
case FTDM_CPC_PAYPHONE:
|
||||
return OR2_CALLING_PARTY_CATEGORY_PAY_PHONE;
|
||||
|
||||
case FTDM_CPC_OPERATOR_FRENCH:
|
||||
case FTDM_CPC_OPERATOR_ENGLISH:
|
||||
case FTDM_CPC_OPERATOR_GERMAN:
|
||||
case FTDM_CPC_OPERATOR_RUSSIAN:
|
||||
case FTDM_CPC_OPERATOR_SPANISH:
|
||||
return OR2_CALLING_PARTY_CATEGORY_COLLECT_CALL;
|
||||
|
||||
case FTDM_CPC_INVALID:
|
||||
return OR2_CALLING_PARTY_CATEGORY_UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -238,6 +238,10 @@
|
||||
RelativePath=".\ftmod_sangoma_isdn_trace.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ftmod_sangoma_isdn_transfer.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
||||
@@ -189,6 +189,7 @@
|
||||
<ClCompile Include="ftmod_sangoma_isdn_stack_rcv.c" />
|
||||
<ClCompile Include="ftmod_sangoma_isdn_support.c" />
|
||||
<ClCompile Include="ftmod_sangoma_isdn_trace.c" />
|
||||
<ClCompile Include="ftmod_sangoma_isdn_transfer.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\msvc\freetdm.2010.vcxproj">
|
||||
@@ -199,4 +200,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -47,7 +47,6 @@ static ftdm_status_t ftdm_sangoma_isdn_start(ftdm_span_t *span);
|
||||
static ftdm_status_t ftdm_sangoma_isdn_dtmf(ftdm_channel_t *ftdmchan, const char* dtmf);
|
||||
|
||||
ftdm_channel_t* ftdm_sangoma_isdn_process_event_states(ftdm_span_t *span, sngisdn_event_data_t *sngisdn_event);
|
||||
static void ftdm_sangoma_isdn_poll_events(ftdm_span_t *span);
|
||||
static void ftdm_sangoma_isdn_process_phy_events(ftdm_span_t *span, ftdm_oob_event_t event);
|
||||
static ftdm_status_t ftdm_sangoma_isdn_process_state_change(ftdm_channel_t *ftdmchan);
|
||||
static void ftdm_sangoma_isdn_process_stack_event (ftdm_span_t *span, sngisdn_event_data_t *sngisdn_event);
|
||||
@@ -59,8 +58,8 @@ static sng_isdn_event_interface_t g_sngisdn_event_interface;
|
||||
|
||||
ftdm_sngisdn_data_t g_sngisdn_data;
|
||||
|
||||
FTDM_ENUM_NAMES(SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_TYPE_STRINGS)
|
||||
FTDM_STR2ENUM(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t, SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_INVALID)
|
||||
SNGISDN_ENUM_NAMES(SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_TYPE_STRINGS)
|
||||
SNGISDN_STR2ENUM(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t, SNGISDN_TRANSFER_TYPE_NAMES, SNGISDN_TRANSFER_INVALID)
|
||||
|
||||
ftdm_state_map_t sangoma_isdn_state_map = {
|
||||
{
|
||||
@@ -313,28 +312,6 @@ static void ftdm_sangoma_isdn_process_phy_events(ftdm_span_t *span, ftdm_oob_eve
|
||||
}
|
||||
}
|
||||
|
||||
static void ftdm_sangoma_isdn_poll_events(ftdm_span_t *span)
|
||||
{
|
||||
ftdm_status_t ret_status;
|
||||
|
||||
ret_status = ftdm_span_poll_event(span, 0, NULL);
|
||||
switch(ret_status) {
|
||||
case FTDM_SUCCESS:
|
||||
{
|
||||
ftdm_event_t *event;
|
||||
while (ftdm_span_next_event(span, &event) == FTDM_SUCCESS) {
|
||||
ftdm_sangoma_isdn_process_phy_events(span, event->enum_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case FTDM_TIMEOUT:
|
||||
/* No events pending */
|
||||
break;
|
||||
default:
|
||||
ftdm_log(FTDM_LOG_WARNING, "%s:Failed to poll span event\n", span->name);
|
||||
}
|
||||
}
|
||||
|
||||
static void ftdm_sangoma_isdn_dchan_set_queue_size(ftdm_channel_t *dchan)
|
||||
{
|
||||
ftdm_status_t ret_status;
|
||||
@@ -365,7 +342,7 @@ static void ftdm_sangoma_isdn_wakeup_phy(ftdm_channel_t *dchan)
|
||||
static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
||||
{
|
||||
uint8_t data[1000];
|
||||
unsigned i;
|
||||
unsigned i = 0;
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
ftdm_wait_flag_t wflags = FTDM_READ;
|
||||
ftdm_span_t *span = (ftdm_span_t*) obj;
|
||||
@@ -374,6 +351,7 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
||||
unsigned waitms = 10000;
|
||||
ftdm_iterator_t *chaniter = NULL;
|
||||
ftdm_iterator_t *citer = NULL;
|
||||
ftdm_event_t *event;
|
||||
short *poll_events = ftdm_malloc(sizeof(short) * span->chan_count);
|
||||
|
||||
/* Initialize the d-channel */
|
||||
@@ -394,6 +372,8 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
||||
wflags = FTDM_READ;
|
||||
memset(poll_events, 0, sizeof(short)*span->chan_count);
|
||||
|
||||
poll_events[i] |= FTDM_EVENTS;
|
||||
|
||||
for (i = 0, citer = ftdm_span_get_chan_iterator(span, chaniter); citer; citer = ftdm_iterator_next(citer), i++) {
|
||||
ftdmchan = ftdm_iterator_current(citer);
|
||||
|
||||
@@ -416,6 +396,7 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
||||
case FTDM_TIMEOUT:
|
||||
break;
|
||||
case FTDM_SUCCESS:
|
||||
/* Check if there are any channels that have data available */
|
||||
for (citer = ftdm_span_get_chan_iterator(span, chaniter); citer; citer = ftdm_iterator_next(citer)) {
|
||||
len = 1000;
|
||||
ftdmchan = ftdm_iterator_current(citer);
|
||||
@@ -444,6 +425,12 @@ static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if there are any channels that have events available */
|
||||
while (ftdm_span_next_event(span, &event) == FTDM_SUCCESS) {
|
||||
ftdm_sangoma_isdn_process_phy_events(span, event->enum_id);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "Unhandled IO event\n");
|
||||
@@ -487,7 +474,6 @@ static void *ftdm_sangoma_isdn_run(ftdm_thread_t *me, void *obj)
|
||||
}
|
||||
|
||||
while (ftdm_running() && !(ftdm_test_flag(span, FTDM_SPAN_STOP_THREAD))) {
|
||||
|
||||
/* Check if there are any timers to process */
|
||||
ftdm_sched_run(signal_data->sched);
|
||||
ftdm_span_trigger_signals(span);
|
||||
@@ -525,9 +511,6 @@ static void *ftdm_sangoma_isdn_run(ftdm_thread_t *me, void *obj)
|
||||
ftdm_log(FTDM_LOG_ERROR, "%s: ftdm_interrupt_wait returned with unknown code\n", span->name);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Poll for events, e.g HW DTMF */
|
||||
ftdm_sangoma_isdn_poll_events(span);
|
||||
}
|
||||
|
||||
/* clear the IN_THREAD flag so that we know the thread is done */
|
||||
|
||||
@@ -177,7 +177,7 @@ typedef enum {
|
||||
SNGISDN_TRANSFER_INVALID,
|
||||
} sngisdn_transfer_type_t;
|
||||
#define SNGISDN_TRANSFER_TYPE_STRINGS "NONE", "ATT_COURTESY_VRU", "ATT_COURTERY_VRU_DATA", "INVALID"
|
||||
FTDM_STR2ENUM_P(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t)
|
||||
SNGISDN_STR2ENUM_P(ftdm_str2sngisdn_transfer_type, sngisdn_transfer_type2str, sngisdn_transfer_type_t)
|
||||
|
||||
/* From section 4.2 of TR50075, max length of data is 100 when single UUI is sent */
|
||||
#define COURTESY_TRANSFER_MAX_DATA_SIZE 100
|
||||
@@ -251,7 +251,8 @@ typedef struct sngisdn_span_data {
|
||||
uint8_t raw_trace_q931; /* TODO: combine with trace_flags */
|
||||
uint8_t raw_trace_q921; /* TODO: combine with trace_flags */
|
||||
uint8_t timer_t3;
|
||||
uint8_t restart_opt;
|
||||
uint8_t restart_opt;
|
||||
uint8_t force_sending_complete;
|
||||
char* local_numbers[SNGISDN_NUM_LOCAL_NUMBERS];
|
||||
ftdm_sched_t *sched;
|
||||
ftdm_queue_t *event_queue;
|
||||
@@ -323,6 +324,11 @@ typedef struct ftdm_sngisdn_data {
|
||||
uint8_t num_dchan;
|
||||
sngisdn_dchan_data_t dchans[MAX_L1_LINKS+1];
|
||||
sngisdn_span_data_t *spans[MAX_L1_LINKS+1]; /* spans are indexed by link_id */
|
||||
|
||||
#ifdef SANGOMA_ISDN_CHAN_ID_INVERT_BIT
|
||||
/* Since this is a global configuration, place it here instead of sngisdn_span_data_t */
|
||||
uint8_t chan_id_invert_extend_bit;
|
||||
#endif
|
||||
}ftdm_sngisdn_data_t;
|
||||
|
||||
typedef struct ftdm2trillium
|
||||
|
||||
@@ -286,7 +286,8 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
||||
signal_data->restart_opt = SNGISDN_OPT_DEFAULT;
|
||||
signal_data->link_id = span->span_id;
|
||||
signal_data->transfer_timeout = 20000;
|
||||
signal_data->att_remove_dtmf = 1;
|
||||
signal_data->att_remove_dtmf = SNGISDN_OPT_DEFAULT;
|
||||
signal_data->force_sending_complete = SNGISDN_OPT_DEFAULT;
|
||||
|
||||
span->default_caller_data.dnis.plan = FTDM_NPI_INVALID;
|
||||
span->default_caller_data.dnis.type = FTDM_TON_INVALID;
|
||||
@@ -386,10 +387,18 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
|
||||
parse_yesno(var, val, &signal_data->raw_trace_q931);
|
||||
} else if (!strcasecmp(var, "q921-raw-trace")) {
|
||||
parse_yesno(var, val, &signal_data->raw_trace_q921);
|
||||
} else if (!strcasecmp(var, "force-sending-complete")) {
|
||||
parse_yesno(var, val, &signal_data->force_sending_complete);
|
||||
} else if (!strcasecmp(var, "early-media-override")) {
|
||||
if (parse_early_media(val, span) != FTDM_SUCCESS) {
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
} else if (!strcasecmp(var, "chan-id-invert-extend-bit")) {
|
||||
#ifdef SANGOMA_ISDN_CHAN_ID_INVERT_BIT
|
||||
parse_yesno(var, val, &g_sngisdn_data.chan_id_invert_extend_bit);
|
||||
#else
|
||||
ftdm_log(FTDM_LOG_WARNING, "chan-id-invert-extend-bit is not supported in your version of libsng_isdn\n");
|
||||
#endif
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_WARNING, "Ignoring unknown parameter %s\n", ftdm_parameters[paramindex].var);
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
||||
cfg.t.cfg.s.inDLSAP.tCbCfg = TRUE;
|
||||
|
||||
cfg.t.cfg.s.inDLSAP.tCbId = signal_data->cc_id;
|
||||
|
||||
|
||||
if (signal_data->facility == SNGISDN_OPT_TRUE) {
|
||||
cfg.t.cfg.s.inDLSAP.facilityHandling = IN_FACILITY_STANDRD;
|
||||
} else {
|
||||
@@ -720,6 +720,16 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
||||
}
|
||||
|
||||
cfg.t.cfg.s.inDLSAP.useSubAdr = 0; /* call routing on subaddress */
|
||||
#ifdef SANGOMA_ISDN_CHAN_ID_INVERT_BIT
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_DMS100 &&
|
||||
g_sngisdn_data.chan_id_invert_extend_bit == SNGISDN_OPT_TRUE) {
|
||||
/* Since this feature is not standard, we modified Trillium to check
|
||||
the useSubAdr field and remove the extended bit if this is set, this
|
||||
is a global configuration and once set, applies to all spans configured
|
||||
as DMS 100 */
|
||||
cfg.t.cfg.s.inDLSAP.useSubAdr = PRSNT_NODEF;
|
||||
}
|
||||
#endif
|
||||
cfg.t.cfg.s.inDLSAP.adrPref = 0; /* use of prefix for international calls */
|
||||
cfg.t.cfg.s.inDLSAP.nmbPrefDig = 0; /* number of digits used for prefix */
|
||||
for (i = 0; i < IN_MAXPREFDIG; i++)
|
||||
|
||||
@@ -882,6 +882,12 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
|
||||
uint8_t call_state = 0;
|
||||
|
||||
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
|
||||
if (!suInstId && !spInstId) {
|
||||
/* We already cleared this call */
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Dropping STATUS CONFIRM (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (staEvnt->callSte.eh.pres && staEvnt->callSte.callGlblSte.pres) {
|
||||
call_state = staEvnt->callSte.callGlblSte.val;
|
||||
@@ -1137,7 +1143,7 @@ static ftdm_status_t sngisdn_force_down(ftdm_channel_t *ftdmchan)
|
||||
sngisdn_chan_data_t *sngisdn_info = (sngisdn_chan_data_t*)ftdmchan->call_data;
|
||||
ftdm_status_t status = FTDM_SUCCESS;
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_NOTICE, "Forcing channel to DOWN state (%s)\n", ftdm_channel_state2str(ftdmchan->state));
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Forcing channel to DOWN state (%s)\n", ftdm_channel_state2str(ftdmchan->state));
|
||||
switch (ftdmchan->state) {
|
||||
case FTDM_CHANNEL_STATE_DOWN:
|
||||
/* Do nothing */
|
||||
|
||||
@@ -51,9 +51,10 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[signal_data->cc_id].mutex);
|
||||
|
||||
memset(&conEvnt, 0, sizeof(conEvnt));
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN) {
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_EUROISDN || signal_data->force_sending_complete == SNGISDN_OPT_TRUE) {
|
||||
conEvnt.sndCmplt.eh.pres = PRSNT_NODEF;
|
||||
}
|
||||
|
||||
if (ftdmchan->span->trunk_type == FTDM_TRUNK_BRI_PTMP &&
|
||||
signal_data->signalling == SNGISDN_SIGNALING_NET) {
|
||||
sngisdn_info->ces = CES_MNGMNT;
|
||||
|
||||
@@ -502,12 +502,16 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
|
||||
sngisdn_event_data_t *sngisdn_event = NULL;
|
||||
|
||||
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
|
||||
|
||||
|
||||
/* We sometimes receive a STA CFM after receiving a RELEASE/RELEASE COMPLETE, so we need to lock
|
||||
here in case we are calling clear_call_data at the same time this function is called */
|
||||
|
||||
ftdm_mutex_lock(g_sngisdn_data.ccs[suId].mutex);
|
||||
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
|
||||
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
|
||||
|
||||
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
|
||||
ftdm_assert(0, "Inconsistent call states\n");
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[suId].mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -526,6 +530,7 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
|
||||
memcpy(&sngisdn_event->event.staEvnt, staEvnt, sizeof(*staEvnt));
|
||||
|
||||
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[suId].mutex);
|
||||
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
@@ -99,13 +99,14 @@ void clear_call_data(sngisdn_chan_data_t *sngisdn_info)
|
||||
ftdm_mutex_lock(g_sngisdn_data.ccs[cc_id].mutex);
|
||||
g_sngisdn_data.ccs[cc_id].active_spInstIds[sngisdn_info->spInstId]=NULL;
|
||||
g_sngisdn_data.ccs[cc_id].active_suInstIds[sngisdn_info->suInstId]=NULL;
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[cc_id].mutex);
|
||||
|
||||
|
||||
sngisdn_info->suInstId = 0;
|
||||
sngisdn_info->spInstId = 0;
|
||||
sngisdn_info->globalFlg = 0;
|
||||
sngisdn_info->flags = 0;
|
||||
sngisdn_info->transfer_data.type = SNGISDN_TRANSFER_NONE;
|
||||
|
||||
ftdm_mutex_unlock(g_sngisdn_data.ccs[cc_id].mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ ftdm_status_t sngisdn_att_transfer_process_dtmf(ftdm_channel_t *ftdmchan, const
|
||||
att_courtesy_transfer_complete(sngisdn_info, sngisdn_info->transfer_data.response);
|
||||
}
|
||||
|
||||
if (signal_data->att_remove_dtmf) {
|
||||
if (signal_data->att_remove_dtmf != SNGISDN_OPT_FALSE) {
|
||||
/* If we return FTDM_BREAK, dtmf event is not queue'ed to user */
|
||||
status = FTDM_BREAK;
|
||||
}
|
||||
|
||||
@@ -584,6 +584,20 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||
|
||||
break;
|
||||
/**************************************************************************/
|
||||
case FTDM_CHANNEL_STATE_HANGUP_COMPLETE:
|
||||
|
||||
/* already hangup complete, just ignore it */
|
||||
/*
|
||||
* i.e. collision REL & ANM
|
||||
* IAM ->
|
||||
* <- ACM
|
||||
* REL -> <- ANM (if REL gets processed first, ANM needs to be ignored)
|
||||
* <- RLC
|
||||
*/
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx ANM/CON Ignoring it because we already hung up\n", sngss7_info->circuit->cic);
|
||||
|
||||
break;
|
||||
/**************************************************************************/
|
||||
default: /* incorrect state...reset the CIC */
|
||||
|
||||
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Rx ANM/CON\n", sngss7_info->circuit->cic);
|
||||
@@ -1267,7 +1281,7 @@ ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circu
|
||||
|
||||
/* confirm that the circuit is active on our side otherwise move to the next circuit */
|
||||
if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[i], SNGSS7_ACTIVE)) {
|
||||
SS7_ERROR("[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
|
||||
ftdm_log(FTDM_LOG_DEBUG, "[CIC:%d]Circuit is not active yet, skipping!\n",g_ftdm_sngss7_data.cfg.isupCkt[i].cic);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1072,16 +1072,20 @@ static __inline__ ftdm_status_t zt_channel_process_event(ftdm_channel_t *fchan,
|
||||
break;
|
||||
case ZT_EVENT_BADFCS:
|
||||
{
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Bad frame checksum (ZT_EVENT_BADFCS)!\n");
|
||||
/* What else could we do? */
|
||||
*event_id = FTDM_OOB_NOOP;
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Bad frame checksum (ZT_EVENT_BADFCS)\n");
|
||||
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
|
||||
}
|
||||
break;
|
||||
case ZT_EVENT_OVERRUN:
|
||||
{
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "Driver overrun! (ZT_EVENT_OVERRUN)\n");
|
||||
/* What else could we do? */
|
||||
*event_id = FTDM_OOB_NOOP;
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "HDLC frame overrun (ZT_EVENT_OVERRUN)\n");
|
||||
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
|
||||
}
|
||||
break;
|
||||
case ZT_EVENT_ABORT:
|
||||
{
|
||||
ftdm_log_chan_msg(fchan, FTDM_LOG_ERROR, "HDLC abort frame received (ZT_EVENT_ABORT)\n");
|
||||
*event_id = FTDM_OOB_NOOP; /* What else could we do? */
|
||||
}
|
||||
break;
|
||||
case ZT_EVENT_NONE:
|
||||
|
||||
@@ -599,8 +599,8 @@ FT_DECLARE(ftdm_iterator_t *) ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_
|
||||
|
||||
FT_DECLARE(ftdm_status_t) ftdm_channel_process_media(ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen);
|
||||
|
||||
FIO_WRITE_FUNCTION(ftdm_raw_write);
|
||||
FIO_READ_FUNCTION(ftdm_raw_read);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_read (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_raw_write (ftdm_channel_t *ftdmchan, void *data, ftdm_size_t *datalen);
|
||||
|
||||
/*!
|
||||
* \brief Retrieves an event from the span
|
||||
|
||||
@@ -1908,6 +1908,8 @@ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, const char
|
||||
int on = 0;
|
||||
int len = 0;
|
||||
char *my_body = strdup(body);
|
||||
char *my_body_base = my_body;
|
||||
|
||||
assert(handle != NULL);
|
||||
assert(body != NULL);
|
||||
|
||||
@@ -1952,7 +1954,9 @@ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, const char
|
||||
free(bdup);
|
||||
}
|
||||
|
||||
free(my_body);
|
||||
if (my_body_base) {
|
||||
free(my_body_base);
|
||||
}
|
||||
|
||||
apr_queue_push(handle->queue, msg);
|
||||
msg = NULL;
|
||||
|
||||
+2
-2
@@ -231,7 +231,7 @@ void stfu_n_debug(stfu_instance_t *i, const char *name)
|
||||
|
||||
void stfu_n_report(stfu_instance_t *i, stfu_report_t *r)
|
||||
{
|
||||
assert(i);
|
||||
stfu_assert(i);
|
||||
r->qlen = i->qlen;
|
||||
r->packet_in_count = i->period_packet_in_count;
|
||||
r->clean_count = i->period_clean_count;
|
||||
@@ -580,7 +580,7 @@ static int stfu_n_find_any_frame(stfu_instance_t *in, stfu_queue_t *queue, stfu_
|
||||
uint32_t i = 0;
|
||||
stfu_frame_t *frame = NULL;
|
||||
|
||||
assert(r_frame);
|
||||
stfu_assert(r_frame);
|
||||
|
||||
*r_frame = NULL;
|
||||
|
||||
|
||||
@@ -40,6 +40,13 @@ extern "C" {
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#if (_MSC_VER >= 1400) // VC8+
|
||||
#define stfu_assert(expr) assert(expr);__analysis_assume( expr )
|
||||
#endif
|
||||
|
||||
#ifndef stfu_assert
|
||||
#define stfu_assert(_x) assert(_x)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifndef uint32_t
|
||||
|
||||
@@ -1 +1 @@
|
||||
Mon Feb 22 09:40:01 CST 2010
|
||||
Thu Jun 16 15:02:31 UTC 2011
|
||||
@@ -14,3 +14,4 @@ Contributor(s):
|
||||
Carlos Pina Soares
|
||||
Chaitanya Chokkareddy <chaitanya.chokkareddy@gmail.com>
|
||||
Tomas Valenta <tomas.valenta@speechtech.cz>
|
||||
Danijel Korzinek <danijel.korzinek@gmail.com>
|
||||
@@ -14,7 +14,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure $(AUX_DIST)
|
||||
|
||||
ACLOCAL = aclocal -I $(macrodir)
|
||||
|
||||
SUBDIRS = conf data libs modules plugins platforms build
|
||||
SUBDIRS = build conf data libs modules plugins platforms
|
||||
if TEST_SUITES
|
||||
SUBDIRS += tests
|
||||
endif
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
The UniMRCP Project (http://www.unimrcp.org)
|
||||
Copyright (C) 2008 Arsen Chaloyan
|
||||
Copyright (C) 2008-2010 Arsen Chaloyan
|
||||
Licensed under the Apache License, Version 2.0 (the "License").
|
||||
|
||||
This product includes a number of subcomponents with
|
||||
|
||||
@@ -3,7 +3,6 @@ m4_include([build/acmacros/apu.m4])
|
||||
m4_include([build/acmacros/find_apr.m4])
|
||||
m4_include([build/acmacros/find_apu.m4])
|
||||
m4_include([build/acmacros/sofia-sip.m4])
|
||||
m4_include([build/acmacros/swift.m4])
|
||||
m4_include([build/acmacros/sphinxbase.m4])
|
||||
m4_include([build/acmacros/pocketsphinx.m4])
|
||||
m4_include([build/acmacros/flite.m4])
|
||||
@@ -1,5 +1,9 @@
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = uni_revision.h
|
||||
|
||||
SUBDIRS = pkgconfig
|
||||
SUBDIRS = pkgconfig svnrev
|
||||
|
||||
include_HEADERS = uni_version.h
|
||||
include_HEADERS = uni_version.h uni_revision.h
|
||||
|
||||
uni_revision.h :
|
||||
svnrev/svnrev -rsvnrev/svnrev.input -p../ -ouni_revision.h
|
||||
@@ -13,21 +13,28 @@ AC_DEFUN([UNIMRCP_CHECK_FLITE],
|
||||
|
||||
found_flite="no"
|
||||
|
||||
flite_libdir="build/libs"
|
||||
flite_config="config/config"
|
||||
for dir in $flite_path ; do
|
||||
cd $dir && flite_dir=`pwd` && cd - > /dev/null
|
||||
if test -d "$dir/$flite_libdir"; then
|
||||
found_flite="yes"
|
||||
UNIMRCP_FLITE_INCLUDES="-I$flite_dir/include"
|
||||
UNIMRCP_FLITE_LIBS="$dir/$flite_libdir/libflite_cmu_us_awb.a \
|
||||
$dir/$flite_libdir/libflite_cmu_us_kal.a \
|
||||
$dir/$flite_libdir/libflite_cmu_us_rms.a \
|
||||
$dir/$flite_libdir/libflite_cmu_us_slt.a \
|
||||
$dir/$flite_libdir/libflite_cmulex.a \
|
||||
$dir/$flite_libdir/libflite_usenglish.a \
|
||||
$dir/$flite_libdir/libflite.a"
|
||||
break
|
||||
fi
|
||||
if test -f "$flite_dir/$flite_config"; then
|
||||
target_os=`grep TARGET_OS "$flite_dir/$flite_config" | sed "s/^.*= //"` ;\
|
||||
target_cpu=`grep TARGET_CPU "$flite_dir/$flite_config" | sed "s/^.*= //"` ;\
|
||||
flite_libdir=$flite_dir/build/$target_cpu-$target_os/lib
|
||||
if test -d "$flite_libdir"; then
|
||||
UNIMRCP_FLITE_INCLUDES="-I$flite_dir/include"
|
||||
UNIMRCP_FLITE_LIBS="$flite_libdir/libflite_cmu_us_awb.a \
|
||||
$flite_libdir/libflite_cmu_us_kal.a \
|
||||
$flite_libdir/libflite_cmu_us_rms.a \
|
||||
$flite_libdir/libflite_cmu_us_slt.a \
|
||||
$flite_libdir/libflite_cmulex.a \
|
||||
$flite_libdir/libflite_usenglish.a \
|
||||
$flite_libdir/libflite.a"
|
||||
found_flite="yes"
|
||||
break
|
||||
else
|
||||
AC_MSG_WARN(Cannot find Flite lib dir: $flite_libdir)
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test x_$found_flite != x_yes; then
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
dnl UNIMRCP_CHECK_SWIFT
|
||||
|
||||
AC_DEFUN([UNIMRCP_CHECK_SWIFT],
|
||||
[
|
||||
AC_MSG_NOTICE([Cepstral Swift library configuration])
|
||||
|
||||
AC_MSG_CHECKING([for Swift])
|
||||
AC_ARG_WITH(swift,
|
||||
[ --with-swift=PATH prefix for installed Swift],
|
||||
[swift_path=$withval],
|
||||
[swift_path="/opt/swift"]
|
||||
)
|
||||
|
||||
if test -d "$swift_path"; then
|
||||
found_swift="yes"
|
||||
UNIMRCP_SWIFT_INCLUDES="-I$swift_path/include"
|
||||
UNIMRCP_SWIFT_LIBS="-lswift -lceplex_us -lceplang_en -lm"
|
||||
UNIMRCP_SWIFT_LDFLAGS="-L$swift_path/lib/ -R$swift_path/lib/"
|
||||
|
||||
AC_SUBST(UNIMRCP_SWIFT_INCLUDES)
|
||||
AC_SUBST(UNIMRCP_SWIFT_LIBS)
|
||||
AC_SUBST(UNIMRCP_SWIFT_LDFLAGS)
|
||||
|
||||
AC_MSG_RESULT($swift_path)
|
||||
else
|
||||
AC_MSG_WARN([not found - looked for $swift_path])
|
||||
fi
|
||||
])
|
||||
Executable
+271
@@ -0,0 +1,271 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# unimrcp-server This shell script takes care of starting and stopping the UniMRCP server.
|
||||
#
|
||||
# chkconfig: 2345 65 35
|
||||
# description: UniMRCP is an open source MRCP v1 & v2 server
|
||||
|
||||
# Some global variables
|
||||
|
||||
# Application
|
||||
APP_NAME="unimrcpserver"
|
||||
APP_LONG_NAME="unimrcpserver"
|
||||
UNIMRCP_DIR="/usr/local/unimrcp/"
|
||||
|
||||
EXEC="${UNIMRCP_DIR}bin/${APP_NAME} -d -o 2 -r ${UNIMRCP_DIR}"
|
||||
|
||||
# sudo user
|
||||
USERNAME=root
|
||||
|
||||
# Priority at which to run the server. See "man nice" for valid priorities.
|
||||
# nice is only used if a priority is specified.
|
||||
PRIORITY=
|
||||
|
||||
# Location of the pid file.
|
||||
PIDDIR="/var/run/"
|
||||
pid=
|
||||
|
||||
LOG="/var/log/${APP_NAME}.log"
|
||||
|
||||
if [ -e $PIDDIR ]; then
|
||||
echo
|
||||
else
|
||||
mkdir $PIDDIR
|
||||
fi
|
||||
|
||||
# Allow configuration overrides in /etc/sysconfig/$APP_NAME
|
||||
CONFIGFILE=/etc/sysconfig/$APP_NAME
|
||||
|
||||
[ -x $CONFIGFILE ] && . $CONFIGFILE
|
||||
|
||||
# Do not modify anything beyond this point
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Get the fully qualified path to the script
|
||||
case $0 in
|
||||
/*)
|
||||
SCRIPT="$0"
|
||||
;;
|
||||
*)
|
||||
PWD=`pwd`
|
||||
SCRIPT="$PWD/$0"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Change spaces to ":" so the tokens can be parsed.
|
||||
SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
|
||||
# Get the real path to this script, resolving any symbolic links
|
||||
TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
|
||||
REALPATH=
|
||||
for C in $TOKENS; do
|
||||
REALPATH="$REALPATH/$C"
|
||||
while [ -h "$REALPATH" ] ; do
|
||||
LS="`ls -ld "$REALPATH"`"
|
||||
LINK="`expr "$LS" : '.*-> \(.*\)$'`"
|
||||
if expr "$LINK" : '/.*' > /dev/null; then
|
||||
REALPATH="$LINK"
|
||||
else
|
||||
REALPATH="`dirname "$REALPATH"`""/$LINK"
|
||||
fi
|
||||
done
|
||||
done
|
||||
# Change ":" chars back to spaces.
|
||||
REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
|
||||
|
||||
# Change the current directory to the location of the script
|
||||
cd "`dirname "$REALPATH"`"
|
||||
|
||||
chown $USERNAME $PIDDIR
|
||||
|
||||
# Process ID
|
||||
PIDFILE="$PIDDIR/$APP_NAME.pid"
|
||||
|
||||
# Resolve the location of the 'ps' command
|
||||
PSEXE="/usr/bin/ps"
|
||||
if [ ! -x $PSEXE ]
|
||||
then
|
||||
PSEXE="/bin/ps"
|
||||
if [ ! -x $PSEXE ]
|
||||
then
|
||||
echo "Unable to locate 'ps'."
|
||||
echo "Please report this with the location on your system."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Build the nice clause
|
||||
if [ "X$PRIORITY" = "X" ]
|
||||
then
|
||||
CMDNICE=""
|
||||
else
|
||||
CMDNICE="nice -$PRIORITY"
|
||||
fi
|
||||
|
||||
getpid() {
|
||||
if [ -f $PIDFILE ]
|
||||
then
|
||||
if [ -r $PIDFILE ]
|
||||
then
|
||||
pid=`cat $PIDFILE`
|
||||
if [ "X$pid" != "X" ]
|
||||
then
|
||||
# Verify that a process with this pid is still running.
|
||||
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
# This is a stale pid file.
|
||||
rm -f $PIDFILE
|
||||
echo "Removed stale pid file: $PIDFILE"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Cannot read $PIDFILE."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
testpid() {
|
||||
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
# Process is gone so remove the pid file.
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
}
|
||||
|
||||
console() {
|
||||
echo "Running $APP_LONG_NAME..."
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
exec sudo -u $USERNAME $CMDNICE $EXEC
|
||||
else
|
||||
echo "$APP_LONG_NAME is already running."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
echo "Starting $APP_LONG_NAME..."
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
sudo -u $USERNAME $CMDNICE $EXEC
|
||||
pid=`$PSEXE -C $APP_NAME -o pid=`
|
||||
echo $pid
|
||||
echo $pid > $PIDFILE
|
||||
else
|
||||
echo "$APP_LONG_NAME is already running."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
stopit() {
|
||||
echo "Stopping $APP_LONG_NAME..."
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
echo "$APP_LONG_NAME was not running."
|
||||
else
|
||||
# Running so try to stop it.
|
||||
sudo -u $USERNAME kill $pid
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# An explanation for the failure should have been given
|
||||
echo "Unable to stop $APP_LONG_NAME."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We can not predict how long it will take for the wrapper to
|
||||
# actually stop as it depends on settings in wrapper.conf.
|
||||
# Loop until it does.
|
||||
savepid=$pid
|
||||
CNT=0
|
||||
TOTCNT=0
|
||||
while [ "X$pid" != "X" ]
|
||||
do
|
||||
# Loop for up to 5 minutes
|
||||
if [ "$TOTCNT" -lt "300" ]
|
||||
then
|
||||
if [ "$CNT" -lt "5" ]
|
||||
then
|
||||
CNT=`expr $CNT + 1`
|
||||
else
|
||||
echo "Waiting for $APP_LONG_NAME to exit..."
|
||||
CNT=0
|
||||
fi
|
||||
TOTCNT=`expr $TOTCNT + 1`
|
||||
|
||||
sleep 1
|
||||
|
||||
testpid
|
||||
else
|
||||
pid=
|
||||
fi
|
||||
done
|
||||
|
||||
pid=$savepid
|
||||
testpid
|
||||
if [ "X$pid" != "X" ]
|
||||
then
|
||||
echo "Timed out waiting for $APP_LONG_NAME to exit."
|
||||
echo " Attempting a forced exit..."
|
||||
kill -9 $pid
|
||||
fi
|
||||
|
||||
pid=$savepid
|
||||
testpid
|
||||
if [ "X$pid" != "X" ]
|
||||
then
|
||||
echo "Failed to stop $APP_LONG_NAME."
|
||||
exit 1
|
||||
else
|
||||
echo "Stopped $APP_LONG_NAME."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
status() {
|
||||
getpid
|
||||
if [ "X$pid" = "X" ]
|
||||
then
|
||||
echo "$APP_LONG_NAME is not running."
|
||||
exit 1
|
||||
else
|
||||
echo "$APP_LONG_NAME is running ($pid)."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
'console')
|
||||
console
|
||||
;;
|
||||
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
|
||||
'stop')
|
||||
stopit
|
||||
;;
|
||||
|
||||
'restart')
|
||||
stopit
|
||||
start
|
||||
;;
|
||||
|
||||
'status')
|
||||
status
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 { console | start | stop | restart | status }"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
INCLUDES = $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
|
||||
|
||||
noinst_PROGRAMS = svnrev
|
||||
svnrev_LDADD = $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
|
||||
svnrev_SOURCES = svnrev.c
|
||||
|
||||
rev:
|
||||
./svnrev -rsvnrev.input -p../../ -o../uni_revision.h
|
||||
@@ -0,0 +1,381 @@
|
||||
/* SvnRev
|
||||
*
|
||||
* This utility retrieves the highest number that follows the "$Id: $" keyword
|
||||
* or a combination of the $Rev: $ and $Date: $ keywords. The Subversion
|
||||
* version control system expands these keywords and keeps them up to date.
|
||||
* For an example of the tag, see the end of this comment.
|
||||
*
|
||||
* Details on the usage and the operation of this utility is available on-line
|
||||
* at http://www.compuphase.com/svnrev.htm.
|
||||
*
|
||||
*
|
||||
* Acknowledgements
|
||||
*
|
||||
* The support for .java files is contributed by Tom McCann (tommc@spoken.com).
|
||||
* The option for prefixing and/or suffixing the build number (in the string
|
||||
* constant SVN_REVSTR) was suggested by Robert Nitzel.
|
||||
*
|
||||
*
|
||||
* License
|
||||
*
|
||||
* Copyright (c) 2005-2009, ITB CompuPhase (www.compuphase.com).
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
* the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software in
|
||||
* a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
* Version: $Id: svnrev.c 1497 2010-02-12 17:20:21Z achaloyan $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <apr_pools.h>
|
||||
#include <apr_file_io.h>
|
||||
|
||||
|
||||
#if defined __WIN32__ || defined _Win32 || defined _WIN32
|
||||
#define DIRSEP '\\'
|
||||
#elif defined macintosh
|
||||
#define DIRSEP ':'
|
||||
#else
|
||||
/* assume Linux/Unix */
|
||||
#define DIRSEP '/'
|
||||
#endif
|
||||
|
||||
#define MAX_LINELENGTH 512
|
||||
#define MAX_SYMBOLLENGTH 32
|
||||
|
||||
static void about(void)
|
||||
{
|
||||
printf("svnrev 1.7.\n\n");
|
||||
printf("Usage: svnrev [options] <input> [input [...]]\n\n"
|
||||
"Options:\n"
|
||||
"-ofilename\tOutput filename for the file with the build number. When no\n"
|
||||
"\t\tfilename follows \"-o\", the result is written to stdout. The\n"
|
||||
"\t\tdefault filename is \"svnrev.h\" for C/C++ and \"VersionInfo.java\"\n"
|
||||
"\t\tfor Java.\n\n"
|
||||
"-fpattern\tFormat: Adds text before or after the build number in the\n"
|
||||
"\t\tconstant SVN_REVSTR. The pattern has the form \"text#text\"\n"
|
||||
"\t\t(without the quotes) where \"text\" is arbitrary text and \"#\"\n"
|
||||
"\t\twill be replaced by the build number.\n\n"
|
||||
"-i\t\tIncremental: this option should be used when the list of input\n"
|
||||
"\t\tfiles is a subset of all files in the project. When -i is\n"
|
||||
"\t\tpresent, svnrev also scans the output file that was generated\n"
|
||||
"\t\ton a previous run.\n\n"
|
||||
"-jname\t\tJava: this option writes a java package file instead of a C/C++\n"
|
||||
"\t\theader file. The name of the Java package must follow the\n"
|
||||
"\t\toption (this is not the filename).\n\n"
|
||||
"-v\t\tVerbose: prints the names of files that are modified since the\n"
|
||||
"\t\tlast commit (into version control) to stderr.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void processfile(const char *name, int failsilent,
|
||||
int *max_build, int *accum_build,
|
||||
int *max_year, int *max_month, int *max_day,
|
||||
int *ismodified)
|
||||
|
||||
{
|
||||
char str[MAX_LINELENGTH], str_base[MAX_LINELENGTH];
|
||||
char name_base[MAX_LINELENGTH];
|
||||
char *p1;
|
||||
FILE *fp, *fp_base;
|
||||
int build, maj_build;
|
||||
int year, month, day;
|
||||
int cnt;
|
||||
char modchar;
|
||||
|
||||
/* since we also want to verify whether the file is modified in version
|
||||
* control, get the path to the working copy name
|
||||
* for every source file "<path>\<filename>, the "working copy" base can
|
||||
* be found in "<path>\.svn\text-base\<filename>.svn-base"
|
||||
*/
|
||||
if ((p1 = strrchr(name, DIRSEP)) != NULL) {
|
||||
++p1; /* skip directory separator character ('\' in Windows, '/' in Linux) */
|
||||
strncpy(name_base, name, (int)(p1 - name));
|
||||
name_base[(int)(p1 - name)] = '\0';
|
||||
} else {
|
||||
name_base[0] = '\0';
|
||||
p1 = (char*)name;
|
||||
} /* if */
|
||||
sprintf(name_base + strlen(name_base), ".svn%ctext-base%c%s.svn-base",
|
||||
DIRSEP, DIRSEP, p1);
|
||||
|
||||
/* first extract the revision keywords */
|
||||
fp = fopen(name, "r");
|
||||
if (fp == NULL) {
|
||||
if (!failsilent)
|
||||
fprintf(stderr, "Failed to open input file '%s'\n", name);
|
||||
return;
|
||||
} /* if */
|
||||
fp_base = fopen(name_base, "r"); /* fail silently */
|
||||
build = 0;
|
||||
maj_build = 0; /* RCS / CVS */
|
||||
year = month = day = 0;
|
||||
|
||||
while (fgets(str, sizeof str, fp) != NULL) {
|
||||
if (fp_base == NULL || fgets(str_base, sizeof str_base, fp_base) == NULL)
|
||||
str_base[0] = '\0';
|
||||
if ((p1 = strstr(str, "$Id:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Id: %*s %d %d-%d-%d", &build, &year, &month, &day) < 4
|
||||
&& sscanf(p1, "$Id: %*s %d %d/%d/%d", &build, &year, &month, &day) < 4)
|
||||
if (sscanf(p1, "$Id: %*s %d.%d %d-%d-%d", &maj_build, &build, &year, &month, &day) < 5)
|
||||
sscanf(p1, "$Id: %*s %d.%d %d/%d/%d", &maj_build, &build, &year, &month, &day);
|
||||
} else if ((p1 = strstr(str, "$Rev:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Rev: %d.%d", &maj_build, &build) < 2) {
|
||||
sscanf(p1, "$Rev: %d", &build);
|
||||
maj_build = 0;
|
||||
} /* if */
|
||||
} else if ((p1 = strstr(str, "$Revision:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Revision: %d.%d", &maj_build, &build) < 2) {
|
||||
/* SvnRev also writes this keyword in its own generated file; read it
|
||||
* back for partial updates
|
||||
*/
|
||||
cnt = sscanf(p1, "$Revision: %d%c", &build, &modchar);
|
||||
if (cnt == 2 && modchar == 'M' && ismodified != NULL)
|
||||
*ismodified = 1;
|
||||
maj_build = 0;
|
||||
} /* if */
|
||||
} else if ((p1 = strstr(str, "$Date:")) != NULL && strchr(p1+1, '$') != NULL) {
|
||||
if (sscanf(p1, "$Date: %d-%d-%d", &year, &month, &day) < 3)
|
||||
sscanf(p1, "$Date: %d/%d/%d", &year, &month, &day);
|
||||
} else if (ismodified != NULL && *ismodified == 0 && fp_base != NULL) {
|
||||
/* no keyword present, compare the lines for equivalence */
|
||||
*ismodified = strcmp(str, str_base) != 0;
|
||||
} /* if */
|
||||
|
||||
if (maj_build)
|
||||
*accum_build += build; /* RCS / CVS */
|
||||
else if (build > *max_build)
|
||||
*max_build = build; /* Subversion */
|
||||
if (year > *max_year
|
||||
|| (year == *max_year && month > *max_month)
|
||||
|| (year == *max_year && month == *max_month && day > *max_day))
|
||||
{
|
||||
*max_year = year;
|
||||
*max_month = month;
|
||||
*max_day = day;
|
||||
} /* if */
|
||||
if (build > 0 && year > 0 && (fp_base == NULL || ismodified == NULL || *ismodified != 0))
|
||||
break; /* both build # and date found, not comparing or modification
|
||||
* already found => no need to search further */
|
||||
|
||||
} /* while */
|
||||
fclose(fp);
|
||||
if (fp_base != NULL)
|
||||
fclose(fp_base);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *outname = NULL;
|
||||
FILE *fp;
|
||||
FILE *input_file;
|
||||
char *input_file_name = NULL;
|
||||
char *path_prefix = NULL;
|
||||
int index;
|
||||
int process_self = 0;
|
||||
int verbose = 0;
|
||||
int max_build, accum_build;
|
||||
int max_year, max_month, max_day;
|
||||
int ismodified, filemodified;
|
||||
char prefix[MAX_SYMBOLLENGTH], suffix[MAX_SYMBOLLENGTH];
|
||||
char modified_suffix[2];
|
||||
int write_java = 0; /* flag for Java output, 0=.h output, 1=.java output */
|
||||
/* java package to put revision info in.
|
||||
* REVIEW - I assume if you want Java output you will specify a package. */
|
||||
char *java_package = NULL;
|
||||
|
||||
if (argc <= 1)
|
||||
about();
|
||||
|
||||
/* collect the options */
|
||||
prefix[0] = '\0';
|
||||
suffix[0] = '\0';
|
||||
|
||||
for (index = 1; index < argc; index++) {
|
||||
/* check for options */
|
||||
if (argv[index][0] == '-'
|
||||
#if defined __WIN32__ || defined _Win32 || defined _WIN32
|
||||
|| argv[index][0] == '/'
|
||||
#endif
|
||||
)
|
||||
{
|
||||
switch (argv[index][1]) {
|
||||
case 'f': {
|
||||
int len;
|
||||
char *ptr = strchr(&argv[index][2], '#');
|
||||
len = (ptr != NULL) ? (int)(ptr - &argv[index][2]) : (int)strlen(&argv[index][2]);
|
||||
if (len >= MAX_SYMBOLLENGTH)
|
||||
len = MAX_SYMBOLLENGTH - 1;
|
||||
strncpy(prefix, &argv[index][2], len);
|
||||
prefix[len] = '\0';
|
||||
ptr = (ptr != NULL) ? ptr + 1 : strchr(argv[index], '\0');
|
||||
len = (int)strlen(ptr);
|
||||
if (len >= MAX_SYMBOLLENGTH)
|
||||
len = MAX_SYMBOLLENGTH - 1;
|
||||
strncpy(suffix, ptr, len);
|
||||
suffix[len] = '\0';
|
||||
break;
|
||||
} /* case */
|
||||
case 'i':
|
||||
process_self = 1;
|
||||
break;
|
||||
case 'j':
|
||||
write_java=1;
|
||||
java_package = &argv[index][2];
|
||||
break;
|
||||
case 'o':
|
||||
outname = &argv[index][2];
|
||||
break;
|
||||
case 'r':
|
||||
input_file_name = &argv[index][2];
|
||||
break;
|
||||
case 'p':
|
||||
path_prefix = &argv[index][2];
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Invalid option '%s'\n", argv[index]);
|
||||
about();
|
||||
} /* switch */
|
||||
} /* if */
|
||||
} /* for */
|
||||
|
||||
if (outname == NULL)
|
||||
outname = write_java ? "SvnRevision.java" : "uni_revision.h";
|
||||
if (!process_self && *outname != '\0')
|
||||
remove(outname);
|
||||
|
||||
/* phase 1: scan through all files and get the highest build number */
|
||||
|
||||
max_build = 0;
|
||||
accum_build = 0; /* for RCS / CVS */
|
||||
max_year = max_month = max_day = 0;
|
||||
ismodified = 0;
|
||||
|
||||
if(input_file_name) {
|
||||
input_file = fopen(input_file_name, "r");
|
||||
if (input_file != NULL) {
|
||||
apr_dir_t *dir;
|
||||
apr_finfo_t finfo;
|
||||
apr_status_t rv;
|
||||
apr_pool_t *pool;
|
||||
char *file_path;
|
||||
char dir_path[256]; /* line */
|
||||
int offset = 0;
|
||||
if(path_prefix)
|
||||
offset = sprintf(dir_path, "%s", path_prefix);
|
||||
else
|
||||
offset = sprintf(dir_path, "../../");
|
||||
|
||||
apr_initialize();
|
||||
apr_pool_create(&pool,NULL);
|
||||
while (fgets(dir_path + offset, sizeof(dir_path) - offset, input_file) != NULL ) { /* read a line */
|
||||
size_t len = strlen(dir_path)-1;
|
||||
if(dir_path[len] == '\n')
|
||||
dir_path[len] = 0;
|
||||
rv = apr_dir_open(&dir,dir_path,pool);
|
||||
if(rv == APR_SUCCESS) {
|
||||
while (apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) { /* get next file */
|
||||
if(finfo.filetype != APR_REG) continue;
|
||||
|
||||
apr_filepath_merge(&file_path,dir_path,finfo.name,0,pool);
|
||||
|
||||
filemodified = 0;
|
||||
if (strcasecmp(file_path, outname)!=0)
|
||||
processfile(file_path, 0, &max_build, &accum_build, &max_year, &max_month, &max_day, &filemodified);
|
||||
if (filemodified && verbose)
|
||||
fprintf(stderr, "\tNotice: modified file '%s'\n", file_path);
|
||||
ismodified = ismodified || filemodified;
|
||||
}
|
||||
apr_dir_close(dir);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "No such directory '%s'\n", dir_path);
|
||||
}
|
||||
}
|
||||
fclose (input_file);
|
||||
apr_pool_destroy(pool);
|
||||
apr_terminate();
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "No such input file '%s'\n", input_file_name);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (index = 1; index < argc; index++) {
|
||||
/* skip the options (already handled) */
|
||||
if (argv[index][0] == '-'
|
||||
#if defined __WIN32__ || defined _Win32 || defined _WIN32
|
||||
|| argv[index][0] == '/'
|
||||
#endif
|
||||
)
|
||||
continue;
|
||||
|
||||
filemodified = 0;
|
||||
if (strcasecmp(argv[index], outname)!=0)
|
||||
processfile(argv[index], 0, &max_build, &accum_build, &max_year, &max_month, &max_day, &filemodified);
|
||||
if (filemodified && verbose)
|
||||
fprintf(stderr, "\tNotice: modified file '%s'\n", argv[index]);
|
||||
ismodified = ismodified || filemodified;
|
||||
} /* for */
|
||||
}
|
||||
|
||||
/* also run over the existing header file, if any */
|
||||
if (process_self && *outname != '\0')
|
||||
processfile(outname, 1, &max_build, &accum_build, &max_year, &max_month, &max_day, NULL/*&ismodified*/);
|
||||
|
||||
if (accum_build > max_build)
|
||||
max_build = accum_build;
|
||||
modified_suffix[0] = ismodified ? 'M' : '\0';
|
||||
modified_suffix[1] = '\0';
|
||||
|
||||
/* phase 2: write a file with this highest build number */
|
||||
if (*outname == '\0') {
|
||||
fp = stdout;
|
||||
} else if ((fp = fopen(outname, "w")) == NULL) {
|
||||
fprintf(stderr, "Failed to create output file '%s'\n", outname);
|
||||
return 2;
|
||||
} /* if */
|
||||
if (*outname != '\0') {
|
||||
/* don't print the comments to stdout */
|
||||
fprintf(fp, "/* This file was generated by the \"svnrev\" utility\n"
|
||||
" * (http://www.compuphase.com/svnrev.htm).\n"
|
||||
" * You should not modify it manually, as it may be re-generated.\n"
|
||||
" *\n"
|
||||
" * $Revision: %d%s$\n"
|
||||
" * $Date: %04d-%02d-%02d$\n"
|
||||
" */\n\n", max_build, modified_suffix, max_year, max_month, max_day);
|
||||
} /* if */
|
||||
|
||||
fprintf(fp, "#ifndef UNI_REVISION_H\n");
|
||||
fprintf(fp, "#define UNI_REVISION_H\n\n");
|
||||
fprintf(fp, "#define UNI_REVISION\t\t%d\n", max_build);
|
||||
fprintf(fp, "#define UNI_REVISION_STRING\t\"%s%d%s%s\"\n", prefix, max_build, modified_suffix, suffix);
|
||||
fprintf(fp, "#define UNI_REVISION_DATE\t\"%04d-%02d-%02d\"\n", max_year, max_month, max_day);
|
||||
fprintf(fp, "#define UNI_REVISION_STAMP\t%04d%02d%02dL\n", max_year, max_month, max_day);
|
||||
fprintf(fp, "#define UNI_REVISION_MODIFIED\t%d\n", ismodified);
|
||||
fprintf(fp, "\n#endif /* UNI_REVISION_H */\n");
|
||||
|
||||
if (*outname != '\0')
|
||||
fclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
build
|
||||
libs/apr-toolkit/include
|
||||
libs/apr-toolkit/src
|
||||
libs/mpf/include
|
||||
libs/mpf/src
|
||||
libs/mrcp/control/include
|
||||
libs/mrcp/control/src
|
||||
libs/mrcp/include
|
||||
libs/mrcp/message/include
|
||||
libs/mrcp/message/src
|
||||
libs/mrcp/resources/include
|
||||
libs/mrcp/resources/src
|
||||
libs/mrcp-client/include
|
||||
libs/mrcp-client/src
|
||||
libs/mrcp-server/include
|
||||
libs/mrcp-server/src
|
||||
libs/mrcp-engine/include
|
||||
libs/mrcp-engine/src
|
||||
libs/mrcp-signaling/include
|
||||
libs/mrcp-signaling/src
|
||||
libs/mrcpv2-transport/include
|
||||
libs/mrcpv2-transport/src
|
||||
libs/uni-rtsp/include
|
||||
libs/uni-rtsp/src
|
||||
modules/mrcp-sofiasip/include
|
||||
modules/mrcp-sofiasip/src
|
||||
modules/mrcp-unirtsp/include
|
||||
modules/mrcp-unirtsp/src
|
||||
platforms/libunimrcp-client/include
|
||||
platforms/libunimrcp-client/src
|
||||
platforms/libunimrcp-server/include
|
||||
platforms/libunimrcp-server/src
|
||||
@@ -0,0 +1,345 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="svnrev"
|
||||
ProjectGUID="{49AAB3FE-63D3-41CA-B92B-65828B79902B}"
|
||||
RootNamespace="svnrev"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
|
||||
Outputs="$(SolutionDir)build\uni_revision.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\svnrev.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="prepare"
|
||||
ProjectGUID="{01D63BF5-7798-4746-852A-4B45229BB735}"
|
||||
RootNamespace="prepare"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
||||
@@ -28,7 +28,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
@@ -41,29 +41,6 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
@@ -74,7 +51,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
@@ -88,6 +65,29 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
@@ -99,7 +99,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="preparesphinx"
|
||||
ProjectGUID="{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}"
|
||||
RootNamespace="preparesphinx"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
"
|
||||
ExcludedFromBuild="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="xcopy "$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 Arsen Chaloyan
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -12,6 +12,8 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: unimrcp_service.c 1474 2010-02-07 20:51:47Z achaloyan $
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="unimrcpservice"
|
||||
ProjectGUID="{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}"
|
||||
RootNamespace="unimrcpservice"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="unimrcpservice.exe.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="unimrcpservice.exe.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\unimrcp_service.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -51,7 +51,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
@@ -113,7 +113,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -178,7 +178,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
@@ -241,7 +241,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
|
||||
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
|
||||
LinkTimeCodeGeneration="1"
|
||||
/>
|
||||
<Tool
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 Arsen Chaloyan
|
||||
* Copyright 2008-2010 Arsen Chaloyan
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -12,10 +12,12 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: uni_version.h 1724 2010-06-02 18:42:20Z achaloyan $
|
||||
*/
|
||||
|
||||
#ifndef __UNI_VERSION_H__
|
||||
#define __UNI_VERSION_H__
|
||||
#ifndef UNI_VERSION_H
|
||||
#define UNI_VERSION_H
|
||||
|
||||
/**
|
||||
* @file uni_version.h
|
||||
@@ -26,20 +28,18 @@
|
||||
* http://apr.apache.org/versioning.html
|
||||
*/
|
||||
|
||||
#include <apr_version.h>
|
||||
|
||||
/** major version
|
||||
* Major API changes that could cause compatibility problems for older
|
||||
* programs such as structure size changes. No binary compatibility is
|
||||
* possible across a change in the major version.
|
||||
*/
|
||||
#define UNI_MAJOR_VERSION 0
|
||||
#define UNI_MAJOR_VERSION 1
|
||||
|
||||
/** minor version
|
||||
* Minor API changes that do not cause binary compatibility problems.
|
||||
* Reset to 0 when upgrading UNI_MAJOR_VERSION
|
||||
*/
|
||||
#define UNI_MINOR_VERSION 9
|
||||
#define UNI_MINOR_VERSION 0
|
||||
|
||||
/** patch level
|
||||
* The Patch Level never includes API changes, simply bug fixes.
|
||||
@@ -57,10 +57,40 @@
|
||||
|| ((major) == UNI_MAJOR_VERSION && (minor) < UNI_MINOR_VERSION) \
|
||||
|| ((major) == UNI_MAJOR_VERSION && (minor) == UNI_MINOR_VERSION && (patch) <= UNI_PATCH_VERSION))
|
||||
|
||||
|
||||
/** Properly quote a value as a string in the C preprocessor */
|
||||
#define UNI_STRINGIFY(n) UNI_STRINGIFY_HELPER(n)
|
||||
/** Helper macro for UNI_STRINGIFY */
|
||||
#define UNI_STRINGIFY_HELPER(n) #n
|
||||
|
||||
/** The formatted string of UniMRCP's version */
|
||||
#define UNI_VERSION_STRING \
|
||||
APR_STRINGIFY(UNI_MAJOR_VERSION) "." \
|
||||
APR_STRINGIFY(UNI_MINOR_VERSION) "." \
|
||||
APR_STRINGIFY(UNI_PATCH_VERSION)
|
||||
UNI_STRINGIFY(UNI_MAJOR_VERSION) "." \
|
||||
UNI_STRINGIFY(UNI_MINOR_VERSION) "." \
|
||||
UNI_STRINGIFY(UNI_PATCH_VERSION)
|
||||
|
||||
#endif /* __UNI_VERSION_H__ */
|
||||
/** An alternative formatted string of UniMRCP's version
|
||||
macro for Win32 .rc files using numeric csv representation */
|
||||
#define UNI_VERSION_STRING_CSV UNI_MAJOR_VERSION ##, \
|
||||
##UNI_MINOR_VERSION ##, \
|
||||
##UNI_PATCH_VERSION
|
||||
|
||||
/** The Copyright */
|
||||
#define UNI_COPYRIGHT "Copyright 2008-2010 Arsen Chaloyan"
|
||||
|
||||
/** The License */
|
||||
#define UNI_LICENSE \
|
||||
"Licensed under the Apache License, Version 2.0 (the ""License"");" \
|
||||
"you may not use this file except in compliance with the License." \
|
||||
"You may obtain a copy of the License at" \
|
||||
"" \
|
||||
" http://www.apache.org/licenses/LICENSE-2.0" \
|
||||
"" \
|
||||
"Unless required by applicable law or agreed to in writing, software" \
|
||||
"distributed under the License is distributed on an ""AS IS"" BASIS," \
|
||||
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." \
|
||||
"See the License for the specific language governing permissions and" \
|
||||
"limitations under the License."
|
||||
|
||||
|
||||
#endif /* UNI_VERSION_H */
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<AprDir>$(LibRootDir)libs\apr</AprDir>
|
||||
<AprUtilDir>$(LibRootDir)libs\apr-util</AprUtilDir>
|
||||
<AprIconvDir>$(LibRootDir)libs\apr-iconv</AprIconvDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(AprDir)\include;$(AprUtilDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="AprDir">
|
||||
<Value>$(AprDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="AprUtilDir">
|
||||
<Value>$(AprUtilDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="AprIconvDir">
|
||||
<Value>$(AprIconvDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apr.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\apr-toolkit\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="cepstral"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(CepstralSDKDir)\include""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="swift.lib"
|
||||
AdditionalLibraryDirectories=""$(CepstralSDKDir)\lib\lib-windows""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="CepstralSDKDir"
|
||||
Value="C:\Program Files\Cepstral\sdk"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mpf\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp\include;$(ProjectRootDir)libs\mrcp\message\include;$(ProjectRootDir)libs\mrcp\control\include;$(ProjectRootDir)libs\mrcp\resources\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="mrcpsignaling.props" />
|
||||
<Import Project="mrcpv2transport.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="mpf.props" />
|
||||
<Import Project="mrcp.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-signaling\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="mrcp.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcpv2-transport\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<SofiaDir>$(LibRootDir)libs\sofia-sip</SofiaDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SofiaDir)\win32;$(SofiaDir)\libsofia-sip-ua\su;$(SofiaDir)\libsofia-sip-ua\nua;$(SofiaDir)\libsofia-sip-ua\url;$(SofiaDir)\libsofia-sip-ua\sip;$(SofiaDir)\libsofia-sip-ua\msg;$(SofiaDir)\libsofia-sip-ua\sdp;$(SofiaDir)\libsofia-sip-ua\nta;$(SofiaDir)\libsofia-sip-ua\nea;$(SofiaDir)\libsofia-sip-ua\soa;$(SofiaDir)\libsofia-sip-ua\iptsec;$(SofiaDir)\libsofia-sip-ua\bnf;$(SofiaDir)\libsofia-sip-ua\features;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="SofiaDir">
|
||||
<Value>$(SofiaDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<ProjectRootDir>$(ProjectDir)..\..\</ProjectRootDir>
|
||||
<LibRootDir>$(SolutionDir)</LibRootDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="ProjectRootDir">
|
||||
<Value>$(ProjectRootDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="LibRootDir">
|
||||
<Value>$(LibRootDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -11,6 +11,6 @@
|
||||
/>
|
||||
<UserMacro
|
||||
Name="UniMRCPClientLibs"
|
||||
Value="libunimrcpclient.lib mrcpclient.lib mrcpsignaling.lib mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
Value="libunimrcpclient.lib mrcpsofiasip.lib mrcpunirtsp.lib unirtsp.lib mrcpclient.lib mrcpv2transport.lib mrcpsignaling.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="unimrcpplugin"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugin"
|
||||
InheritedPropertySheets=".\mrcpengine.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories=""$(SolutionDir)$(ConfigurationName)\bin""
|
||||
AdditionalDependencies="mrcpengine.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib ws2_32.lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
@@ -11,6 +11,6 @@
|
||||
/>
|
||||
<UserMacro
|
||||
Name="UniMRCPServerLibs"
|
||||
Value="libunimrcpserver.lib mrcpserver.lib mrcpsignaling.lib mrcpengine.lib mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
Value="libunimrcpserver.lib mrcpsofiasip.lib mrcpunirtsp.lib unirtsp.lib mrcpserver.lib mrcpv2transport.lib mrcpsignaling.lib mrcpengine.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="apt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectRootDir)libs\uni-rtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>RTSP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -2,10 +2,17 @@ MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
def-conf:
|
||||
test -d $(confdir) || $(mkinstalldirs) $(confdir)
|
||||
for conffile in `find ./ -name \*.xml` ; do \
|
||||
for conffile in `find ./ -maxdepth 1 -name \*.xml -o -name \*.xsd` ; do \
|
||||
filename=`echo $$conffile | sed -e 's|^.*/||'`; \
|
||||
$(INSTALL) -m 644 $$filename $(confdir); \
|
||||
done
|
||||
|
||||
test -d $(confdir)/client-profiles || $(mkinstalldirs) $(confdir)/client-profiles
|
||||
for conffile in `find ./client-profiles/ -maxdepth 1 -name \*.xml -o -name \*.xsd` ; do \
|
||||
filename=`echo $$conffile | sed -e 's|^.*/||'`; \
|
||||
$(INSTALL) -m 644 client-profiles/$$filename $(confdir)/client-profiles; \
|
||||
done
|
||||
|
||||
|
||||
install-data-local:
|
||||
test -d $(confdir) || $(MAKE) def-conf
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- UniMRCP client document -->
|
||||
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd"
|
||||
version="1.0">
|
||||
<settings>
|
||||
<!-- SIP MRCPv2 settings -->
|
||||
<sip-settings id="LumenVox-SIP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>5060</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
</sip-settings>
|
||||
|
||||
<!-- RTSP MRCPv1 settings -->
|
||||
<rtsp-settings id="LumenVox-RTSP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>554</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<resource-location></resource-location>
|
||||
<resource-map>
|
||||
<param name="speechrecog" value="recognizer"/>
|
||||
</resource-map>
|
||||
</rtsp-settings>
|
||||
</settings>
|
||||
|
||||
<profiles>
|
||||
<!-- LumenVox MRCPv2 profile -->
|
||||
<mrcpv2-profile id="lv2">
|
||||
<sip-uac>SIP-Agent-1</sip-uac>
|
||||
<mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<sip-settings>LumenVox-SIP-Settings</sip-settings>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
</mrcpv2-profile>
|
||||
|
||||
<!-- LumenVox MRCPv1 profile -->
|
||||
<mrcpv1-profile id="lv1">
|
||||
<rtsp-uac>RTSP-Agent-1</rtsp-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<rtsp-settings>LumenVox-RTSP-Settings</rtsp-settings>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
</mrcpv1-profile>
|
||||
|
||||
<!-- more profiles might be added here -->
|
||||
</profiles>
|
||||
</unimrcpclient>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- UniMRCP client document -->
|
||||
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd"
|
||||
version="1.0">
|
||||
<settings>
|
||||
<!-- SIP MRCPv2 settings -->
|
||||
<sip-settings id="Nuance-SIP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>5060</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<!-- <feature-tags>*;+mrcpv2.speechrecog;+mrcpv2.speechrecog.grammars="http://grammars.example.com/biggrammar.gram"</feature-tags> -->
|
||||
</sip-settings>
|
||||
|
||||
<!-- RTSP MRCPv1 settings -->
|
||||
<rtsp-settings id="Nuance-RTSP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>4900</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<resource-location>media</resource-location>
|
||||
<resource-map>
|
||||
<param name="speechsynth" value="speechsynthesizer"/>
|
||||
<param name="speechrecog" value="speechrecognizer"/>
|
||||
</resource-map>
|
||||
</rtsp-settings>
|
||||
|
||||
<!-- RTP/RTCP settings -->
|
||||
<rtp-settings id="Nuance-RTP-Settings">
|
||||
<jitter-buffer>
|
||||
<playout-delay>50</playout-delay>
|
||||
<max-playout-delay>200</max-playout-delay>
|
||||
</jitter-buffer>
|
||||
<ptime>20</ptime>
|
||||
<codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
|
||||
<!-- enable/disable RTCP support -->
|
||||
<rtcp enable="true">
|
||||
<!-- RTCP BYE policies (RTCP must be enabled first)
|
||||
0 - disable RTCP BYE
|
||||
1 - send RTCP BYE at the end of session
|
||||
2 - send RTCP BYE also at the end of each talkspurt (input)
|
||||
-->
|
||||
<rtcp-bye>2</rtcp-bye>
|
||||
<!-- rtcp transmission interval in msec (set 0 to disable) -->
|
||||
<tx-interval>5000</tx-interval>
|
||||
<!-- period (timeout) to check for new rtcp messages in msec (set 0 to disable) -->
|
||||
<rx-resolution>1000</rx-resolution>
|
||||
</rtcp>
|
||||
</rtp-settings>
|
||||
|
||||
</settings>
|
||||
|
||||
<profiles>
|
||||
<!-- Nuance MRCPv2 profile -->
|
||||
<mrcpv2-profile id="nss2">
|
||||
<sip-uac>SIP-Agent-1</sip-uac>
|
||||
<mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<sip-settings>Nuance-SIP-Settings</sip-settings>
|
||||
<rtp-settings>Nuance-RTP-Settings</rtp-settings>
|
||||
</mrcpv2-profile>
|
||||
|
||||
<!-- Nuance MRCPv1 profile -->
|
||||
<mrcpv1-profile id="nss1">
|
||||
<rtsp-uac>RTSP-Agent-1</rtsp-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<rtsp-settings>Nuance-RTSP-Settings</rtsp-settings>
|
||||
<rtp-settings>Nuance-RTP-Settings</rtp-settings>
|
||||
</mrcpv1-profile>
|
||||
|
||||
<!-- more profiles might be added here -->
|
||||
</profiles>
|
||||
</unimrcpclient>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- UniMRCP client document -->
|
||||
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd"
|
||||
version="1.0">
|
||||
<settings>
|
||||
<!-- RTSP MRCPv1 settings -->
|
||||
<rtsp-settings id="SpeechPro-RTSP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>8000</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<resource-location></resource-location>
|
||||
<resource-map>
|
||||
<param name="speechsynth" value="tts"/>
|
||||
<param name="speechrecog" value="asr"/>
|
||||
</resource-map>
|
||||
</rtsp-settings>
|
||||
</settings>
|
||||
|
||||
<profiles>
|
||||
<!-- SpeechPro MRCPv1 profile -->
|
||||
<mrcpv1-profile id="sp1">
|
||||
<rtsp-uac>RTSP-Agent-1</rtsp-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<rtsp-settings>SpeechPro-RTSP-Settings</rtsp-settings>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
</mrcpv1-profile>
|
||||
|
||||
<!-- more profiles might be added here -->
|
||||
</profiles>
|
||||
</unimrcpclient>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- UniMRCP client document -->
|
||||
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd"
|
||||
version="1.0">
|
||||
<settings>
|
||||
<!-- SIP MRCPv2 settings -->
|
||||
<sip-settings id="UniMRCP-SIP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>8060</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
</sip-settings>
|
||||
|
||||
<!-- RTSP MRCPv1 settings -->
|
||||
<rtsp-settings id="UniMRCP-RTSP-Settings">
|
||||
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the properties. -->
|
||||
<!-- <server-ip>10.10.0.1</server-ip> -->
|
||||
<server-port>1554</server-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<resource-location>media</resource-location>
|
||||
<resource-map>
|
||||
<param name="speechsynth" value="speechsynthesizer"/>
|
||||
<param name="speechrecog" value="speechrecognizer"/>
|
||||
</resource-map>
|
||||
</rtsp-settings>
|
||||
</settings>
|
||||
|
||||
<profiles>
|
||||
<!-- UniMRCP MRCPv2 profile -->
|
||||
<mrcpv2-profile id="uni2">
|
||||
<sip-uac>SIP-Agent-1</sip-uac>
|
||||
<mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<sip-settings>UniMRCP-SIP-Settings</sip-settings>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
</mrcpv2-profile>
|
||||
|
||||
<!-- UniMRCP MRCPv1 profile -->
|
||||
<mrcpv1-profile id="uni1">
|
||||
<rtsp-uac>RTSP-Agent-1</rtsp-uac>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<rtsp-settings>UniMRCP-RTSP-Settings</rtsp-settings>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
</mrcpv1-profile>
|
||||
|
||||
<!-- more profiles might be added here -->
|
||||
</profiles>
|
||||
</unimrcpclient>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Logger Document -->
|
||||
<aptlogger>
|
||||
<!-- Set the log priority to one of
|
||||
EMERGENCY system is unusable
|
||||
ALERT action must be taken immediately
|
||||
CRITICAL critical condition
|
||||
ERROR error condition
|
||||
WARNING warning condition
|
||||
NOTICE normal, but significant condition
|
||||
INFO informational message
|
||||
DEBUG debug-level message
|
||||
-->
|
||||
<priority>INFO</priority>
|
||||
|
||||
<!-- Set the log output mode
|
||||
CONSOLE console output
|
||||
FILE log file output
|
||||
CONSOLE,FILE both console and the log file output
|
||||
-->
|
||||
<output>CONSOLE</output>
|
||||
|
||||
<!-- Set the format of the log messages
|
||||
DATE date output
|
||||
TIME time output
|
||||
PRIORITY priority output
|
||||
MARK file:line marker output
|
||||
THREAD calling thread identifier output
|
||||
-->
|
||||
<headers>DATE,TIME,PRIORITY</headers>
|
||||
|
||||
<!-- Set the log masking mode
|
||||
NONE log everything as is
|
||||
COMPLETE mask private data completely
|
||||
ENCRYPTED enrcypt private data
|
||||
-->
|
||||
<masking>NONE</masking>
|
||||
</aptlogger>
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
UniMRCP Client Scenarios.
|
||||
There are predefined, named scenarios, which you can customize and use.
|
||||
@@ -5,8 +6,9 @@ Currently available scenarios are
|
||||
1. class="Synthesizer"
|
||||
2. class="Recognizer"
|
||||
3. class="Recorder"
|
||||
4. class="DtmfRecofnizer"
|
||||
4. class="DtmfRecognizer"
|
||||
5. class="Params"
|
||||
6. class="Verifier"
|
||||
|
||||
More than one scenario of the same type (class) can be defined.
|
||||
The name (not class) of the scenario is used to run it from console.
|
||||
@@ -15,7 +17,7 @@ For instance,
|
||||
-->
|
||||
|
||||
<umcscenarios>
|
||||
<scenario name="synth" class="Synthesizer" profile="MRCPv2-Default">
|
||||
<scenario name="synth" class="Synthesizer" profile="uni2">
|
||||
<resource-discovery enable="0"/>
|
||||
<speak enable="1" content-type="application/synthesis+ssml" content-location="speak.xml"/>
|
||||
<!-- <speak enable="1" content-type="text/plain" content-location="speak.txt"/> -->
|
||||
@@ -33,7 +35,7 @@ For instance,
|
||||
-->
|
||||
</scenario>
|
||||
|
||||
<scenario name="recog" class="Recognizer" profile="MRCPv2-Default">
|
||||
<scenario name="recog" class="Recognizer" profile="uni2">
|
||||
<resource-discovery enable="0"/>
|
||||
<define-grammar enable="1" content-type="application/srgs+xml" content-location="grammar.xml"/>
|
||||
<!-- <define-grammar enable="1" content-type="application/grammar+xml" content-location="grammar.xml"/> -->
|
||||
@@ -55,7 +57,7 @@ For instance,
|
||||
-->
|
||||
</scenario>
|
||||
|
||||
<scenario name="rec" class="Recorder" profile="MRCPv2-Default">
|
||||
<scenario name="rec" class="Recorder" profile="uni2">
|
||||
<resource-discovery enable="0"/>
|
||||
<record enable="1"/>
|
||||
|
||||
@@ -72,7 +74,7 @@ For instance,
|
||||
-->
|
||||
</scenario>
|
||||
|
||||
<scenario name="dtmf" class="DtmfRecognizer" profile="MRCPv2-Default">
|
||||
<scenario name="dtmf" class="DtmfRecognizer" profile="uni2">
|
||||
<resource-discovery enable="0"/>
|
||||
<recognize enable="1" content-type="text/uri-list" grammar="builtin:dtmf/digits" digits="1234"/> -->
|
||||
|
||||
@@ -89,8 +91,24 @@ For instance,
|
||||
-->
|
||||
</scenario>
|
||||
|
||||
<scenario name="params" class="Params" profile="MRCPv2-Default"/>
|
||||
<scenario name="params" class="Params" profile="uni2"/>
|
||||
|
||||
<scenario name="verify" class="Verifier" profile="uni2">
|
||||
<resource-discovery enable="0"/>
|
||||
<verify repository-uri="http://www.example.com/voiceprintdbase/" verification-mode="verify" voiceprint-identifier="johnsmith"/>
|
||||
|
||||
<termination enable="1">
|
||||
<capabilities>
|
||||
<codec name="LPCM" rates="8000 16000"/>
|
||||
<!-- <codec name="PCMU" rates="8000 16000"/> -->
|
||||
</capabilities>
|
||||
</termination>
|
||||
<!--
|
||||
<rtp-termination enable="1" ip="127.0.0.1" port="5678">
|
||||
<codecs="PCMU PCMA L16/96/8000 PCMU/97/16000 telephone-event/101/8000"/>
|
||||
</rtp-termination>
|
||||
-->
|
||||
</scenario>
|
||||
<!-- It'd be great to have scriptable custom scenarios as well.
|
||||
<scenario name="custom" class="UmcXml">
|
||||
</scenario>
|
||||
|
||||
@@ -1,97 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- UniMRCP client document -->
|
||||
<unimrcpclient>
|
||||
<!-- MRCP resources -->
|
||||
<resources>
|
||||
<resource class="speechsynth" enable="1"/>
|
||||
<resource class="speechrecog" enable="1"/>
|
||||
<resource class="recorder" enable="1"/>
|
||||
</resources>
|
||||
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="unimrcpclient.xsd"
|
||||
version="1.0"
|
||||
subfolder="client-profiles">
|
||||
<properties>
|
||||
<!-- By default, network interface (IP address) to bind to will be implicitly identified.
|
||||
Alternatively, it can be explicitly set.
|
||||
-->
|
||||
<ip type="auto"/>
|
||||
<!-- <ip>10.10.0.1</ip> -->
|
||||
<!-- <ext-ip>a.b.c.d</ext-ip> -->
|
||||
<!-- <server-ip>a.b.c.d</server-ip> -->
|
||||
</properties>
|
||||
|
||||
<!-- Client settings (signaling, media, ...) -->
|
||||
<components>
|
||||
<!-- Factory of MRCP resources -->
|
||||
<resource-factory>
|
||||
<resource id="speechsynth" enable="true"/>
|
||||
<resource id="speechrecog" enable="true"/>
|
||||
<resource id="recorder" enable="true"/>
|
||||
<resource id="speakverify" enable="true"/>
|
||||
</resource-factory>
|
||||
|
||||
<!-- SofiaSIP MRCPv2 signaling agent -->
|
||||
<sip-uac id="SIP-Agent-1" type="SofiaSIP">
|
||||
<!-- By default, "ip" and "ext-ip" addresses set in the properties will be used.
|
||||
They still can be explicitly specified (overriden) here.
|
||||
-->
|
||||
<!-- <sip-ip>10.10.0.1</sip-ip> -->
|
||||
<!-- <sip-ext-ip>a.b.c.d</sip-ext-ip> -->
|
||||
<sip-port>8062</sip-port>
|
||||
<sip-transport>udp</sip-transport>
|
||||
<ua-name>UniMRCP SofiaSIP</ua-name>
|
||||
<sdp-origin>UniMRCPClient</sdp-origin>
|
||||
<!-- <sip-t1>500</sip-t1> -->
|
||||
<!-- <sip-t2>4000</sip-t2> -->
|
||||
<!-- <sip-t4>4000</sip-t4> -->
|
||||
<!-- <sip-t1x64>32000</sip-t1x64> -->
|
||||
</sip-uac>
|
||||
|
||||
<!-- UniRTSP MRCPv1 signaling agent -->
|
||||
<rtsp-uac id="RTSP-Agent-1" type="UniRTSP">
|
||||
<max-connection-count>100</max-connection-count>
|
||||
<!-- <request-timeout>5000</request-timeout> -->
|
||||
<sdp-origin>UniMRCPClient</sdp-origin>
|
||||
</rtsp-uac>
|
||||
|
||||
<!-- MRCPv2 connection agent -->
|
||||
<mrcpv2-uac id="MRCPv2-Agent-1">
|
||||
<max-connection-count>100</max-connection-count>
|
||||
<offer-new-connection>false</offer-new-connection>
|
||||
<rx-buffer-size>1024</rx-buffer-size>
|
||||
<tx-buffer-size>1024</tx-buffer-size>
|
||||
<!-- <request-timeout>5000</request-timeout> -->
|
||||
</mrcpv2-uac>
|
||||
|
||||
<!-- Media processing engine -->
|
||||
<media-engine id="Media-Engine-1">
|
||||
<realtime-rate>1</realtime-rate>
|
||||
</media-engine>
|
||||
|
||||
<!-- Factory of RTP terminations -->
|
||||
<rtp-factory id="RTP-Factory-1">
|
||||
<!-- By default, "ip" and "ext-ip" addresses set in the properties will be used.
|
||||
They still can be explicitly specified (overriden) here.
|
||||
-->
|
||||
<!-- <rtp-ip>10.10.0.1</rtp-ip> -->
|
||||
<!-- <rtp-ext-ip>a.b.c.d</rtp-ext-ip> -->
|
||||
<rtp-port-min>4000</rtp-port-min>
|
||||
<rtp-port-max>5000</rtp-port-max>
|
||||
</rtp-factory>
|
||||
</components>
|
||||
|
||||
<settings>
|
||||
<!-- SIP, RTSP signaling agents -->
|
||||
<signaling>
|
||||
<!-- SofiaSIP MRCPv2 signaling agent -->
|
||||
<agent name="SIP-Agent-1" class="SofiaSIP">
|
||||
<param name="client-ip" value="auto"/>
|
||||
<!-- <param name="client-ext-ip" value="auto"/> -->
|
||||
<param name="client-port" value="8062"/>
|
||||
<param name="server-ip" value="auto"/>
|
||||
<param name="server-port" value="8060"/>
|
||||
<!-- <param name="force-destination" value="1"/> -->
|
||||
<!-- <param name="sip-transport" value="tcp"/> -->
|
||||
<param name="sip-transport" value="udp"/>
|
||||
|
||||
<param name="ua-name" value="UniMRCP SofiaSIP"/>
|
||||
<param name="sdp-origin" value="UniMRCPClient"/>
|
||||
</agent>
|
||||
<!-- UniRTSP MRCPv1 signaling agent -->
|
||||
<agent name="RTSP-Agent-1" class="UniRTSP">
|
||||
<param name="server-ip" value="auto"/>
|
||||
<param name="server-port" value="1554"/>
|
||||
<!-- <param name="force-destination" value="1"/> -->
|
||||
<param name="resource-location" value="media"/>
|
||||
<resourcemap>
|
||||
<param name="speechsynth" value="speechsynthesizer"/>
|
||||
<param name="speechrecog" value="speechrecognizer"/>
|
||||
</resourcemap>
|
||||
</agent>
|
||||
</signaling>
|
||||
|
||||
<!-- MRCPv2 connection agents -->
|
||||
<connection>
|
||||
<agent name="MRCPv2-Agent-1">
|
||||
<param name="max-connection-count" value="100"/>
|
||||
<!-- <param name="offer-new-connection" value="1"/> -->
|
||||
</agent>
|
||||
</connection>
|
||||
|
||||
<!-- Media engines -->
|
||||
<media>
|
||||
<engine name="Media-Engine-1" realtime-rate="1"/>
|
||||
<rtp name="RTP-Factory-1">
|
||||
<param name="rtp-ip" value="auto"/>
|
||||
<!-- <param name="rtp-ext-ip" value="auto"/> -->
|
||||
<param name="rtp-port-min" value="4000"/>
|
||||
<param name="rtp-port-max" value="5000"/>
|
||||
<!-- <param name="playout-delay" value="50"/> -->
|
||||
<!-- <param name="max-playout-delay" value="200"/> -->
|
||||
<!-- <param name="ptime" value="20"/> -->
|
||||
<param name="codecs" value="PCMU PCMA L16/96/8000 PCMU/97/16000 telephone-event/101/8000"/>
|
||||
<!-- <param name="codecs" value="PCMU PCMA L16/96/8000 PCMU/97/16000 PCMA/98/16000 L16/99/16000"/> -->
|
||||
|
||||
<!-- enable/disable rtcp support -->
|
||||
<param name="rtcp" value="0"/>
|
||||
<!-- rtcp bye policies (rtcp must be enabled first)
|
||||
0 - disable rtcp bye
|
||||
1 - send rtcp bye at the end of session
|
||||
2 - send rtcp bye also at the end of each talkspurt (input)
|
||||
<!-- common (default) RTP/RTCP settings -->
|
||||
<rtp-settings id="RTP-Settings-1">
|
||||
<jitter-buffer>
|
||||
<playout-delay>50</playout-delay>
|
||||
<max-playout-delay>200</max-playout-delay>
|
||||
</jitter-buffer>
|
||||
<ptime>20</ptime>
|
||||
<codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
|
||||
<!-- <codecs>PCMU PCMA L16/96/8000 PCMU/97/16000 PCMA/98/16000 L16/99/16000</codecs> -->
|
||||
<!-- enable/disable RTCP support -->
|
||||
<rtcp enable="false">
|
||||
<!-- RTCP BYE policies (RTCP must be enabled first)
|
||||
0 - disable RTCP BYE
|
||||
1 - send RTCP BYE at the end of session
|
||||
2 - send RTCP BYE also at the end of each talkspurt (input)
|
||||
-->
|
||||
<param name="rtcp-bye" value="1"/>
|
||||
<rtcp-bye>1</rtcp-bye>
|
||||
<!-- rtcp transmission interval in msec (set 0 to disable) -->
|
||||
<param name="rtcp-tx-interval" value="5000"/>
|
||||
<tx-interval>5000</tx-interval>
|
||||
<!-- period (timeout) to check for new rtcp messages in msec (set 0 to disable) -->
|
||||
<param name="rtcp-rx-resolution" value="1000"/>
|
||||
</rtp>
|
||||
</media>
|
||||
</settings>
|
||||
|
||||
<!-- Client profiles -->
|
||||
<profiles>
|
||||
<!-- MRCPv2 default profile -->
|
||||
<profile name="MRCPv2-Default">
|
||||
<param name="signaling-agent" value="SIP-Agent-1"/>
|
||||
<param name="connection-agent" value="MRCPv2-Agent-1"/>
|
||||
<param name="media-engine" value="Media-Engine-1"/>
|
||||
<param name="rtp-factory" value="RTP-Factory-1"/>
|
||||
</profile>
|
||||
<!-- MRCPv1 default profile -->
|
||||
<profile name="MRCPv1-Default">
|
||||
<param name="signaling-agent" value="RTSP-Agent-1"/>
|
||||
<param name="media-engine" value="Media-Engine-1"/>
|
||||
<param name="rtp-factory" value="RTP-Factory-1"/>
|
||||
</profile>
|
||||
|
||||
<!-- more profiles might be added here -->
|
||||
</profiles>
|
||||
<rx-resolution>1000</rx-resolution>
|
||||
</rtcp>
|
||||
</rtp-settings>
|
||||
</settings>
|
||||
</unimrcpclient>
|
||||
@@ -0,0 +1,266 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
|
||||
<xsd:element name="unimrcpclient">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>UniMRCP client document</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="properties" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Generic properties</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ip" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="ext-ip" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="server-ip" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="components" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Common components</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="resource-factory" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Factory of MRCP resources</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="resource">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="sip-uac" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>SIP signaling agent</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sip-ip" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="sip-ext-ip" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="sip-port" type="xsd:short" />
|
||||
<xsd:element name="sip-transport" type="xsd:string" />
|
||||
<xsd:element name="ua-name" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="sdp-origin" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="sip-t1" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sip-t2" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sip-t4" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sip-t1x64" type="xsd:long" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="type" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtsp-uac" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>RTSP signaling agent</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="max-connection-count" type="xsd:short" minOccurs="0" />
|
||||
<xsd:element name="request-timeout" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sdp-origin" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="type" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="mrcpv2-uac" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>MRCPv2 connection agent</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="max-connection-count" type="xsd:short" minOccurs="0" />
|
||||
<xsd:element name="offer-new-connection" type="xsd:boolean" minOccurs="0" />
|
||||
<xsd:element name="rx-buffer-size" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="tx-buffer-size" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="request-timeout" type="xsd:long" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="media-engine" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Media processing engine</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="realtime-rate" type="xsd:short" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtp-factory" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Factory of RTP terminations</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtp-ip" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="rtp-ext-ip" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="rtp-port-min" type="xsd:short" />
|
||||
<xsd:element name="rtp-port-max" type="xsd:short" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="settings" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Settings</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sip-settings" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>SIP settings</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="server-ip" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="server-port" type="xsd:short" />
|
||||
<xsd:element name="force-destination" type="xsd:boolean" default="false" minOccurs="0" />
|
||||
<xsd:element name="feature-tags" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtsp-settings" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>RTSP settings</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="server-ip" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="server-port" type="xsd:short" />
|
||||
<xsd:element name="force-destination" type="xsd:boolean" default="false" minOccurs="0" />
|
||||
<xsd:element name="resource-location" type="xsd:string" />
|
||||
<xsd:element name="resource-map">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="param" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="value" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtp-settings" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>RTP settings</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="jitter-buffer" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="playout-delay" type="xsd:long" />
|
||||
<xsd:element name="max-playout-delay" type="xsd:long" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="ptime" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="codecs" type="xsd:string" />
|
||||
<xsd:element name="rtcp" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtcp-bye" type="xsd:int" />
|
||||
<xsd:element name="tx-interval" type="xsd:long" />
|
||||
<xsd:element name="rx-resolution" type="xsd:long" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="profiles" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Profiles</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mrcpv2-profile" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>MRCPv2 profile</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sip-uac" type="xsd:string" />
|
||||
<xsd:element name="mrcpv2-uac" type="xsd:string" />
|
||||
<xsd:element name="media-engine" type="xsd:string" />
|
||||
<xsd:element name="rtp-factory" type="xsd:string" />
|
||||
<xsd:element name="sip-settings" type="xsd:string" />
|
||||
<xsd:element name="rtp-settings" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="mrcpv1-profile" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>MRCPv1 profile</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtsp-uac" type="xsd:string" />
|
||||
<xsd:element name="media-engine" type="xsd:string" />
|
||||
<xsd:element name="rtp-factory" type="xsd:string" />
|
||||
<xsd:element name="rtsp-settings" type="xsd:string" />
|
||||
<xsd:element name="rtp-settings" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="version" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="subfolder" type="xsd:string" use="optional" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
@@ -1,103 +1,157 @@
|
||||
<!-- unimrcpserver document -->
|
||||
<unimrcpserver>
|
||||
<!-- MRCP resources -->
|
||||
<resources>
|
||||
<resource class="speechsynth" enable="1"/>
|
||||
<resource class="speechrecog" enable="1"/>
|
||||
<resource class="recorder" enable="1"/>
|
||||
</resources>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- UniMRCP server document -->
|
||||
<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
|
||||
<properties>
|
||||
<!-- By default, network interface (IP address) to bind to will be implicitly identified.
|
||||
Alternatively, it can be explicitly set.
|
||||
-->
|
||||
<ip type="auto"/>
|
||||
<!-- <ip>10.10.0.1</ip> -->
|
||||
<!-- <ext-ip>a.b.c.d</ext-ip> -->
|
||||
</properties>
|
||||
|
||||
<components>
|
||||
<!-- Factory of MRCP resources -->
|
||||
<resource-factory>
|
||||
<resource id="speechsynth" enable="true"/>
|
||||
<resource id="speechrecog" enable="true"/>
|
||||
<resource id="recorder" enable="true"/>
|
||||
<resource id="speakverify" enable="true"/>
|
||||
</resource-factory>
|
||||
|
||||
<!-- SofiaSIP MRCPv2 signaling agent -->
|
||||
<sip-uas id="SIP-Agent-1" type="SofiaSIP">
|
||||
<!-- By default, "ip" and "ext-ip" addresses set in the properties will be used.
|
||||
They still can be explicitly specified (overriden) here.
|
||||
-->
|
||||
<!-- <sip-ip>10.10.0.1</sip-ip> -->
|
||||
<!-- <sip-ext-ip>a.b.c.d</sip-ext-ip> -->
|
||||
<sip-port>8060</sip-port>
|
||||
<sip-transport>udp,tcp</sip-transport>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<ua-name>UniMRCP SofiaSIP</ua-name>
|
||||
<sdp-origin>UniMRCPServer</sdp-origin>
|
||||
<!-- <sip-t1>500</sip-t1> -->
|
||||
<!-- <sip-t2>4000</sip-t2> -->
|
||||
<!-- <sip-t4>4000</sip-t4> -->
|
||||
<!-- <sip-t1x64>32000</sip-t1x64> -->
|
||||
</sip-uas>
|
||||
|
||||
<!-- UniRTSP MRCPv1 signaling agent -->
|
||||
<rtsp-uas id="RTSP-Agent-1" type="UniRTSP">
|
||||
<!-- By default, "ip" and "ext-ip" addresses set in the properties will be used.
|
||||
They still can be explicitly specified (overriden) here.
|
||||
-->
|
||||
<!-- <rtsp-ip>10.10.0.1</rtsp-ip> -->
|
||||
<!-- <rtsp-ext-ip>a.b.c.d</rtsp-ext-ip> -->
|
||||
<rtsp-port>1554</rtsp-port>
|
||||
<!-- <force-destination>true</force-destination> -->
|
||||
<resource-map>
|
||||
<param name="speechsynth" value="speechsynthesizer"/>
|
||||
<param name="speechrecog" value="speechrecognizer"/>
|
||||
</resource-map>
|
||||
<max-connection-count>100</max-connection-count>
|
||||
<sdp-origin>UniMRCPServer</sdp-origin>
|
||||
</rtsp-uas>
|
||||
|
||||
<!-- MRCPv2 connection agent -->
|
||||
<mrcpv2-uas id="MRCPv2-Agent-1">
|
||||
<!-- By default, "ip" set in the properties will be used.
|
||||
It still can be explicitly specified (overriden) here.
|
||||
-->
|
||||
<!-- <mrcp-ip>10.10.0.1</mrcp-ip> -->
|
||||
<mrcp-port>1544</mrcp-port>
|
||||
<max-connection-count>100</max-connection-count>
|
||||
<force-new-connection>false</force-new-connection>
|
||||
<rx-buffer-size>1024</rx-buffer-size>
|
||||
<tx-buffer-size>1024</tx-buffer-size>
|
||||
</mrcpv2-uas>
|
||||
|
||||
<!-- Media processing engine -->
|
||||
<media-engine id="Media-Engine-1">
|
||||
<realtime-rate>1</realtime-rate>
|
||||
</media-engine>
|
||||
|
||||
<!-- Factory of RTP terminations -->
|
||||
<rtp-factory id="RTP-Factory-1">
|
||||
<!-- By default, "ip" and "ext-ip" addresses set in the properties will be used.
|
||||
They still can be explicitly specified (overriden) here.
|
||||
-->
|
||||
<!-- <rtp-ip>10.10.0.1</rtp-ip> -->
|
||||
<!-- <rtp-ext-ip>a.b.c.d</rtp-ext-ip> -->
|
||||
<rtp-port-min>5000</rtp-port-min>
|
||||
<rtp-port-max>6000</rtp-port-max>
|
||||
</rtp-factory>
|
||||
|
||||
<!-- Factory of plugins (MRCP engines) -->
|
||||
<plugin-factory>
|
||||
<engine id="PocketSphinx-1" name="mrcppocketsphinx" enable="false"/>
|
||||
<engine id="Flite-1" name="mrcpflite" enable="false"/>
|
||||
<engine id="Demo-Synth-1" name="demosynth" enable="true"/>
|
||||
<engine id="Demo-Recog-1" name="demorecog" enable="true"/>
|
||||
<engine id="Demo-Verifier-1" name="demoverifier" enable="true"/>
|
||||
<engine id="Recorder-1" name="mrcprecorder" enable="true"/>
|
||||
|
||||
<!-- Engines may have additional named and generic params
|
||||
<engine id="Your-Engine-1" name="yourengine" enable="false">
|
||||
<max-channel-count>100</max-channel-count>
|
||||
<param name="..." value="..."/>
|
||||
</engine>
|
||||
-->
|
||||
</plugin-factory>
|
||||
</components>
|
||||
|
||||
<!-- Server settings (signaling, media, ...) -->
|
||||
<settings>
|
||||
<!-- SIP, RTSP signaling agents -->
|
||||
<signaling>
|
||||
<agent name="SIP-Agent-1" class="SofiaSIP">
|
||||
<param name="sip-ip" value="auto"/>
|
||||
<!-- <param name="sip-ext-ip" value="auto"/> -->
|
||||
<param name="sip-port" value="8060"/>
|
||||
<param name="sip-transport" value="udp,tcp"/>
|
||||
<!-- <param name="force-destination" value="1"/> -->
|
||||
|
||||
<param name="ua-name" value="UniMRCP SofiaSIP"/>
|
||||
<param name="sdp-origin" value="UniMRCPServer"/>
|
||||
</agent>
|
||||
<agent name="RTSP-Agent-1" class="UniRTSP">
|
||||
<param name="rtsp-ip" value="auto"/>
|
||||
<param name="rtsp-port" value="1554"/>
|
||||
<!-- <param name="force-destination" value="1"/> -->
|
||||
<resourcemap>
|
||||
<param name="speechsynth" value="speechsynthesizer"/>
|
||||
<param name="speechrecog" value="speechrecognizer"/>
|
||||
</resourcemap>
|
||||
</agent>
|
||||
</signaling>
|
||||
|
||||
<!-- MRCPv2 connection agents -->
|
||||
<connection>
|
||||
<agent name="MRCPv2-Agent-1">
|
||||
<param name="mrcp-ip" value="auto"/>
|
||||
<param name="mrcp-port" value="1544"/>
|
||||
<param name="max-connection-count" value="100"/>
|
||||
<!-- <param name="force-new-connection" value="1"/> -->
|
||||
</agent>
|
||||
</connection>
|
||||
|
||||
<!-- Media engines -->
|
||||
<media>
|
||||
<engine name="Media-Engine-1" realtime-rate="1"/>
|
||||
<rtp name="RTP-Factory-1">
|
||||
<param name="rtp-ip" value="auto"/>
|
||||
<!-- <param name="rtp-ext-ip" value="auto"/> -->
|
||||
<param name="rtp-port-min" value="5000"/>
|
||||
<param name="rtp-port-max" value="6000"/>
|
||||
<!-- <param name="playout-delay" value="50"/> -->
|
||||
<!-- <param name="max-playout-delay" value="200"/> -->
|
||||
<!-- <param name="ptime" value="20"/> -->
|
||||
<param name="codecs" value="PCMU PCMA L16/96/8000 telephone-event/101/8000"/>
|
||||
<!-- <param name="codecs" value="PCMU PCMA L16/96/8000 PCMU/97/16000 PCMA/98/16000 L16/99/16000"/> -->
|
||||
<!-- <param name="own-preference" value="1"/> -->
|
||||
|
||||
<!-- enable/disable rtcp support -->
|
||||
<param name="rtcp" value="0"/>
|
||||
<!-- rtcp bye policies (rtcp must be enabled first)
|
||||
0 - disable rtcp bye
|
||||
1 - send rtcp bye at the end of session
|
||||
2 - send rtcp bye also at the end of each talkspurt (input)
|
||||
<!-- RTP/RTCP settings -->
|
||||
<rtp-settings id="RTP-Settings-1">
|
||||
<jitter-buffer>
|
||||
<playout-delay>50</playout-delay>
|
||||
<max-playout-delay>200</max-playout-delay>
|
||||
</jitter-buffer>
|
||||
<ptime>20</ptime>
|
||||
<codecs own-preference="false">PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
|
||||
<!-- <codecs own-preference="false">PCMU PCMA L16/96/8000 PCMU/97/16000 PCMA/98/16000 L16/99/16000</codecs> -->
|
||||
<!-- enable/disable RTCP support -->
|
||||
<rtcp enable="false">
|
||||
<!-- RTCP BYE policies (RTCP must be enabled first)
|
||||
0 - disable RTCP BYE
|
||||
1 - send RTCP BYE at the end of session
|
||||
2 - send RTCP BYE also at the end of each talkspurt (input)
|
||||
-->
|
||||
<param name="rtcp-bye" value="1"/>
|
||||
<!-- rtcp transmission interval in msec -->
|
||||
<param name="rtcp-tx-interval" value="5000"/>
|
||||
<rtcp-bye>1</rtcp-bye>
|
||||
<!-- rtcp transmission interval in msec (set 0 to disable) -->
|
||||
<tx-interval>5000</tx-interval>
|
||||
<!-- period (timeout) to check for new rtcp messages in msec (set 0 to disable) -->
|
||||
<param name="rtcp-rx-resolution" value="1000"/>
|
||||
</rtp>
|
||||
</media>
|
||||
|
||||
<!-- Resource plugins -->
|
||||
<plugin>
|
||||
<engine name="Cepstral-Swift-1" class="mrcpcepstral" enable="0"/>
|
||||
<engine name="PocketSphinx-1" class="mrcppocketsphinx" enable="0"/>
|
||||
<engine name="Flite-1" class="mrcpflite" enable="0"/>
|
||||
<engine name="Demo-Synth-1" class="demosynth" enable="1"/>
|
||||
<engine name="Demo-Recog-1" class="demorecog" enable="1"/>
|
||||
<engine name="Recorder-1" class="mrcprecorder" enable="1"/>
|
||||
</plugin>
|
||||
<rx-resolution>1000</rx-resolution>
|
||||
</rtcp>
|
||||
</rtp-settings>
|
||||
</settings>
|
||||
|
||||
<!-- Server profiles -->
|
||||
|
||||
<profiles>
|
||||
<!-- MRCPv2 default profile -->
|
||||
<profile name="MRCPv2-Default">
|
||||
<param name="signaling-agent" value="SIP-Agent-1"/>
|
||||
<param name="connection-agent" value="MRCPv2-Agent-1"/>
|
||||
<param name="media-engine" value="Media-Engine-1"/>
|
||||
<param name="rtp-factory" value="RTP-Factory-1"/>
|
||||
</profile>
|
||||
<mrcpv2-profile id="uni2">
|
||||
<sip-uas>SIP-Agent-1</sip-uas>
|
||||
<mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
|
||||
<!-- It's possible to define profile based map of resources and engines.
|
||||
<resource-engine-map>
|
||||
<param name="speechsynth" value="Flite-1"/>
|
||||
<param name="speechrecog" value="PocketSphinx-1"/>
|
||||
</resource-engine-map>
|
||||
-->
|
||||
</mrcpv2-profile>
|
||||
|
||||
<!-- MRCPv1 default profile -->
|
||||
<profile name="MRCPv1-Default">
|
||||
<param name="signaling-agent" value="RTSP-Agent-1"/>
|
||||
<param name="media-engine" value="Media-Engine-1"/>
|
||||
<param name="rtp-factory" value="RTP-Factory-1"/>
|
||||
</profile>
|
||||
<mrcpv1-profile id="uni1">
|
||||
<rtsp-uas>RTSP-Agent-1</rtsp-uas>
|
||||
<media-engine>Media-Engine-1</media-engine>
|
||||
<rtp-factory>RTP-Factory-1</rtp-factory>
|
||||
<rtp-settings>RTP-Settings-1</rtp-settings>
|
||||
</mrcpv1-profile>
|
||||
|
||||
<!-- more profiles might be added here -->
|
||||
</profiles>
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
|
||||
<xsd:element name="unimrcpserver">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>UniMRCP server document</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="properties" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Generic properties</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ip" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="ext-ip" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="components" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Common components</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="resource-factory" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Factory of MRCP resources</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="resource">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="sip-uas" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>SIP signaling agent</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sip-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="sip-ext-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="sip-port" type="xsd:short"/>
|
||||
<xsd:element name="sip-transport" type="xsd:string"/>
|
||||
<xsd:element name="force-destination" type="xsd:boolean" default="false" minOccurs="0"/>
|
||||
<xsd:element name="ua-name" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="sdp-origin" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="sip-t1" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sip-t2" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sip-t4" type="xsd:long" minOccurs="0" />
|
||||
<xsd:element name="sip-t1x64" type="xsd:long" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="type" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtsp-uas" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>RTSP signaling agent</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtsp-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="rtsp-ext-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="rtsp-port" type="xsd:string"/>
|
||||
<xsd:element name="resource-map">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="param" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="value" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="max-connection-count" type="xsd:short" minOccurs="0"/>
|
||||
<xsd:element name="sdp-origin" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="type" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="mrcpv2-uas" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>MRCPv2 connection agent</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mrcp-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="mrcp-port" type="xsd:string"/>
|
||||
<xsd:element name="max-connection-count" type="xsd:short" minOccurs="0"/>
|
||||
<xsd:element name="force-new-connection" type="xsd:boolean" minOccurs="0"/>
|
||||
<xsd:element name="rx-buffer-size" type="xsd:long" minOccurs="0"/>
|
||||
<xsd:element name="tx-buffer-size" type="xsd:long" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="media-engine" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Media processing engine</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="realtime-rate" type="xsd:short" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtp-factory" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Factory of RTP terminations</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtp-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="rtp-ext-ip" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="rtp-port-min" type="xsd:short"/>
|
||||
<xsd:element name="rtp-port-max" type="xsd:short"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="plugin-factory" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Factory of plugins (MRCP engines)</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="engine">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="max-channel-count" minOccurs="0"/>
|
||||
<xsd:element name="param" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="value" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="settings" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Settings</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtp-settings" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>RTP settings</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="jitter-buffer" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="playout-delay" type="xsd:long"/>
|
||||
<xsd:element name="max-playout-delay" type="xsd:long"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="ptime" type="xsd:long" minOccurs="0"/>
|
||||
<xsd:element name="codecs">
|
||||
<xsd:complexType>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="own-preference" type="xsd:boolean" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="rtcp" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtcp-bye" type="xsd:int"/>
|
||||
<xsd:element name="tx-interval" type="xsd:long"/>
|
||||
<xsd:element name="rx-resolution" type="xsd:long"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="profiles" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Profiles</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mrcpv2-profile" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>MRCPv2 profile</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sip-uas" type="xsd:string"/>
|
||||
<xsd:element name="mrcpv2-uas" type="xsd:string"/>
|
||||
<xsd:element name="media-engine" type="xsd:string"/>
|
||||
<xsd:element name="rtp-factory" type="xsd:string"/>
|
||||
<xsd:element name="rtp-settings" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="mrcpv1-profile" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>MRCPv1 profile</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="rtsp-uas" type="xsd:string"/>
|
||||
<xsd:element name="media-engine" type="xsd:string"/>
|
||||
<xsd:element name="rtp-factory" type="xsd:string"/>
|
||||
<xsd:element name="rtp-settings" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="version" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="subfolder" type="xsd:string" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
+15
-20
@@ -3,14 +3,11 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
AC_INIT([unimrcp],[0.9.0])
|
||||
AC_INIT([unimrcp],[1.0.0])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build])
|
||||
AC_CONFIG_MACRO_DIR([build/acmacros])
|
||||
AC_PREFIX_DEFAULT(/usr/local/unimrcp)
|
||||
CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
|
||||
LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
|
||||
|
||||
plugindir='${prefix}/plugin'
|
||||
confdir='${prefix}/conf'
|
||||
@@ -120,6 +117,15 @@ AC_ARG_ENABLE(demorecog-plugin,
|
||||
AM_CONDITIONAL([DEMORECOG_PLUGIN],[test "${enable_demorecog_plugin}" = "yes"])
|
||||
|
||||
|
||||
#Enable demo verifier plugin
|
||||
AC_ARG_ENABLE(demoverifier-plugin,
|
||||
[AC_HELP_STRING([--disable-demoverifier-plugin ],[exclude demo verifier plugin from build])],
|
||||
[enable_demoverifier_plugin="$enableval"],
|
||||
[enable_demoverifier_plugin="yes"])
|
||||
|
||||
AM_CONDITIONAL([DEMOVERIFIER_PLUGIN],[test "${enable_demoverifier_plugin}" = "yes"])
|
||||
|
||||
|
||||
#Enable recorder plugin
|
||||
AC_ARG_ENABLE(recorder-plugin,
|
||||
[AC_HELP_STRING([--disable-recorder-plugin ],[exclude recorder plugin from build])],
|
||||
@@ -129,20 +135,6 @@ AC_ARG_ENABLE(recorder-plugin,
|
||||
AM_CONDITIONAL([RECORDER_PLUGIN],[test "${enable_recorder_plugin}" = "yes"])
|
||||
|
||||
|
||||
#Enable Cepstral Swift plugin
|
||||
AC_ARG_ENABLE(cepstral-plugin,
|
||||
[AC_HELP_STRING([--disable-cepstral-plugin ],[exclude cepstral plugin from build])],
|
||||
[enable_cepstral_plugin="$enableval"],
|
||||
[enable_cepstral_plugin="yes"])
|
||||
|
||||
if test "${enable_cepstral_plugin}" != "no"; then
|
||||
UNIMRCP_CHECK_SWIFT
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([CEPSTRAL_PLUGIN],[test "${enable_cepstral_plugin}" = "yes" &&\
|
||||
test "${found_swift}" = "yes"])
|
||||
|
||||
|
||||
#Enable PocketSphinx plugin
|
||||
AC_ARG_ENABLE(pocketsphinx-plugin,
|
||||
[AC_HELP_STRING([--enable-pocketsphinx-plugin ],[enable pocketsphinx plugin])],
|
||||
@@ -191,12 +183,12 @@ AC_CONFIG_FILES([
|
||||
modules/mrcp-sofiasip/Makefile
|
||||
modules/mrcp-unirtsp/Makefile
|
||||
plugins/Makefile
|
||||
plugins/mrcp-cepstral/Makefile
|
||||
plugins/mrcp-pocketsphinx/Makefile
|
||||
plugins/mrcp-flite/Makefile
|
||||
plugins/mrcp-recorder/Makefile
|
||||
plugins/demo-synth/Makefile
|
||||
plugins/demo-recog/Makefile
|
||||
plugins/demo-verifier/Makefile
|
||||
platforms/Makefile
|
||||
platforms/libunimrcp-server/Makefile
|
||||
platforms/libunimrcp-client/Makefile
|
||||
@@ -216,8 +208,10 @@ AC_CONFIG_FILES([
|
||||
build/pkgconfig/unimrcpclient.pc
|
||||
build/pkgconfig/unimrcpserver.pc
|
||||
build/pkgconfig/unimrcpplugin.pc
|
||||
build/svnrev/Makefile
|
||||
conf/Makefile
|
||||
data/Makefile
|
||||
docs/doxygen.conf
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -231,6 +225,7 @@ AC_MSG_NOTICE([ Sofia-SIP: $sofia_version])
|
||||
AC_MSG_NOTICE([Plugins:])
|
||||
AC_MSG_NOTICE([ Demo Synthesizer: $enable_demosynth_plugin])
|
||||
AC_MSG_NOTICE([ Demo Recognizer: $enable_demorecog_plugin])
|
||||
AC_MSG_NOTICE([ Cepstral: $enable_cepstral_plugin])
|
||||
AC_MSG_NOTICE([ Demo Verifier: $enable_demoverifier_plugin])
|
||||
AC_MSG_NOTICE([ Recorder: $enable_recorder_plugin])
|
||||
AC_MSG_NOTICE([ PocketSphinx: $enable_pocketsphinx_plugin])
|
||||
AC_MSG_NOTICE([ Flite: $enable_flite_plugin])
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
|
||||
--break
|
||||
Content-Type:text/uri-list
|
||||
Content-Length: 22
|
||||
|
||||
builtin:grammar/digits
|
||||
|
||||
--break
|
||||
Content-Type:application/srgs+xml
|
||||
Content-Length: 230
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<grammar root="digit" version="1.0" xml:lang="en-US"
|
||||
xmlns="http://www.w3.org/2001/06/grammar">
|
||||
<rule id="digit" scope="public">
|
||||
<item>one two three four five</item>
|
||||
</rule>
|
||||
</grammar>
|
||||
--break--
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<result>
|
||||
<verification-result>
|
||||
<voiceprint id="johnsmith">
|
||||
<incremental>
|
||||
<utterance-length> 500 </utterance-length>
|
||||
<device> cellular-phone </device>
|
||||
<gender> male </gender>
|
||||
<decision> accepted </decision>
|
||||
<verification-score> 0.85 </verification-score>
|
||||
</incremental>
|
||||
<cumulative>
|
||||
<utterance-length> 1500 </utterance-length>
|
||||
<device> cellular-phone </device>
|
||||
<gender> male </gender>
|
||||
<decision> accepted </decision>
|
||||
<verification-score> 0.75 </verification-score>
|
||||
</cumulative>
|
||||
</voiceprint>
|
||||
</verification-result>
|
||||
</result>
|
||||
Loaded 100 of 608 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user