[Freeswitch-svn] [commit] r3382 - in freeswitch/branches/knhor/trunk: . libs/libdingaling libs/libdingaling/src libs/win32/sofia scripts src src/include src/mod/endpoints/mod_dingaling src/mod/endpoints/mod_sofia src/mod/languages/mod_python src/mod/languages/mod_spidermonkey
Freeswitch SVN
knhor at freeswitch.org
Wed Nov 15 20:38:31 EST 2006
Author: knhor
Date: Wed Nov 15 20:38:30 2006
New Revision: 3382
Added:
freeswitch/branches/knhor/trunk/scripts/mytest.py
- copied unchanged from r3381, /freeswitch/trunk/scripts/mytest.py
Modified:
freeswitch/branches/knhor/trunk/ (props changed)
freeswitch/branches/knhor/trunk/AUTHORS
freeswitch/branches/knhor/trunk/libs/libdingaling/.update
freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c
freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h
freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c
freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.h
freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj
freeswitch/branches/knhor/trunk/src/include/switch_am_config.h.in
freeswitch/branches/knhor/trunk/src/include/switch_apr.h
freeswitch/branches/knhor/trunk/src/include/switch_utils.h
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/Makefile
freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/branches/knhor/trunk/src/switch_rtp.c
freeswitch/branches/knhor/trunk/src/switch_utils.c
Log:
Merged revisions 3349-3381 via svnmerge from trunk
Modified: freeswitch/branches/knhor/trunk/AUTHORS
==============================================================================
--- freeswitch/branches/knhor/trunk/AUTHORS (original)
+++ freeswitch/branches/knhor/trunk/AUTHORS Wed Nov 15 20:38:30 2006
@@ -29,6 +29,7 @@
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.
Neal Horman <neal at wanlink dot com> - conference improvements, switch_ivr menu additions and other tweaks.
+ Johny Kadarisman <jkr888 at gmail.com> - mod_python fixups.
A big THANK YOU goes to:
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/.update
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/.update (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/.update Wed Nov 15 20:38:30 2006
@@ -1 +1 @@
-Tue Oct 24 13:51:01 CDT 2006
+Wed Nov 15 20:20:53 UTC 2006
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c Wed Nov 15 20:38:30 2006
@@ -149,6 +149,17 @@
};
+static void lowercase(char *str)
+{
+ size_t x = 0;
+
+ if (str) {
+ for (x = 0; x < strlen(str); x++) {
+ str[x] = (char)tolower((int)str[x]);
+ }
+ }
+}
+
static char *cut_path(char *in)
{
char *p, *ret = in;
@@ -682,7 +693,6 @@
char id[1024];
char *resource;
struct ldl_buffer *buffer;
- size_t x;
ldl_signal_t signal;
@@ -696,8 +706,6 @@
status = type;
}
-
-
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);
@@ -706,16 +714,12 @@
}
apr_cpystrn(id, from, sizeof(id));
+ lowercase(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);
@@ -861,8 +865,10 @@
if (!strcasecmp(iks_name(tag), "bind")) {
char *jid = iks_find_cdata(tag, "jid");
char *resource = strchr(jid, '/');
- //iks *iq, *x;
- handle->acc->resource = apr_pstrdup(handle->pool, resource);
+ if (resource) {
+ resource++;
+ handle->acc->resource = apr_pstrdup(handle->pool, resource);
+ }
handle->login = apr_pstrdup(handle->pool, jid);
#if 0
if ((iq = iks_new("iq"))) {
@@ -973,7 +979,7 @@
sha_context_t sha;
char *p;
int x;
- unsigned char digest[20];
+ unsigned char digest[20] = "";
SHA1Init(&sha);
@@ -995,9 +1001,10 @@
switch (type) {
case IKS_NODE_START:
if (handle->state == CS_NEW) {
- char secret[256];
- char hash[256];
- char handshake[512];
+ 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);
@@ -1581,6 +1588,11 @@
return handle->private_info;
}
+void *ldl_handle_get_login(ldl_handle_t *handle)
+{
+ return handle->login;
+}
+
void ldl_handle_send_presence(ldl_handle_t *handle, char *from, char *to, char *type, char *rpid, char *message)
{
do_presence(handle, from, to, type, rpid, message);
@@ -1746,7 +1758,7 @@
char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *from, char *buf, unsigned int len)
{
iks *pres, *msg;
- char *lid = NULL;
+ char *lid = NULL, *low_id = NULL;
struct ldl_buffer buffer;
apr_time_t started;
unsigned int elapsed;
@@ -1761,13 +1773,14 @@
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);
+ iks_insert_attrib(msg, "from", from);
apr_queue_push(handle->queue, msg);
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, notice);
+ iks_insert_attrib(msg, "from", from);
apr_queue_push(handle->queue, msg);
apr_queue_push(handle->queue, pres);
@@ -1792,7 +1805,12 @@
ldl_yield(1000);
}
- apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, NULL);
+ if ((low_id = strdup(id))) {
+ lowercase(id);
+ apr_hash_set(handle->probe_hash, low_id, APR_HASH_KEY_STRING, NULL);
+ free(low_id);
+ }
+
return lid;
}
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h Wed Nov 15 20:38:30 2006
@@ -356,6 +356,13 @@
void *ldl_handle_get_private(ldl_handle_t *handle);
/*!
+ \brief Get the full login of a connection handle
+ \param handle the conection handle
+ \return the requested data
+*/
+void *ldl_handle_get_login(ldl_handle_t *handle);
+
+/*!
\brief Send a message to a session
\param session the session handle
\param subject optional subject
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c Wed Nov 15 20:38:30 2006
@@ -92,12 +92,12 @@
/* Hash a single 512-bit block. This is the core of the algorithm. */
-void SHA1Transform(unsigned long state[5], unsigned char buffer[64])
+void SHA1Transform(uint32_t state[5], unsigned char buffer[64])
{
-unsigned long a, b, c, d, e;
+uint32_t a, b, c, d, e;
typedef union {
unsigned char c[64];
- unsigned long l[16];
+ uint32_t l[16];
} CHAR64LONG16;
CHAR64LONG16* block;
#ifdef SHA1HANDSOFF
@@ -161,9 +161,9 @@
/* Run your data through this. */
-void SHA1Update(sha_context_t* context, unsigned char* data, unsigned int len)
+void SHA1Update(sha_context_t* context, unsigned char* data, uint32_t len)
{
-unsigned int i, j;
+uint32_t i, j;
j = (context->count[0] >> 3) & 63;
if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
@@ -185,7 +185,7 @@
void SHA1Final(unsigned char digest[20], sha_context_t* context)
{
-unsigned long i, j;
+uint32_t i, j;
unsigned char finalcount[8];
for (i = 0; i < 8; i++) {
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.h Wed Nov 15 20:38:30 2006
@@ -41,15 +41,40 @@
}
#endif
+#undef inline
+#define inline __inline
+
+#ifndef uint32_t
+#ifdef WIN32
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+typedef __int8 int8_t;
+typedef __int16 int16_t;
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned long in_addr_t;
+#else
+#include <limits.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <inttypes.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <time.h>
+#endif
+#endif
+
typedef struct {
- unsigned long state[5];
- unsigned long count[2];
+ uint32_t state[5];
+ uint32_t count[2];
unsigned char buffer[64];
} sha_context_t;
-void SHA1Transform(unsigned long state[5], unsigned char buffer[64]);
+void SHA1Transform(uint32_t 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 SHA1Update(sha_context_t* context, unsigned char* data, uint32_t len);
void SHA1Final(unsigned char digest[20], sha_context_t* context);
#ifdef __cplusplus
Modified: freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj (original)
+++ freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj Wed Nov 15 20:38:30 2006
@@ -419,7 +419,7 @@
Name="soa"
>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\soa.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip-1.12.3.10\soa_session.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip\soa_session.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\soa_static.c"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\soa_tag.c"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\soa_tag_ref.c"></File>
@@ -433,36 +433,36 @@
Name="su headers"
Filter="su*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\htable.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\htable2.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\rbtree.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_addrinfo.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_alloc.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_alloc_stat.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_bm.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_config.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_debug.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_errno.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_localinfo.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_log.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_md5.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\htable.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\htable2.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\rbtree.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_addrinfo.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_alloc.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_alloc_stat.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_bm.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_config.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_debug.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_errno.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_localinfo.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_log.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_md5.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\su_module_debug.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_os_nw.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_os_nw.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\su_port.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_source.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_strlst.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_tag_class.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_tag_inline.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_tag_io.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_tagarg.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_time.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_types.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_uniqueid.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_vector.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\su_wait.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip-1.12.3.10\tstdef.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_source.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_strlst.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_tag_inline.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_tag_io.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_tagarg.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_time.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_types.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_uniqueid.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_vector.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\su_wait.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\su\sofia-sip\tstdef.h"></File>
</Filter>
<Filter
Name="win32 headers"
@@ -474,83 +474,83 @@
<Filter
Name="ipt headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip-1.12.3.10\base64.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip-1.12.3.10\rc4.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip-1.12.3.10\string0.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip-1.12.3.10\token64.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip\base64.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip\rc4.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip\string0.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\ipt\sofia-sip\token64.h"></File>
</Filter>
<Filter
Name="url headers"
Filter="url*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\url\sofia-sip-1.12.3.10\url.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\url\sofia-sip-1.12.3.10\url_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\url\sofia-sip-1.12.3.10\url_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\url\sofia-sip\url.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\url\sofia-sip\url_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\url\sofia-sip\url_tag_class.h"></File>
</Filter>
<Filter
Name="features headers"
Filter="features*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\features\sofia-sip-1.12.3.10\sofia_features.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\features\sofia-sip\sofia_features.h"></File>
</Filter>
<Filter
Name="bnf headers"
Filter="bnf*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\bnf\sofia-sip-1.12.3.10\bnf.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\bnf\sofia-sip-1.12.3.10\hostdomain.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\bnf\sofia-sip\bnf.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\bnf\sofia-sip\hostdomain.h"></File>
</Filter>
<Filter
Name="msg headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_addr.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_addr.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\msg_bnf.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_buffer.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_date.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_header.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_buffer.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_date.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_header.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\msg_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_mclass.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_mclass_hash.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_mime.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_mime_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_parser.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_tag_class.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip-1.12.3.10\msg_types.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_mclass.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_mclass_hash.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_mime.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_mime_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_parser.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\msg\sofia-sip\msg_types.h"></File>
</Filter>
<Filter
Name="sip headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sip_extensions.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_hclasses.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_header.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_hclasses.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_header.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sip_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_parser.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_status.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_tag_class.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip-1.12.3.10\sip_util.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_parser.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_status.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sip\sofia-sip\sip_util.h"></File>
</Filter>
<Filter
Name="http headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_hclasses.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_header.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_parser.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_status.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip-1.12.3.10\http_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_hclasses.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_header.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_parser.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_status.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\http\sofia-sip\http_tag_class.h"></File>
</Filter>
<Filter
Name="nth headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nth\sofia-sip-1.12.3.10\nth.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nth\sofia-sip-1.12.3.10\nth_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nth\sofia-sip\nth.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nth\sofia-sip\nth_tag.h"></File>
</Filter>
<Filter
Name="sresolv headers"
@@ -559,68 +559,68 @@
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sresolv\sofia-resolv\sres_async.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sresolv\sofia-resolv\sres_cache.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sresolv\sofia-resolv\sres_record.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sresolv\sofia-sip-1.12.3.10\sresolv.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sresolv\sofia-sip\sresolv.h"></File>
</Filter>
<Filter
Name="nea headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nea\sofia-sip-1.12.3.10\nea.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nea\sofia-sip\nea.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nea\nea_debug.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nea\sofia-sip-1.12.3.10\nea_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nea\sofia-sip\nea_tag.h"></File>
</Filter>
<Filter
Name="iptsec headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip-1.12.3.10\auth_client.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip-1.12.3.10\auth_digest.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip-1.12.3.10\auth_module.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip-1.12.3.10\auth_ntlm.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip-1.12.3.10\auth_plugin.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip\auth_client.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip\auth_digest.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip\auth_module.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip\auth_ntlm.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\sofia-sip\auth_plugin.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\iptsec\iptsec_debug.h"></File>
</Filter>
<Filter
Name="stun headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\stun\sofia-sip-1.12.3.10\stun.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\stun\sofia-sip-1.12.3.10\stun_common.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\stun\sofia-sip-1.12.3.10\stun_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\stun\sofia-sip\stun.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\stun\sofia-sip\stun_common.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\stun\sofia-sip\stun_tag.h"></File>
</Filter>
<Filter
Name="nua headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nua\sofia-sip-1.12.3.10\nua.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nua\sofia-sip-1.12.3.10\nua_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nua\sofia-sip\nua.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nua\sofia-sip\nua_tag.h"></File>
</Filter>
<Filter
Name="nta headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip-1.12.3.10\nta.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip\nta.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\nta_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip-1.12.3.10\nta_stateless.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip-1.12.3.10\nta_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip-1.12.3.10\nta_tport.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip-1.12.3.10\sl_utils.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip\nta_stateless.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip\nta_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip\nta_tport.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\nta\sofia-sip\sl_utils.h"></File>
</Filter>
<Filter
Name="tport headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\sofia-sip-1.12.3.10\tport.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\sofia-sip-1.12.3.10\tport_plugins.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\sofia-sip-1.12.3.10\tport_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\sofia-sip\tport.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\sofia-sip\tport_plugins.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\sofia-sip\tport_tag.h"></File>
<File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\tport\tport_tls.h"></File>
</Filter>
<Filter
Name="sdp headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sdp\sofia-sip-1.12.3.10\sdp.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sdp\sofia-sip-1.12.3.10\sdp_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sdp\sofia-sip\sdp.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\sdp\sofia-sip\sdp_tag.h"></File>
</Filter>
<Filter
Name="soa headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip-1.12.3.10\soa.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip-1.12.3.10\soa_add.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip-1.12.3.10\soa_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip\soa.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip\soa_add.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.3.10\libsofia-sip-ua\soa\sofia-sip\soa_tag.h"></File>
</Filter>
</Filter>
</Files>
Modified: freeswitch/branches/knhor/trunk/src/include/switch_am_config.h.in
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_am_config.h.in (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_am_config.h.in Wed Nov 15 20:38:30 2006
@@ -124,5 +124,5 @@
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
Modified: freeswitch/branches/knhor/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_apr.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_apr.h Wed Nov 15 20:38:30 2006
@@ -649,7 +649,7 @@
* @param flags The flags to use
* @param buf The buffer to use
* @param len The length of the available buffer
- */
+ *
DoxyDefine(apr_status_t switch_socket_recvfrom(switch_sockaddr_t *from,
switch_socket_t *sock,
@@ -657,6 +657,7 @@
char *buf,
apr_size_t *len);)
#define switch_socket_recvfrom apr_socket_recvfrom
+*/
/**
* Send a file from an open file descriptor to a socket, along with
Modified: freeswitch/branches/knhor/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_utils.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_utils.h Wed Nov 15 20:38:30 2006
@@ -54,6 +54,11 @@
#define SWITCH_SMIN -32768
#define switch_normalize_to_16bit(n) if (n > SWITCH_SMAX) n = SWITCH_SMAX / 2; else if (n < SWITCH_SMIN) n = SWITCH_SMIN / 2;
+SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in);
+
+SWITCH_DECLARE(apr_status_t) switch_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
+ apr_int32_t flags, char *buf,
+ apr_size_t *len);
/*!
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Wed Nov 15 20:38:30 2006
@@ -1471,7 +1471,7 @@
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;
if ((callto = strchr(profile_name, '/'))) {
@@ -1481,26 +1481,30 @@
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
return SWITCH_STATUS_GENERR;
}
-
+
if ((dnis = strchr(callto, ':'))) {
*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 = (char *) modname;
- }
-
if ((mdl_profile = switch_core_hash_find(globals.profile_hash, profile_name))) {
-
- if ((mdl_profile->user_flags & LDL_FLAG_COMPONENT) && strchr(outbound_profile->caller_id_number, '@')) {
+ if ((mdl_profile->user_flags & LDL_FLAG_COMPONENT)) {
+ 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 {
+ terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+ return SWITCH_STATUS_GENERR;
+ }
+ }
+
+ if (strchr(outbound_profile->caller_id_number, '@')) {
snprintf(ubuf, sizeof(ubuf), "%s/talk", outbound_profile->caller_id_number);
user = ubuf;
+ } else {
+ user = ldl_handle_get_login(mdl_profile->handle);
}
if (!ldl_handle_ready(mdl_profile->handle)) {
@@ -2170,7 +2174,9 @@
char *hint;
if (profile->auto_reply) {
- ldl_handle_send_msg(handle, (profile->user_flags & LDL_FLAG_COMPONENT) ? to : profile->login, from, "", profile->auto_reply);
+ ldl_handle_send_msg(handle,
+ (profile->user_flags & LDL_FLAG_COMPONENT) ? to : ldl_handle_get_login(profile->handle),
+ from, "", profile->auto_reply);
}
if (strchr(to, '+')) {
@@ -2203,7 +2209,7 @@
break;
case LDL_SIGNAL_LOGIN_SUCCESS:
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, DL_EVENT_LOGIN_SUCCESS) == SWITCH_STATUS_SUCCESS) {
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
switch_event_fire(&event);
}
if (profile->user_flags & LDL_FLAG_COMPONENT) {
@@ -2213,13 +2219,13 @@
break;
case LDL_SIGNAL_LOGIN_FAILURE:
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, DL_EVENT_LOGIN_FAILURE) == SWITCH_STATUS_SUCCESS) {
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
switch_event_fire(&event);
}
break;
case LDL_SIGNAL_CONNECTED:
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, DL_EVENT_CONNECTED) == SWITCH_STATUS_SUCCESS) {
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
switch_event_fire(&event);
}
break;
@@ -2313,7 +2319,7 @@
}
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", ldl_handle_get_login(profile->handle));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "hint", "%s", hint);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", from);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "to", "%s", to);
@@ -2527,7 +2533,7 @@
ldl_session_get_id(dlsession), cid_name, cid_num, exten);
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
- profile->login,
+ ldl_handle_get_login(profile->handle),
profile->dialplan,
cid_name,
cid_num,
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Nov 15 20:38:30 2006
@@ -426,6 +426,26 @@
AUTH_STALE,
} auth_res_t;
+
+static char *get_url_from_contact(char *buf, uint8_t dup)
+{
+ char *url = NULL, *e;
+
+
+ if ((url = strchr(buf, '<')) && (e = strchr(url, '>'))) {
+ url++;
+ if (dup) {
+ url = strdup(url);
+ e = strchr(url, '>');
+ }
+
+ *e = '\0';
+ }
+
+ return url;
+}
+
+
static auth_res_t parse_auth(sofia_profile_t *profile, sip_authorization_t const *authorization, char *regstr, char *np, size_t nplen)
{
int index;
@@ -1871,22 +1891,13 @@
activate_rtp(tech_pvt);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Ring SDP:\n%s\n", tech_pvt->local_sdp_str);
+ nua_respond(tech_pvt->nh,
+ SIP_183_SESSION_PROGRESS,
+ SIPTAG_CONTACT_STR(tech_pvt->profile->url),
+ SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
+ SOATAG_AUDIO_AUX("cn telephone-event"),
+ TAG_END());
- if (msg->message_id == SWITCH_MESSAGE_INDICATE_RINGING) {
- nua_respond(tech_pvt->nh,
- SIP_180_RINGING,
- SIPTAG_CONTACT_STR(tech_pvt->profile->url),
- SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
- SOATAG_AUDIO_AUX("cn telephone-event"),
- TAG_END());
- } else {
- nua_respond(tech_pvt->nh,
- SIP_183_SESSION_PROGRESS,
- SIPTAG_CONTACT_STR(tech_pvt->profile->url),
- SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
- SOATAG_AUDIO_AUX("cn telephone-event"),
- TAG_END());
- }
}
}
break;
@@ -2078,7 +2089,6 @@
snprintf(tech_pvt->dest, strlen(dest) + 5, "sip:%s", dest);
}
- printf("WTF [%s]\n", dest);
attach_private(nsession, profile, tech_pvt, dest);
nchannel = switch_core_session_get_channel(nsession);
@@ -3185,6 +3195,7 @@
nua_handle_t *nh;
char *to;
char *open;
+ char *tmp;
if (!rpid) {
rpid = "unknown";
@@ -3226,6 +3237,8 @@
nh = nua_handle(profile->nua, NULL, TAG_END());
+ tmp = contact;
+ contact = get_url_from_contact(tmp, 0);
nua_notify(nh,
NUTAG_URL(contact),
@@ -4465,8 +4478,8 @@
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("SUBSCRIBE")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ENABLEMESSAGE(1)),
- TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),
- TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence.winfo")),
+ //TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),
+ //TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence.winfo")),
SIPTAG_SUPPORTED_STR("100rel, precondition"),
SIPTAG_USER_AGENT_STR(SOFIA_USER_AGENT),
TAG_END());
@@ -4916,6 +4929,7 @@
sofia_profile_t *profile;
char *ffrom = NULL;
nua_handle_t *msg_nh;
+ char *contact;
if (to && (user = strdup(to))) {
if ((host = strchr(user, '@'))) {
@@ -4947,20 +4961,23 @@
*p = '+';
}
- ffrom = switch_mprintf("\"%s\"<sip:%s+%s@%s>", fu, proto, fp, profile->name);
+ ffrom = switch_mprintf("\"%s\" <sip:%s+%s@%s>", fu, proto, fp, profile->name);
from = ffrom;
switch_safe_free(fu);
switch_safe_free(fp);
}
-
+ contact = get_url_from_contact(buf, 1);
msg_nh = nua_handle(profile->nua, NULL,
SIPTAG_FROM_STR(from),
- NUTAG_URL(buf),
- SIPTAG_TO_STR(buf),
+ NUTAG_URL(contact),
+ SIPTAG_TO_STR(buf), // if this cries, add contact here too, change the 1 to 0 and omit the safe_free
SIPTAG_CONTACT_STR(profile->url),
TAG_END());
-
+
+ switch_safe_free(contact);
+
+
nua_message(msg_nh,
SIPTAG_CONTENT_TYPE_STR("text/html"),
SIPTAG_PAYLOAD_STR(body),
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/Makefile
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/Makefile (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/Makefile Wed Nov 15 20:38:30 2006
@@ -1,7 +1,7 @@
LCFLAGS=-fPIC
CFLAGS += -fPIC -I$(PREFIX)/include/python2.4/
PYMOD=freeswitch
-LDFLAGS=-lpython2.4 -Xlinker -L$(PREFIX)/lib/python2.4/config/
+LDFLAGS=-lpython2.4 -Xlinker -export-dynamic -L$(PREFIX)/lib/python2.4/config/ -lutil
SWIGCFILE=../../../switch_swig.c
SWIGIFILE=../../../switch_swig.i
@@ -32,13 +32,13 @@
$(CC) $(SOLINK) -o py_$(PYMOD).$(DYNAMIC_LIB_EXTEN) switch_swig_wrap.o switch_swig.o $(LDFLAGS)
-$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(MODNAME).o $(OBJS) Makefile
- $(CC) $(LCFLAGS) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS)
+$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c $(MODNAME).o $(OBJS) switch_swig_wrap.o switch_swig.o Makefile
+ $(CC) $(LCFLAGS) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o switch_swig_wrap.o switch_swig.o $(OBJS) $(LDFLAGS)
clean:
rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~
install:
- #cp -f py_$(PYMOD).$(DYNAMIC_LIB_EXTEN) $(MDIR)
+ # cp -f py_$(PYMOD).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod
cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c Wed Nov 15 20:38:30 2006
@@ -24,6 +24,7 @@
* Contributor(s):
*
* Brian Fertig <brian.fertig at convergencetek.com>
+ * Johny Kadarisman <jkr888 at gmail.com>
*
* mod_python.c -- Python Module
*
@@ -41,104 +42,24 @@
#include <switch.h>
+void init_freeswitch(void);
+
const char modname[] = "mod_python";
-static int numargs=0;
-static PyObject* emb_numargs(PyObject *self, PyObject *args)
-{
- if(!PyArg_ParseTuple(args, ":numargs"))
- return NULL;
- return Py_BuildValue("i", numargs);
-}
-
-static PyMethodDef EmbMethods[] = {
- {"numargs", emb_numargs, METH_VARARGS,
- "Return the number of arguments received by the process."},
- {NULL, NULL, 0, NULL}
-};
-
static void python_function(switch_core_session_t *session, char *data)
{
char *uuid = switch_core_session_get_uuid(session);
- uint32_t ulen = strlen(uuid);
- uint32_t len = strlen((char *) data) + ulen + 2;
- char *mydata = switch_core_session_alloc(session, len);
- int argc, i;
- char *argv[5];
- char python_code[1024];
-// void*** tsrm_ls = NULL;
+ char *argv[1];
+ FILE* pythonfile;
- PyObject *pName, *pModule, *pFunc;
- PyObject *pArgs, *pValue;
+ argv[0] = uuid;
+ pythonfile = fopen(data, "r");
-
- snprintf(mydata, len, "%s %s", uuid, data);
-
- argc = switch_separate_string(mydata, ' ',argv,(sizeof(argv) / sizeof(argv[0])));
-
- sprintf(python_code, "$uuid=\"%s\"; include(\"%s\");\n", argv[0], argv[1]);
- //python_embed_init(argc, argv, &tsrm_ls);
- //python_EMBED_START_BLOCK(argc, argv);
- //zend_eval_string(python_code, NULL, "Embedded code" TSRMLS_CC);
- //python_EMBED_END_BLOCK();
- //python_embed_shutdown(tsrm_ls);
-
-
Py_Initialize();
- numargs = argc;
- Py_InitModule("emb", EmbMethods);
- pName = PyString_FromString(data);
- /* Error checking of pName left out */
-
- pModule = PyImport_Import(pName);
- Py_DECREF(pName);
-
- if (pModule != NULL) {
- pFunc = PyObject_GetAttrString(pModule, "main");
- /* pFunc is a new reference */
-
- if (pFunc && PyCallable_Check(pFunc)) {
- pArgs = PyTuple_New(argc - 3);
- for (i = 0; i < argc - 3; ++i) {
- pValue = PyInt_FromLong(atoi(argv[i + 3]));
- if (!pValue) {
- Py_DECREF(pArgs);
- Py_DECREF(pModule);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot convert argument\n");
-
- }
- /* pValue reference stolen here: */
- PyTuple_SetItem(pArgs, i, pValue);
- }
- pValue = PyObject_CallObject(pFunc, pArgs);
- Py_DECREF(pArgs);
- if (pValue != NULL) {
- printf("Result of call: %ld\n", PyInt_AsLong(pValue));
- Py_DECREF(pValue);
- }
- else {
- Py_DECREF(pFunc);
- Py_DECREF(pModule);
- PyErr_Print();
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Call failed\n");
-
- }
- }
- else {
- if (PyErr_Occurred())
- PyErr_Print();
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find function \"%s\"\n", argv[2]);
- }
- Py_XDECREF(pFunc);
- Py_DECREF(pModule);
- }
- else {
- PyErr_Print();
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to load \"%s\"\n", argv[1]);
-
- }
+ PySys_SetArgv(1, argv);
+ init_freeswitch();
+ PyRun_SimpleFile(pythonfile, "");
Py_Finalize();
-
}
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Wed Nov 15 20:38:30 2006
@@ -416,7 +416,7 @@
apr_status_t status = SWITCH_STATUS_SUCCESS;
apr_dso_handle_sym_t function_handle = NULL;
spidermonkey_init_t spidermonkey_init = NULL;
- const sm_module_interface_t *module_interface, *mp;
+ const sm_module_interface_t *module_interface = NULL, *mp;
int loading = 1;
const char *err = NULL;
Modified: freeswitch/branches/knhor/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_rtp.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_rtp.c Wed Nov 15 20:38:30 2006
@@ -272,14 +272,18 @@
switch_stun_packet_t *rpacket;
char *remote_ip;
switch_size_t bytes;
-
+ char ipbuf[25];
+
memset(buf, 0, sizeof(buf));
rpacket = switch_stun_packet_build_header(SWITCH_STUN_BINDING_RESPONSE, packet->header.id, buf);
switch_stun_packet_attribute_add_username(rpacket, username, 32);
- switch_sockaddr_ip_get(&remote_ip, rtp_session->from_addr);
+ //switch_sockaddr_ip_get(&remote_ip, rtp_session->from_addr);
+
+ remote_ip = switch_get_addr(ipbuf, sizeof(ipbuf), rtp_session->from_addr);
+
+
switch_stun_packet_attribute_add_binded_address(rpacket, remote_ip, rtp_session->from_addr->port);
bytes = switch_stun_packet_length(rpacket);
-
switch_socket_sendto(rtp_session->sock, rtp_session->from_addr, 0, (void*)rpacket, &bytes);
}
}
@@ -866,9 +870,14 @@
char *tx_host;
uint32_t old = rtp_session->remote_port;
char *old_host;
-
- switch_sockaddr_ip_get(&tx_host, rtp_session->from_addr);
- switch_sockaddr_ip_get(&old_host, rtp_session->remote_addr);
+ char bufa[30], bufb[30];
+
+ //switch_sockaddr_ip_get(&tx_host, rtp_session->from_addr);
+ //switch_sockaddr_ip_get(&old_host, rtp_session->remote_addr);
+
+ tx_host = switch_get_addr(bufa, sizeof(bufa), rtp_session->from_addr);
+ old_host = switch_get_addr(bufb, sizeof(bufb), rtp_session->remote_addr);
+
if (!switch_strlen_zero(tx_host) && rtp_session->from_addr->port > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Auto Changing port from %s:%u to %s:%u\n",
old_host, old, tx_host, rtp_session->from_addr->port);
Modified: freeswitch/branches/knhor/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_utils.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_utils.c Wed Nov 15 20:38:30 2006
@@ -34,6 +34,7 @@
#include <string.h>
#include <stdlib.h>
+
SWITCH_DECLARE(char *) switch_priority_name(switch_priority_t priority)
{
switch(priority) { /*lol*/
@@ -49,6 +50,40 @@
}
static char RFC2833_CHARS[] = "0123456789*#ABCDF";
+
+
+
+SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in)
+{
+ uint8_t x, *i;
+ char *p = buf;
+
+
+ i = (uint8_t *) &in->sa.sin.sin_addr;
+
+ memset(buf, 0, len);
+ for(x =0; x < 4; x++) {
+ sprintf(p, "%u%s", i[x], x == 3 ? "" : ".");
+ p = buf + strlen(buf);
+ }
+ return buf;
+}
+
+SWITCH_DECLARE(apr_status_t) switch_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
+ apr_int32_t flags, char *buf,
+ apr_size_t *len)
+{
+ apr_status_t r;
+
+ if ((r = apr_socket_recvfrom(from, sock, flags, buf, len)) == APR_SUCCESS) {
+ from->port = ntohs(from->sa.sin.sin_port);
+ //from->ipaddr_ptr = &(from->sa.sin.sin_addr);
+ //from->ipaddr_ptr = inet_ntoa(from->sa.sin.sin_addr);
+ }
+
+ return r;
+
+}
SWITCH_DECLARE(char) switch_rfc2833_to_char(int event)
{
More information about the Freeswitch-svn
mailing list