Freeswitch-trunk
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- 14172 discussions
[commit] r3099 - in freeswitch/trunk/libs/srtp: . crypto/cipher crypto/hash crypto/kernel crypto/math crypto/replay crypto/rng include
by Freeswitch SVN 19 Oct '06
by Freeswitch SVN 19 Oct '06
19 Oct '06
Author: mikej
Date: Thu Oct 19 02:29:49 2006
New Revision: 3099
Modified:
freeswitch/trunk/libs/srtp/crypto/cipher/aes_icm.c
freeswitch/trunk/libs/srtp/crypto/cipher/cipher.c
freeswitch/trunk/libs/srtp/crypto/cipher/null_cipher.c
freeswitch/trunk/libs/srtp/crypto/hash/null_auth.c
freeswitch/trunk/libs/srtp/crypto/kernel/err.c
freeswitch/trunk/libs/srtp/crypto/math/datatypes.c
freeswitch/trunk/libs/srtp/crypto/math/stat.c
freeswitch/trunk/libs/srtp/crypto/replay/rdbx.c
freeswitch/trunk/libs/srtp/crypto/replay/ut_sim.c
freeswitch/trunk/libs/srtp/crypto/rng/rand_source.c
freeswitch/trunk/libs/srtp/include/srtp.h
freeswitch/trunk/libs/srtp/libsrtp.vcproj
Log:
up the msvc warning level on srtp
Modified: freeswitch/trunk/libs/srtp/crypto/cipher/aes_icm.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/cipher/aes_icm.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/cipher/aes_icm.c Thu Oct 19 02:29:49 2006
@@ -49,6 +49,9 @@
#include "aes_icm.h"
#include "alloc.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
debug_module_t mod_aes_icm = {
0, /* debugging is off by default */
@@ -367,7 +370,7 @@
for (i=0; i < (bytes_to_encr/sizeof(v128_t)); i++) {
/* fill buffer with new keystream */
- aes_icm_advance_ismacryp(c, forIsmacryp);
+ aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp);
/*
* add keystream into the data buffer (this would be a lot faster
@@ -415,7 +418,7 @@
if ((bytes_to_encr & 0xf) != 0) {
/* fill buffer with new keystream */
- aes_icm_advance_ismacryp(c, forIsmacryp);
+ aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp);
for (i=0; i < (bytes_to_encr & 0xf); i++)
*buf++ ^= c->keystream_buffer.v8[i];
Modified: freeswitch/trunk/libs/srtp/crypto/cipher/cipher.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/cipher/cipher.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/cipher/cipher.c Thu Oct 19 02:29:49 2006
@@ -155,7 +155,7 @@
test_case->ciphertext_length_octets));
/* compare the resulting ciphertext with that in the test case */
- if (len != test_case->ciphertext_length_octets)
+ if ((int)len != test_case->ciphertext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->ciphertext_length_octets; i++)
@@ -222,7 +222,7 @@
test_case->plaintext_length_octets));
/* compare the resulting plaintext with that in the test case */
- if (len != test_case->plaintext_length_octets)
+ if ((int)len != test_case->plaintext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->plaintext_length_octets; i++)
@@ -344,7 +344,7 @@
octet_string_hex_string(buffer, length));
/* compare the resulting plaintext with the original one */
- if (length != plaintext_len)
+ if ((int)length != plaintext_len)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < plaintext_len; i++)
Modified: freeswitch/trunk/libs/srtp/crypto/cipher/null_cipher.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/cipher/null_cipher.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/cipher/null_cipher.c Thu Oct 19 02:29:49 2006
@@ -48,6 +48,10 @@
#include "null_cipher.h"
#include "alloc.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
/* the null_cipher uses the cipher debug module */
extern debug_module_t mod_cipher;
Modified: freeswitch/trunk/libs/srtp/crypto/hash/null_auth.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/hash/null_auth.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/hash/null_auth.c Thu Oct 19 02:29:49 2006
@@ -48,6 +48,10 @@
#include "null_auth.h"
#include "alloc.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
/* null_auth uses the auth debug module */
extern debug_module_t mod_auth;
Modified: freeswitch/trunk/libs/srtp/crypto/kernel/err.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/kernel/err.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/kernel/err.c Thu Oct 19 02:29:49 2006
@@ -42,6 +42,10 @@
*
*/
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
+
#include "err.h"
#ifdef ERR_REPORTING_SYSLOG
Modified: freeswitch/trunk/libs/srtp/crypto/math/datatypes.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/math/datatypes.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/math/datatypes.c Thu Oct 19 02:29:49 2006
@@ -149,10 +149,9 @@
case ('E'): return 0xe;
case ('f'): return 0xf;
case ('F'): return 0xf;
- default: return -1; /* this flags an error */
}
- /* NOTREACHED */
- return -1; /* this keeps compilers from complaining */
+ /* this flags an error */
+ return -1;
}
int
@@ -179,7 +178,7 @@
tmp = hex_char_to_nibble(hex[0]);
if (tmp == -1)
return hex_len;
- x = (tmp << 4);
+ x = (uint8_t)(tmp << 4);
hex_len++;
tmp = hex_char_to_nibble(hex[1]);
if (tmp == -1)
@@ -564,8 +563,6 @@
return 63;
case '=':
return 64;
- default:
- return -1;
}
return -1;
}
@@ -586,7 +583,7 @@
tmp = base64_char_to_sextet(base64[0]);
if (tmp == -1)
return base64_len;
- x = (tmp << 6);
+ x = (uint8_t)(tmp << 6);
base64_len++;
tmp = base64_char_to_sextet(base64[1]);
if (tmp == -1)
Modified: freeswitch/trunk/libs/srtp/crypto/math/stat.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/math/stat.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/math/stat.c Thu Oct 19 02:29:49 2006
@@ -28,7 +28,7 @@
ones_count = 0;
while (data < data_end) {
- ones_count += octet_get_weight(*data);
+ ones_count = (uint16_t)(ones_count + octet_get_weight(*data));
data++;
}
Modified: freeswitch/trunk/libs/srtp/crypto/replay/rdbx.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/replay/rdbx.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/replay/rdbx.c Thu Oct 19 02:29:49 2006
@@ -229,7 +229,7 @@
if (delta > 0) {
/* shift forward by delta */
- index_advance(&rdbx->index, delta);
+ index_advance(&rdbx->index, (sequence_number_t)delta);
v128_left_shift(&rdbx->bitmask, delta);
v128_set_bit(&rdbx->bitmask, 127);
} else {
Modified: freeswitch/trunk/libs/srtp/crypto/replay/ut_sim.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/replay/ut_sim.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/replay/ut_sim.c Thu Oct 19 02:29:49 2006
@@ -47,6 +47,9 @@
#include "ut_sim.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4100)
+#endif
int
ut_compar(const void *a, const void *b) {
Modified: freeswitch/trunk/libs/srtp/crypto/rng/rand_source.c
==============================================================================
--- freeswitch/trunk/libs/srtp/crypto/rng/rand_source.c (original)
+++ freeswitch/trunk/libs/srtp/crypto/rng/rand_source.c Thu Oct 19 02:29:49 2006
@@ -97,7 +97,7 @@
/* rand() returns 0-32767 (ugh) */
/* Is this a good enough way to get random bytes?
It is if it passes FIPS-140... */
- *dst++ = val & 0xff;
+ *dst++ = (uint8_t)(val & 0xff);
len--;
}
#endif
Modified: freeswitch/trunk/libs/srtp/include/srtp.h
==============================================================================
--- freeswitch/trunk/libs/srtp/include/srtp.h (original)
+++ freeswitch/trunk/libs/srtp/include/srtp.h Thu Oct 19 02:29:49 2006
@@ -52,6 +52,7 @@
#ifdef _MSC_VER
#pragma pack(4)
+#pragma warning(disable:4214)
#endif
#include "crypto_kernel.h"
Modified: freeswitch/trunk/libs/srtp/libsrtp.vcproj
==============================================================================
--- freeswitch/trunk/libs/srtp/libsrtp.vcproj (original)
+++ freeswitch/trunk/libs/srtp/libsrtp.vcproj Thu Oct 19 02:29:49 2006
@@ -52,7 +52,8 @@
RuntimeLibrary="3"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
+ WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
@@ -119,7 +120,8 @@
RuntimeLibrary="2"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
+ WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
@@ -189,7 +191,8 @@
RuntimeLibrary="3"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
+ WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
@@ -271,7 +274,8 @@
RuntimeLibrary="2"
StructMemberAlignment="0"
UsePrecompiledHeader="0"
- WarningLevel="3"
+ WarningLevel="4"
+ WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
1
0
19 Oct '06
Author: mikej
Date: Wed Oct 18 23:51:46 2006
New Revision: 3093
Added:
freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h
Modified:
freeswitch/trunk/AUTHORS
freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile
freeswitch/trunk/src/mod/event_handlers/mod_cdr/README
freeswitch/trunk/src/mod/event_handlers/mod_cdr/schema.sql
Log:
add XmlCDR (like pddcdr, but xml format). Thanks ken for another great contribution.
Modified: freeswitch/trunk/AUTHORS
==============================================================================
--- freeswitch/trunk/AUTHORS (original)
+++ freeswitch/trunk/AUTHORS Wed Oct 18 23:51:46 2006
@@ -27,6 +27,7 @@
Stefan Knoblich - Various patches and support. Thanks.
Justin Unger - <justinunger at gmail dot com> Lots of help with patches and SIP testing. Thanks!
Paul D. Tinsley - Various patches and support. <pdt at jackhammer.org>
+ Ken Rice of Asteria Solutions Group, INC <ken AT asteriasgi.com> - xmlcdr, sofia improvements, load testing.
A big THANK YOU goes to:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile Wed Oct 18 23:51:46 2006
@@ -3,7 +3,7 @@
LDFLAGS += $(shell mysql_config --libs)
CPPCC = g++
-OBJS=cdrcontainer.o basecdr.o baseregistry.o mysqlcdr.o pddcdr.o csvcdr.o
+OBJS=cdrcontainer.o basecdr.o baseregistry.o mysqlcdr.o pddcdr.o csvcdr.o xmlcdr.o
all: depends $(OBJS) $(MODNAME).$(DYNAMIC_LIB_EXTEN)
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/README
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/README (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/README Wed Oct 18 23:51:46 2006
@@ -59,6 +59,21 @@
<param name="chanvars_supp" value=""/> value is a comma separated list of supplemental channel variables to log. Can be a wildcard (*) (optional)
<param name="chanvars_supp_repeat_fixed" value=""/> value is 0 for no, 1 for yes, and determines whether or not to repeat any of the fixed channel variables as key / value pairs in the chanvars table.
+Class: OdbcCDR, located in odbccdr.h and odbccdr.cpp
+ This class logs the call detail record to an ODBC database using prepared
+ statements. This class is similar to MysqlCDR in that the fixed channel variables are treated as additional columns on the main freeswitchcdr database table for improved normalization of the database. As such, you need to specify the format of each fixed channel variable as well. If you do not specify, it will default to a varchar column type, and will not execute if the table schema does not match. Therefore it is very important to make sure that any fixed channel variables you log exist as columns on the table. The supplemental channel variables are stored in a separate table using a key / value pair linking to the myuuid of the call. Recommended to use at least one other logger in conjuction with this one just to be on the safe side, as failover handling of errors to write to the db are not yet implemented, and therefore there is a risk of data loss if the database connection is lost entirely (it will be limited to only those records created at the time of the loss of connection) or some other fatal error is encountered. Additionally, since there is no uniform method to handling columns of type sequence/autoincrement/autonumber in the rdbms world, it should be noted that each row in the chanvars (supplemental channel variables) table will cost 36 bytes for the myuuid to be posted to it instead of 8 bytes for a bigint as in MysqlCDR.
+Configuration: Section <odbccdr>
+ <param name="dsn" value=""/> - Not yet implemented, but meant for future use in ease of config
+ <param name="hostname" value=""/> - The hostname or IP of the backend server
+ <param name="username" value=""/> - The username used to authenticate to the backend server
+ <param name="password" value=""/> - The password used to authenticate to the backend server
+ <param name="dbname" value=""/> - The database to use for logging
+ <param name="main_db_table" value=""/> - Optional: the name of the main logging table (defaults to freeswitchcdr)
+ <param name="supp_chanvars_db_table" value=""/> - Optional: the name of the supplemental chanvars table (defaults to chanvars)
+ <param name="chanvars_fixed" value=""/> Is a comma separated list of key=type pairs. Types are x for decimal, s for string (varchar), d for double, i for integer, t for tiny. If no type is provided, it defaults that column to string (varchar). It cannot accept wildcards (*). (optional)
+ <param name="chanvars_supp" value=""/> value is a comma separated list of supplemental channel variables to log. Can be a wildcard (*) (optional)
+ <param name="chanvars_supp_repeat_fixed" value=""/> value is 0 for no, 1 for yes, and determines whether or not to repeat any of the fixed channel variables as key / value pairs in the chanvars table.
+
FAQ:
Q: Why C++?
@@ -69,6 +84,9 @@
Q: What would an example configuration look like?
A: Here is an excerpt from the freeswitch XML configuration file:
+
+Q: What happened to the ani2 field?
+A: Oops, you caught us. The real name for is it aniii. You will need to update any database schemas or external handlers for this change.
<configuration name="mod_cdr.conf" description="CDR Configuration">
<pddcdr>
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/schema.sql
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/schema.sql (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/schema.sql Wed Oct 18 23:51:46 2006
@@ -8,7 +8,7 @@
src varchar(80) NOT NULL,
dst varchar(80) NOT NULL,
ani varchar(80) default "",
- ani2 varchar(80) default "",
+ aniii varchar(80) default "",
dialplan varchar(80) default "",
myuuid char(36) NOT NULL,
destuuid char(36) NOT NULL,
@@ -19,13 +19,7 @@
billusec bigint default 0,
disposition tinyint default 0, /* 0 = Busy or Unanswered, 1 = Answered */
hangupcause int default 0,
- amaflags tinyint default 0,
- /*
- This section not needed, because it was an old asteriskism. A chan_var table is to replace it perhaps.
- accountcode varchar(80) default "",
- uniqueid varchar(32) default "",
- userfield varchar(255) default ""
- */
+ amaflags tinyint default 0
);
create index myuuid_index on freeswitchcdr (myuuid);
@@ -37,4 +31,4 @@
varvalue varchar(255) default ""
);
-create index callid_index on chanvars(callid,varname);
\ No newline at end of file
+create index callid_index on chanvars(callid,varname);
Added: freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp Wed Oct 18 23:51:46 2006
@@ -0,0 +1,221 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ * Copyright 2006, Author: Yossi Neiman of Cartis Solutions, Inc. <freeswitch AT cartissolutions.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ *
+ * The Initial Developer of the Original Code is
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ * Ken Rice of Asteria Solutions Group, INC <ken AT asteriasgi.com>
+ *
+ * Description: This C++ source file describes the XmlCDR class which handles formatting a CDR out to
+ * individual text files in a XML format.
+ *
+ * xmlcdr.cpp
+ *
+ */
+
+#include <switch.h>
+#include "xmlcdr.h"
+
+XmlCDR::XmlCDR() : BaseCDR()
+{
+ memset(formattedcallstartdate,0,100);
+ memset(formattedcallanswerdate,0,100);
+ memset(formattedcallenddate,0,100);
+}
+
+XmlCDR::XmlCDR(switch_mod_cdr_newchannel_t *newchannel) : BaseCDR(newchannel)
+{
+ memset(formattedcallstartdate,0,100);
+ memset(formattedcallanswerdate,0,100);
+ memset(formattedcallenddate,0,100);
+
+ if(newchannel != 0)
+ {
+ switch_time_exp_t tempcallstart, tempcallanswer, tempcallend;
+ memset(&tempcallstart,0,sizeof(tempcallstart));
+ memset(&tempcallanswer,0,sizeof(tempcallanswer));
+ memset(&tempcallend,0,sizeof(tempcallend));
+ switch_time_exp_lt(&tempcallstart, callstartdate);
+ switch_time_exp_lt(&tempcallanswer, callanswerdate);
+ switch_time_exp_lt(&tempcallend, callenddate);
+
+ // Format the times
+ size_t retsizecsd, retsizecad, retsizeced; //csd == callstartdate, cad == callanswerdate, ced == callenddate, ceff == callenddate_forfile
+ char format[] = "%Y-%m-%d-%H-%M-%S";
+ switch_strftime(formattedcallstartdate,&retsizecsd,sizeof(formattedcallstartdate),format,&tempcallstart);
+ switch_strftime(formattedcallanswerdate,&retsizecad,sizeof(formattedcallanswerdate),format,&tempcallanswer);
+ switch_strftime(formattedcallenddate,&retsizeced,sizeof(formattedcallenddate),format,&tempcallend);
+
+ std::ostringstream ostring;
+ ostring << (callenddate/1000000);
+ std::string callenddate_forfile = ostring.str();
+
+ outputfile_name = outputfile_path;
+ outputfile_name.append(SWITCH_PATH_SEPARATOR);
+ outputfile_name.append(callenddate_forfile); // Make sorting a bit easier, kinda like Maildir does
+ outputfile_name.append(".");
+ outputfile_name.append(myuuid); // The goal is to have a resulting filename of "/path/to/myuuid"
+ outputfile_name.append(".xml"); // .xml - "XML Data Dumper"
+
+ outputfile.open(outputfile_name.c_str());
+
+ bool repeat = 1;
+ process_channel_variables(chanvars_supp_list,chanvars_fixed_list,newchannel->channel,repeat);
+ }
+}
+
+XmlCDR::~XmlCDR()
+{
+ outputfile.close();
+}
+
+bool XmlCDR::activated=0;
+bool XmlCDR::logchanvars=0;
+bool XmlCDR::connectionstate=0;
+std::string XmlCDR::outputfile_path;
+std::list<std::string> XmlCDR::chanvars_fixed_list;
+std::list<std::string> XmlCDR::chanvars_supp_list;
+
+void XmlCDR::connect(switch_xml_t& cfg, switch_xml_t& xml, switch_xml_t& settings, switch_xml_t& param)
+{
+ switch_console_printf(SWITCH_CHANNEL_LOG, "XmlCDR::connect() - Loading configuration file.\n");
+ activated = 0; // Set it as inactive initially
+ connectionstate = 0; // Initialize it to false to show that we aren't yet connected.
+
+ if ((settings = switch_xml_child(cfg, "xmlcdr")))
+ {
+ int count_config_params = 0; // Need to make sure all params are set before we load
+ for (param = switch_xml_child(settings, "param"); param; param = param->next)
+ {
+ char *var = (char *) switch_xml_attr_soft(param, "name");
+ char *val = (char *) switch_xml_attr_soft(param, "value");
+
+ if (!strcmp(var, "path"))
+ {
+ if(val != 0)
+ outputfile_path = val;
+ count_config_params++;
+ }
+ else if (!strcmp(var, "chanvars"))
+ {
+ if(val != 0)
+ {
+ std::string unparsed;
+ unparsed = val;
+ if(unparsed.size() > 0)
+ {
+ bool fixed = 0;
+ parse_channel_variables_xconfig(unparsed,chanvars_supp_list,fixed);
+ logchanvars=1;
+ }
+ }
+ }
+ else if (!strcmp(var, "chanvars_fixed"))
+ {
+ switch_console_printf(SWITCH_CHANNEL_LOG,"XmlCDR has no need for a fixed or supplemental list of channel variables due to the nature of the format. Please use the setting parameter of \"chanvars\" instead and try again.\n");
+ }
+ else if (!strcmp(var, "chanvars_supp"))
+ {
+ switch_console_printf(SWITCH_CHANNEL_LOG,"XmlCDR has no need for a fixed or supplemental list of channel variables due to the nature of the format. Please use the setting parameter of \"chanvars\" instead and try again.\n");
+ }
+ }
+
+ if(count_config_params > 0)
+ activated = 1;
+ else
+ switch_console_printf(SWITCH_CHANNEL_LOG,"XmlCDR::connect(): You did not specify the minimum parameters for using this module. You must specify at least a path to have the records logged to.\n");
+ }
+}
+
+bool XmlCDR::process_record()
+{
+ bool retval = 0;
+ if(!outputfile)
+ switch_console_printf(SWITCH_CHANNEL_LOG, "XmlCDR::process_record(): Unable to open file %s to commit the call record to. Invalid path name, invalid permissions, or no space available?\n",outputfile_name.c_str());
+ else
+ {
+ switch_console_printf(SWITCH_CHANNEL_LOG, "XmlCDR::process_record(): Preping the CDR to %s.\n",outputfile_name.c_str());
+ // Format the call record and proceed from here...
+ outputfile << "<?xml version=\"1.0\"?>" << std::endl;
+ outputfile << "<document type=\"freeswitch-cdr/xml\">" << std::endl;
+ outputfile << "\t<callstartdate data=\"" << callstartdate << "\" />" << std::endl;
+ outputfile << "\t<callanswerdate data=\"" << callanswerdate << "\" />" << std::endl;
+ outputfile << "\t<callenddate data=\"" << callenddate << "\" />" << std::endl;
+ outputfile << "\t<hangupcause data=\"" << hangupcause_text << "\" />" << std::endl;
+ outputfile << "\t<hangupcausecode data=\"" << hangupcause << "\" />" << std::endl;
+ outputfile << "\t<clid data=\"" << clid << "\" />" << std::endl;
+ outputfile << "\t<originated data=\"" << originated << "\" />" << std::endl;
+ outputfile << "\t<dialplan data=\"" << dialplan << "\" />" << std::endl;
+ outputfile << "\t<myuuid data=\"" << myuuid << "\" />" << std::endl;
+ outputfile << "\t<destuuid data=\"" << destuuid << "\" />" << std::endl;
+ outputfile << "\t<src data=\"" << src << "\" />" << std::endl;
+ outputfile << "\t<dst data=\"" << dst << "\" />" << std::endl;
+ outputfile << "\t<srcchannel data=\"" << srcchannel << "\" />" << std::endl;
+ outputfile << "\t<dstchannel data=\"" << dstchannel << "\" />" << std::endl;
+ outputfile << "\t<ani data=\"" << ani << "\" />" << std::endl;
+ outputfile << "\t<aniii data=\"" << aniii << "\" />" << std::endl;
+ outputfile << "\t<network_addr data=\"" << network_addr << "\" />" << std::endl;
+ outputfile << "\t<lastapp data=\"" << lastapp << "\" />" << std::endl;
+ outputfile << "\t<lastdata data=\"" << lastdata << "\" />" << std::endl;
+ outputfile << "\t<billusec data=\"" << billusec << "\" />" << std::endl;
+ outputfile << "\t<disposition data=\"" << disposition << "\" />" << std::endl;
+ outputfile << "\t<amaflags data=\"" << amaflags << "\" />" << std::endl;
+
+ // Now to process chanvars
+ outputfile << "\t<chanvars>" << std::endl;
+ if(chanvars_supp.size() > 0 )
+ {
+ std::map<std::string,std::string>::iterator iItr,iEnd;
+ for(iItr = chanvars_supp.begin(), iEnd = chanvars_supp.end() ; iItr != iEnd; iItr++)
+ outputfile << "\t\t<variable name=\"" << iItr->first << "\" data= \"" << iItr->second << "\" />" << std::endl;
+ }
+ outputfile << "\t</chanvars>" << std::endl << "</document>" << std::endl << std::endl;
+
+ switch_console_printf(SWITCH_CHANNEL_LOG, "XmlCDR::process_record(): Dumping the CDR to %s.\n",outputfile_name.c_str());
+ retval = 1;
+ }
+
+ return retval;
+}
+
+bool XmlCDR::is_activated()
+{
+ return activated;
+}
+
+void XmlCDR::tempdump_record()
+{
+
+}
+
+void XmlCDR::reread_tempdumped_records()
+{
+
+}
+
+void XmlCDR::disconnect()
+{
+ switch_console_printf(SWITCH_CHANNEL_LOG,"Shutting down XmlCDR... Done!");
+}
+
+AUTO_REGISTER_BASECDR(XmlCDR);
Added: freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h Wed Oct 18 23:51:46 2006
@@ -0,0 +1,72 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ * Copyright 2006, Author: Yossi Neiman of Cartis Solutions, Inc. <freeswitch AT cartissolutions.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application Call Detail Recorder module
+ *
+ * The Initial Developer of the Original Code is
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Yossi Neiman <freeswitch AT cartissolutions.com>
+ * Ken Rice, Asteria Solutions Group, Inc. <ken AT asteriasgi.com>
+ *
+ * Description: This C++ header file describes the XmlCDR class which handles formatting a CDR out to
+ * individual text files in a XML format.
+ *
+ * xmlcdr.h
+ *
+ */
+
+#include "baseregistry.h"
+#include <switch.h>
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <list>
+
+#ifndef XMLCDR
+#define XMLCDR
+
+class XmlCDR : public BaseCDR {
+ public:
+ XmlCDR();
+ XmlCDR(switch_mod_cdr_newchannel_t *newchannel);
+ virtual ~XmlCDR();
+ virtual bool process_record();
+ virtual void connect(switch_xml_t& cfg, switch_xml_t& xml, switch_xml_t& settings, switch_xml_t& param); // connect and disconnect need to be static because we're persisting connections until shutdown
+ virtual void disconnect();
+ virtual bool is_activated();
+ virtual void tempdump_record();
+ virtual void reread_tempdumped_records();
+
+ private:
+ static bool activated; // Is this module activated?
+ static bool connectionstate; // What is the status of the connection?
+ static bool logchanvars;
+ static std::string outputfile_path; // The directory we'll dump these into
+ static std::list<std::string> chanvars_fixed_list; // Normally this would be used, but not in this class
+ static std::list<std::string> chanvars_supp_list; // This will hold the list for all chanvars here
+ char formattedcallstartdate[100];
+ char formattedcallanswerdate[100];
+ char formattedcallenddate[100];
+ std::string outputfile_name;
+ std::ofstream outputfile;
+};
+
+#endif
1
0
[commit] r3091 - in freeswitch/trunk: . src/mod/endpoints/mod_dingaling src/mod/endpoints/mod_sofia
by Freeswitch SVN 19 Oct '06
by Freeswitch SVN 19 Oct '06
19 Oct '06
Author: mikej
Date: Wed Oct 18 21:28:29 2006
New Revision: 3091
Modified:
freeswitch/trunk/Freeswitch.sln
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
fix windows build from recent changes.
Modified: freeswitch/trunk/Freeswitch.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.sln (original)
+++ freeswitch/trunk/Freeswitch.sln Wed Oct 18 21:28:29 2006
@@ -3,21 +3,21 @@
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Console\FreeSwitchConsole.vcproj", "{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
ProjectSection(ProjectDependencies) = postProject
- {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761} = {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761}
- {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
+ {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761} = {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g729", "src\mod\codecs\mod_g729\mod_g729.vcproj", "{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}"
@@ -27,42 +27,42 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_gsm", "src\mod\codecs\mod_gsm\mod_gsm.vcproj", "{4926323F-4EA8-4B7D-A3D3-65488725988F}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{8FD2E297-4096-47E5-9258-C48FF1841523} = {8FD2E297-4096-47E5-9258-C48FF1841523}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xmpp_event", "src\mod\event_handlers\mod_xmpp_event\mod_xmpp_event.vcproj", "{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sndfile", "src\mod\formats\mod_sndfile\mod_sndfile.vcproj", "{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {3D0370CA-BED2-4657-A475-32375CBCB6E4} = {3D0370CA-BED2-4657-A475-32375CBCB6E4}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {3D0370CA-BED2-4657-A475-32375CBCB6E4} = {3D0370CA-BED2-4657-A475-32375CBCB6E4}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_bridgecall", "src\mod\applications\mod_bridgecall\mod_bridgecall.vcproj", "{E1794405-29D4-466D-9BE3-DD2344C2A663}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_test", "src\mod\event_handlers\mod_event_test\mod_event_test.vcproj", "{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g711", "src\mod\codecs\mod_g711\mod_g711.vcproj", "{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}"
@@ -72,28 +72,28 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_iax", "src\mod\endpoints\mod_iax\mod_iax.vcproj", "{3A5B9131-F20C-4A85-9447-6C1610941CEE}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_playback", "src\mod\applications\mod_playback\mod_playback.vcproj", "{78100236-7CEA-4948-96CC-E8ED3160329C}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_PortAudio", "src\mod\endpoints\mod_portaudio\mod_PortAudio.vcproj", "{5FD31A25-5D83-4794-8BEE-904DAD84CE71}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{C30D35E4-7FC6-4E97-9BE5-4BC077BE0D4B} = {C30D35E4-7FC6-4E97-9BE5-4BC077BE0D4B}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_l16", "src\mod\codecs\mod_l16\mod_l16.vcproj", "{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
@@ -103,24 +103,24 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_softtimer", "src\mod\timers\mod_softtimer\mod_softtimer.vcproj", "{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_speex", "src\mod\codecs\mod_speex\mod_speex.vcproj", "{5580D60E-0F77-4716-9CD4-B8E5986FA375}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{1C469CDD-A3AF-4A94-A592-B2CF12F2D918} = {1C469CDD-A3AF-4A94-A592-B2CF12F2D918}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_woomera", "src\mod\endpoints\mod_woomera\mod_woomera.vcproj", "{FE3540C5-3303-46E0-A69E-D92F775687F1}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Codecs", "Codecs", "{F881ADA2-2F1A-4046-9FEB-191D9422D781}"
@@ -143,19 +143,19 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_xml", "src\mod\dialplans\mod_dialplan_xml\mod_dialplan_xml.vcproj", "{07113B25-D3AF-4E04-BA77-4CD1171F022C}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_ivrtest", "src\mod\applications\mod_ivrtest\mod_ivrtest.vcproj", "{419AA391-5F3F-4BFE-A869-9D154D62A792}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "FreeSwitchSetup", "w32\Setup\Setup.vdproj", "{B17FFBE6-A942-4056-8346-B624FB5D995B}"
@@ -169,28 +169,28 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_directory", "src\mod\dialplans\mod_dialplan_directory\mod_dialplan_directory.vcproj", "{A27CCA23-1541-4337-81A4-F0A6413078A0}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_zeroconf", "src\mod\event_handlers\mod_zeroconf\mod_zeroconf.vcproj", "{C7705DC4-2088-493E-AF8D-65BC6D65C125}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {49C34584-B6DA-448F-83CF-27584DC9FC90} = {49C34584-B6DA-448F-83CF-27584DC9FC90}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {49C34584-B6DA-448F-83CF-27584DC9FC90} = {49C34584-B6DA-448F-83CF-27584DC9FC90}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_multicast", "src\mod\event_handlers\mod_event_multicast\mod_event_multicast.vcproj", "{784113EF-44D9-4949-835D-7065D3C7AD08}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libteletone", "libs\libteletone\libteletone.vcproj", "{89385C74-5860-4174-9CAF-A39E7C48909C}"
@@ -199,15 +199,15 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey", "src\mod\languages\mod_spidermonkey\mod_spidermonkey.vcproj", "{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {76D0A759-9C07-42D4-90A9-82AE15462C95} = {76D0A759-9C07-42D4-90A9-82AE15462C95}
- {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
- {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
+ {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
+ {76D0A759-9C07-42D4-90A9-82AE15462C95} = {76D0A759-9C07-42D4-90A9-82AE15462C95}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ASR-TTS", "ASR-TTS", "{4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}"
@@ -229,35 +229,36 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_echo", "src\mod\applications\mod_echo\mod_echo.vcproj", "{0E2C6395-13B9-46E5-9264-8859D346018D}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_ilbc", "src\mod\codecs\mod_ilbc\mod_ilbc.vcproj", "{D3EC0AFF-76FC-4210-A825-9A17410660A3}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{989BB874-7AF1-44CB-8E5C-CC8113D267E8} = {989BB874-7AF1-44CB-8E5C-CC8113D267E8}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dingaling", "src\mod\endpoints\mod_dingaling\mod_dingaling.vcproj", "{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}"
ProjectSection(ProjectDependencies) = postProject
{1906D736-08BD-4EE1-924F-B536249B9A54} = {1906D736-08BD-4EE1-924F-B536249B9A54}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_commands", "src\mod\applications\mod_commands\mod_commands.vcproj", "{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Loggers", "Loggers", "{A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}"
@@ -271,54 +272,54 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_rpc", "src\mod\xml_int\mod_xml_rpc\mod_xml_rpc.vcproj", "{CBEC7225-0C21-4DA8-978E-1F158F8AD950}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {356EC96D-4C9F-47B5-9083-FC328B87BA94} = {356EC96D-4C9F-47B5-9083-FC328B87BA94}
- {A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
- {155844C3-EC5F-407F-97A4-A2DDADED9B2F} = {155844C3-EC5F-407F-97A4-A2DDADED9B2F}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {155844C3-EC5F-407F-97A4-A2DDADED9B2F} = {155844C3-EC5F-407F-97A4-A2DDADED9B2F}
+ {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
+ {356EC96D-4C9F-47B5-9083-FC328B87BA94} = {356EC96D-4C9F-47B5-9083-FC328B87BA94}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rss", "src\mod\applications\mod_rss\mod_rss.vcproj", "{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_conference", "src\mod\applications\mod_conference\mod_conference.vcproj", "{C24FB505-05D7-4319-8485-7540B44C8603}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dptools", "src\mod\applications\mod_dptools\mod_dptools.vcproj", "{B5881A85-FE70-4F64-8607-2CAAE52669C6}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "src\mod\event_handlers\mod_event_socket\mod_event_socket.vcproj", "{05515420-16DE-4E63-BE73-85BE85BA5142}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cdr", "src\mod\event_handlers\mod_cdr\mod_cdr.vcproj", "{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Libraries", "_Libraries", "{EB910B0D-F27D-4B62-B67B-DE834C99AC5B}"
@@ -343,8 +344,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpcre", "libs\win32\pcre\libpcre.vcproj", "{8D04B550-D240-4A44-8A18-35DA3F7038D9}"
ProjectSection(ProjectDependencies) = postProject
- {91695C7C-7AD1-4782-9727-508F82D9C577} = {91695C7C-7AD1-4782-9727-508F82D9C577}
{1CED5987-A529-46DC-B30F-870D85FF9C94} = {1CED5987-A529-46DC-B30F-870D85FF9C94}
+ {91695C7C-7AD1-4782-9727-508F82D9C577} = {91695C7C-7AD1-4782-9727-508F82D9C577}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpcre Generate pcre_chartables.c", "libs\win32\pcre\pcre_chartables.c.vcproj", "{1CED5987-A529-46DC-B30F-870D85FF9C94}"
@@ -361,18 +362,18 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libapriconv", "libs\win32\apr-iconv\libapriconv.vcproj", "{101130D1-3EA6-4ED2-B65D-CEB5243A20ED}"
ProjectSection(ProjectDependencies) = postProject
- {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7} = {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7}
- {5786D51D-1C6A-4BE1-8804-29954DB5258F} = {5786D51D-1C6A-4BE1-8804-29954DB5258F}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {5786D51D-1C6A-4BE1-8804-29954DB5258F} = {5786D51D-1C6A-4BE1-8804-29954DB5258F}
+ {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7} = {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libaprutil", "libs\win32\apr-util\libaprutil.vcproj", "{F057DA7F-79E5-4B00-845C-EF446EF055E3}"
ProjectSection(ProjectDependencies) = postProject
- {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7} = {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7}
- {5786D51D-1C6A-4BE1-8804-29954DB5258F} = {5786D51D-1C6A-4BE1-8804-29954DB5258F}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{E969F3E0-1043-482A-AD49-787B8356BA92} = {E969F3E0-1043-482A-AD49-787B8356BA92}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {5786D51D-1C6A-4BE1-8804-29954DB5258F} = {5786D51D-1C6A-4BE1-8804-29954DB5258F}
+ {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7} = {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Downloads", "_Downloads", "{C120A020-773F-4EA3-923F-B67AF28B750D}"
@@ -386,8 +387,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download APR-Util", "libs\win32\Download APR-Util.vcproj", "{E969F3E0-1043-482A-AD49-787B8356BA92}"
ProjectSection(ProjectDependencies) = postProject
- {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7} = {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7}
{5786D51D-1C6A-4BE1-8804-29954DB5258F} = {5786D51D-1C6A-4BE1-8804-29954DB5258F}
+ {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7} = {C4854C1D-5478-4F87-AB62-36CCDDDBA3C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download PCRE", "libs\win32\Download PCRE.vcproj", "{91695C7C-7AD1-4782-9727-508F82D9C577}"
@@ -424,8 +425,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mDNSResponder static library", "libs\win32\howl\libmDNSResponder.vcproj", "{49C34584-B6DA-448F-83CF-27584DC9FC90}"
ProjectSection(ProjectDependencies) = postProject
- {5927104D-C14C-4AC8-925C-4AB681762E75} = {5927104D-C14C-4AC8-925C-4AB681762E75}
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
+ {5927104D-C14C-4AC8-925C-4AB681762E75} = {5927104D-C14C-4AC8-925C-4AB681762E75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download LIBSNDFILE", "libs\win32\Download LIBSNDFILE.vcproj", "{EFA9E76E-62A5-4237-B7E9-F39B8E174CD5}"
@@ -451,8 +452,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Abyss", "libs\win32\xmlrpc\Abyss.vcproj", "{356EC96D-4C9F-47B5-9083-FC328B87BA94}"
ProjectSection(ProjectDependencies) = postProject
- {A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
{EC8D4AE8-0F3E-454A-BFB8-D56A5D9C0121} = {EC8D4AE8-0F3E-454A-BFB8-D56A5D9C0121}
+ {A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "libs\win32\apr-util\xml.vcproj", "{155844C3-EC5F-407F-97A4-A2DDADED9B2F}"
@@ -466,58 +467,58 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js", "libs\win32\js\js.vcproj", "{204FA0DE-305D-4414-AE2E-F195A23F390D}"
ProjectSection(ProjectDependencies) = postProject
- {76D0A759-9C07-42D4-90A9-82AE15462C95} = {76D0A759-9C07-42D4-90A9-82AE15462C95}
{B0AA13FC-636C-45A7-8EAE-663220679A75} = {B0AA13FC-636C-45A7-8EAE-663220679A75}
+ {76D0A759-9C07-42D4-90A9-82AE15462C95} = {76D0A759-9C07-42D4-90A9-82AE15462C95}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sofia", "src\mod\endpoints\mod_sofia\mod_sofia.vcproj", "{0DF3ABD0-DDC0-4265-B778-07C66780979B}"
ProjectSection(ProjectDependencies) = postProject
- {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg726", "libs\codec\g726\libg726.vcproj", "{5A6A281A-AA50-470A-8305-202BDA1CD1BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g726", "src\mod\codecs\mod_g726\mod_g726.vcproj", "{486369EB-F150-4B56-BCC8-77B9E18FF5F5}"
ProjectSection(ProjectDependencies) = postProject
- {5A6A281A-AA50-470A-8305-202BDA1CD1BF} = {5A6A281A-AA50-470A-8305-202BDA1CD1BF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {5A6A281A-AA50-470A-8305-202BDA1CD1BF} = {5A6A281A-AA50-470A-8305-202BDA1CD1BF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg7xx", "libs\codec\g7xx\libg7xx.vcproj", "{D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g722", "src\mod\codecs\mod_g722\mod_g722.vcproj", "{D42518CC-7475-454D-B392-0E132C07D761}"
ProjectSection(ProjectDependencies) = postProject
- {D71E7338-8D9C-4FE4-A15F-D5CC60202C7C} = {D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {D71E7338-8D9C-4FE4-A15F-D5CC60202C7C} = {D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_park", "src\mod\applications\mod_park\mod_park.vcproj", "{2740F45C-475A-4DE0-BCED-6E2E5F6C4B8B}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download SOFIA", "libs\win32\Download SOFIA.vcproj", "{8B2CE7D1-77EF-45ED-927D-82147805440B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsofia_sip_ua_static", "libs\win32\sofia\libsofia_sip_ua_static.vcproj", "{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}"
ProjectSection(ProjectDependencies) = postProject
- {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
- {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}
{8B2CE7D1-77EF-45ED-927D-82147805440B} = {8B2CE7D1-77EF-45ED-927D-82147805440B}
+ {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}
+ {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download PTHREAD", "libs\win32\Download PTHREAD.vcproj", "{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}"
@@ -529,18 +530,18 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g723_1", "src\mod\codecs\mod_g723_1\mod_g723_1.vcproj", "{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_native_file", "src\mod\formats\mod_native_file\mod_native_file.vcproj", "{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSwitch.NET", "src\dotnet\FreeSwitch.NET.csproj", "{251CAABC-16C3-4593-A491-603B908094E0}"
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Wed Oct 18 21:28:29 2006
@@ -269,9 +269,9 @@
sql = switch_core_db_mprintf("select *,'%q','%q' from subscriptions where sub_to='%q'", type ? type : "", status ? status : "unavailable", from);
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ char *errmsg;
switch_hash_this(hi, NULL, NULL, &val);
profile = (struct mdl_profile *) val;
- char *errmsg;
if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
continue;
@@ -357,9 +357,9 @@
sql = switch_core_db_mprintf("select *,'%q' from subscriptions", show ? show : "unavilable");
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ char *errmsg;
switch_hash_this(hi, NULL, NULL, &val);
profile = (struct mdl_profile *) val;
- char *errmsg;
if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
continue;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Oct 18 21:28:29 2006
@@ -870,7 +870,7 @@
*resource++ = '\0';
}
- len = strlen(user) + 25;
+ len = (uint32_t)strlen(user) + 25;
if (at) {
*at++ = '\0';
1
0
19 Oct '06
Author: mikej
Date: Wed Oct 18 21:21:43 2006
New Revision: 3089
Modified:
freeswitch/trunk/libs/libdingaling/libdingaling.vcproj
freeswitch/trunk/libs/libdingaling/src/libdingaling.c
Log:
add new sha1 code on windows build.
Modified: freeswitch/trunk/libs/libdingaling/libdingaling.vcproj
==============================================================================
--- freeswitch/trunk/libs/libdingaling/libdingaling.vcproj (original)
+++ freeswitch/trunk/libs/libdingaling/libdingaling.vcproj Wed Oct 18 21:21:43 2006
@@ -308,6 +308,10 @@
RelativePath=".\src\libdingaling.c"
>
</File>
+ <File
+ RelativePath=".\src\sha1.c"
+ >
+ </File>
</Filter>
<Filter
Name="Header Files"
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c Wed Oct 18 21:21:43 2006
@@ -62,6 +62,10 @@
#include "libdingaling.h"
#include "sha1.h"
+#ifdef _MSC_VER
+#pragma warning(disable:4127)
+#endif
+
#define microsleep(x) apr_sleep(x * 1000)
static int opt_timeout = 30;
@@ -953,7 +957,7 @@
SHA1Init(&sha);
- SHA1Update(&sha, (unsigned char *) in, strlen(in));
+ SHA1Update(&sha, (unsigned char *) in, (unsigned int)strlen(in));
SHA1Final(digest, &sha);
1
0
[commit] r3088 - in freeswitch/trunk: libs/iax/src libs/libdingaling/src src/include
by Freeswitch SVN 19 Oct '06
by Freeswitch SVN 19 Oct '06
19 Oct '06
Author: mikej
Date: Wed Oct 18 21:21:17 2006
New Revision: 3088
Modified:
freeswitch/trunk/libs/iax/src/md5.c
freeswitch/trunk/libs/libdingaling/src/sha1.c
freeswitch/trunk/src/include/switch_platform.h
Log:
add endian defines on MSVC
Modified: freeswitch/trunk/libs/iax/src/md5.c
==============================================================================
--- freeswitch/trunk/libs/iax/src/md5.c (original)
+++ freeswitch/trunk/libs/iax/src/md5.c Wed Oct 18 21:21:17 2006
@@ -23,6 +23,18 @@
# endif
#endif
+#ifdef _MSC_VER
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+#endif
+
#if __BYTE_ORDER == __BIG_ENDIAN || BYTE_ORDER == BIG_ENDIAN
# define HIGHFIRST 1
#elif __BYTE_ORDER == __LITTLE_ENDIAN || BYTE_ORDER == LITLE_ENDIAN
Modified: freeswitch/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/sha1.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.c Wed Oct 18 21:21:17 2006
@@ -54,7 +54,19 @@
#include <stdio.h>
#include <string.h>
+#ifdef _MSC_VER
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+#else
#include "config.h"
+#endif
#include "sha1.h"
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h (original)
+++ freeswitch/trunk/src/include/switch_platform.h Wed Oct 18 21:21:17 2006
@@ -60,6 +60,16 @@
*/
#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055 4214 4819 4132 4510 4512 4610)
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
#if (_MSC_VER >= 1400) // VC8+
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
1
0
19 Oct '06
Author: anthm
Date: Wed Oct 18 20:26:00 2006
New Revision: 3087
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
fix
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Oct 18 20:26:00 2006
@@ -957,7 +957,7 @@
}
- if ((e_dest = strdup(tech_pvt->e_dest))) {
+ if (tech_pvt->e_dest && (e_dest = strdup(tech_pvt->e_dest))) {
char *user = e_dest, *host = NULL;
char hash_key[256] = "";
1
0
Author: anthm
Date: Wed Oct 18 20:20:40 2006
New Revision: 3086
Modified:
freeswitch/trunk/build/buildlib.sh
Log:
fix build
Modified: freeswitch/trunk/build/buildlib.sh
==============================================================================
--- freeswitch/trunk/build/buildlib.sh (original)
+++ freeswitch/trunk/build/buildlib.sh Wed Oct 18 20:20:40 2006
@@ -59,7 +59,7 @@
if [ ! -f $root/.nothanks ] && [ $uncompressed/.complete -ot $uncompressed ] ; then
echo remove stale .complete
rm $uncompressed/.complete
- cd $uncompressed && $MAKE clean distclean
+ sh -c "cd $uncompressed && $MAKE clean distclean"
fi
if [ -f $uncompressed/.complete ] ; then
1
0
Author: anthm
Date: Wed Oct 18 20:17:47 2006
New Revision: 3085
Added:
freeswitch/trunk/libs/libdingaling/src/config.h.in
Log:
update
Added: freeswitch/trunk/libs/libdingaling/src/config.h.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/libdingaling/src/config.h.in Wed Oct 18 20:17:47 2006
@@ -0,0 +1,110 @@
+/* src/config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* for the places where it is not defined */
+#undef __BIG_ENDIAN
+
+/* Little Endian */
+#undef __BYTE_ORDER
+
+/* for the places where it is not defined */
+#undef __LITTLE_ENDIAN
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
1
0
[commit] r3083 - in freeswitch/trunk: . build libs/libdingaling libs/libdingaling/src src src/include src/mod/endpoints/mod_dingaling src/mod/endpoints/mod_sofia
by Freeswitch SVN 18 Oct '06
by Freeswitch SVN 18 Oct '06
18 Oct '06
Author: anthm
Date: Wed Oct 18 18:57:35 2006
New Revision: 3083
Added:
freeswitch/trunk/libs/libdingaling/src/sha1.c
freeswitch/trunk/libs/libdingaling/src/sha1.h
Modified:
freeswitch/trunk/Makefile.in
freeswitch/trunk/build/buildlib.sh
freeswitch/trunk/libs/libdingaling/Makefile.am
freeswitch/trunk/libs/libdingaling/Makefile.in
freeswitch/trunk/libs/libdingaling/configure
freeswitch/trunk/libs/libdingaling/configure.in
freeswitch/trunk/libs/libdingaling/src/libdingaling.c
freeswitch/trunk/libs/libdingaling/src/libdingaling.h
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_event.h
freeswitch/trunk/src/include/switch_rtp.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_event.c
freeswitch/trunk/src/switch_ivr.c
Log:
Christmas Presence
Modified: freeswitch/trunk/Makefile.in
==============================================================================
--- freeswitch/trunk/Makefile.in (original)
+++ freeswitch/trunk/Makefile.in Wed Oct 18 18:57:35 2006
@@ -53,7 +53,7 @@
ChangeLog INSTALL NEWS build/config/compile \
build/config/config.guess build/config/config.sub \
build/config/depcomp build/config/install-sh \
- build/config/ltmain.sh build/config/missing mkinstalldirs
+ build/config/ltmain.sh build/config/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
Modified: freeswitch/trunk/build/buildlib.sh
==============================================================================
--- freeswitch/trunk/build/buildlib.sh (original)
+++ freeswitch/trunk/build/buildlib.sh Wed Oct 18 18:57:35 2006
@@ -56,6 +56,12 @@
fi
fi
+if [ ! -f $root/.nothanks ] && [ $uncompressed/.complete -ot $uncompressed ] ; then
+ echo remove stale .complete
+ rm $uncompressed/.complete
+ cd $uncompressed && $MAKE clean distclean
+fi
+
if [ -f $uncompressed/.complete ] ; then
echo $uncompressed already installed
exit 0
Modified: freeswitch/trunk/libs/libdingaling/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/libdingaling/Makefile.am (original)
+++ freeswitch/trunk/libs/libdingaling/Makefile.am Wed Oct 18 18:57:35 2006
@@ -17,7 +17,7 @@
AM_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs )
lib_LTLIBRARIES = libdingaling.la
-libdingaling_la_SOURCES = src/libdingaling.c
+libdingaling_la_SOURCES = src/libdingaling.c src/sha1.c
libdingaling_la_CFLAGS = $(AM_CFLAGS)
libdingaling_la_LDFLAGS =
Modified: freeswitch/trunk/libs/libdingaling/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/libdingaling/Makefile.in (original)
+++ freeswitch/trunk/libs/libdingaling/Makefile.in Wed Oct 18 18:57:35 2006
@@ -39,9 +39,9 @@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(library_include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- compile config.guess config.sub depcomp install-sh ltmain.sh \
- missing mkinstalldirs
+ $(top_srcdir)/configure $(top_srcdir)/src/config.h.in AUTHORS \
+ COPYING ChangeLog INSTALL NEWS compile config.guess config.sub \
+ depcomp install-sh ltmain.sh missing mkinstalldirs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
@@ -50,6 +50,7 @@
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -62,9 +63,10 @@
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libdingaling_la_LIBADD =
-am_libdingaling_la_OBJECTS = libdingaling_la-libdingaling.lo
+am_libdingaling_la_OBJECTS = libdingaling_la-libdingaling.lo \
+ libdingaling_la-sha1.lo
libdingaling_la_OBJECTS = $(am_libdingaling_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -210,7 +212,7 @@
APR_CONFIG = $(prefix)/bin/apr-1-config
APU_CONFIG = $(prefix)/bin/apu-1-config
lib_LTLIBRARIES = libdingaling.la
-libdingaling_la_SOURCES = src/libdingaling.c
+libdingaling_la_SOURCES = src/libdingaling.c src/sha1.c
libdingaling_la_CFLAGS = $(AM_CFLAGS)
libdingaling_la_LDFLAGS =
library_includedir = $(prefix)/include
@@ -252,6 +254,23 @@
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+src/config.h: src/stamp-h1
+ @if test ! -f $@; then \
+ rm -f src/stamp-h1; \
+ $(MAKE) src/stamp-h1; \
+ else :; fi
+
+src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status
+ @rm -f src/stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(top_srcdir)/src/config.h.in: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f src/stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f src/config.h src/stamp-h1
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@@ -289,6 +308,7 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdingaling_la-libdingaling.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdingaling_la-sha1.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -318,6 +338,13 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -c -o libdingaling_la-libdingaling.lo `test -f 'src/libdingaling.c' || echo '$(srcdir)/'`src/libdingaling.c
+libdingaling_la-sha1.lo: src/sha1.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -MT libdingaling_la-sha1.lo -MD -MP -MF "$(DEPDIR)/libdingaling_la-sha1.Tpo" -c -o libdingaling_la-sha1.lo `test -f 'src/sha1.c' || echo '$(srcdir)/'`src/sha1.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdingaling_la-sha1.Tpo" "$(DEPDIR)/libdingaling_la-sha1.Plo"; else rm -f "$(DEPDIR)/libdingaling_la-sha1.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/sha1.c' object='libdingaling_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -c -o libdingaling_la-sha1.lo `test -f 'src/sha1.c' || echo '$(srcdir)/'`src/sha1.c
+
mostlyclean-libtool:
-rm -f *.lo
@@ -661,7 +688,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-hdr distclean-libtool distclean-tags
dvi: dvi-recursive
@@ -713,11 +740,11 @@
clean-libtool clean-recursive ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
distcheck distclean distclean-compile distclean-generic \
- distclean-libtool distclean-recursive distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-libLTLIBRARIES \
+ distclean-hdr distclean-libtool distclean-recursive \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-libLTLIBRARIES \
install-library_includeHEADERS install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic \
Modified: freeswitch/trunk/libs/libdingaling/configure
==============================================================================
--- freeswitch/trunk/libs/libdingaling/configure (original)
+++ freeswitch/trunk/libs/libdingaling/configure Wed Oct 18 18:57:35 2006
@@ -1947,6 +1947,8 @@
+ ac_config_headers="$ac_config_headers src/config.h"
+
#AC_CONFIG_HEADER([])
# Checks for programs.
@@ -3689,7 +3691,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3692 "configure"' > conftest.$ac_ext
+ echo '#line 3694 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5268,7 +5270,7 @@
# Provide some information about the compiler.
-echo "$as_me:5271:" \
+echo "$as_me:5273:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6366,11 +6368,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6369: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6371: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6373: \$? = $ac_status" >&5
+ echo "$as_me:6375: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6628,11 +6630,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6631: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6633: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6635: \$? = $ac_status" >&5
+ echo "$as_me:6637: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6690,11 +6692,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6693: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6695: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6697: \$? = $ac_status" >&5
+ echo "$as_me:6699: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8938,7 +8940,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8941 "configure"
+#line 8943 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9036,7 +9038,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9039 "configure"
+#line 9041 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11291,11 +11293,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11294: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11296: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11298: \$? = $ac_status" >&5
+ echo "$as_me:11300: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11353,11 +11355,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11356: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11358: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11360: \$? = $ac_status" >&5
+ echo "$as_me:11362: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12730,7 +12732,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12733 "configure"
+#line 12735 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12828,7 +12830,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12831 "configure"
+#line 12833 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13713,11 +13715,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13716: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13718: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13720: \$? = $ac_status" >&5
+ echo "$as_me:13722: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13775,11 +13777,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13778: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13780: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13782: \$? = $ac_status" >&5
+ echo "$as_me:13784: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15905,11 +15907,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15908: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15910: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15912: \$? = $ac_status" >&5
+ echo "$as_me:15914: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16167,11 +16169,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16170: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16172: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16174: \$? = $ac_status" >&5
+ echo "$as_me:16176: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16229,11 +16231,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16232: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16234: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16236: \$? = $ac_status" >&5
+ echo "$as_me:16238: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18477,7 +18479,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18480 "configure"
+#line 18482 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18575,7 +18577,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18578 "configure"
+#line 18580 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21107,6 +21109,251 @@
#AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset socket strcasecmp strchr strdup strncasecmp strstr])
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define __BYTE_ORDER __BIG_ENDIAN
+_ACEOF
+ ;;
+ no)
+
+cat >>confdefs.h <<\_ACEOF
+#define __BYTE_ORDER __LITTLE_ENDIAN
+_ACEOF
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define __LITTLE_ENDIAN 1234
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define __BIG_ENDIAN 4321
+_ACEOF
+
+
ac_config_files="$ac_config_files Makefile"
@@ -21184,39 +21431,8 @@
}'
fi
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+DEFS=-DHAVE_CONFIG_H
-
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
@@ -21570,10 +21786,15 @@
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
Configuration files:
$config_files
+Configuration headers:
+$config_headers
+
Configuration commands:
$config_commands
@@ -21694,6 +21915,7 @@
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
@@ -21706,6 +21928,7 @@
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
@@ -22081,6 +22304,251 @@
rm -f $tmp/out
fi
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
Modified: freeswitch/trunk/libs/libdingaling/configure.in
==============================================================================
--- freeswitch/trunk/libs/libdingaling/configure.in (original)
+++ freeswitch/trunk/libs/libdingaling/configure.in Wed Oct 18 18:57:35 2006
@@ -5,6 +5,7 @@
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AM_INIT_AUTOMAKE(libdingaling,0.1)
AC_CONFIG_SRCDIR([src])
+AC_CONFIG_HEADER([src/config.h])
#AC_CONFIG_HEADER([])
# Checks for programs.
@@ -31,6 +32,10 @@
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
#AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset socket strcasecmp strchr strdup strncasecmp strstr])
+
+AC_C_BIGENDIAN(AC_DEFINE([__BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([__BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
+AC_DEFINE([__LITTLE_ENDIAN],1234,[for the places where it is not defined])
+AC_DEFINE([__BIG_ENDIAN],4321,[for the places where it is not defined])
AC_CONFIG_FILES([Makefile])
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c Wed Oct 18 18:57:35 2006
@@ -60,6 +60,7 @@
#include "ldl_compat.h"
#include "libdingaling.h"
+#include "sha1.h"
#define microsleep(x) apr_sleep(x * 1000)
@@ -89,6 +90,12 @@
int hit;
};
+typedef enum {
+ CS_NEW,
+ CS_START,
+ CS_CONNECTED
+} ldl_handle_state_t;
+
struct ldl_handle {
iksparser *parser;
iksid *acc;
@@ -116,6 +123,7 @@
apr_pool_t *pool;
void *private_info;
FILE *log_stream;
+ ldl_handle_state_t state;
};
struct ldl_session {
@@ -125,6 +133,7 @@
char *initiator;
char *them;
char *ip;
+ char *login;
ldl_payload_t payloads[LDL_MAX_PAYLOADS];
unsigned int payload_len;
ldl_candidate_t candidates[LDL_MAX_CANDIDATES];
@@ -193,7 +202,7 @@
void ldl_session_send_msg(ldl_session_t *session, char *subject, char *body)
{
- ldl_handle_send_msg(session->handle, session->them, subject, body);
+ ldl_handle_send_msg(session->handle, session->login, session->them, subject, body);
}
ldl_status ldl_session_destroy(ldl_session_t **session_p)
@@ -235,14 +244,21 @@
*session_p = NULL;
return LDL_STATUS_MEMERR;
}
-
memset(session, 0, sizeof(ldl_session_t));
apr_pool_create(&session->pool, globals.memory_pool);
session->id = apr_pstrdup(session->pool, id);
session->them = apr_pstrdup(session->pool, them);
- if (me) {
- session->initiator = apr_pstrdup(session->pool, me);
+
+ //if (me) {
+ //session->initiator = apr_pstrdup(session->pool, them);
+ //}
+
+ if (ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
+ session->login = apr_pstrdup(session->pool, me);
+ } else {
+ session->login = apr_pstrdup(session->pool, handle->login);
}
+
apr_hash_set(handle->sessions, session->id, APR_HASH_KEY_STRING, session);
apr_hash_set(handle->sessions, session->them, APR_HASH_KEY_STRING, session);
session->handle = handle;
@@ -259,7 +275,7 @@
return LDL_STATUS_SUCCESS;
}
-static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from, iks *xml, char *xtype)
+static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from, char *to, iks *xml, char *xtype)
{
ldl_session_t *session = NULL;
ldl_signal_t signal = LDL_SIGNAL_NONE;
@@ -267,7 +283,7 @@
char *msg = NULL;
if (!(session = apr_hash_get(handle->sessions, id, APR_HASH_KEY_STRING))) {
- ldl_session_create(&session, handle, id, from, initiator);
+ ldl_session_create(&session, handle, id, from, to);
if (!session) {
return LDL_STATUS_MEMERR;
}
@@ -433,7 +449,7 @@
}
if (handle->session_callback && signal) {
- handle->session_callback(handle, session, signal, from, id, msg);
+ handle->session_callback(handle, session, signal, to, from, id, msg);
}
return LDL_STATUS_SUCCESS;
@@ -441,10 +457,208 @@
const char *marker = "TRUE";
+static int on_disco_info(void *user_data, ikspak *pak)
+{
+ ldl_handle_t *handle = user_data;
+
+ if (pak->subtype == IKS_TYPE_RESULT) {
+ if (iks_find_with_attrib(pak->query, "feature", "var", "http://www.google.com/xmpp/protocol/voice/v1")) {
+ char *from = iks_find_attrib(pak->x, "from");
+ char id[1024];
+ char *resource;
+ struct ldl_buffer *buffer;
+ size_t x;
+
+ if (!apr_hash_get(handle->sub_hash, from, APR_HASH_KEY_STRING)) {
+ iks *msg;
+ apr_hash_set(handle->sub_hash, apr_pstrdup(handle->pool, from), APR_HASH_KEY_STRING, &marker);
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling....");
+ apr_queue_push(handle->queue, msg);
+ }
+
+ apr_cpystrn(id, from, sizeof(id));
+ if ((resource = strchr(id, '/'))) {
+ *resource++ = '\0';
+ }
+
+ if (resource) {
+ for (x = 0; x < strlen(resource); x++) {
+ resource[x] = (char)tolower((int)resource[x]);
+ }
+ }
+
+ if (resource && strstr(resource, "talk") && (buffer = apr_hash_get(handle->probe_hash, id, APR_HASH_KEY_STRING))) {
+ apr_cpystrn(buffer->buf, from, buffer->len);
+ fflush(stderr);
+ buffer->hit = 1;
+ }
+ }
+ return IKS_FILTER_EAT;
+ }
+
+ if (pak->subtype == IKS_TYPE_GET) {
+ iks *iq, *query, *tag;
+ uint8_t send = 0;
+
+ if ((iq = iks_new("iq"))) {
+ do {
+ iks_insert_attrib(iq, "from", handle->login);
+ iks_insert_attrib(iq, "to", pak->from->full);
+ iks_insert_attrib(iq, "id", pak->id);
+ iks_insert_attrib(iq, "type", "result");
+
+ if (!(query = iks_insert (iq, "query"))) {
+ break;
+ }
+ iks_insert_attrib(query, "xmlns", "http://jabber.org/protocol/disco#info");
+
+ if (!(tag = iks_insert (query, "identity"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "category", "client");
+ iks_insert_attrib(tag, "type", "voice");
+ iks_insert_attrib(tag, "name", "LibDingaLing");
+
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "http://jabber.org/protocol/disco#info");
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "http://www.google.com/xmpp/protocol/voice/v1");
+
+ iks_send(handle->parser, iq);
+ send = 1;
+ } while (0);
+
+ iks_delete(iq);
+ }
+
+ if (!send) {
+ globals.logger(DL_LOG_DEBUG, "Memory Error!\n");
+ }
+ }
+
+ return IKS_FILTER_EAT;
+}
+
+static int on_component_disco_info(void *user_data, ikspak *pak)
+{
+ char *node = iks_find_attrib(pak->query, "node");
+ ldl_handle_t *handle = user_data;
+
+ if (pak->subtype == IKS_TYPE_RESULT) {
+ globals.logger(DL_LOG_DEBUG, "FixME!!! node=[%s]\n", node?node:"");
+ } else if (pak->subtype == IKS_TYPE_GET) {
+ // if (ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
+ if (node) {
+
+ } else {
+ iks *iq, *query, *tag;
+ uint8_t send = 0;
+
+ if ((iq = iks_new("iq"))) {
+ do {
+ iks_insert_attrib(iq, "from", handle->login);
+ iks_insert_attrib(iq, "to", pak->from->full);
+ iks_insert_attrib(iq, "id", pak->id);
+ iks_insert_attrib(iq, "type", "result");
+
+ if (!(query = iks_insert (iq, "query"))) {
+ break;
+ }
+ iks_insert_attrib(query, "xmlns", "http://jabber.org/protocol/disco#info");
+
+ if (!(tag = iks_insert (query, "identity"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "category", "gateway");
+ iks_insert_attrib(tag, "type", "voice");
+ iks_insert_attrib(tag, "name", "LibDingaLing");
+
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "http://jabber.org/protocol/disco");
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "jabber:iq:register");
+
+ /*
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "http://jabber.org/protocol/commands");
+ */
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "jabber:iq:gateway");
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "jabber:iq:version");
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "vcard-temp");
+
+ if (!(tag = iks_insert (query, "feature"))) {
+ break;
+ }
+ iks_insert_attrib(tag, "var", "jabber:iq:search");
+
+ iks_send(handle->parser, iq);
+ send = 1;
+ } while (0);
+
+ iks_delete(iq);
+ }
+
+ if (!send) {
+ globals.logger(DL_LOG_DEBUG, "Memory Error!\n");
+ }
+
+ }
+ }
+
+ return IKS_FILTER_EAT;
+}
+
+
+
+static int on_disco_items(void *user_data, ikspak *pak)
+{
+ globals.logger(DL_LOG_DEBUG, "FixME!!!\n");
+ return IKS_FILTER_EAT;
+}
+
+static int on_disco_reg_in(void *user_data, ikspak *pak)
+{
+ globals.logger(DL_LOG_DEBUG, "FixME!!!\n");
+ return IKS_FILTER_EAT;
+}
+
+static int on_disco_reg_out(void *user_data, ikspak *pak)
+{
+ globals.logger(DL_LOG_DEBUG, "FixME!!!\n");
+ return IKS_FILTER_EAT;
+}
+
static int on_presence(void *user_data, ikspak *pak)
{
ldl_handle_t *handle = user_data;
char *from = iks_find_attrib(pak->x, "from");
+ char *to = iks_find_attrib(pak->x, "to");
char *type = iks_find_attrib(pak->x, "type");
char *show = iks_find_cdata(pak->x, "show");
char *status = iks_find_cdata(pak->x, "status");
@@ -454,6 +668,7 @@
size_t x;
ldl_signal_t signal;
+
if (type && !strcasecmp(type, "unavailable")) {
signal = LDL_SIGNAL_PRESENCE_OUT;
} else {
@@ -464,9 +679,7 @@
status = type;
}
- if (handle->session_callback) {
- handle->session_callback(handle, NULL, signal, from, status ? status : "n/a", show ? show : "n/a");
- }
+
if (!apr_hash_get(handle->sub_hash, from, APR_HASH_KEY_STRING)) {
iks *msg;
@@ -491,20 +704,104 @@
fflush(stderr);
buffer->hit = 1;
}
+
+ if (!type || (type && strcasecmp(type, "probe"))) {
+ if (handle->session_callback) {
+ handle->session_callback(handle, NULL, signal, to, from, status ? status : "n/a", show ? show : "n/a");
+ }
+ }
+
+
return IKS_FILTER_EAT;
}
+static void do_presence(ldl_handle_t *handle, char *from, char *to, char *type, char *message)
+{
+ iks *pres;
+ char buf[512];
+ iks *tag;
+ if (!strchr(from, '/')) {
+ snprintf(buf, sizeof(buf), "%s/talk", from);
+ from = buf;
+ }
+ if ((pres = iks_new("presence"))) {
+ iks_insert_attrib(pres, "xmlns", "jabber:client");
+ if (from) {
+ iks_insert_attrib(pres, "from", from);
+ }
+ if (to) {
+ iks_insert_attrib(pres, "to", to);
+ }
+ if (type) {
+ iks_insert_attrib(pres, "type", type);
+ }
+
+
+
+ if (message) {
+ if ((tag = iks_insert (pres, "status"))) {
+ iks_insert_cdata(tag, message ? message : "", 0);
+ if ((tag = iks_insert(pres, "c"))) {
+ iks_insert_attrib(tag, "node", "http://www.freeswitch.org/xmpp/client/caps");
+ iks_insert_attrib(tag, "ver", "1.0.0.1");
+ iks_insert_attrib(tag, "ext", "sidebar voice-v1");
+ iks_insert_attrib(tag, "client", "libdingaling2");
+ iks_insert_attrib(tag, "xmlns", "http://jabber.org/protocol/caps");
+ }
+ }
+ }
+
+ apr_queue_push(handle->queue, pres);
+ }
+}
+
+static void do_roster(ldl_handle_t *handle)
+{
+ if (handle->session_callback) {
+ handle->session_callback(handle, NULL, LDL_SIGNAL_ROSTER, NULL, handle->login, NULL, NULL);
+ }
+}
+
+static int on_unsubscribe(void *user_data, ikspak *pak)
+{
+ ldl_handle_t *handle = user_data;
+ char *from = iks_find_attrib(pak->x, "from");
+ char *to = iks_find_attrib(pak->x, "to");
+
+ if (handle->session_callback) {
+ handle->session_callback(handle, NULL, LDL_SIGNAL_SUBSCRIBE, to, from, NULL, NULL);
+ }
+
+ return IKS_FILTER_EAT;
+}
+
static int on_subscribe(void *user_data, ikspak *pak)
{
ldl_handle_t *handle = user_data;
char *from = iks_find_attrib(pak->x, "from");
+ char *to = iks_find_attrib(pak->x, "to");
iks *msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling....");
+
+ if (to && ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
+ iks_insert_attrib(msg, "from", to);
+ }
+
apr_queue_push(handle->queue, msg);
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, from, "Ding A Ling....");
+
+ if (to && ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
+ iks_insert_attrib(msg, "from", to);
+ }
+
apr_queue_push(handle->queue, msg);
+
+ if (handle->session_callback) {
+ handle->session_callback(handle, NULL, LDL_SIGNAL_SUBSCRIBE, to, from, NULL, NULL);
+ }
+
return IKS_FILTER_EAT;
}
@@ -526,7 +823,7 @@
{
ldl_handle_t *handle = user_data;
char *from = iks_find_attrib(pak->x, "from");
- //char *to = iks_find_attrib(pak->x, "to");
+ char *to = iks_find_attrib(pak->x, "to");
char *iqid = iks_find_attrib(pak->x, "id");
char *type = iks_find_attrib(pak->x, "type");
uint8_t is_result = strcasecmp(type, "result") ? 0 : 1;
@@ -540,9 +837,10 @@
if (!strcasecmp(iks_name(tag), "bind")) {
char *jid = iks_find_cdata(tag, "jid");
char *resource = strchr(jid, '/');
- iks *iq, *x;
+ //iks *iq, *x;
handle->acc->resource = apr_pstrdup(handle->pool, resource);
handle->login = apr_pstrdup(handle->pool, jid);
+#if 0
if ((iq = iks_new("iq"))) {
iks_insert_attrib(iq, "type", "get");
iks_insert_attrib(iq, "id", "roster");
@@ -555,6 +853,7 @@
iks_delete(iq);
break;
}
+#endif
}
tag = iks_next_tag(tag);
}
@@ -579,10 +878,11 @@
if (!strcasecmp(name, "session")) {
char *id = iks_find_attrib(xml, "id");
//printf("SESSION type=%s name=%s id=%s\n", type, name, id);
- if (parse_session_code(handle, id, from, xml, strcasecmp(type, "error") ? NULL : type) == LDL_STATUS_SUCCESS) {
+ if (parse_session_code(handle, id, from, to, xml, strcasecmp(type, "error") ? NULL : type) == LDL_STATUS_SUCCESS) {
iks *reply;
reply = iks_make_iq(IKS_TYPE_RESULT, NULL);
iks_insert_attrib(reply, "to", from);
+ iks_insert_attrib(reply, "from", to);
iks_insert_attrib(reply, "id", iqid);
apr_queue_push(handle->queue, reply);
}
@@ -644,8 +944,89 @@
return 0;
}
-static int on_stream(ldl_handle_t *handle, int type, iks * node)
+static void sha1_hash(char *out, char *in)
{
+ sha_context_t sha;
+ char *p;
+ int x;
+ unsigned char digest[20];
+
+ SHA1Init(&sha);
+
+ SHA1Update(&sha, (unsigned char *) in, strlen(in));
+
+ SHA1Final(digest, &sha);
+
+ p = out;
+ for (x = 0; x < 20; x++) {
+ p += sprintf(p, "%2.2x", digest[x]);
+ }
+}
+
+
+static int on_stream_component(ldl_handle_t *handle, int type, iks *node)
+{
+ ikspak *pak = iks_packet(node);
+
+ switch (type) {
+ case IKS_NODE_START:
+ if (handle->state == CS_NEW) {
+ char secret[256];
+ char hash[256];
+ char handshake[512];
+ snprintf(secret, sizeof(secret), "%s%s", pak->id, handle->password);
+ sha1_hash(hash, secret);
+ snprintf(handshake, sizeof(handshake), "<handshake>%s</handshake>", hash);
+ iks_send_raw(handle->parser, handshake);
+ handle->state = CS_START;
+ if (iks_recv(handle->parser, 1) == 2) {
+ handle->state = CS_CONNECTED;
+ if (!ldl_test_flag(handle, LDL_FLAG_AUTHORIZED)) {
+ ldl_set_flag_locked(handle, LDL_FLAG_READY);
+ do_roster(handle);
+ if (handle->session_callback) {
+ handle->session_callback(handle, NULL, LDL_SIGNAL_LOGIN_SUCCESS, "user", "core", "Login Success", handle->login);
+ }
+ globals.logger(DL_LOG_DEBUG, "XMPP authenticated\n");
+ ldl_set_flag_locked(handle, LDL_FLAG_AUTHORIZED);
+ }
+ } else {
+ globals.logger(DL_LOG_ERR, "LOGIN ERROR!\n");
+ handle->state = CS_NEW;
+ }
+ break;
+ }
+ break;
+
+ case IKS_NODE_NORMAL:
+ break;
+
+ case IKS_NODE_ERROR:
+ globals.logger(DL_LOG_ERR, "NODE ERROR!\n");
+ return IKS_HOOK;
+
+ case IKS_NODE_STOP:
+ globals.logger(DL_LOG_ERR, "DISCONNECTED!\n");
+ return IKS_HOOK;
+ }
+
+
+ pak = iks_packet(node);
+ iks_filter_packet(handle->filter, pak);
+
+ if (handle->job_done == 1) {
+ return IKS_HOOK;
+ }
+
+ if (node) {
+ iks_delete(node);
+ }
+
+ return IKS_OK;
+}
+
+static int on_stream(ldl_handle_t *handle, int type, iks *node)
+{
handle->counter = opt_timeout;
switch (type) {
@@ -708,20 +1089,20 @@
} else if (strcmp("failure", iks_name(node)) == 0) {
globals.logger(DL_LOG_DEBUG, "sasl authentication failed\n");
if (handle->session_callback) {
- handle->session_callback(handle, NULL, LDL_SIGNAL_LOGIN_FAILURE, "core", "Login Failure", handle->login);
+ handle->session_callback(handle, NULL, LDL_SIGNAL_LOGIN_FAILURE, "user", "core", "Login Failure", handle->login);
}
} else if (strcmp("success", iks_name(node)) == 0) {
globals.logger(DL_LOG_DEBUG, "XMPP server connected\n");
iks_send_header(handle->parser, handle->acc->server);
ldl_set_flag_locked(handle, LDL_FLAG_CONNECTED);
if (handle->session_callback) {
- handle->session_callback(handle, NULL, LDL_SIGNAL_CONNECTED, "core", "Server Connected", handle->login);
+ handle->session_callback(handle, NULL, LDL_SIGNAL_CONNECTED, "user", "core", "Server Connected", handle->login);
}
} else {
ikspak *pak;
if (!ldl_test_flag(handle, LDL_FLAG_AUTHORIZED)) {
if (handle->session_callback) {
- handle->session_callback(handle, NULL, LDL_SIGNAL_LOGIN_SUCCESS, "core", "Login Success", handle->login);
+ handle->session_callback(handle, NULL, LDL_SIGNAL_LOGIN_SUCCESS, "user", "core", "Login Success", handle->login);
}
globals.logger(DL_LOG_DEBUG, "XMPP authenticated\n");
ldl_set_flag_locked(handle, LDL_FLAG_AUTHORIZED);
@@ -754,6 +1135,7 @@
static int on_msg(void *user_data, ikspak *pak)
{
char *cmd = iks_find_cdata(pak->x, "body");
+ char *to = iks_find_attrib(pak->x, "to");
char *from = iks_find_attrib(pak->x, "from");
char *subject = iks_find_attrib(pak->x, "subject");
ldl_handle_t *handle = user_data;
@@ -764,7 +1146,7 @@
}
if (handle->session_callback) {
- handle->session_callback(handle, session, LDL_SIGNAL_MSG, from, subject ? subject : "N/A", cmd);
+ handle->session_callback(handle, session, LDL_SIGNAL_MSG, to, from, subject ? subject : "N/A", cmd);
}
return 0;
@@ -789,18 +1171,13 @@
fprintf(stderr, "[%s]\n", data);
}
-static void j_setup_filter(ldl_handle_t *handle, char *login)
+static void j_setup_filter(ldl_handle_t *handle)
{
if (handle->filter) {
iks_filter_delete(handle->filter);
}
handle->filter = iks_filter_new();
- /*
- iks_filter_add_rule(handle->filter, on_msg, 0,
- IKS_RULE_TYPE, IKS_PAK_MESSAGE,
- IKS_RULE_SUBTYPE, IKS_TYPE_CHAT, IKS_RULE_FROM, login, IKS_RULE_DONE);
- */
iks_filter_add_rule(handle->filter, on_msg, handle, IKS_RULE_TYPE, IKS_PAK_MESSAGE, IKS_RULE_SUBTYPE, IKS_TYPE_CHAT, IKS_RULE_DONE);
iks_filter_add_rule(handle->filter, on_result, handle,
@@ -832,9 +1209,31 @@
IKS_RULE_SUBTYPE, IKS_TYPE_SUBSCRIBE,
IKS_RULE_DONE);
+ iks_filter_add_rule(handle->filter, on_unsubscribe, handle,
+ IKS_RULE_TYPE, IKS_PAK_S10N,
+ IKS_RULE_SUBTYPE, IKS_TYPE_UNSUBSCRIBE,
+ IKS_RULE_DONE);
+
iks_filter_add_rule(handle->filter, on_error, handle,
IKS_RULE_TYPE, IKS_PAK_IQ,
IKS_RULE_SUBTYPE, IKS_TYPE_ERROR, IKS_RULE_ID, "auth", IKS_RULE_DONE);
+
+
+
+ if (ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
+ iks_filter_add_rule(handle->filter, on_component_disco_info, handle,
+ IKS_RULE_NS, "http://jabber.org/protocol/disco#info", IKS_RULE_DONE);
+ iks_filter_add_rule(handle->filter, on_disco_items, handle,
+ IKS_RULE_NS, "http://jabber.org/protocol/disco#items", IKS_RULE_DONE);
+ iks_filter_add_rule(handle->filter, on_disco_reg_in, handle,
+ IKS_RULE_SUBTYPE, IKS_TYPE_GET, IKS_RULE_NS, "jabber:iq:register", IKS_RULE_DONE);
+ iks_filter_add_rule(handle->filter, on_disco_reg_out, handle,
+ IKS_RULE_SUBTYPE, IKS_TYPE_SET, IKS_RULE_NS, "jabber:iq:register", IKS_RULE_DONE);
+ } else {
+ iks_filter_add_rule(handle->filter, on_disco_info, handle,
+ IKS_RULE_NS, "http://jabber.org/protocol/disco#info", IKS_RULE_DONE);
+ }
+
}
static void ldl_flush_queue(ldl_handle_t *handle)
@@ -928,26 +1327,35 @@
{
while (ldl_test_flag(handle, LDL_FLAG_RUNNING)) {
int e;
+ char tmp[512], *sl;
- handle->parser = iks_stream_new(IKS_NS_CLIENT, handle, (iksStreamHook *) on_stream);
+ handle->parser = iks_stream_new(ldl_test_flag(handle, LDL_FLAG_COMPONENT) ? IKS_NS_COMPONENT : IKS_NS_CLIENT,
+ handle,
+ (iksStreamHook *) (ldl_test_flag(handle, LDL_FLAG_COMPONENT) ? on_stream_component : on_stream));
+
if (globals.debug) {
iks_set_log_hook(handle->parser, (iksLogHook *) on_log);
}
- handle->acc = iks_id_new(iks_parser_stack(handle->parser), jabber_id);
- if (NULL == handle->acc->resource) {
+
+ strncpy(tmp, jabber_id, sizeof(tmp)-1);
+ sl = strchr(tmp, '/');
+
+ if (!sl && !ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
/* user gave no resource name, use the default */
- char tmp[512];
- sprintf(tmp, "%s@%s/%s", handle->acc->user, handle->acc->server, "dingaling");
- handle->acc = iks_id_new(iks_parser_stack(handle->parser), tmp);
+ snprintf(tmp + strlen(tmp), sizeof(tmp) - strlen(tmp), "/%s", "talk");
+ } else if (sl && ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
+ *sl = '\0';
}
+
+ handle->acc = iks_id_new(iks_parser_stack(handle->parser), tmp);
+
handle->password = pass;
- j_setup_filter(handle, "fixme");
+ j_setup_filter(handle);
e = iks_connect_via(handle->parser,
handle->server ? handle->server : handle->acc->server,
handle->port ? handle->port : IKS_JABBER_PORT,
- //handle->server ? handle->server : handle->acc->server);
handle->acc->server);
switch (e) {
@@ -1040,7 +1448,7 @@
snprintf(idbuf, sizeof(idbuf), "%u", myid);
iq = iks_new("iq");
iks_insert_attrib(iq, "xmlns", "jabber:client");
- iks_insert_attrib(iq, "from", session->handle->login);
+ iks_insert_attrib(iq, "from", session->login);
iks_insert_attrib(iq, "to", session->them);
iks_insert_attrib(iq, "type", "set");
iks_insert_attrib(iq, "id", idbuf);
@@ -1092,6 +1500,11 @@
return session->them;
}
+char *ldl_session_get_callee(ldl_session_t *session)
+{
+ return session->login;
+}
+
void ldl_session_set_ip(ldl_session_t *session, char *ip)
{
session->ip = apr_pstrdup(session->pool, ip);
@@ -1123,7 +1536,7 @@
iq = iks_new("iq");
iks_insert_attrib(iq, "type", "set");
iks_insert_attrib(iq, "id", idbuf);
- iks_insert_attrib(iq, "from", session->handle->login);
+ iks_insert_attrib(iq, "from", session->login);
iks_insert_attrib(iq, "to", session->them);
sess = iks_insert (iq, "session");
iks_insert_attrib(sess, "xmlns", "http://www.google.com/session");
@@ -1142,8 +1555,13 @@
return handle->private_info;
}
-void ldl_handle_send_msg(ldl_handle_t *handle, char *to, char *subject, char *body)
+void ldl_handle_send_presence(ldl_handle_t *handle, char *from, char *to, char *type, char *message)
{
+ do_presence(handle, from, to, type, message);
+}
+
+void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, char *subject, char *body)
+{
iks *msg;
assert(handle != NULL);
@@ -1153,6 +1571,12 @@
msg = iks_make_msg(IKS_TYPE_NONE, to, body);
iks_insert_attrib(msg, "type", "chat");
+ if (!from) {
+ from = handle->login;
+ }
+
+ iks_insert_attrib(msg, "from", from);
+
if (subject) {
iks_insert_attrib(msg, "subject", subject);
}
@@ -1235,7 +1659,7 @@
return id;
}
-char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *buf, unsigned int len)
+char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *from, char *buf, unsigned int len)
{
iks *pres, *msg;
char *lid = NULL;
@@ -1251,15 +1675,86 @@
pres = iks_new("presence");
iks_insert_attrib(pres, "type", "probe");
+ iks_insert_attrib(pres, "from", from);
iks_insert_attrib(pres, "to", id);
apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, &buffer);
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice);
+ iks_insert_attrib(pres, "from", from);
apr_queue_push(handle->queue, msg);
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, notice);
apr_queue_push(handle->queue, msg);
apr_queue_push(handle->queue, pres);
+
+ //schedule_packet(handle, next_id(), pres, LDL_RETRY);
+
+ started = apr_time_now();
+ for(;;) {
+ elapsed = (unsigned int)((apr_time_now() - started) / 1000);
+ if (elapsed > 5000 && ! again) {
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice);
+ iks_insert_attrib(pres, "from", from);
+ apr_queue_push(handle->queue, msg);
+ again++;
+ }
+ if (elapsed > 10000) {
+ break;
+ }
+ if (buffer.hit) {
+ lid = buffer.buf;
+ break;
+ }
+ ldl_yield(1000);
+ }
+
+ apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, NULL);
+ return lid;
+}
+
+
+char *ldl_handle_disco(ldl_handle_t *handle, char *id, char *from, char *buf, unsigned int len)
+{
+ iks *iq, *query, *msg;
+ char *lid = NULL;
+ struct ldl_buffer buffer;
+ apr_time_t started;
+ unsigned int elapsed;
+ char *notice = "Call Me!";
+ int again = 0;
+ unsigned int myid;
+ char idbuf[80];
+
+ myid = next_id();
+ snprintf(idbuf, sizeof(idbuf), "%u", myid);
+
+ buffer.buf = buf;
+ buffer.len = len;
+ buffer.hit = 0;
+
+ if ((iq = iks_new("iq"))) {
+ if ((query = iks_insert(iq, "query"))) {
+ iks_insert_attrib(iq, "type", "get");
+ iks_insert_attrib(iq, "to", id);
+ iks_insert_attrib(iq,"from", from);
+ iks_insert_attrib(iq, "id", idbuf);
+ iks_insert_attrib(query, "xmlns", "http://jabber.org/protocol/disco#info");
+ } else {
+ iks_delete(iq);
+ globals.logger(DL_LOG_DEBUG, "Memory ERROR!\n");
+ return NULL;
+ }
+ } else {
+ globals.logger(DL_LOG_DEBUG, "Memory ERROR!\n");
+ return NULL;
+ }
+
+ apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, &buffer);
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice);
+ apr_queue_push(handle->queue, msg);
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, notice);
+ apr_queue_push(handle->queue, msg);
+ apr_queue_push(handle->queue, iq);
//schedule_packet(handle, next_id(), pres, LDL_RETRY);
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.h Wed Oct 18 18:57:35 2006
@@ -50,6 +50,7 @@
#define LDL_MAX_CANDIDATES 10
#define LDL_MAX_PAYLOADS 50
#define LDL_RETRY 3
+#define IKS_NS_COMPONENT "jabber:component:accept"
/*! \brief A structure to store a jingle candidate */
struct ldl_candidate {
@@ -105,13 +106,14 @@
LDL_FLAG_AUTHORIZED = (1 << 2),
LDL_FLAG_READY = (1 << 3),
LDL_FLAG_CONNECTED = (1 << 4),
- LDL_FLAG_QUEUE_RUNNING = (1 << 5),
+ LDL_FLAG_QUEUE_RUNNING = (1 << 5)
} ldl_flag_t;
typedef enum {
LDL_FLAG_TLS = (1 << 10),
LDL_FLAG_SASL_PLAIN = (1 << 11),
- LDL_FLAG_SASL_MD5 = (1 << 12)
+ LDL_FLAG_SASL_MD5 = (1 << 12),
+ LDL_FLAG_COMPONENT = (1 << 13),
} ldl_user_flag_t;
typedef enum {
@@ -121,6 +123,9 @@
LDL_SIGNAL_MSG,
LDL_SIGNAL_PRESENCE_IN,
LDL_SIGNAL_PRESENCE_OUT,
+ LDL_SIGNAL_ROSTER,
+ LDL_SIGNAL_SUBSCRIBE,
+ LDL_SIGNAL_UNSUBSCRIBE,
LDL_SIGNAL_TERMINATE,
LDL_SIGNAL_ERROR,
LDL_SIGNAL_LOGIN_SUCCESS,
@@ -156,7 +161,7 @@
#define DL_LOG_EMERG DL_PRE, 0
typedef ldl_status (*ldl_loop_callback_t)(ldl_handle_t *);
-typedef ldl_status (*ldl_session_callback_t)(ldl_handle_t *, ldl_session_t *, ldl_signal_t, char *, char *, char *);
+typedef ldl_status (*ldl_session_callback_t)(ldl_handle_t *, ldl_session_t *, ldl_signal_t, char *, char *, char *, char *);
typedef ldl_status (*ldl_response_callback_t)(ldl_handle_t *, char *);
typedef void (*ldl_logger_t)(char *file, const char *func, int line, int level, char *fmt, ...);
@@ -266,6 +271,13 @@
char *ldl_session_get_caller(ldl_session_t *session);
/*!
+ \brief Get the callee name of a session
+ \param session the session to get the callee from
+ \return the callee name
+*/
+char *ldl_session_get_callee(ldl_session_t *session);
+
+/*!
\brief Set the ip of a session
\param session the session to set the ip on
\param ip the ip
@@ -310,13 +322,25 @@
\brief Perform a probe on a given id to resolve the proper Jingle Resource
\param handle the connection handle to use.
\param id the id to probe
+ \param from the from string
\param buf a string to store the result
\param len the size in bytes of the string
\return a pointer to buf if a successful lookup was made otherwise NULL
*/
-char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *buf, unsigned int len);
+char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *from, char *buf, unsigned int len);
/*!
+ \brief Perform a discovery on a given id to resolve the proper Jingle Resource
+ \param handle the connection handle to use.
+ \param id the id to probe
+ \param from the from string
+ \param buf a string to store the result
+ \param len the size in bytes of the string
+ \return a pointer to buf if a successful lookup was made otherwise NULL
+*/
+char *ldl_handle_disco(ldl_handle_t *handle, char *id, char *from, char *buf, unsigned int len);
+
+/*!
\brief Signal a termination request on a given session
\param session the session to terminate
\return TRUE if the signal was sent.
@@ -340,13 +364,24 @@
void ldl_session_send_msg(ldl_session_t *session, char *subject, char *body);
/*!
+ \brief Send a presence notification to a target
+ \param handle the handle to send with
+ \param from the from address
+ \param to the to address
+ \param type the type of presence
+ \param message a status message
+*/
+void ldl_handle_send_presence(ldl_handle_t *handle, char *from, char *to, char *type, char *message);
+
+/*!
\brief Send a message
\param handle the conection handle
+ \param from the message sender
\param to the message recipiant
\param subject optional subject
\param body body of the message
*/
-void ldl_handle_send_msg(ldl_handle_t *handle, char *to, char *subject, char *body);
+void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, char *subject, char *body);
/*!
\brief Offer candidates to a potential session
Added: freeswitch/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.c Wed Oct 18 18:57:35 2006
@@ -0,0 +1,203 @@
+/*
+ * libDingaLing XMPP Jingle Library
+ * Copyright (C) 2005/2006, Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is libDingaLing XMPP Jingle Library
+ *
+ * The Initial Developer of the Original Code is
+ * Steve Reid <steve(a)edmweb.com>
+ *
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Steve Reid <steve(a)edmweb.com>
+ *
+ * sha1.h
+ *
+ */
+/*! \file sha1.c
+ \brief SHA1
+*/
+
+/*
+ORIGINAL HEADERS
+----------------------------------------------------------------------------------------------
+SHA-1 in C
+By Steve Reid <steve(a)edmweb.com>
+100% Public Domain
+
+Test Vectors (from FIPS PUB 180-1)
+"abc"
+ A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
+"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
+A million repetitions of "a"
+ 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
+*/
+
+/* #define LITTLE_ENDIAN * This should be #define'd if true. */
+/* #define SHA1HANDSOFF * Copies data before messing with it. */
+
+#include <stdio.h>
+#include <string.h>
+#include "config.h"
+#include "sha1.h"
+
+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
+
+/* blk0() and blk() perform the initial expand. */
+/* I got the idea of expanding during the round function from SSLeay */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
+ |(rol(block->l[i],8)&0x00FF00FF))
+#else
+#define blk0(i) block->l[i]
+#endif
+#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
+ ^block->l[(i+2)&15]^block->l[i&15],1))
+
+/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+
+/* Hash a single 512-bit block. This is the core of the algorithm. */
+
+void SHA1Transform(unsigned long state[5], unsigned char buffer[64])
+{
+unsigned long a, b, c, d, e;
+typedef union {
+ unsigned char c[64];
+ unsigned long l[16];
+} CHAR64LONG16;
+CHAR64LONG16* block;
+#ifdef SHA1HANDSOFF
+static unsigned char workspace[64];
+ block = (CHAR64LONG16*)workspace;
+ memcpy(block, buffer, 64);
+#else
+ block = (CHAR64LONG16*)buffer;
+#endif
+ /* Copy context->state[] to working vars */
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ /* 4 rounds of 20 operations each. Loop unrolled. */
+ R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+ R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+ R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+ R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+ R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+ R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+ R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+ R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+ R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+ R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+ R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+ R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+ R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+ R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+ R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+ R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+ R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+ R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+ R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+ R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+ /* Add the working vars back into context.state[] */
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ /* Wipe variables */
+ a = b = c = d = e = 0;
+}
+
+
+/* SHA1Init - Initialize new context */
+
+void SHA1Init(sha_context_t* context)
+{
+ /* SHA1 initialization constants */
+ context->state[0] = 0x67452301;
+ context->state[1] = 0xEFCDAB89;
+ context->state[2] = 0x98BADCFE;
+ context->state[3] = 0x10325476;
+ context->state[4] = 0xC3D2E1F0;
+ context->count[0] = context->count[1] = 0;
+}
+
+
+/* Run your data through this. */
+
+void SHA1Update(sha_context_t* context, unsigned char* data, unsigned int len)
+{
+unsigned int i, j;
+
+ j = (context->count[0] >> 3) & 63;
+ if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
+ context->count[1] += (len >> 29);
+ if ((j + len) > 63) {
+ memcpy(&context->buffer[j], data, (i = 64-j));
+ SHA1Transform(context->state, context->buffer);
+ for ( ; i + 63 < len; i += 64) {
+ SHA1Transform(context->state, &data[i]);
+ }
+ j = 0;
+ }
+ else i = 0;
+ memcpy(&context->buffer[j], &data[i], len - i);
+}
+
+
+/* Add padding and return the message digest. */
+
+void SHA1Final(unsigned char digest[20], sha_context_t* context)
+{
+unsigned long i, j;
+unsigned char finalcount[8];
+
+ for (i = 0; i < 8; i++) {
+ finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
+ >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
+ }
+ SHA1Update(context, (unsigned char *)"\200", 1);
+ while ((context->count[0] & 504) != 448) {
+ SHA1Update(context, (unsigned char *)"\0", 1);
+ }
+ SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
+ for (i = 0; i < 20; i++) {
+ digest[i] = (unsigned char)
+ ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+ }
+ /* Wipe variables */
+ i = j = 0;
+ memset(context->buffer, 0, 64);
+ memset(context->state, 0, 20);
+ memset(context->count, 0, 8);
+ memset(&finalcount, 0, 8);
+#ifdef SHA1HANDSOFF /* make SHA1Transform overwrite it's own static vars */
+ SHA1Transform(context->state, context->buffer);
+#endif
+}
+
+
Added: freeswitch/trunk/libs/libdingaling/src/sha1.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.h Wed Oct 18 18:57:35 2006
@@ -0,0 +1,58 @@
+/*
+ * libDingaLing XMPP Jingle Library
+ * Copyright (C) 2005/2006, Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is libDingaLing XMPP Jingle Library
+ *
+ * The Initial Developer of the Original Code is
+ * Steve Reid <steve(a)edmweb.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Steve Reid <steve(a)edmweb.com>
+ *
+ * sha1.h
+ *
+ */
+/*! \file sha1.h
+ \brief SHA1
+*/
+
+#ifndef __SHA1_H
+#define __SHA1_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __STUPIDFORMATBUG__
+}
+#endif
+
+typedef struct {
+ unsigned long state[5];
+ unsigned long count[2];
+ unsigned char buffer[64];
+} sha_context_t;
+
+void SHA1Transform(unsigned long state[5], unsigned char buffer[64]);
+void SHA1Init(sha_context_t* context);
+void SHA1Update(sha_context_t* context, unsigned char* data, unsigned int len);
+void SHA1Final(unsigned char digest[20], sha_context_t* context);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Wed Oct 18 18:57:35 2006
@@ -841,6 +841,7 @@
\brief Initialize a codec handle
\param codec the handle to initilize
\param codec_name the name of the codec module to use
+ \param fmtp codec parameters to send
\param rate the desired rate (0 for any)
\param ms the desired number of milliseconds (0 for any)
\param channels the desired number of channels (0 for any)
Modified: freeswitch/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/trunk/src/include/switch_event.h (original)
+++ freeswitch/trunk/src/include/switch_event.h Wed Oct 18 18:57:35 2006
@@ -97,6 +97,8 @@
void *bind_user_data;
/*! user data from the event sender */
void *event_user_data;
+ /*! unique key */
+ unsigned long key;
struct switch_event *next;
};
Modified: freeswitch/trunk/src/include/switch_rtp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_rtp.h (original)
+++ freeswitch/trunk/src/include/switch_rtp.h Wed Oct 18 18:57:35 2006
@@ -72,6 +72,7 @@
\param ms_per_packet time in microseconds per packet
\param flags flags to control behaviour
\param crypto_key optional crypto key
+ \param timer_name timer interface to use
\param err a pointer to resolve error messages
\param pool a memory pool to use for the session
\return the new RTP session or NULL on failure
@@ -98,6 +99,7 @@
\param ms_per_packet time in microseconds per packet
\param flags flags to control behaviour
\param crypto_key optional crypto key
+ \param timer_name timer interface to use
\param err a pointer to resolve error messages
\param pool a memory pool to use for the session
\return the new RTP session or NULL on failure
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Wed Oct 18 18:57:35 2006
@@ -659,6 +659,7 @@
SWITCH_EVENT_MESSAGE,
SWITCH_EVENT_PRESENCE_IN,
SWITCH_EVENT_PRESENCE_OUT,
+ SWITCH_EVENT_ROSTER,
SWITCH_EVENT_CODEC,
SWITCH_EVENT_BACKGROUND_JOB,
SWITCH_EVENT_ALL
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Wed Oct 18 18:57:35 2006
@@ -34,8 +34,8 @@
#define DL_CAND_WAIT 10000000
#define DL_CAND_INITIAL_WAIT 2000000
+#define JINGLE_KEY 1
-
#define DL_EVENT_LOGIN_SUCCESS "dingaling::login_success"
#define DL_EVENT_LOGIN_FAILURE "dingaling::login_failure"
#define DL_EVENT_CONNECTED "dingaling::connected"
@@ -44,6 +44,13 @@
static switch_memory_pool_t *module_pool = NULL;
+static char sub_sql[] =
+"CREATE TABLE subscriptions (\n"
+" sub_from VARCHAR(255),\n"
+" sub_to VARCHAR(255)\n"
+");\n";
+
+
typedef enum {
TFLAG_IO = (1 << 0),
TFLAG_INBOUND = (1 << 1),
@@ -104,6 +111,8 @@
char *exten;
char *context;
char *timer_name;
+ char *dbname;
+ switch_mutex_t *mutex;
ldl_handle_t *handle;
uint32_t flags;
uint32_t user_flags;
@@ -173,11 +182,207 @@
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
-static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsession, ldl_signal_t signal, char *from, char *subject, char *msg);
+static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsession, ldl_signal_t signal, char *to, char *from, char *subject, char *msg);
static ldl_status handle_response(ldl_handle_t *handle, char *id);
static switch_status_t load_config(void);
+static int sub_callback(void *pArg, int argc, char **argv, char **columnNames)
+{
+ struct mdl_profile *profile = (struct mdl_profile *) pArg;
+
+ char *sub_from = argv[0];
+ char *sub_to = argv[1];
+ char *type = argv[2];
+ char *show = argv[3];
+
+ if (switch_strlen_zero(type)) {
+ type = NULL;
+ } else if (!strcasecmp(type, "unavailable")) {
+ show = NULL;
+ }
+
+
+ ldl_handle_send_presence(profile->handle, sub_to, sub_from, type, show);
+
+ return 0;
+}
+
+static int rost_callback(void *pArg, int argc, char **argv, char **columnNames)
+{
+ struct mdl_profile *profile = (struct mdl_profile *) pArg;
+
+ char *sub_from = argv[0];
+ char *sub_to = argv[1];
+ char *show = argv[2];
+
+
+ ldl_handle_send_presence(profile->handle, sub_to, sub_from, NULL, show);
+
+ return 0;
+}
+
+static void pres_event_handler(switch_event_t *event)
+{
+ struct mdl_profile *profile = NULL;
+ switch_hash_index_t *hi;
+ void *val;
+ char *from = switch_event_get_header(event, "from");
+ char *status= switch_event_get_header(event, "status");
+ char *show= switch_event_get_header(event, "show");
+ char *type = NULL;
+ char *sql;
+ switch_core_db_t *db;
+ char *p;
+
+ if (event->key == JINGLE_KEY) {
+ return;
+ }
+
+ if (status && !strcasecmp(status, "n/a")) {
+ status = show;
+ if (status && !strcasecmp(status, "n/a")) {
+ status = NULL;
+ }
+ }
+
+
+
+ switch(event->event_id) {
+ case SWITCH_EVENT_PRESENCE_IN:
+ if (!status) {
+ status = "Available";
+ }
+ break;
+ case SWITCH_EVENT_PRESENCE_OUT:
+ type = "unavailable";
+ break;
+ default:
+ break;
+ }
+
+
+
+ if ((p = strchr(from, '/'))) {
+ *p = '\0';
+ }
+
+ sql = switch_core_db_mprintf("select *,'%q','%q' from subscriptions where sub_to='%q'", type ? type : "", status ? status : "unavailable", from);
+ for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ switch_hash_this(hi, NULL, NULL, &val);
+ profile = (struct mdl_profile *) val;
+ char *errmsg;
+
+ if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
+ continue;
+ }
+
+
+ if (sql) {
+ if (!(db = switch_core_db_open_file(profile->dbname))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
+ continue;
+ }
+ switch_mutex_lock(profile->mutex);
+ switch_core_db_exec(db, sql, sub_callback, profile, &errmsg);
+ switch_mutex_unlock(profile->mutex);
+ switch_core_db_close(db);
+ }
+
+
+ }
+
+ switch_safe_free(sql);
+}
+
+static void chat_event_handler(switch_event_t *event)
+{
+ char *from = switch_event_get_header(event, "from");
+ char *to = switch_event_get_header(event, "to");
+ char *body = switch_event_get_body(event);
+ char *user, *host, *f_user, *f_host = NULL;
+ struct mdl_profile *profile = NULL;
+
+ if (from && (f_user = strdup(from))) {
+ if ((f_host = strchr(f_user, '@'))) {
+ *f_host++ = '\0';
+ }
+ }
+
+ if (to && (user = strdup(to))) {
+ if ((host = strchr(user, '@'))) {
+ *host++ = '\0';
+ }
+
+ if (f_host && (profile = switch_core_hash_find(globals.profile_hash, f_host))) {
+ ldl_handle_send_msg(profile->handle, from, to, NULL, body);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Profile %s\n", f_host ? f_host : "NULL");
+ return;
+ }
+
+ switch_safe_free(f_host);
+ free(user);
+ }
+
+}
+
+
+static void roster_event_handler(switch_event_t *event)
+{
+ char *status= switch_event_get_header(event, "status");
+ char *show= switch_event_get_header(event, "show");
+ char *event_type = switch_event_get_header(event, "event_type");
+ struct mdl_profile *profile = NULL;
+ switch_hash_index_t *hi;
+ void *val;
+ char *sql;
+ switch_core_db_t *db;
+
+ if (event->key == JINGLE_KEY) {
+ return;
+ }
+
+ if (status && !strcasecmp(status, "n/a")) {
+ status = show;
+ if (status && !strcasecmp(status, "n/a")) {
+ status = NULL;
+ }
+ }
+
+ if (switch_strlen_zero(event_type)) {
+ event_type="presence";
+ }
+
+ sql = switch_core_db_mprintf("select *,'%q' from subscriptions", show ? show : "unavilable");
+
+ for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ switch_hash_this(hi, NULL, NULL, &val);
+ profile = (struct mdl_profile *) val;
+ char *errmsg;
+
+ if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
+ continue;
+ }
+
+
+ if (sql) {
+ if (!(db = switch_core_db_open_file(profile->dbname))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
+ continue;
+ }
+ switch_mutex_lock(profile->mutex);
+ switch_core_db_exec(db, sql, rost_callback, profile, &errmsg);
+ switch_mutex_unlock(profile->mutex);
+ switch_core_db_close(db);
+ }
+
+ }
+
+ switch_safe_free(sql);
+
+}
+
static void terminate_session(switch_core_session_t **session, int line, switch_call_cause_t cause)
{
if (*session) {
@@ -645,7 +850,7 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
-
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
return SWITCH_STATUS_SUCCESS;
@@ -1079,6 +1284,7 @@
char sess_id[11] = "";
char *dnis = NULL;
char workspace[1024] = "";
+ char *p, *u, ubuf[512] = "", *user = NULL;;
switch_copy_string(workspace, outbound_profile->destination_number, sizeof(workspace));
profile_name = workspace;
@@ -1094,13 +1300,23 @@
*dnis++ = '\0';
}
+ if ((p = strchr(profile_name, '@'))) {
+ *p++ = '\0';
+ u = profile_name;
+ profile_name = p;
+ snprintf(ubuf, sizeof(ubuf), "%s@%s/talk", u, profile_name);
+ user = ubuf;
+ } else {
+ user = mdl_profile->login;
+ }
+
if ((mdl_profile = switch_core_hash_find(globals.profile_hash, profile_name))) {
if (!ldl_handle_ready(mdl_profile->handle)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! we are not logged in yet!\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
return SWITCH_STATUS_GENERR;
}
- if (!(full_id = ldl_handle_probe(mdl_profile->handle, callto, idbuf, sizeof(idbuf)))) {
+ if (!(full_id = ldl_handle_probe(mdl_profile->handle, callto, user, idbuf, sizeof(idbuf)))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unknown Recipient!\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
return SWITCH_STATUS_GENERR;
@@ -1151,7 +1367,7 @@
switch_stun_random_string(sess_id, 10, "0123456789");
- ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, mdl_profile->login);
+ ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user);
tech_pvt->profile = mdl_profile;
ldl_session_set_private(dlsession, *new_session);
ldl_session_set_value(dlsession, "dnis", dnis);
@@ -1195,7 +1411,27 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!", DL_EVENT_CONNECTED);
return SWITCH_STATUS_GENERR;
}
+
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_IN, SWITCH_EVENT_SUBCLASS_ANY, pres_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_OUT, SWITCH_EVENT_SUBCLASS_ANY, pres_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_ROSTER, SWITCH_EVENT_SUBCLASS_ANY, roster_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_MESSAGE, SWITCH_EVENT_SUBCLASS_ANY, chat_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+
/* connect my internal structure to the blank pointer passed to me */
*module_interface = &channel_module_interface;
@@ -1323,6 +1559,25 @@
if (switch_true(val)) {
profile->user_flags |= LDL_FLAG_TLS;
}
+ } else if (!strcasecmp(var, "component")) {
+ if (switch_true(val)) {
+ char dbname[256];
+ switch_core_db_t *db;
+
+ profile->user_flags |= LDL_FLAG_COMPONENT;
+ switch_mutex_init(&profile->mutex, SWITCH_MUTEX_NESTED, module_pool);
+ snprintf(dbname, sizeof(dbname), "dingaling_%s", profile->name);
+ profile->dbname = switch_core_strdup(module_pool, dbname);
+
+ if ((db = switch_core_db_open_file(profile->dbname))) {
+ switch_core_db_test_reactive(db, "select * from subscriptions", sub_sql);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open SQL Database!\n");
+ return;
+ }
+ switch_core_db_close(db);
+
+ }
} else if (!strcasecmp(var, "sasl")) {
if (!strcasecmp(val, "plain")) {
profile->user_flags |= LDL_FLAG_SASL_PLAIN;
@@ -1510,8 +1765,29 @@
}
+static void execute_sql(char *dbname, char *sql, switch_mutex_t *mutex)
+{
+ switch_core_db_t *db;
-static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsession, ldl_signal_t signal, char *from, char *subject, char *msg)
+ if (mutex) {
+ switch_mutex_lock(mutex);
+ }
+
+ if (!(db = switch_core_db_open_file(dbname))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", dbname);
+ goto end;
+ }
+
+ switch_core_db_persistant_execute(db, sql, 25);
+ switch_core_db_close(db);
+
+ end:
+ if (mutex) {
+ switch_mutex_unlock(mutex);
+ }
+}
+
+static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsession, ldl_signal_t signal, char *to, char *from, char *subject, char *msg)
{
struct mdl_profile *profile = NULL;
switch_core_session_t *session = NULL;
@@ -1519,7 +1795,8 @@
struct private_object *tech_pvt = NULL;
switch_event_t *event;
ldl_status status = LDL_STATUS_SUCCESS;
-
+ char *sql;
+
assert(handle != NULL);
if (!(profile = ldl_handle_get_private(handle))) {
@@ -1530,6 +1807,32 @@
if (!dlsession) {
switch(signal) {
+ case LDL_SIGNAL_UNSUBSCRIBE:
+ if ((profile->user_flags & LDL_FLAG_COMPONENT)) {
+
+ if ((sql = switch_core_db_mprintf("delete from subscriptions where sub_from='%q' and sub_to='%q';", from, to))) {
+ execute_sql(profile->dbname, sql, profile->mutex);
+ switch_core_db_free(sql);
+ }
+ }
+ break;
+
+ case LDL_SIGNAL_SUBSCRIBE:
+ if ((profile->user_flags & LDL_FLAG_COMPONENT)) {
+
+ if ((sql = switch_core_db_mprintf("insert into subscriptions values('%q','%q')", from, to))) {
+ execute_sql(profile->dbname, sql, profile->mutex);
+ switch_core_db_free(sql);
+ }
+ }
+ break;
+ case LDL_SIGNAL_ROSTER:
+ if (switch_event_create(&event, SWITCH_EVENT_ROSTER) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "jingle");
+ //event->key = JINGLE_KEY;
+ switch_event_fire(&event);
+ }
+ break;
case LDL_SIGNAL_PRESENCE_IN:
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "jingle");
@@ -1537,14 +1840,17 @@
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", subject);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "show", "%s", msg);
+ //event->key = JINGLE_KEY;
switch_event_fire(&event);
}
+
break;
case LDL_SIGNAL_PRESENCE_OUT:
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "jingle");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
+ //event->key = JINGLE_KEY;
switch_event_fire(&event);
}
break;
@@ -1553,13 +1859,15 @@
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "jingle");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", "%s", subject);
+ event->key = JINGLE_KEY;
if (msg) {
switch_event_add_body(event, msg);
}
if (profile->auto_reply) {
- ldl_handle_send_msg(handle, from, "", profile->auto_reply);
+ ldl_handle_send_msg(handle, (profile->user_flags & LDL_FLAG_COMPONENT) ? to : profile->login, from, "", profile->auto_reply);
}
switch_event_fire(&event);
@@ -1666,6 +1974,7 @@
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "jingle");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", "%s", subject);
if (msg) {
switch_event_add_body(event, msg);
@@ -1803,6 +2112,7 @@
char *context;
char *cid_name;
char *cid_num;
+ char *t, *them = NULL;
memset(payloads, 0, sizeof(payloads));
@@ -1814,6 +2124,18 @@
if (!(exten = ldl_session_get_value(dlsession, "dnis"))) {
exten = profile->exten;
+ if (!strcmp(exten, "_auto_")) {
+ if ((t = ldl_session_get_callee(dlsession))) {
+ if ((them = strdup(t))) {
+ char *p;
+ if ((p = strchr(them, '/'))) {
+ *p = '\0';
+ }
+ exten = them;
+ }
+ }
+
+ }
}
if (!(context = ldl_session_get_value(dlsession, "context"))) {
@@ -1851,6 +2173,8 @@
}
}
+ switch_safe_free(them);
+
if (lanaddr) {
switch_set_flag_locked(tech_pvt, TFLAG_LANADDR);
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Oct 18 18:57:35 2006
@@ -24,6 +24,7 @@
* Contributor(s):
*
* Anthony Minessale II <anthmct(a)yahoo.com>
+ * Ken Rice, Asteria Solutions Group, Inc <ken(a)asteriasgi.com>
*
*
* mod_sofia.c -- SOFIA SIP Endpoint
@@ -66,8 +67,8 @@
#define MULTICAST_EVENT "multicast::event"
#define SOFIA_REPLACES_HEADER "_sofia_replaces_"
#define SOFIA_USER_AGENT "FreeSWITCH(mod_sofia)"
+#define SIP_KEY 2
-
#include <sofia-sip/nua.h>
#include <sofia-sip/sip_status.h>
#include <sofia-sip/sdp.h>
@@ -251,6 +252,8 @@
outbound_reg_t *registrations;
sip_presence_t *presence;
su_home_t *home;
+ switch_hash_t *profile_hash;
+ switch_hash_t *chat_hash;
};
@@ -296,6 +299,10 @@
char *xferto;
char *kick;
char *origin;
+ char *hash_key;
+ char *chat_from;
+ char *chat_to;
+ char *e_dest;
unsigned long rm_rate;
switch_payload_t pt;
switch_mutex_t *flag_mutex;
@@ -530,7 +537,6 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", dbname);
goto end;
}
-
switch_core_db_persistant_execute(db, sql, 25);
switch_core_db_close(db);
@@ -840,12 +846,57 @@
return SWITCH_STATUS_SUCCESS;
}
+char *encode_name(char *s)
+{
+ char *ss, *sret;
+ uint32_t len;
+ char *at, *resource;
+ char *user;
+
+ if (!strchr(s, '/') && !strchr(s, '@')) {
+ return NULL;
+ }
+
+ if (!(ss = strdup(s))) {
+ return NULL;
+ }
+
+ user = ss;
+
+ resource = strchr(user, '/');
+ at = strchr(user, '@');
+
+ if (resource) {
+ *resource++ = '\0';
+ }
+
+ len = strlen(user) + 25;
+
+ if (at) {
+ *at++ = '\0';
+ }
+
+ if (!(sret = (char *) malloc(len))) {
+ return NULL;
+ }
+
+ memset(sret, 0, len);
+ snprintf(sret, len, "jingle+%s+%s", user, at);
+
+ free(ss);
+
+
+ return sret;
+}
+
static void do_invite(switch_core_session_t *session)
{
char rpid[1024];
private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
switch_caller_profile_t *caller_profile;
+ char *cid_name, *cid_num_p = NULL, *cid_num;
+ char *e_dest = NULL;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -855,16 +906,22 @@
caller_profile = switch_channel_get_caller_profile(channel);
+ cid_name = (char *) caller_profile->caller_id_name;
+ cid_num = (char *) caller_profile->caller_id_number;
+ if ((cid_num_p = encode_name(cid_num))) {
+ cid_num = cid_num_p;
+ }
if ((tech_pvt->from_str = switch_core_db_mprintf("\"%s\" <sip:%s@%s>",
- (char *) caller_profile->caller_id_name,
- (char *) caller_profile->caller_id_number,
+ cid_name,
+ cid_num,
tech_pvt->profile->sipip
))) {
char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
+
tech_choose_port(tech_pvt);
set_local_sdp(tech_pvt);
@@ -899,6 +956,23 @@
}
+
+ if ((e_dest = strdup(tech_pvt->e_dest))) {
+ char *user = e_dest, *host = NULL;
+ char hash_key[256] = "";
+
+ if ((host = strchr(user, '@'))) {
+ *host++ = '\0';
+ }
+ snprintf(hash_key, sizeof(hash_key), "%s%s%s", user, host, cid_num);
+
+ tech_pvt->chat_from = tech_pvt->from_str;
+ tech_pvt->chat_to = tech_pvt->dest;
+ tech_pvt->hash_key = switch_core_session_strdup(tech_pvt->session, hash_key);
+ switch_core_hash_insert(tech_pvt->profile->chat_hash, tech_pvt->hash_key, tech_pvt);
+
+ }
+
nua_invite(tech_pvt->nh,
TAG_IF(rpid, SIPTAG_HEADER_STR(rpid)),
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
@@ -910,6 +984,8 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
}
+ switch_safe_free(cid_num_p);
+
}
@@ -982,6 +1058,7 @@
tech_pvt->read_frame.buflen = SWITCH_RTP_MAX_BUF_LEN;
+
switch_channel_set_variable(channel, "endpoint_disposition", "INIT");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SOFIA INIT\n");
@@ -1113,6 +1190,9 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel %s hanging up, cause: %s\n",
switch_channel_get_name(channel), switch_channel_cause2str(cause), sip_cause);
+ if (tech_pvt->hash_key) {
+ switch_core_hash_delete(tech_pvt->profile->chat_hash, tech_pvt->hash_key);
+ }
if (tech_pvt->kick && (asession = switch_core_session_locate(tech_pvt->kick))) {
switch_channel_t *a_channel = switch_core_session_get_channel(asession);
@@ -1714,6 +1794,42 @@
return SWITCH_STATUS_SUCCESS;
}
+static switch_status_t sofia_receive_event(switch_core_session_t *session, switch_event_t *event)
+{
+ switch_channel_t *channel;
+ struct private_object *tech_pvt;
+ char *body;
+ nua_handle_t *msg_nh;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ tech_pvt = switch_core_session_get_private(session);
+ assert(tech_pvt != NULL);
+
+
+ if (!(body = switch_event_get_body(event))) {
+ body = "";
+ }
+
+ if (tech_pvt->hash_key) {
+ msg_nh = nua_handle(tech_pvt->profile->nua, NULL,
+ SIPTAG_FROM_STR(tech_pvt->chat_from),
+ NUTAG_URL(tech_pvt->chat_to),
+ SIPTAG_TO_STR(tech_pvt->chat_to),
+ SIPTAG_CONTACT_STR(tech_pvt->profile->url),
+ TAG_END());
+
+
+ nua_message(msg_nh,
+ SIPTAG_CONTENT_TYPE_STR("text/html"),
+ SIPTAG_PAYLOAD_STR(body),
+ TAG_END());
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
static const switch_io_routines_t sofia_io_routines = {
/*.outgoing_channel */ sofia_outgoing_channel,
/*.answer_channel */ sofia_answer_channel,
@@ -1723,7 +1839,8 @@
/*.waitfor_read */ sofia_waitfor_read,
/*.waitfor_read */ sofia_waitfor_write,
/*.send_dtmf*/ sofia_send_dtmf,
- /*.receive_message*/ sofia_receive_message
+ /*.receive_message*/ sofia_receive_message,
+ /*.receive_event*/ sofia_receive_event
};
static const switch_state_handler_table_t sofia_event_handlers = {
@@ -1823,6 +1940,8 @@
if ((host = strchr(dest, '%'))) {
char buf[128];
+ *host = '@';
+ tech_pvt->e_dest = switch_core_session_strdup(nsession, dest);
*host++ = '\0';
if (find_reg_url(profile, dest, host, buf, sizeof(buf))) {
tech_pvt->dest = switch_core_session_strdup(nsession, buf);
@@ -1976,6 +2095,57 @@
}
}
+
+static void set_hash_key(char *hash_key, int32_t len, sip_t const *sip)
+{
+
+ snprintf(hash_key, len, "%s%s%s",
+ (char *) sip->sip_from->a_url->url_user,
+ (char *) sip->sip_from->a_url->url_host,
+ (char *) sip->sip_to->a_url->url_user
+ );
+
+
+#if 0
+ /* nicer one we cant use in both directions >=0 */
+ snprintf(hash_key, len, "%s%s%s%s%s%s",
+ (char *) sip->sip_to->a_url->url_user,
+ (char *) sip->sip_to->a_url->url_host,
+ (char *) sip->sip_to->a_url->url_params,
+
+ (char *) sip->sip_from->a_url->url_user,
+ (char *) sip->sip_from->a_url->url_host,
+ (char *) sip->sip_from->a_url->url_params
+ );
+#endif
+
+}
+
+static void set_chat_hash(private_object_t *tech_pvt, sip_t const *sip)
+{
+ char hash_key[256] = "";
+ char buf[512];
+
+ if (!sip || tech_pvt->hash_key) {
+ return;
+ }
+
+ if (find_reg_url(tech_pvt->profile, (char *) sip->sip_from->a_url->url_user, (char *) sip->sip_from->a_url->url_host, buf, sizeof(buf))) {
+ tech_pvt->chat_from = sip_header_as_string(tech_pvt->home, (void *)sip->sip_to);
+ tech_pvt->chat_to = switch_core_session_strdup(tech_pvt->session, buf);
+ set_hash_key(hash_key, sizeof(hash_key), sip);
+ } else {
+ return;
+ }
+
+
+
+ tech_pvt->hash_key = switch_core_session_strdup(tech_pvt->session, hash_key);
+ switch_core_hash_insert(tech_pvt->profile->chat_hash, tech_pvt->hash_key, tech_pvt);
+
+}
+
+
static void sip_i_message(int status,
char const *phrase,
nua_t *nua,
@@ -1995,7 +2165,7 @@
sip_subject_t const *sip_subject = sip->sip_subject;
sip_payload_t *payload = sip->sip_payload;
const char *subject = "n/a";
- char *msg = "";
+ char *msg = NULL;
if (strstr((char*)sip->sip_content_type->c_subtype, "composing")) {
return;
@@ -2020,34 +2190,71 @@
}
if (nh) {
- char *message = "<b>hello world</b>";
- char buf[256] = "";
+ char hash_key[512];
+ private_object_t *tech_pvt;
+ switch_channel_t *channel;
+ switch_event_t *event;
+ char *to_addr;
+ char *from_addr;
+ char *p;
- if (find_reg_url(profile, from_user, from_host, buf, sizeof(buf))) {
- nua_handle_t *msg_nh;
+ if ((p=strchr(to_user, '+'))) {
+
+ if ((to_addr = strdup(++p))) {
+ p = strchr(to_addr, '+');
+ *p = '@';
+ }
+
+ } else {
+ to_addr = switch_core_db_mprintf("%s@%s", to_user, to_host);
+ }
+ from_addr = switch_core_db_mprintf("%s@%s", from_user, from_host);
- msg_nh = nua_handle(profile->nua, NULL,
- SIPTAG_FROM(sip->sip_to),
- SIPTAG_TO_STR(buf),
- SIPTAG_CONTACT_STR(profile->url),
- TAG_END());
+ set_hash_key(hash_key, sizeof(hash_key), sip);
+ if ((tech_pvt = (private_object_t *) switch_core_hash_find(profile->chat_hash, hash_key))) {
+ channel = switch_core_session_get_channel(tech_pvt->session);
+ if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", tech_pvt->hash_key);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to_addr);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
+ event->key = SIP_KEY;
+ if (msg) {
+ switch_event_add_body(event, msg);
+ }
+ if (switch_core_session_queue_event(tech_pvt->session, &event) != SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
+ switch_event_fire(&event);
+ }
+ }
+ } else {
+ if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from_addr);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to_addr);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
+ event->key = SIP_KEY;
+ if (msg) {
+ switch_event_add_body(event, msg);
+ }
- nua_message(msg_nh,
- SIPTAG_CONTENT_TYPE_STR("text/html"),
- TAG_IF(message,
- SIPTAG_PAYLOAD_STR(message)),
- TAG_END());
+ switch_event_fire(&event);
+ }
+
}
-
- }
- //printf("==================================\nFrom: %s@%s\nSubject: %s\n\n%s\n\n",from_user,from_host,subject,msg);
+ switch_safe_free(to_addr);
+ switch_safe_free(from_addr);
+ }
+
}
-
}
+
static void sip_i_state(int status,
char const *phrase,
nua_t *nua,
@@ -2089,6 +2296,8 @@
tech_pvt->nh = nh;
+
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel %s entering state [%s]\n",
switch_channel_get_name(channel),
nua_callstate_name(ss_state));
@@ -2097,6 +2306,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Remote SDP:\n%s\n", r_sdp);
tech_pvt->remote_sdp_str = switch_core_session_strdup(session, (char *)r_sdp);
switch_channel_set_variable(channel, SWITCH_R_SDP_VARIABLE, (char *) r_sdp);
+
}
}
@@ -2201,7 +2411,6 @@
if (match) {
nua_handle_t *bnh;
sip_replaces_t *replaces;
-
switch_channel_set_variable(channel, "endpoint_disposition", "RECEIVED");
switch_channel_set_state(channel, CS_INIT);
switch_set_flag_locked(tech_pvt, TFLAG_READY);
@@ -2447,14 +2656,22 @@
uint8_t stale = 0, ret = 0, forbidden = 0;
auth_res_t auth_res;
long exptime = 60;
+ switch_event_t *event;
+
+
+
if (sip->sip_contact) {
+ char *port = (char *) contact->m_url->url_port;
+ if (!port) {
+ port = "5060";
+ }
if (contact->m_url->url_params) {
snprintf(contact_str, sizeof(contact_str), "sip:%s@%s:%s;%s",
- contact->m_url->url_user, contact->m_url->url_host, contact->m_url->url_port, contact->m_url->url_params);
+ contact->m_url->url_user, contact->m_url->url_host, port, contact->m_url->url_params);
} else {
snprintf(contact_str, sizeof(contact_str), "sip:%s@%s:%s",
- contact->m_url->url_user, contact->m_url->url_host, contact->m_url->url_port);
+ contact->m_url->url_user, contact->m_url->url_host, port);
}
}
@@ -2600,7 +2817,6 @@
}
-
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_REGISTER) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile-name", "%s", profile->name);
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from-user", "%s", from_user);
@@ -2623,6 +2839,38 @@
(long)exptime
);
+
+
+ if (switch_event_create(&event, SWITCH_EVENT_ROSTER) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+ event->key = SIP_KEY;
+ switch_event_fire(&event);
+ }
+
+ if (exptime) {
+ if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
+
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Registered");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "show", "Registered");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+ switch_event_fire(&event);
+ }
+ } else {
+ if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) {
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
+
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "unavailable");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "show", "unavailable");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
+ switch_event_fire(&event);
+ }
+ }
+
if (regtype == REG_REGISTER) {
nua_respond(nh, SIP_200_OK, SIPTAG_CONTACT(contact),
NUTAG_WITH_THIS(nua),
@@ -2667,14 +2915,19 @@
}
if (contact) {
+ char *port = (char *) contact->m_url->url_port;
+ if (!port) {
+ port = "5060";
+ }
+
if (contact->m_url->url_params) {
contact_str = switch_core_db_mprintf("sip:%s@%s:%s;%s",
contact->m_url->url_user,
- contact->m_url->url_host, contact->m_url->url_port, contact->m_url->url_params);
+ contact->m_url->url_host, port, contact->m_url->url_params);
} else {
contact_str = switch_core_db_mprintf("sip:%s@%s:%s",
contact->m_url->url_user,
- contact->m_url->url_host, contact->m_url->url_port);
+ contact->m_url->url_host, port);
}
}
@@ -2737,9 +2990,7 @@
switch_core_db_free(sql);
}
-
-
-
+
nua_respond(nh, SIP_202_ACCEPTED,
SIPTAG_SUBSCRIPTION_STATE_STR("active;expires=3600"),
SIPTAG_FROM(sip->sip_to),
@@ -3095,8 +3346,9 @@
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", status_txt);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "show", "%s", note_txt);
+
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "%s", note_txt);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "show", "%s", status_txt);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "%s", event_type);
switch_event_fire(&event);
}
@@ -3105,6 +3357,7 @@
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", from_user, from_host);
+
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "%s", event_type);
switch_event_fire(&event);
}
@@ -3213,11 +3466,14 @@
return;
}
+
attach_private(session, profile, tech_pvt, username);
channel = switch_core_session_get_channel(session);
switch_channel_set_variable(channel, "endpoint_disposition", "INBOUND CALL");
+ set_chat_hash(tech_pvt, sip);
+
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
(char *) from->a_url->url_user,
profile->dialplan,
@@ -3743,6 +3999,11 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Creating presence for %s\n", profile->url);
}
+ switch_mutex_lock(globals.hash_mutex);
+ switch_core_hash_insert(globals.profile_hash, profile->name, profile);
+ switch_mutex_unlock(globals.hash_mutex);
+
+
while(globals.running == 1) {
if (++ireg_loops >= IREG_SECONDS) {
check_expire(profile, time(NULL));
@@ -3784,9 +4045,6 @@
switch_threadattr_create(&thd_attr, profile->pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
- switch_mutex_lock(globals.hash_mutex);
- switch_core_hash_insert(globals.profile_hash, profile->name, profile);
- switch_mutex_unlock(globals.hash_mutex);
switch_thread_create(&thread, thd_attr, profile_thread_run, profile, profile->pool);
}
@@ -3851,6 +4109,7 @@
profile->name = switch_core_strdup(profile->pool, xprofilename);
snprintf(url, sizeof(url), "sofia_reg_%s", xprofilename);
profile->dbname = switch_core_strdup(profile->pool, url);
+ switch_core_hash_init(&profile->chat_hash, profile->pool);
profile->dtmf_duration = 100;
profile->codec_ms = 20;
@@ -3970,7 +4229,7 @@
profile->sipdomain = switch_core_strdup(profile->pool, profile->sipip);
}
- snprintf(url, sizeof(url), "sip:%s@%s:%d", profile->name, profile->sipip, profile->sip_port);
+ snprintf(url, sizeof(url), "sip:mod_sofia@%s:%d", profile->sipip, profile->sip_port);
profile->url = switch_core_strdup(profile->pool, url);
}
if (profile) {
@@ -4044,6 +4303,7 @@
}
oreg->next = profile->registrations;
profile->registrations = oreg;
+
}
}
}
@@ -4192,9 +4452,63 @@
return 0;
}
-static void msg_event_handler(switch_event_t *event)
+static void chat_event_handler(switch_event_t *event)
{
+ char *from = switch_event_get_header(event, "from");
+ char *to = switch_event_get_header(event, "to");
+ char *body = switch_event_get_body(event);
+ char buf[256];
+ char *user, *host;
sofia_profile_t *profile;
+ char *from_p = NULL, *from_pp = NULL;
+
+ if (event->key == SIP_KEY) {
+ return;
+ }
+
+ if (to && (user = strdup(to))) {
+ if ((host = strchr(user, '@'))) {
+ *host++ = '\0';
+ }
+
+ if (!host || !(profile = (sofia_profile_t *) switch_core_hash_find(globals.profile_hash, host))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Profile %s\n", host ? host : "NULL");
+ return;
+ }
+
+ if (find_reg_url(profile, user, host, buf, sizeof(buf))) {
+ nua_handle_t *msg_nh;
+
+ if ((from_p = encode_name(from))) {
+ from_pp = switch_core_db_mprintf("\"%s\" <sip:%s@%s>", from, from_p, host);
+ from = from_pp;
+ }
+
+ msg_nh = nua_handle(profile->nua, NULL,
+ SIPTAG_FROM_STR(from),
+ NUTAG_URL(buf),
+ SIPTAG_TO_STR(buf),
+ SIPTAG_CONTACT_STR(profile->url),
+ TAG_END());
+
+
+ nua_message(msg_nh,
+ SIPTAG_CONTENT_TYPE_STR("text/html"),
+ SIPTAG_PAYLOAD_STR(body),
+ TAG_END());
+
+ }
+ switch_safe_free(from_p);
+ switch_safe_free(from_pp);
+ free(user);
+ }
+
+
+}
+
+static void pres_event_handler(switch_event_t *event)
+{
+ sofia_profile_t *profile;
switch_hash_index_t *hi;
void *val;
char *from = switch_event_get_header(event, "from");
@@ -4207,6 +4521,36 @@
char *resource;
switch_core_db_t *db;
+ if (event->key == SIP_KEY) {
+ return;
+ }
+
+ if (event->event_id == SWITCH_EVENT_ROSTER) {
+ sql = switch_core_db_mprintf("select 1,'%q',* from sip_subscriptions where event='presence'", status ? status : "Available");
+
+ for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ switch_hash_this(hi, NULL, NULL, &val);
+ profile = (sofia_profile_t *) val;
+ if (!(profile->pflags & PFLAG_PRESENCE)) {
+ continue;
+ }
+
+ if (sql) {
+ if (!(db = switch_core_db_open_file(profile->dbname))) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", profile->dbname);
+ continue;
+ }
+ switch_mutex_lock(profile->ireg_mutex);
+ switch_core_db_exec(db, sql, sub_callback, profile, &errmsg);
+ switch_mutex_unlock(profile->ireg_mutex);
+ switch_core_db_close(db);
+ }
+
+ }
+
+ return;
+ }
+
if (status && !strcasecmp(status, "n/a")) {
status = show;
if (status && !strcasecmp(status, "n/a")) {
@@ -4237,6 +4581,8 @@
return;
}
+
+
switch(event->event_id) {
case SWITCH_EVENT_PRESENCE_IN:
if (!status) {
@@ -4308,17 +4654,22 @@
config_sofia(0);
- if (switch_event_bind((char *) modname, SWITCH_EVENT_MESSAGE, SWITCH_EVENT_SUBCLASS_ANY, msg_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_MESSAGE, SWITCH_EVENT_SUBCLASS_ANY, chat_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_IN, SWITCH_EVENT_SUBCLASS_ANY, msg_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_IN, SWITCH_EVENT_SUBCLASS_ANY, pres_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_OUT, SWITCH_EVENT_SUBCLASS_ANY, msg_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_OUT, SWITCH_EVENT_SUBCLASS_ANY, pres_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+
+ if (switch_event_bind((char *) modname, SWITCH_EVENT_ROSTER, SWITCH_EVENT_SUBCLASS_ANY, pres_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Wed Oct 18 18:57:35 2006
@@ -1315,19 +1315,19 @@
if (endpoint_interface->io_routines->outgoing_channel) {
if (session) {
- char *ecaller_id_name = NULL, *ecaller_id_number = NULL;
channel = switch_core_session_get_channel(session);
+ if (caller_profile) {
+ char *ecaller_id_name = NULL, *ecaller_id_number = NULL;
+
+ ecaller_id_name = switch_channel_get_variable(channel, "effective_caller_id_name");
+ ecaller_id_number = switch_channel_get_variable(channel, "effective_caller_id_number");
- ecaller_id_name = switch_channel_get_variable(channel, "effective_caller_id_name");
- ecaller_id_number = switch_channel_get_variable(channel, "effective_caller_id_number");
-
- if (ecaller_id_name || ecaller_id_number) {
- if (caller_profile) {
+ if (ecaller_id_name || ecaller_id_number) {
outgoing_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
caller_profile->username,
caller_profile->dialplan,
- ecaller_id_name ? ecaller_id_name : caller_profile->caller_id_name,
- ecaller_id_number ? ecaller_id_number : caller_profile->caller_id_number,
+ ecaller_id_name,
+ ecaller_id_number,
caller_profile->network_addr,
caller_profile->ani,
caller_profile->aniii,
@@ -1336,8 +1336,11 @@
caller_profile->context,
caller_profile->destination_number);
outgoing_profile->flags = caller_profile->flags;
- }
+ }
}
+ if (!outgoing_profile) {
+ outgoing_profile = switch_channel_get_caller_profile(channel);
+ }
}
if ((status = endpoint_interface->io_routines->outgoing_channel(session,
@@ -1361,14 +1364,13 @@
if (*new_session) {
switch_caller_profile_t *profile = NULL, *peer_profile = NULL, *cloned_profile = NULL;
- switch_channel_t *peer_channel = NULL;
switch_event_t *event;
- switch_channel_t *new_channel = switch_core_session_get_channel(*new_session);
+ switch_channel_t *peer_channel = switch_core_session_get_channel(*new_session);
if (session && channel) {
profile = switch_channel_get_caller_profile(channel);
}
- if ((peer_channel = switch_core_session_get_channel(*new_session)) != 0) {
+ if (peer_channel) {
peer_profile = switch_channel_get_caller_profile(peer_channel);
}
@@ -1386,7 +1388,7 @@
}
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_OUTGOING) == SWITCH_STATUS_SUCCESS) {
- switch_channel_event_set_data(new_channel, event);
+ switch_channel_event_set_data(peer_channel, event);
switch_event_fire(&event);
}
}
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Wed Oct 18 18:57:35 2006
@@ -125,6 +125,7 @@
"MESSAGE",
"PRESENCE_IN",
"PRESENCE_OUT",
+ "ROSTER",
"CODEC",
"BACKGROUND_JOB",
"ALL"
@@ -586,6 +587,8 @@
if (todup->body) {
(*event)->body = DUP(todup->body);
}
+
+ (*event)->key = todup->key;
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Wed Oct 18 18:57:35 2006
@@ -1823,6 +1823,7 @@
caller_caller_profile->source,
caller_caller_profile->context,
chan_data);
+ caller_profiles[i]->flags = caller_caller_profile->flags;
pool = NULL;
} else {
if (!cid_name_override) {
1
0
Author: mikej
Date: Wed Oct 18 18:44:28 2006
New Revision: 3082
Modified:
freeswitch/trunk/libs/srtp/test/ (props changed)
Log:
svn::ignore
1
0