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
April 2007
- 3 participants
- 201 discussions
19 Apr '07
Author: anthm
Date: Thu Apr 19 18:49:01 2007
New Revision: 4980
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Thu Apr 19 18:49:01 2007
@@ -312,6 +312,8 @@
nua_handle_t *nh;
nua_handle_t *nh2;
sip_contact_t *contact;
+ uint32_t owner_id;
+ uint32_t session_id;
/** VIDEO **/
switch_frame_t video_read_frame;
switch_codec_t video_read_codec;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Thu Apr 19 18:49:01 2007
@@ -40,7 +40,6 @@
void sofia_glue_set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, char *sr, int force)
{
char buf[2048];
- switch_time_t now = switch_time_now();
int ptime = 0;
int rate = 0;
uint32_t v_port;
@@ -65,14 +64,24 @@
sr = "sendrecv";
}
+ if (!tech_pvt->owner_id) {
+ tech_pvt->owner_id = (uint32_t) time(NULL) - port;
+ }
+
+ if (!tech_pvt->session_id) {
+ tech_pvt->session_id = tech_pvt->owner_id ;
+ }
+
+ tech_pvt->session_id++;
+
snprintf(buf, sizeof(buf),
"v=0\n"
- "o=FreeSWITCH %d%" SWITCH_TIME_T_FMT " %d%" SWITCH_TIME_T_FMT " IN IP4 %s\n"
+ "o=FreeSWITCH %010u %010u IN IP4 %s\n"
"s=FreeSWITCH\n"
"c=IN IP4 %s\n" "t=0 0\n"
"a=%s\n"
- "m=audio %d RTP/AVP", port, now, port, now, ip, ip, sr, port);
-
+ "m=audio %d RTP/AVP", tech_pvt->owner_id, tech_pvt->session_id, ip, ip, sr, port);
+
if (tech_pvt->rm_encoding) {
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->pt);
} else if (tech_pvt->num_codecs) {
@@ -277,7 +286,7 @@
{
if (tech_pvt->num_codecs && !switch_test_flag(tech_pvt, TFLAG_VIDEO)) {
int i;
-
+ tech_pvt->video_count = 0;
for (i = 0; i < tech_pvt->num_codecs; i++) {
if (tech_pvt->codecs[i]->codec_type == SWITCH_CODEC_TYPE_VIDEO) {
tech_pvt->video_count++;
1
0
Author: mikej
Date: Thu Apr 19 18:28:01 2007
New Revision: 4979
Added:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
Removed:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.build.in
Modified:
freeswitch/trunk/libs/sofia-sip/configure.ac
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am
freeswitch/trunk/libs/sofia-sip/utils/Makefile.am
freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
Log:
switch doxygen generation in sofia-sip around to use configure generated files. This should avoid some problems with warnings and errors when builing the manpages. You will probably need to autoreconf and configure sofia-sip for this
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Thu Apr 19 18:28:01 2007
@@ -249,31 +249,51 @@
packages/sofia-sip-ua-glib.pc
libsofia-sip-ua/Makefile
libsofia-sip-ua/bnf/Makefile
+libsofia-sip-ua/bnf/Doxyfile
libsofia-sip-ua/docs/Makefile
+libsofia-sip-ua/docs/Doxyfile
libsofia-sip-ua/docs/Doxyfile.version
libsofia-sip-ua/docs/sofia-footer.html
+libsofia-sip-ua/features/Doxyfile
libsofia-sip-ua/features/Makefile
+libsofia-sip-ua/http/Doxyfile
libsofia-sip-ua/http/Makefile
+libsofia-sip-ua/ipt/Doxyfile
libsofia-sip-ua/ipt/Makefile
+libsofia-sip-ua/iptsec/Doxyfile
libsofia-sip-ua/iptsec/Makefile
+libsofia-sip-ua/msg/Doxyfile
libsofia-sip-ua/msg/Makefile
+libsofia-sip-ua/nea/Doxyfile
libsofia-sip-ua/nea/Makefile
+libsofia-sip-ua/nta/Doxyfile
libsofia-sip-ua/nta/Makefile
+libsofia-sip-ua/nth/Doxyfile
libsofia-sip-ua/nth/Makefile
+libsofia-sip-ua/nua/Doxyfile
libsofia-sip-ua/nua/Makefile
+libsofia-sip-ua/sdp/Doxyfile
libsofia-sip-ua/sdp/Makefile
+libsofia-sip-ua/sip/Doxyfile
libsofia-sip-ua/sip/Makefile
+libsofia-sip-ua/soa/Doxyfile
libsofia-sip-ua/soa/Makefile
+libsofia-sip-ua/sresolv/Doxyfile
libsofia-sip-ua/sresolv/Makefile
+libsofia-sip-ua/stun/Doxyfile
libsofia-sip-ua/stun/Makefile
+libsofia-sip-ua/su/Doxyfile
libsofia-sip-ua/su/Makefile
+libsofia-sip-ua/tport/Doxyfile
libsofia-sip-ua/tport/Makefile
+libsofia-sip-ua/url/Doxyfile
libsofia-sip-ua/url/Makefile
libsofia-sip-ua/features/sofia-sip/sofia_features.h
libsofia-sip-ua-glib/Makefile
libsofia-sip-ua-glib/su-glib/Makefile
+libsofia-sip-ua-glib/su-glib/Doxyfile
utils/Makefile
-utils/Doxyfile.build
+utils/Doxyfile
win32/Makefile
win32/config.h
])
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am Thu Apr 19 18:28:01 2007
@@ -32,8 +32,7 @@
docs/Doxyfile.version
doxygen: built-sources
- @cd ${srcdir} ;\
- mkdir -p docs docs/html &&\
+ @mkdir -p docs docs/html &&\
for d in $(DIST_SUBDIRS) $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
@@ -41,7 +40,7 @@
&& ${DOXYGEN} \
&& popd > /dev/null ; \
done
- cd ${srcdir}/docs/html && ../../${top_srcdir}/libsofia-sip-ua/docs/hide_emails.sh
+ ${top_srcdir}/libsofia-sip-ua/docs/hide_emails.sh docs/html
include $(top_srcdir)/rules/recursive.am
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,12 @@
+PROJECT_NAME = "sofia-sip/su-glib"
+
+OUTPUT_DIRECTORY = ../docs/html/su-glib
+
+INPUT = @srcdir@/su_glib.docs @srcdir@ . @srcdir@/sofia-sip
+
+@INCLUDE_PATH = @srcdir@ .
+@INCLUDE = ../docs/Doxyfile.conf
+
+GENERATE_TAGFILE = ../docs/su_glib.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am Thu Apr 19 18:28:01 2007
@@ -59,7 +59,6 @@
doxygen: built-sources
@echo Generating empty doxytags
- cd ${srcdir}; \
mkdir -p docs/html ; \
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile || continue ; \
@@ -71,20 +70,18 @@
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
fi ; \
done
- @cd ${srcdir} ;\
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
&& echo running ${DOXYGEN} first time in $$d \
&& ${DOXYGEN} 2>&1 \
- | egrep -v -i -e 'Warning: (unsupported (xml/)?html tag|unable to resolve reference|could not be resolved)' \
+ | egrep -v -i -e 'Warning: (unsupported (xml/)?html tag|unable to resolve reference|explicit link.*could not be resolved)' \
; popd > /dev/null ; \
test -r docs/$$d.doxytags && \
sed '2,10s!<name>index</name>!<name>'$$d'_index</name>!' \
docs/$$d.doxytags > docs/$$d.doxytags.tmp && \
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
done
- @cd ${srcdir} ;\
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
@@ -97,6 +94,6 @@
docs/$$d.doxytags > docs/$$d.doxytags.tmp && \
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
done
- cd ${srcdir}/docs/html && ../hide_emails.sh
+ ${srcdir}/docs/hide_emails.sh docs/html
.PHONY: built-sources built-sources-am empty-doxytags doxygen
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,15 @@
+PROJECT_NAME = "bnf"
+OUTPUT_DIRECTORY = ../docs/html/bnf
+
+INPUT = @srcdir@/bnf.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+
+GENERATE_TAGFILE = ../docs/bnf.doxytags
+
+PREDEFINED += "static="
+
+MAX_INITIALIZER_LINES = 2
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.am Thu Apr 19 18:28:01 2007
@@ -33,7 +33,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile bnf.docs
+EXTRA_DIST = bnf.docs
# ----------------------------------------------------------------------
# Tests
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf Thu Apr 19 18:28:01 2007
@@ -62,5 +62,3 @@
EXCLUDE_PATTERNS = acconfig.h config.h confdefs.h \
test*.h test*.c torture*.c *test.c *torture.c \
*_tag_dll.c *_tag_ref.c
-
-IMAGE_PATH = ../../libsofia-sip-ua/docs/pictures
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,31 @@
+PROJECT_NAME = "libsofia-sip-ua"
+OUTPUT_DIRECTORY = ../docs/html
+
+INPUT = @srcdir@/mainpage.docs @srcdir@/docguide.docs @srcdir@/conformance.docs
+
+# release.docs
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+GENERATE_TAGFILE = docs.doxytags
+
+TAGFILES =
+TAGFILES += su.doxytags=su
+TAGFILES += ipt.doxytags=ipt
+TAGFILES += bnf.doxytags=bnf
+TAGFILES += url.doxytags=url
+TAGFILES += msg.doxytags=msg
+TAGFILES += sip.doxytags=sip
+TAGFILES += sresolv.doxytags=sresolv
+TAGFILES += stun.doxytags=stun
+TAGFILES += tport.doxytags=tport
+TAGFILES += nta.doxytags=nta
+TAGFILES += iptsec.doxytags=iptsec
+TAGFILES += sdp.doxytags=sdp
+TAGFILES += soa.doxytags=soa
+TAGFILES += nea.doxytags=nea
+TAGFILES += nua.doxytags=nua
+TAGFILES += features.doxytags=features
+
+EXAMPLE_PATH = @srcdir@/../sip
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.version.in Thu Apr 19 18:28:01 2007
@@ -1 +1,3 @@
PROJECT_NUMBER = @VERSION@
+
+IMAGE_PATH = @top_srcdir@/libsofia-sip-ua/docs/pictures
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am Thu Apr 19 18:28:01 2007
@@ -1,9 +1,7 @@
-EXTRA_DIST = Doxyfile Doxyfile.aliases Doxyfile.conf \
+EXTRA_DIST = Doxyfile.aliases Doxyfile.conf \
docguide.docs \
mainpage.docs \
conformance.docs \
- Doxyfile.version.in \
- sofia-footer.html.in \
hide_emails.sh \
ChangeLog \
pictures/SIP_basic_incoming_operation.eps \
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/hide_emails.sh Thu Apr 19 18:28:01 2007
@@ -29,9 +29,9 @@
#
# --------------------------------------------------------------------
-find . -name '*.html' -print | while read i ; do
- (
- echo "Hiding email addresses in ${i}."
- sed -r -i 's/([:>;][a-z][-a-z.]*)((a)[a-z][a-z]*)\.[a-z][a-z]*(["<\&])/\1\2-email.address.hidden\3/gi' $i
- )
-done
+echo "Hiding email addresses in ${1:-.}"
+
+find ${1:-.} -name '*.html' -print0 |
+xargs -0 \
+sed -r -i 's/([:>;][a-z][-a-z.]*)((a)[a-z][a-z]*)\.[a-z][a-z]*(["<\&])/\1\2-email.address.hidden\3/gi'
+
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,23 @@
+PROJECT_NAME = "features"
+OUTPUT_DIRECTORY = ../docs/html/features
+
+INPUT = @srcdir@/features.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/docs.doxytags=..
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+TAGFILES += ../docs/sdp.doxytags=../sdp
+
+GENERATE_TAGFILE = ../docs/features.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.am Thu Apr 19 18:28:01 2007
@@ -26,7 +26,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile features.docs
+EXTRA_DIST = features.docs
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,19 @@
+PROJECT_NAME = "http"
+OUTPUT_DIRECTORY = ../docs/html/http
+
+INPUT = @srcdir@/http.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ ../docs/su.doxytags=../su \
+ ../docs/ipt.doxytags=../ipt \
+ ../docs/bnf.doxytags=../bnf \
+ ../docs/url.doxytags=../url \
+ ../docs/msg.doxytags=../msg
+
+GENERATE_TAGFILE = ../docs/http.doxytags
+
+ALIASES += \
+ "HTTP_HEADER=@ingroup http_headers\n@defgroup" \
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am Thu Apr 19 18:28:01 2007
@@ -56,7 +56,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile http.docs \
+EXTRA_DIST = http.docs \
sofia-sip/http_protos.h.in \
sofia-sip/http_tag.h.in \
http_parser_table.c.in \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,13 @@
+PROJECT_NAME = "ipt"
+OUTPUT_DIRECTORY = ../docs/html/ips
+
+INPUT = @srcdir@/ipt.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+GENERATE_TAGFILE = ../docs/ipt.doxytags
+
+ALIASES +=
+
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am Thu Apr 19 18:28:01 2007
@@ -46,7 +46,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST += Doxyfile ipt.docs
+EXTRA_DIST += ipt.docs
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,26 @@
+PROJECT_NAME = "iptsec"
+OUTPUT_DIRECTORY = ../docs/html/iptsec
+
+INPUT = @srcdir@/iptsec.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+@INCLUDE = ../sip/sip.doxyaliases
+
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/http.doxytags=../http
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+
+GENERATE_TAGFILE = ../docs/iptsec.doxytags
+
+ALIASES +=
+
+PREDEFINED += SOFIA_EXTEND_AUTH_CLIENT=1
+
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am Thu Apr 19 18:28:01 2007
@@ -78,7 +78,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile iptsec.docs testpasswd $(BUILT_SOURCES)
+EXTRA_DIST = iptsec.docs testpasswd $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h Thu Apr 19 18:28:01 2007
@@ -30,7 +30,8 @@
* @brief Client-side plugin interface for authentication
*
* @note For extensions in 1.12.6 or later,
- * you have to #define SOFIA_EXTEND_AUTH_CLIENT to 1.
+ * you have to define SOFIA_EXTEND_AUTH_CLIENT to 1
+ * before including this file.
*
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
*
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,18 @@
+PROJECT_NAME = "msg"
+OUTPUT_DIRECTORY = ../docs/html/msg
+
+INPUT = @srcdir@/msg.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+@INCLUDE = ../sip/sip.doxyaliases
+
+TAGFILES += ../docs/ipt.doxytags=../ipt \
+ ../docs/su.doxytags=../su \
+ ../docs/sip.doxytags=../sip \
+ ../docs/nta.doxytags=../nta \
+ ../docs/http.doxytags=../http
+
+GENERATE_TAGFILE = ../docs/msg.doxytags
+
+IMAGE_PATH += @srcdir@/../sip/images
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am Thu Apr 19 18:28:01 2007
@@ -66,7 +66,7 @@
dist_pkgdata_SCRIPTS = msg_parser.awk
-EXTRA_DIST = Doxyfile msg.docs \
+EXTRA_DIST = msg.docs \
sofia-sip/msg_mime_protos.h.in \
sofia-sip/msg_protos.h.in \
msg_mime_table.c.in \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,22 @@
+PROJECT_NAME = "nea"
+OUTPUT_DIRECTORY = ../docs/html/nea
+
+INPUT = @srcdir@/nea.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+EXCLUDE_PATTERNS = test*.c torture*.c
+
+TAGFILES += \
+ "../docs/su.doxytags=../su" \
+ "../docs/ipt.doxytags=../ipt" \
+ "../docs/bnf.doxytags=../bnf" \
+ "../docs/url.doxytags=../url" \
+ "../docs/msg.doxytags=../msg" \
+ "../docs/sip.doxytags=../sip" \
+ "../docs/nta.doxytags=../nta"
+
+GENERATE_TAGFILE = ../docs/nea.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am Thu Apr 19 18:28:01 2007
@@ -54,7 +54,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nea.docs $(BUILT_SOURCES)
+EXTRA_DIST = nea.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,25 @@
+PROJECT_NAME = "nta"
+OUTPUT_DIRECTORY = ../docs/html/nta
+
+INPUT = @srcdir@/nta.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+
+GENERATE_TAGFILE = ../docs/nta.doxytags
+
+EXCLUDE_PATTERNS += sl_*.h sl_*.c nta_compat.*
+
+ALIASES +=
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../sip/sip.doxyaliases
\ No newline at end of file
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am Thu Apr 19 18:28:01 2007
@@ -66,7 +66,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nta.docs sl_utils.docs \
+EXTRA_DIST = nta.docs sl_utils.docs \
agent.pem cafile.pem \
invite.msc $(BUILT_SOURCES)
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,19 @@
+PROJECT_NAME = "nth"
+OUTPUT_DIRECTORY = ../docs/html/nth
+
+INPUT = @srcdir@/nth.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ "../docs/su.doxytags=../su" \
+ "../docs/ipt.doxytags=../ipt" \
+ "../docs/bnf.doxytags=../bnf" \
+ "../docs/url.doxytags=../url" \
+ "../docs/msg.doxytags=../msg" \
+ "../docs/http.doxytags=../http" \
+
+GENERATE_TAGFILE = ../docs/nth.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.am Thu Apr 19 18:28:01 2007
@@ -57,7 +57,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nth.docs $(BUILT_SOURCES) \
+EXTRA_DIST = nth.docs $(BUILT_SOURCES) \
agent.pem cafile.pem
# ----------------------------------------------------------------------
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,39 @@
+PROJECT_NAME = "nua"
+OUTPUT_DIRECTORY = ../docs/html/nua
+
+INPUT = @srcdir@/nua.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/docs.doxytags=../docs
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+TAGFILES += ../docs/soa.doxytags=../soa
+TAGFILES += ../docs/nea.doxytags=../nea
+TAGFILES += ../docs/sdp.doxytags=../sdp
+
+GENERATE_TAGFILE = ../docs/nua.doxytags
+
+ALIASES += CFILE="@internal @file" IFILE="@internal @file"
+
+ALIASES += nua="@ref index \"nua\""
+# When GENERATE_TAGFILE=YES, we should use \ref main
+#ALIASES += nua="@ref main \"nua\""
+
+ALIASES += NUA_EVENT="@var nua_event_e::"
+ALIASES += END_NUA_EVENT="@par "
+
+ALIASES += \
+ NUA_HPARAM_CALLS="nua_invite(), nua_respond(), nua_ack(), nua_prack(), nua_update(), nua_info(), nua_bye(), nua_options(), nua_message(), nua_register(), nua_publish(), nua_refer(),nua_subscribe(), nua_notify(), nua_refer(), nua_notifier()"
+
+VERBATIM_HEADERS = NO
+
+@INCLUDE = ../sip/sip.doxyaliases
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.am Thu Apr 19 18:28:01 2007
@@ -92,7 +92,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile nua.docs $(BUILT_SOURCES)
+EXTRA_DIST = nua.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,12 @@
+PROJECT_NAME = "sdp"
+OUTPUT_DIRECTORY = ../docs/html/sdp
+
+INPUT = @srcdir@/sdp.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+GENERATE_TAGFILE = ../docs/sdp.doxytags
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.am Thu Apr 19 18:28:01 2007
@@ -43,7 +43,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile sdp.docs $(BUILT_SOURCES) \
+EXTRA_DIST = sdp.docs $(BUILT_SOURCES) \
tests/message-1.sdp \
tests/message-2.sdp \
tests/message-3.sdp \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,31 @@
+PROJECT_NAME = "sip"
+OUTPUT_DIRECTORY = ../docs/html/sip
+
+INPUT = @srcdir@/sofia-sip sofia-sip @srcdir@/sip.docs @srcdir@/sip_parser.docs @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ ../docs/su.doxytags=../su \
+ ../docs/ipt.doxytags=../ipt \
+ ../docs/bnf.doxytags=../bnf \
+ ../docs/url.doxytags=../url \
+ ../docs/msg.doxytags=../msg \
+ ../docs/sdp.doxytags=../sdp \
+ ../docs/iptsec.doxytags=../iptsec \
+ ../docs/nta.doxytags=../nta \
+ ../docs/nua.doxytags=../nua
+
+GENERATE_TAGFILE = ../docs/sip.doxytags
+
+ALIASES += \
+ "SIP_TAG=@ingroup sip_tag\n" \
+ "SIP_HEADER=@ingroup sip_headers\n@defgroup" \
+ "SIP_PARSER=\n"
+
+@INCLUDE = sip.doxyaliases
+
+PREDEFINED += SU_HAVE_EXPERIMENTAL=1
+
+IMAGE_PATH += @srcdir@/images
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am Thu Apr 19 18:28:01 2007
@@ -69,7 +69,7 @@
# note: srcdir needs to be specified, otherwise
# breaks make distcheck target
-EXTRA_DIST = Doxyfile sip.docs sip_parser.docs sip.doxyaliases \
+EXTRA_DIST = sip.docs sip_parser.docs sip.doxyaliases \
ADD-A-HEADER GRAMMAR sip_bad_mask \
sip_parser_table.c.in sip_tag.c.in \
sip_extra_headers.txt \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,30 @@
+PROJECT_NAME = "soa"
+OUTPUT_DIRECTORY = ../docs/html/soa
+
+INPUT = @srcdir@/soa.docs @srcdir@/sofia-sip/soa.h
+INPUT += @srcdir@/sofia-sip/soa_add.h @srcdir@/soa.c
+INPUT += @srcdir@/sofia-sip/soa_tag.h @srcdir@/soa_tag.c
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/docs.doxytags=../docs
+TAGFILES += ../docs/su.doxytags=../su
+TAGFILES += ../docs/ipt.doxytags=../ipt
+TAGFILES += ../docs/bnf.doxytags=../bnf
+TAGFILES += ../docs/url.doxytags=../url
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/sresolv.doxytags=../sresolv
+TAGFILES += ../docs/tport.doxytags=../tport
+TAGFILES += ../docs/nta.doxytags=../nta
+TAGFILES += ../docs/sdp.doxytags=../sdp
+TAGFILES += ../docs/nua.doxytags=../nua
+
+GENERATE_TAGFILE = ../docs/soa.doxytags
+
+ALIASES += soa="@ref index \"soa\""
+# When GENERATE_TAGFILE=YES, we should use \ref main
+#ALIASES += soa="@ref main \"soa\""
+
+@INCLUDE = ../sip/sip.doxyaliases
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am Thu Apr 19 18:28:01 2007
@@ -53,7 +53,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile soa.docs $(BUILT_SOURCES)
+EXTRA_DIST = soa.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,16 @@
+PROJECT_NAME = "sresolv"
+OUTPUT_DIRECTORY = ../docs/html/sresolv
+
+INPUT = @srcdir@/sofia-sip @srcdir@/sofia-resolv @srcdir@/sresolv.docs @srcdir@
+
+EXCLUDE = resolve_sip.c
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+ALIASES += CFILE="@internal @file" IFILE="@internal @file"
+
+TAGFILES += ../docs/su.doxytags=../su
+GENERATE_TAGFILE = ../docs/sresolv.doxytags
+
+PREDEFINED += SRES_CONTEXT_T="struct sres_context_s"
\ No newline at end of file
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am Thu Apr 19 18:28:01 2007
@@ -51,7 +51,7 @@
# ----------------------------------------------------------------------
# Distribution
-EXTRA_DIST = Doxyfile sresolv.docs
+EXTRA_DIST = sresolv.docs
dist_noinst_DATA = run_test_sresolv \
root.zone rndc.conf \
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,11 @@
+PROJECT_NAME = "stun"
+OUTPUT_DIRECTORY = ../docs/html/stun
+
+INPUT = @srcdir@/stun.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+
+GENERATE_TAGFILE = ../docs/stun.doxytags
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.am Thu Apr 19 18:28:01 2007
@@ -46,7 +46,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile stun.docs cert.pem key.pem
+EXTRA_DIST = stun.docs cert.pem key.pem
# ----------------------------------------------------------------------
# Sofia specific rules
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c Thu Apr 19 18:28:01 2007
@@ -98,7 +98,7 @@
* @endcode
*
* @section stunc_environment Environment
- * STUN_DEBUG
+ * #STUN_DEBUG
*
* @section stunc_bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,25 @@
+PROJECT_NAME = "su"
+OUTPUT_DIRECTORY = ../docs/html/su
+
+INPUT = @srcdir@/su.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/msg.doxytags=../msg
+TAGFILES += ../docs/sip.doxytags=../sip
+TAGFILES += ../docs/docs.doxytags=..
+
+GENERATE_TAGFILE = ../docs/su.doxytags
+
+ALIASES += "SU_TAG=@ingroup su_tag\n"
+
+PREDEFINED += \
+ TSTFLAGS=1 \
+ SU_HAVE_BSDSOCK=0 \
+ su_root_s=su_root_t \
+ _su_task_r=su_task_r
+
+EXCLUDE_PATTERNS += localinfo.c addrinfo.c
+
+@INCLUDE = ../sip/sip.doxyaliases
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am Thu Apr 19 18:28:01 2007
@@ -105,7 +105,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile su.docs \
+EXTRA_DIST = su.docs \
run_addrinfo run_localinfo run_test_su
dist_pkgdata_SCRIPTS = tag_dll.awk
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c Thu Apr 19 18:28:01 2007
@@ -63,7 +63,7 @@
* messages based on message priority.
*
* @sa @ref debug_logs, <sofia-sip/su_log.h>,
- * su_llog(), su_vllog(), #su_log_t, #SU_LOG,
+ * su_llog(), su_vllog(), #su_log_t, #SU_DEBUG,
* SU_DEBUG_0(), SU_DEBUG_1(), SU_DEBUG_2(), SU_DEBUG_3(), SU_DEBUG_5(),
* SU_DEBUG_7(), SU_DEBUG_9()
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c Thu Apr 19 18:28:01 2007
@@ -157,7 +157,7 @@
unsigned char sut_set; /**< Timer is set (inserted in tree) */
};
-/** @internal Timer running status */
+/** Timer running status */
enum sut_running {
reset = 0, /**< Timer is not running */
run_at_intervals = 1, /**< Compensate missed wakeup calls */
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,20 @@
+PROJECT_NAME = "tport"
+OUTPUT_DIRECTORY = ../docs/html/tport
+
+INPUT = @srcdir@/tport.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += \
+ ../docs/su.doxytags=../su \
+ ../docs/msg.doxytags=../msg \
+ ../docs/nth.doxytags=../nth \
+ ../docs/nta.doxytags=../nta \
+ ../docs/nua.doxytags=../nua \
+
+GENERATE_TAGFILE = ../docs/tport.doxytags
+
+EXCLUDE_PATTERNS += test_*.[hc] torture_*.[hc]
+
+ALIASES +=
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am Thu Apr 19 18:28:01 2007
@@ -80,7 +80,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile tport.docs \
+EXTRA_DIST = tport.docs \
certificates.html agent.pem cafile.pem
# ----------------------------------------------------------------------
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,13 @@
+PROJECT_NAME = "url"
+OUTPUT_DIRECTORY = ../docs/html/url
+
+INPUT = @srcdir@/url.docs @srcdir@/sofia-sip @srcdir@ .
+
+@INCLUDE_PATH = . @srcdir@
+@INCLUDE = ../docs/Doxyfile.conf
+
+TAGFILES += ../docs/su.doxytags=../su
+
+GENERATE_TAGFILE = ../docs/url.doxytags
+
+PREDEFINED += "URL_DLL"
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.am Thu Apr 19 18:28:01 2007
@@ -43,7 +43,7 @@
# ----------------------------------------------------------------------
# Install and distribution rules
-EXTRA_DIST = Doxyfile url.docs $(BUILT_SOURCES)
+EXTRA_DIST = url.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Tests
Added: freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in Thu Apr 19 18:28:01 2007
@@ -0,0 +1,67 @@
+#
+# Template for Doxyfile.
+# @configure_input@
+#
+# Copyright (C) 2006 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi(a)nokia.com>
+# Licensed under LGPL. See file COPYING.
+#
+
+PROJECT_NAME = "sofia-sip"
+
+PROJECT_NUMBER = @VERSION@
+
+INPUT = @srcdir@
+INPUT += @top_srcdir@/libsofia-sip-ua/su/localinfo.c
+INPUT += @top_srcdir@/libsofia-sip-ua/su/addrinfo.c
+INPUT += @top_srcdir@/libsofia-sip-ua/stun/stunc.c
+
+OUTPUT_DIRECTORY = ../man
+
+@INCLUDE_PATH = . @srcdir@
+
+@INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.aliases
+@INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.rfc
+
+FILE_PATTERNS = *.h *.c
+
+EXCLUDE_PATTERNS = acconfig.h config.h confdefs.h \
+ test*.h test*.c torture*.c *test.c *torture.c \
+ *_tag_dll.c *_tag_ref.c
+
+TAGFILES =
+
+OUTPUT_LANGUAGE = English
+
+DETAILS_AT_TOP = YES
+OPTIMIZE_OUTPUT_FOR_C = YES
+SHOW_USED_FILES = NO
+
+QUIET = YES
+WARNINGS = YES
+DISABLE_INDEX = NO
+
+HAVE_DOT = YES
+INCLUDE_GRAPH = NO
+INCLUDED_BY_GRAPH = NO
+
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+HIDE_UNDOC_MEMBERS = YES
+HIDE_UNDOC_CLASSES = YES
+HIDE_SCOPE_NAMES = YES
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+JAVADOC_AUTOBRIEF = YES
+MAX_INITIALIZER_LINES = 0
+ENUM_VALUES_PER_LINE = 1
+
+ENABLE_PREPROCESSING = NO
+
+GENERATE_MAN = YES
+MAN_OUTPUT = .
+MAN_EXTENSION = .1
+MAN_LINKS = NO
+
+GENERATE_HTML = NO
+GENERATE_LATEX = NO
Modified: freeswitch/trunk/libs/sofia-sip/utils/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/Makefile.am Thu Apr 19 18:28:01 2007
@@ -44,5 +44,3 @@
bin_PROGRAMS = sip-options sip-date sip-dig
LDADD = ../libsofia-sip-ua/libsofia-sip-ua.la $(GLIB_LIBS)
-
-EXTRA_DIST = Doxyfile
Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c Thu Apr 19 18:28:01 2007
@@ -116,7 +116,7 @@
* @endcode
*
* @section sip_dig_environment Environment
- * SRESOLV_DEBUG, SRESOLV_CONF
+ * #SRESOLV_DEBUG, SRESOLV_CONF
*
* @section sip_dig_bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-options.c (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-options.c Thu Apr 19 18:28:01 2007
@@ -77,7 +77,7 @@
* @endcode
*
* @section environment Environment
- * SIPADDRESS, sip_proxy, NTA_DEBUG, TPORT_DEBUG, TPORT_LOG.
+ * #SIPADDRESS, #sip_proxy, #NTA_DEBUG, #TPORT_DEBUG, #TPORT_LOG.
*
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
1
0
[commit] r4978 - in freeswitch/trunk: . src src/include src/mod/codecs/mod_h26x
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: mikej
Date: Thu Apr 19 18:04:03 2007
New Revision: 4978
Modified:
freeswitch/trunk/Freeswitch.sln
freeswitch/trunk/src/include/switch_rtp.h
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
freeswitch/trunk/src/switch_rtp.c
Log:
video stuff windows build.
Modified: freeswitch/trunk/Freeswitch.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.sln (original)
+++ freeswitch/trunk/Freeswitch.sln Thu Apr 19 18:04:03 2007
@@ -600,6 +600,8 @@
build\config\ax_compiler_vendor.m4 = build\config\ax_compiler_vendor.m4
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_h26x", "src\mod\codecs\mod_h26x\mod_h26x.vcproj", "{2C3C2423-234B-4772-8899-D3B137E5CA35}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -1122,6 +1124,12 @@
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|Win32.ActiveCfg = Release Passthrough|Win32
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|Win32.Build.0 = Release Passthrough|Win32
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|x64.ActiveCfg = Release|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|Win32.Build.0 = Debug|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|x64.ActiveCfg = Debug|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|Win32.ActiveCfg = Release|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|Win32.Build.0 = Release|Win32
+ {2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1137,6 +1145,7 @@
{D42518CC-7475-454D-B392-0E132C07D761} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{8DEB383C-4091-4F42-A56F-C9E46D552D79} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
+ {2C3C2423-234B-4772-8899-D3B137E5CA35} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{C7705DC4-2088-493E-AF8D-65BC6D65C125} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
Modified: freeswitch/trunk/src/include/switch_rtp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_rtp.h (original)
+++ freeswitch/trunk/src/include/switch_rtp.h Thu Apr 19 18:04:03 2007
@@ -348,7 +348,7 @@
*/
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
void *data,
- uint16_t datalen,
+ uint32_t datalen,
uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags);
/*!
Modified: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj (original)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj Thu Apr 19 18:04:03 2007
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="mod_h26x"
- ProjectGUID="{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
+ ProjectGUID="{2C3C2423-234B-4772-8899-D3B137E5CA35}"
RootNamespace="mod_h26x"
Keyword="Win32Proj"
>
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu Apr 19 18:04:03 2007
@@ -1146,7 +1146,7 @@
frame->source = __FILE__;
frame->flags |= SFF_RAW_RTP;
frame->timestamp = ntohl(rtp_session->recv_msg.header.ts);
- frame->seq = ntohs(rtp_session->recv_msg.header.seq);
+ frame->seq = (uint16_t)ntohs((u_short)rtp_session->recv_msg.header.seq);
frame->ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
frame->m = rtp_session->recv_msg.header.m ? SWITCH_TRUE : SWITCH_FALSE;
@@ -1488,7 +1488,7 @@
if (switch_test_flag(frame, SFF_RTP_HEADER)) {
return switch_rtp_write_manual(rtp_session, frame->data, frame->datalen, frame->m, frame->payload,
- frame->timestamp, frame->seq, frame->ssrc, &frame->flags);
+ (uint32_t)(frame->timestamp), frame->seq, frame->ssrc, &frame->flags);
}
@@ -1521,7 +1521,7 @@
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
void *data,
- uint16_t datalen,
+ uint32_t datalen,
uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, uint32_t ssrc, switch_frame_flag_t *flags)
{
rtp_msg_t send_msg = { {0} };
1
0
[commit] r4977 - in freeswitch/trunk/src: . include mod/codecs/mod_h26x mod/endpoints/mod_sofia
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: anthm
Date: Thu Apr 19 17:40:50 2007
New Revision: 4977
Added:
freeswitch/trunk/src/mod/codecs/mod_h26x/
freeswitch/trunk/src/mod/codecs/mod_h26x/Makefile
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
Modified:
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_core_event_hook.h
freeswitch/trunk/src/include/switch_frame.h
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_module_interfaces.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/switch_core_event_hook.c
freeswitch/trunk/src/switch_core_io.c
freeswitch/trunk/src/switch_core_state_machine.c
freeswitch/trunk/src/switch_ivr_async.c
freeswitch/trunk/src/switch_rtp.c
Log:
modest core framework for video stuff
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Thu Apr 19 17:40:50 2007
@@ -714,6 +714,9 @@
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
+SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
+SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
+
/*!
\brief Reset the buffers and resampler on a session
\param session the session to reset
Modified: freeswitch/trunk/src/include/switch_core_event_hook.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core_event_hook.h (original)
+++ freeswitch/trunk/src/include/switch_core_event_hook.h Thu Apr 19 17:40:50 2007
@@ -38,7 +38,9 @@
typedef struct switch_io_event_hook_receive_message switch_io_event_hook_receive_message_t;
typedef struct switch_io_event_hook_receive_event switch_io_event_hook_receive_event_t;
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame_t;
+typedef struct switch_io_event_hook_video_read_frame switch_io_event_hook_video_read_frame_t;
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame_t;
+typedef struct switch_io_event_hook_video_write_frame switch_io_event_hook_video_write_frame_t;
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel_t;
typedef struct switch_io_event_hook_waitfor_read switch_io_event_hook_waitfor_read_t;
typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_write_t;
@@ -50,7 +52,9 @@
typedef switch_status_t (*switch_receive_message_hook_t) (switch_core_session_t *, switch_core_session_message_t *);
typedef switch_status_t (*switch_receive_event_hook_t) (switch_core_session_t *, switch_event_t *);
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_video_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_video_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_kill_channel_hook_t) (switch_core_session_t *, int);
typedef switch_status_t (*switch_waitfor_read_hook_t) (switch_core_session_t *, int, int);
typedef switch_status_t (*switch_waitfor_write_hook_t) (switch_core_session_t *, int, int);
@@ -86,6 +90,13 @@
struct switch_io_event_hook_read_frame *next;
};
+/*! \brief Node in which to store custom read frame channel callback hooks */
+struct switch_io_event_hook_video_read_frame {
+ /*! the read frame channel callback hook */
+ switch_read_frame_hook_t video_read_frame;
+ struct switch_io_event_hook_video_read_frame *next;
+};
+
/*! \brief Node in which to store custom write_frame channel callback hooks */
struct switch_io_event_hook_write_frame {
/*! the write_frame channel callback hook */
@@ -93,6 +104,13 @@
struct switch_io_event_hook_write_frame *next;
};
+/*! \brief Node in which to store custom video_write_frame channel callback hooks */
+struct switch_io_event_hook_video_write_frame {
+ /*! the video_write_frame channel callback hook */
+ switch_video_write_frame_hook_t video_write_frame;
+ struct switch_io_event_hook_video_write_frame *next;
+};
+
/*! \brief Node in which to store custom kill channel callback hooks */
struct switch_io_event_hook_kill_channel {
/*! the kill channel callback hook */
@@ -138,8 +156,12 @@
switch_io_event_hook_receive_event_t *receive_event;
/*! a list of read frame hooks */
switch_io_event_hook_read_frame_t *read_frame;
+ /*! a list of video read frame hooks */
+ switch_io_event_hook_video_read_frame_t *video_read_frame;
/*! a list of write frame hooks */
switch_io_event_hook_write_frame_t *write_frame;
+ /*! a list of video write frame hooks */
+ switch_io_event_hook_video_write_frame_t *video_write_frame;
/*! a list of kill channel hooks */
switch_io_event_hook_kill_channel_t *kill_channel;
/*! a list of wait for read hooks */
@@ -186,6 +208,14 @@
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_read_frame(switch_core_session_t *session, switch_read_frame_hook_t read_frame);
/*!
+ \brief Add an event hook to be executed when a session reads a frame
+ \param session session to bind hook to
+ \param video_read_frame hook to bind
+ \return SWITCH_STATUS_SUCCESS on suceess
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_read_frame(switch_core_session_t *session, switch_read_frame_hook_t video_read_frame);
+
+/*!
\brief Add an event hook to be executed when a session writes a frame
\param session session to bind hook to
\param write_frame hook to bind
@@ -194,6 +224,14 @@
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_write_frame(switch_core_session_t *session, switch_write_frame_hook_t write_frame);
/*!
+ \brief Add an event hook to be executed when a session writes a video frame
+ \param session session to bind hook to
+ \param write_frame hook to bind
+ \return SWITCH_STATUS_SUCCESS on suceess
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_write_frame(switch_core_session_t *session, switch_video_write_frame_hook_t video_write_frame);
+
+/*!
\brief Add an event hook to be executed when a session kills a channel
\param session session to bind hook to
\param kill_channel hook to bind
Modified: freeswitch/trunk/src/include/switch_frame.h
==============================================================================
--- freeswitch/trunk/src/include/switch_frame.h (original)
+++ freeswitch/trunk/src/include/switch_frame.h Thu Apr 19 17:40:50 2007
@@ -30,7 +30,7 @@
*
*/
/*! \file switch_frame.h
- \brief Media Frame Structure
+ \brief Media Frame Structure
*/
#ifndef SWITCH_FRAME_H
@@ -40,7 +40,7 @@
SWITCH_BEGIN_EXTERN_C
/*! \brief An abstraction of a data frame */
- struct switch_frame {
+struct switch_frame {
/*! a pointer to the codec information */
switch_codec_t *codec;
/*! the originating source of the frame */
@@ -63,6 +63,9 @@
switch_payload_t payload;
/*! the timestamp of the frame */
switch_size_t timestamp;
+ uint16_t seq;
+ uint32_t ssrc;
+ switch_bool_t m;
/*! frame flags */
switch_frame_flag_t flags;
};
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Thu Apr 19 17:40:50 2007
@@ -203,6 +203,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_session(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_ivr_stop_inband_dtmf_session(switch_core_session_t *session);
+SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session);
/*!
\brief play a file from the disk to the session
Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h Thu Apr 19 17:40:50 2007
@@ -99,6 +99,10 @@
switch_status_t (*receive_event) (switch_core_session_t *, switch_event_t *);
/*! change a sessions channel state */
switch_status_t (*state_change) (switch_core_session_t *);
+ /*! read a video frame from a session */
+ switch_status_t (*read_video_frame) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+ /*! write a video frame to a session */
+ switch_status_t (*write_video_frame) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
};
/*! \brief Abstraction of an module endpoint interface
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Apr 19 17:40:50 2007
@@ -110,6 +110,10 @@
#define SWITCH_LOCAL_MEDIA_PORT_VARIABLE "local_media_port"
#define SWITCH_REMOTE_MEDIA_IP_VARIABLE "remote_media_ip"
#define SWITCH_REMOTE_MEDIA_PORT_VARIABLE "remote_media_port"
+#define SWITCH_REMOTE_VIDEO_IP_VARIABLE "remote_video_ip"
+#define SWITCH_REMOTE_VIDEO_PORT_VARIABLE "remote_video_port"
+#define SWITCH_LOCAL_VIDEO_IP_VARIABLE "local_video_ip"
+#define SWITCH_LOCAL_VIDEO_PORT_VARIABLE "local_video_port"
#define SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE "hangup_after_bridge"
#define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"
#define SWITCH_SPEECH_KEY "speech"
@@ -542,6 +546,7 @@
CF_BREAK = (1 << 19) - Channel should stop what it's doing
CF_BROADCAST = (1 << 20) - Channel is broadcasting
CF_UNICAST = (1 << 21) - Channel has a unicast connection
+CF_VIDEO = (1 << 22) - Channel has video
</pre>
*/
@@ -567,7 +572,8 @@
CF_RING_READY = (1 << 18),
CF_BREAK = (1 << 19),
CF_BROADCAST = (1 << 20),
- CF_UNICAST = (1 << 21)
+ CF_UNICAST = (1 << 21),
+ CF_VIDEO = (1 << 22)
} switch_channel_flag_t;
@@ -578,12 +584,14 @@
<pre>
SFF_CNG = (1 << 0) - Frame represents comfort noise
SFF_RAW_RTP = (1 << 1) - Frame has raw rtp accessible
+SFF_RTP_HEADER = (1 << 2) - Get the rtp header from the frame header
</pre>
*/
typedef enum {
SFF_NONE = 0,
SFF_CNG = (1 << 0),
- SFF_RAW_RTP = (1 << 1)
+ SFF_RAW_RTP = (1 << 1),
+ SFF_RTP_HEADER = (1 << 2)
} switch_frame_flag_t;
Added: freeswitch/trunk/src/mod/codecs/mod_h26x/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/Makefile Thu Apr 19 17:40:50 2007
@@ -0,0 +1,2 @@
+BASE=../../../..
+include /usr/src/freeswitch.trunk/build/modmake.rules
Added: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c Thu Apr 19 17:40:50 2007
@@ -0,0 +1,154 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * 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 FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ *
+ * mod_h26x.c -- H26X Signed Linear Codec
+ *
+ */
+#include <switch.h>
+
+static const char modname[] = "mod_h26x";
+
+
+static switch_status_t switch_h26x_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
+{
+ int encoding, decoding;
+
+ encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
+ decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
+
+ if (!(encoding || decoding)) {
+ return SWITCH_STATUS_FALSE;
+ } else {
+ return SWITCH_STATUS_SUCCESS;
+ }
+}
+
+static switch_status_t switch_h26x_encode(switch_codec_t *codec,
+ switch_codec_t *other_codec,
+ void *decoded_data,
+ uint32_t decoded_data_len,
+ uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
+ unsigned int *flag)
+{
+ return SWITCH_STATUS_FALSE;
+}
+
+static switch_status_t switch_h26x_decode(switch_codec_t *codec,
+ switch_codec_t *other_codec,
+ void *encoded_data,
+ uint32_t encoded_data_len,
+ uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
+ unsigned int *flag)
+{
+ return SWITCH_STATUS_FALSE;
+}
+
+
+static switch_status_t switch_h26x_destroy(switch_codec_t *codec)
+{
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static const switch_codec_implementation_t h264_90000_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
+ /*.ianacode */ 99,
+ /*.iananame */ "H264",
+ /*.fmtp */ NULL,
+ /*.samples_per_second = */ 90000,
+ /*.bits_per_second = */ 0,
+ /*.microseconds_per_frame = */ 0,
+ /*.samples_per_frame = */ 0,
+ /*.bytes_per_frame = */ 0,
+ /*.encoded_bytes_per_frame = */ 0,
+ /*.number_of_channels = */ 1,
+ /*.pref_frames_per_packet = */ 1,
+ /*.max_frames_per_packet = */ 1,
+ /*.init = */ switch_h26x_init,
+ /*.encode = */ switch_h26x_encode,
+ /*.decode = */ switch_h26x_decode,
+ /*.destroy = */ switch_h26x_destroy
+ /*.next = */
+};
+
+static const switch_codec_implementation_t h263_90000_implementation = {
+ /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
+ /*.ianacode */ 34,
+ /*.iananame */ "H263",
+ /*.fmtp */ NULL,
+ /*.samples_per_second = */ 90000,
+ /*.bits_per_second = */ 0,
+ /*.microseconds_per_frame = */ 0,
+ /*.samples_per_frame = */ 0,
+ /*.bytes_per_frame = */ 0,
+ /*.encoded_bytes_per_frame = */ 0,
+ /*.number_of_channels = */ 1,
+ /*.pref_frames_per_packet = */ 1,
+ /*.max_frames_per_packet = */ 1,
+ /*.init = */ switch_h26x_init,
+ /*.encode = */ switch_h26x_encode,
+ /*.decode = */ switch_h26x_decode,
+ /*.destroy = */ switch_h26x_destroy,
+ /*.next = */&h264_90000_implementation
+};
+
+static const switch_codec_interface_t h26x_codec_interface = {
+ /*.interface_name */ "h26x video (passthru)",
+ /*.implementations */ &h263_90000_implementation
+};
+
+static switch_loadable_module_interface_t h26x_module_interface = {
+ /*.module_name */ modname,
+ /*.endpoint_interface */ NULL,
+ /*.timer_interface */ NULL,
+ /*.dialplan_interface */ NULL,
+ /*.codec_interface */ &h26x_codec_interface,
+ /*.application_interface */ NULL,
+ /*.api_interface */ NULL,
+};
+
+
+SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
+{
+ /* connect my internal structure to the blank pointer passed to me */
+ *module_interface = &h26x_module_interface;
+
+ /* indicate that the module should continue to be loaded */
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Added: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.vcproj Thu Apr 19 17:40:50 2007
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="mod_h26x"
+ ProjectGUID="{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
+ RootNamespace="mod_h26x"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\libresample\include""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""$(InputDir)..\..\..\..\libs\libresample\win";..\..\..\..\w32\vsnet\$(OutDir)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/mod_h26x.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\libresample\include""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""$(InputDir)..\..\..\..\libs\libresample\win";..\..\..\..\w32\vsnet\$(OutDir)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/mod_h26x.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\mod_h26x.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
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 Thu Apr 19 17:40:50 2007
@@ -58,6 +58,8 @@
switch_memory_pool_t **pool);
static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t sofia_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 sofia_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id);
+static switch_status_t sofia_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id);
static switch_status_t sofia_kill_channel(switch_core_session_t *session, int sig);
@@ -321,12 +323,13 @@
}
-static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id)
+
+static switch_status_t sofia_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id)
{
private_object_t *tech_pvt = NULL;
switch_channel_t *channel = NULL;
int payload = 0;
-
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -337,7 +340,7 @@
return SWITCH_STATUS_FALSE;
}
- while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
+ while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session))) {
if (switch_channel_ready(channel)) {
switch_yield(10000);
} else {
@@ -346,18 +349,112 @@
}
- tech_pvt->read_frame.datalen = 0;
- switch_set_flag_locked(tech_pvt, TFLAG_READING);
+ tech_pvt->video_read_frame.datalen = 0;
-#if 0
- if (tech_pvt->last_read) {
- elapsed = (unsigned int) ((switch_time_now() - tech_pvt->last_read) / 1000);
- if (elapsed > 60000) {
- return SWITCH_STATUS_TIMEOUT;
+
+ if (switch_test_flag(tech_pvt, TFLAG_IO)) {
+ switch_status_t status;
+
+ if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
+ return SWITCH_STATUS_GENERR;
+ }
+
+ assert(tech_pvt->rtp_session != NULL);
+ tech_pvt->video_read_frame.datalen = 0;
+
+ while (switch_test_flag(tech_pvt, TFLAG_IO) && tech_pvt->video_read_frame.datalen == 0) {
+ tech_pvt->video_read_frame.flags = SFF_NONE;
+
+ status = switch_rtp_zerocopy_read_frame(tech_pvt->video_rtp_session, &tech_pvt->video_read_frame);
+ if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_BREAK) {
+ return SWITCH_STATUS_FALSE;
+ }
+
+ payload = tech_pvt->video_read_frame.payload;
+
+ if (tech_pvt->video_read_frame.datalen > 0) {
+ break;
+ }
}
}
-#endif
+ if (tech_pvt->video_read_frame.datalen == 0) {
+ *frame = NULL;
+ return SWITCH_STATUS_GENERR;
+ }
+
+ *frame = &tech_pvt->video_read_frame;
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t sofia_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id)
+{
+ private_object_t *tech_pvt;
+ switch_channel_t *channel = NULL;
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ tech_pvt = (private_object_t *) switch_core_session_get_private(session);
+ assert(tech_pvt != NULL);
+
+ while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session))) {
+ if (switch_channel_ready(channel)) {
+ switch_yield(10000);
+ } else {
+ return SWITCH_STATUS_GENERR;
+ }
+ }
+
+ if (switch_test_flag(tech_pvt, TFLAG_HUP)) {
+ return SWITCH_STATUS_FALSE;
+ }
+
+ if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
+ return SWITCH_STATUS_GENERR;
+ }
+
+ if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ if (!switch_test_flag(frame, SFF_CNG)) {
+ switch_rtp_write_frame(tech_pvt->video_rtp_session, frame, 0);
+ }
+
+ return status;
+}
+
+
+static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id)
+{
+ private_object_t *tech_pvt = NULL;
+ switch_channel_t *channel = NULL;
+ int payload = 0;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ tech_pvt = (private_object_t *) switch_core_session_get_private(session);
+ assert(tech_pvt != NULL);
+
+ if (switch_test_flag(tech_pvt, TFLAG_HUP)) {
+ return SWITCH_STATUS_FALSE;
+ }
+
+ while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
+ if (switch_channel_ready(channel)) {
+ switch_yield(10000);
+ } else {
+ return SWITCH_STATUS_GENERR;
+ }
+ }
+
+
+ tech_pvt->read_frame.datalen = 0;
+ switch_set_flag_locked(tech_pvt, TFLAG_READING);
if (switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_status_t status;
@@ -382,20 +479,6 @@
payload = tech_pvt->read_frame.payload;
-#if 0
- elapsed = (unsigned int) ((switch_time_now() - started) / 1000);
-
- if (timeout > -1) {
- if (elapsed >= (unsigned int) timeout) {
- return SWITCH_STATUS_BREAK;
- }
- }
-
- elapsed = (unsigned int) ((switch_time_now() - last_act) / 1000);
- if (elapsed >= hard_timeout) {
- return SWITCH_STATUS_BREAK;
- }
-#endif
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
char dtmf[128];
switch_rtp_dequeue_dtmf(tech_pvt->rtp_session, dtmf, sizeof(dtmf));
@@ -508,6 +591,9 @@
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_BREAK);
}
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_rtp_set_flag(tech_pvt->video_rtp_session, SWITCH_RTP_FLAG_BREAK);
+ }
break;
case SWITCH_SIG_KILL:
default:
@@ -517,6 +603,9 @@
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_kill_socket(tech_pvt->rtp_session);
}
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_rtp_kill_socket(tech_pvt->video_rtp_session);
+ }
break;
}
@@ -774,7 +863,10 @@
/*.waitfor_read */ sofia_waitfor_write,
/*.send_dtmf */ sofia_send_dtmf,
/*.receive_message */ sofia_receive_message,
- /*.receive_event */ sofia_receive_event
+ /*.receive_event */ sofia_receive_event,
+ /*.state_change*/ NULL,
+ /*.read_video_frame*/ sofia_read_video_frame,
+ /*.write_video_frame*/ sofia_write_video_frame
};
static const switch_state_handler_table_t sofia_event_handlers = {
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Thu Apr 19 17:40:50 2007
@@ -137,7 +137,9 @@
TFLAG_BUGGY_2833 = (1 << 21),
TFLAG_SIP_HOLD = (1 << 22),
TFLAG_INB_NOMEDIA = (1 << 23),
- TFLAG_LATE_NEGOTIATION = (1 << 24)
+ TFLAG_LATE_NEGOTIATION = (1 << 24),
+ TFLAG_SDP = (1 << 25),
+ TFLAG_VIDEO = (1 << 26)
} TFLAGS;
struct mod_sofia_globals {
@@ -310,7 +312,23 @@
nua_handle_t *nh;
nua_handle_t *nh2;
sip_contact_t *contact;
- int hangup_status;
+ /** VIDEO **/
+ switch_frame_t video_read_frame;
+ switch_codec_t video_read_codec;
+ switch_codec_t video_write_codec;
+ switch_rtp_t *video_rtp_session;
+ switch_port_t adv_sdp_video_port;
+ switch_port_t local_sdp_video_port;
+ char *video_rm_encoding;
+ switch_payload_t video_pt;
+ unsigned long video_rm_rate;
+ uint32_t video_codec_ms;
+ char *remote_sdp_video_ip;
+ switch_port_t remote_sdp_video_port;
+ char *video_rm_fmtp;
+ switch_payload_t video_agreed_pt;
+ char *video_fmtp_out;
+ uint32_t video_count;
};
struct callback_t {
@@ -428,3 +446,4 @@
switch_core_db_callback_func_t callback,
void *pdata);
char *sofia_glue_execute_sql2str(sofia_profile_t *profile, switch_mutex_t *mutex, char *sql, char *resbuf, size_t len);
+void sofia_glue_check_video_codecs(private_object_t *tech_pvt);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Apr 19 17:40:50 2007
@@ -924,14 +924,8 @@
nua_ack(nh, TAG_END());
break;
case nua_callstate_received:
-
- if (session && switch_core_session_running(session)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Re-Entering Call State Received!\n");
- goto done;
- }
-
- if (channel) {
- if (r_sdp) {
+ if (tech_pvt && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
+ if (r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOMEDIA");
switch_set_flag_locked(tech_pvt, TFLAG_READY);
@@ -1015,7 +1009,7 @@
break;
case nua_callstate_completed:
if (tech_pvt && r_sdp) {
- if (r_sdp) {
+ if (r_sdp) { // && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
goto done;
} else {
@@ -1078,10 +1072,10 @@
goto done;
}
- if (!r_sdp) {
+ if (!r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
r_sdp = (const char *) switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);
}
- if (r_sdp) {
+ if (r_sdp && !switch_test_flag(tech_pvt, TFLAG_SDP)) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
switch_set_flag_locked(tech_pvt, TFLAG_ANS);
switch_channel_mark_answered(channel);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Thu Apr 19 17:40:50 2007
@@ -34,6 +34,8 @@
*/
#include "mod_sofia.h"
+switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt);
+switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force);
void sofia_glue_set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, char *sr, int force)
{
@@ -41,6 +43,7 @@
switch_time_t now = switch_time_now();
int ptime = 0;
int rate = 0;
+ uint32_t v_port;
if (!force && !ip && !sr && switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
return;
@@ -56,6 +59,8 @@
port = tech_pvt->proxy_sdp_audio_port;
}
}
+
+
if (!sr) {
sr = "sendrecv";
}
@@ -63,7 +68,10 @@
snprintf(buf, sizeof(buf),
"v=0\n"
"o=FreeSWITCH %d%" SWITCH_TIME_T_FMT " %d%" SWITCH_TIME_T_FMT " IN IP4 %s\n"
- "s=FreeSWITCH\n" "c=IN IP4 %s\n" "t=0 0\n" "a=%s\n" "m=audio %d RTP/AVP", port, now, port, now, ip, ip, sr, port);
+ "s=FreeSWITCH\n"
+ "c=IN IP4 %s\n" "t=0 0\n"
+ "a=%s\n"
+ "m=audio %d RTP/AVP", port, now, port, now, ip, ip, sr, port);
if (tech_pvt->rm_encoding) {
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->pt);
@@ -72,6 +80,10 @@
for (i = 0; i < tech_pvt->num_codecs; i++) {
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+ if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
+ continue;
+ }
+
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", imp->ianacode);
if (!ptime) {
ptime = imp->microseconds_per_frame / 1000;
@@ -105,6 +117,10 @@
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
uint32_t rfc_3551_sucks = imp->samples_per_second;
+ if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
+ continue;
+ }
+
if (!rate) {
rate = imp->samples_per_second;
}
@@ -136,6 +152,65 @@
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=ptime:%d\n", ptime);
}
+
+ if (switch_test_flag(tech_pvt, TFLAG_VIDEO)) {
+ sofia_glue_tech_choose_video_port(tech_pvt);
+ if ((v_port = tech_pvt->adv_sdp_video_port)) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "m=video %d RTP/AVP", v_port);
+ sofia_glue_tech_set_video_codec(tech_pvt, 0);
+
+
+ /*****************************/
+ if (tech_pvt->video_rm_encoding) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->video_pt);
+ } else if (tech_pvt->num_codecs) {
+ int i;
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", imp->ianacode);
+ if (!ptime) {
+ ptime = imp->microseconds_per_frame / 1000;
+ }
+ }
+ }
+
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "\n");
+
+ if (tech_pvt->rm_encoding) {
+ rate = tech_pvt->video_rm_rate;
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d %s/%ld\n", tech_pvt->video_pt, tech_pvt->video_rm_encoding, tech_pvt->video_rm_rate);
+ if (tech_pvt->video_fmtp_out) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=fmtp:%d %s\n", tech_pvt->video_pt, tech_pvt->video_fmtp_out);
+ }
+ } else if (tech_pvt->num_codecs) {
+ int i;
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ if (!rate) {
+ rate = imp->samples_per_second;
+ }
+
+
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d %s/%d\n", imp->ianacode, imp->iananame, imp->samples_per_second);
+ if (imp->fmtp) {
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=fmtp:%d %s\n", imp->ianacode, imp->fmtp);
+ }
+ }
+ }
+ }
+ }
+ /*****************************/
+
tech_pvt->local_sdp_str = switch_core_session_strdup(tech_pvt->session, buf);
}
@@ -146,11 +221,11 @@
char *ocodec = NULL;
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
- return;
+ goto end;
}
if (tech_pvt->num_codecs) {
- return;
+ goto end;
}
assert(tech_pvt->session != NULL);
@@ -192,6 +267,26 @@
sizeof(tech_pvt->codecs) / sizeof(tech_pvt->codecs[0]));
}
+ end:
+
+ sofia_glue_check_video_codecs(tech_pvt);
+
+}
+
+void sofia_glue_check_video_codecs(private_object_t *tech_pvt)
+{
+ if (tech_pvt->num_codecs && !switch_test_flag(tech_pvt, TFLAG_VIDEO)) {
+ int i;
+
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ if (tech_pvt->codecs[i]->codec_type == SWITCH_CODEC_TYPE_VIDEO) {
+ tech_pvt->video_count++;
+ }
+ }
+ if (tech_pvt->video_count) {
+ switch_set_flag_locked(tech_pvt, TFLAG_VIDEO);
+ }
+ }
}
@@ -297,6 +392,42 @@
return SWITCH_STATUS_SUCCESS;
}
+
+
+switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt)
+{
+ char *ip = tech_pvt->profile->rtpip;
+ switch_channel_t *channel;
+ switch_port_t sdp_port;
+ char tmp[50];
+
+ channel = switch_core_session_get_channel(tech_pvt->session);
+
+ if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA) || tech_pvt->adv_sdp_video_port) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+
+ tech_pvt->local_sdp_video_port = switch_rtp_request_port();
+ sdp_port = tech_pvt->local_sdp_video_port;
+
+ if (tech_pvt->profile->extrtpip) {
+ if (sofia_glue_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) !=
+ SWITCH_STATUS_SUCCESS) {
+ return SWITCH_STATUS_FALSE;
+ }
+ }
+
+ tech_pvt->adv_sdp_video_port = sdp_port;
+
+ snprintf(tmp, sizeof(tmp), "%d", sdp_port);
+ switch_channel_set_variable(channel, SWITCH_LOCAL_VIDEO_IP_VARIABLE, tech_pvt->adv_sdp_audio_ip);
+ switch_channel_set_variable(channel, SWITCH_LOCAL_VIDEO_PORT_VARIABLE, tmp);
+
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
{
char rpid[1024] = { 0 };
@@ -555,6 +686,77 @@
}
switch_rtp_destroy(&tech_pvt->rtp_session);
}
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_rtp_destroy(&tech_pvt->video_rtp_session);
+ }
+}
+
+switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int force)
+{
+ switch_channel_t *channel;
+
+ if (tech_pvt->video_read_codec.implementation) {
+ if (!force) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+ if (strcasecmp(tech_pvt->video_read_codec.implementation->iananame, tech_pvt->video_rm_encoding) ||
+ tech_pvt->video_read_codec.implementation->samples_per_second != tech_pvt->video_rm_rate) {
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Changing Codec from %s to %s\n",
+ tech_pvt->video_read_codec.implementation->iananame, tech_pvt->video_rm_encoding);
+ switch_core_codec_destroy(&tech_pvt->video_read_codec);
+ switch_core_codec_destroy(&tech_pvt->video_write_codec);
+ //switch_core_session_reset(tech_pvt->session);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Already using %s\n", tech_pvt->video_read_codec.implementation->iananame);
+ return SWITCH_STATUS_SUCCESS;
+ }
+ }
+
+ channel = switch_core_session_get_channel(tech_pvt->session);
+ assert(channel != NULL);
+
+ if (!tech_pvt->video_rm_encoding) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec with no name?\n");
+ return SWITCH_STATUS_FALSE;
+ }
+
+ if (switch_core_codec_init(&tech_pvt->video_read_codec,
+ tech_pvt->video_rm_encoding,
+ tech_pvt->video_rm_fmtp,
+ tech_pvt->video_rm_rate,
+ 0,
+ //tech_pvt->video_codec_ms,
+ 1,
+ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+ NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
+ return SWITCH_STATUS_FALSE;
+ } else {
+ if (switch_core_codec_init(&tech_pvt->video_write_codec,
+ tech_pvt->video_rm_encoding,
+ tech_pvt->video_rm_fmtp,
+ tech_pvt->video_rm_rate,
+ 0,//tech_pvt->video_codec_ms,
+ 1,
+ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+ NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
+ return SWITCH_STATUS_FALSE;
+ } else {
+ int ms;
+ tech_pvt->video_read_frame.rate = tech_pvt->video_rm_rate;
+ ms = tech_pvt->video_write_codec.implementation->microseconds_per_frame / 1000;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Set VIDEO Codec %s %s/%ld %d ms\n",
+ switch_channel_get_name(channel), tech_pvt->video_rm_encoding, tech_pvt->video_rm_rate, tech_pvt->video_codec_ms);
+ tech_pvt->video_read_frame.codec = &tech_pvt->video_read_codec;
+
+ //switch_core_session_set_read_codec(tech_pvt->session, &tech_pvt->read_codec);
+ //switch_core_session_set_write_codec(tech_pvt->session, &tech_pvt->write_codec);
+ tech_pvt->fmtp_out = switch_core_session_strdup(tech_pvt->session, tech_pvt->video_write_codec.fmtp_out);
+ }
+ }
+ return SWITCH_STATUS_SUCCESS;
}
switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
@@ -625,6 +827,9 @@
}
+
+
+
switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt)
{
int bw, ms;
@@ -674,7 +879,7 @@
flags |= SWITCH_RTP_FLAG_AUTO_CNG;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "RTP [%s] %s:%d->%s:%d codec: %u ms: %d\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "AUDIO RTP [%s] %s:%d->%s:%d codec: %u ms: %d\n",
switch_channel_get_name(channel),
tech_pvt->local_sdp_audio_ip,
tech_pvt->local_sdp_audio_port,
@@ -690,9 +895,9 @@
if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port, &err) !=
SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "AUDIO RTP REPORTS ERROR: [%s]\n", err);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP CHANGING DEST TO: [%s:%d]\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "AUDIO RTP CHANGING DEST TO: [%s:%d]\n",
tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
/* Reactivate the NAT buster flag. */
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
@@ -722,7 +927,7 @@
if ((vad_in && inb) || (vad_out && !inb)) {
switch_rtp_enable_vad(tech_pvt->rtp_session, tech_pvt->session, &tech_pvt->read_codec, SWITCH_VAD_FLAG_TALKING);
switch_set_flag_locked(tech_pvt, TFLAG_VAD);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP Engage VAD for %s ( %s %s )\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "AUDIO RTP Engage VAD for %s ( %s %s )\n",
switch_channel_get_name(switch_core_session_get_channel(tech_pvt->session)), vad_in ? "in" : "", vad_out ? "out" : "");
}
@@ -732,6 +937,41 @@
if (tech_pvt->cng_pt) {
switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);
}
+
+ sofia_glue_check_video_codecs(tech_pvt);
+
+ if (switch_test_flag(tech_pvt, TFLAG_VIDEO) && tech_pvt->video_rm_encoding) {
+ flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_AUTOADJ | SWITCH_RTP_FLAG_DATAWAIT | SWITCH_RTP_FLAG_NOBLOCK | SWITCH_RTP_FLAG_RAW_WRITE);
+
+ sofia_glue_tech_set_video_codec(tech_pvt, 0);
+
+ tech_pvt->video_rtp_session = switch_rtp_new(tech_pvt->local_sdp_audio_ip,
+ tech_pvt->local_sdp_video_port,
+ tech_pvt->remote_sdp_video_ip,
+ tech_pvt->remote_sdp_video_port,
+ tech_pvt->video_agreed_pt,
+ tech_pvt->video_read_codec.implementation->samples_per_frame,
+ 0,//tech_pvt->video_codec_ms * 1000,
+ (switch_rtp_flag_t) flags,
+ NULL,
+ NULL,//tech_pvt->profile->timer_name,
+ &err, switch_core_session_get_pool(tech_pvt->session));
+
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "VIDEO RTP [%s] %s:%d->%s:%d codec: %u ms: %d [%s]\n",
+ switch_channel_get_name(channel),
+ tech_pvt->local_sdp_audio_ip,
+ tech_pvt->local_sdp_video_port,
+ tech_pvt->remote_sdp_video_ip,
+ tech_pvt->remote_sdp_video_port, tech_pvt->video_agreed_pt,
+ 0,//tech_pvt->video_read_codec.implementation->microseconds_per_frame / 1000,
+ switch_rtp_ready(tech_pvt->video_rtp_session) ? "SUCCESS" : err);
+
+
+ if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
+ switch_channel_set_flag(channel, CF_VIDEO);
+ }
+ }
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
@@ -783,8 +1023,6 @@
return SWITCH_STATUS_FALSE;
}
-
-
uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
{
uint8_t match = 0;
@@ -811,6 +1049,7 @@
if (switch_strlen_zero(a->a_name)) {
continue;
}
+
if (!strcasecmp(a->a_name, "sendonly")) {
if (!switch_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
char *stream;
@@ -840,15 +1079,17 @@
sdp_connection_t *connection;
ptime = dptime;
- for (a = m->m_attributes; a; a = a->a_next) {
- if (!strcasecmp(a->a_name, "ptime") && a->a_value) {
- ptime = atoi(a->a_value);
- }
- }
+
if (m->m_type == sdp_media_audio) {
sdp_rtpmap_t *map;
+ for (a = m->m_attributes; a; a = a->a_next) {
+ if (!strcasecmp(a->a_name, "ptime") && a->a_value) {
+ ptime = atoi(a->a_value);
+ }
+ }
+
connection = sdp->sdp_connection;
if (m->m_connections) {
connection = m->m_connections;
@@ -896,14 +1137,18 @@
for (i = 0; i < tech_pvt->num_codecs; i++) {
const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec Compare [%s:%d]/[%s:%d]\n",
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) {
+ continue;
+ }
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Audio Codec Compare [%s:%d]/[%s:%d]\n",
rm_encoding, map->rm_pt, imp->iananame, imp->ianacode);
if (map->rm_pt < 96) {
match = (map->rm_pt == imp->ianacode) ? 1 : 0;
} else {
match = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
}
-
+
if (match && (map->rm_rate == imp->samples_per_second)) {
if (ptime && ptime * 1000 != imp->microseconds_per_frame) {
near_match = imp;
@@ -963,9 +1208,83 @@
}
}
}
+ } else if (m->m_type == sdp_media_video) {
+ sdp_rtpmap_t *map;
+ const char *rm_encoding;
+ int framerate = 0;
+ const switch_codec_implementation_t *mimp = NULL;
+ int vmatch = 0, i;
+
+ connection = sdp->sdp_connection;
+ if (m->m_connections) {
+ connection = m->m_connections;
+ }
+
+ if (!connection) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find a c= line in the sdp at media or session level!\n");
+ match = 0;
+ break;
+ }
+
+ for (map = m->m_rtpmaps; map; map = map->rm_next) {
+
+ for (a = m->m_attributes; a; a = a->a_next) {
+ if (!strcasecmp(a->a_name, "framerate") && a->a_value) {
+ framerate = atoi(a->a_value);
+ }
+ }
+ if (!(rm_encoding = map->rm_encoding)) {
+ rm_encoding = "";
+ }
+
+ for (i = 0; i < tech_pvt->num_codecs; i++) {
+ const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
+
+ if (imp->codec_type != SWITCH_CODEC_TYPE_VIDEO) {
+ continue;
+ }
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Video Codec Compare [%s:%d]/[%s:%d]\n",
+ rm_encoding, map->rm_pt, imp->iananame, imp->ianacode);
+ if (map->rm_pt < 96) {
+ vmatch = (map->rm_pt == imp->ianacode) ? 1 : 0;
+ } else {
+ vmatch = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
+ }
+
+
+ if (vmatch && (map->rm_rate == imp->samples_per_second)) {
+ mimp = imp;
+ break;
+ } else {
+ vmatch = 0;
+ }
+ }
+
+ if (mimp) {
+ if ((tech_pvt->video_rm_encoding = switch_core_session_strdup(session, (char *) rm_encoding))) {
+ char tmp[50];
+ tech_pvt->video_pt = (switch_payload_t) map->rm_pt;
+ tech_pvt->video_rm_rate = map->rm_rate;
+ tech_pvt->video_codec_ms = mimp->microseconds_per_frame / 1000;
+ tech_pvt->remote_sdp_video_ip = switch_core_session_strdup(session, (char *) connection->c_address);
+ tech_pvt->video_rm_fmtp = switch_core_session_strdup(session, (char *) map->rm_fmtp);
+ tech_pvt->remote_sdp_video_port = (switch_port_t) m->m_port;
+ tech_pvt->video_agreed_pt = (switch_payload_t) map->rm_pt;
+ snprintf(tmp, sizeof(tmp), "%d", tech_pvt->remote_sdp_video_port);
+ switch_channel_set_variable(channel, SWITCH_REMOTE_VIDEO_IP_VARIABLE, tech_pvt->remote_sdp_audio_ip);
+ switch_channel_set_variable(channel, SWITCH_REMOTE_VIDEO_PORT_VARIABLE, tmp);
+ } else {
+ vmatch = 0;
+ }
+ }
+ }
}
+
}
+ switch_set_flag_locked(tech_pvt, TFLAG_SDP);
+
return match;
}
Modified: freeswitch/trunk/src/switch_core_event_hook.c
==============================================================================
--- freeswitch/trunk/src/switch_core_event_hook.c (original)
+++ freeswitch/trunk/src/switch_core_event_hook.c Thu Apr 19 17:40:50 2007
@@ -118,6 +118,50 @@
}
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_read_frame(switch_core_session_t *session, switch_video_read_frame_hook_t video_read_frame)
+{
+ switch_io_event_hook_video_read_frame_t *hook, *ptr;
+
+ assert(video_read_frame != NULL);
+ if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
+ hook->video_read_frame = video_read_frame;
+ if (!session->event_hooks.video_read_frame) {
+ session->event_hooks.video_read_frame = hook;
+ } else {
+ for (ptr = session->event_hooks.video_read_frame; ptr && ptr->next; ptr = ptr->next);
+ ptr->next = hook;
+
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ return SWITCH_STATUS_MEMERR;
+
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_video_write_frame(switch_core_session_t *session, switch_video_write_frame_hook_t video_write_frame)
+{
+ switch_io_event_hook_video_write_frame_t *hook, *ptr;
+
+ assert(video_write_frame != NULL);
+ if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
+ hook->video_write_frame = video_write_frame;
+ if (!session->event_hooks.video_write_frame) {
+ session->event_hooks.video_write_frame = hook;
+ } else {
+ for (ptr = session->event_hooks.video_write_frame; ptr && ptr->next; ptr = ptr->next);
+ ptr->next = hook;
+
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ return SWITCH_STATUS_MEMERR;
+
+}
+
SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_kill_channel(switch_core_session_t *session, switch_kill_channel_hook_t kill_channel)
{
switch_io_event_hook_kill_channel_t *hook, *ptr;
Modified: freeswitch/trunk/src/switch_core_io.c
==============================================================================
--- freeswitch/trunk/src/switch_core_io.c (original)
+++ freeswitch/trunk/src/switch_core_io.c Thu Apr 19 17:40:50 2007
@@ -35,6 +35,61 @@
#include "private/switch_core.h"
+SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id)
+{
+ switch_io_event_hook_video_write_frame_t *ptr;
+ switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_io_flag_t flags = 0;
+ if (session->endpoint_interface->io_routines->write_video_frame) {
+ if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, timeout, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
+ for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) {
+ if ((status = ptr->video_write_frame(session, frame, timeout, flags, stream_id)) != SWITCH_STATUS_SUCCESS) {
+ break;
+ }
+ }
+ }
+ }
+ return status;
+}
+
+SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id)
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_io_event_hook_video_read_frame_t *ptr;
+
+ if (session->endpoint_interface->io_routines->read_video_frame) {
+ if ((status =
+ session->endpoint_interface->io_routines->read_video_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) {
+ for (ptr = session->event_hooks.video_read_frame; ptr; ptr = ptr->next) {
+ if ((status = ptr->video_read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) != SWITCH_STATUS_SUCCESS) {
+ break;
+ }
+ }
+ }
+ }
+
+ if (status != SWITCH_STATUS_SUCCESS) {
+ goto done;
+ }
+
+ if (!(*frame)) {
+ goto done;
+ }
+
+ assert(session != NULL);
+ assert(*frame != NULL);
+
+ if (switch_test_flag(*frame, SFF_CNG)) {
+ status = SWITCH_STATUS_SUCCESS;
+ goto done;
+ }
+
+ done:
+
+ return status;
+}
+
+
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id)
{
switch_io_event_hook_read_frame_t *ptr;
@@ -128,6 +183,10 @@
session->raw_read_frame.samples = session->raw_read_frame.datalen / sizeof(int16_t);
session->raw_read_frame.rate = read_frame->rate;
session->raw_read_frame.timestamp = read_frame->timestamp;
+ session->raw_read_frame.ssrc = read_frame->ssrc;
+ session->raw_read_frame.seq = read_frame->seq;
+ session->raw_read_frame.m = read_frame->m;
+ session->raw_read_frame.payload = read_frame->payload;
read_frame = &session->raw_read_frame;
break;
case SWITCH_STATUS_NOOP:
@@ -139,6 +198,10 @@
session->raw_read_frame.samples = session->raw_read_frame.datalen / sizeof(int16_t);
session->raw_read_frame.timestamp = read_frame->timestamp;
session->raw_read_frame.rate = read_frame->rate;
+ session->raw_read_frame.ssrc = read_frame->ssrc;
+ session->raw_read_frame.seq = read_frame->seq;
+ session->raw_read_frame.m = read_frame->m;
+ session->raw_read_frame.payload = read_frame->payload;
read_frame = &session->raw_read_frame;
status = SWITCH_STATUS_SUCCESS;
break;
@@ -244,6 +307,10 @@
session->enc_read_frame.codec = session->read_codec;
session->enc_read_frame.samples = session->read_codec->implementation->bytes_per_frame / sizeof(int16_t);
session->enc_read_frame.timestamp = read_frame->timestamp;
+ session->enc_read_frame.rate = read_frame->rate;
+ session->enc_read_frame.ssrc = read_frame->ssrc;
+ session->enc_read_frame.seq = read_frame->seq;
+ session->enc_read_frame.m = read_frame->m;
session->enc_read_frame.payload = session->read_codec->implementation->ianacode;
*frame = &session->enc_read_frame;
break;
@@ -252,6 +319,9 @@
session->raw_read_frame.samples = enc_frame->codec->implementation->samples_per_frame;
session->raw_read_frame.timestamp = read_frame->timestamp;
session->raw_read_frame.payload = enc_frame->codec->implementation->ianacode;
+ session->raw_read_frame.m = read_frame->m;
+ session->raw_read_frame.ssrc = read_frame->ssrc;
+ session->raw_read_frame.seq = read_frame->seq;
*frame = &session->raw_read_frame;
status = SWITCH_STATUS_SUCCESS;
break;
@@ -371,6 +441,10 @@
session->raw_write_frame.samples = session->raw_write_frame.datalen / sizeof(int16_t);
session->raw_write_frame.timestamp = frame->timestamp;
session->raw_write_frame.rate = frame->rate;
+ session->raw_write_frame.m = frame->m;
+ session->raw_write_frame.ssrc = frame->ssrc;
+ session->raw_write_frame.seq = frame->seq;
+ session->raw_write_frame.payload = frame->payload;
write_frame = &session->raw_write_frame;
break;
case SWITCH_STATUS_BREAK:
@@ -500,12 +574,18 @@
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
+ session->enc_write_frame.m = frame->m;
+ session->enc_write_frame.ssrc = frame->ssrc;
+ session->enc_write_frame.seq = frame->seq;
write_frame = &session->enc_write_frame;
break;
case SWITCH_STATUS_NOOP:
enc_frame->codec = session->write_codec;
enc_frame->samples = enc_frame->datalen / sizeof(int16_t);
enc_frame->timestamp = frame->timestamp;
+ enc_frame->m = frame->m;
+ enc_frame->seq = frame->seq;
+ enc_frame->ssrc = frame->ssrc;
enc_frame->payload = enc_frame->codec->implementation->ianacode;
write_frame = enc_frame;
status = SWITCH_STATUS_SUCCESS;
@@ -553,6 +633,9 @@
session->enc_write_frame.codec = session->write_codec;
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
+ session->enc_write_frame.m = frame->m;
+ session->enc_write_frame.ssrc = frame->ssrc;
+ session->enc_write_frame.seq = frame->seq;
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
write_frame = &session->enc_write_frame;
if (!session->read_resampler) {
@@ -571,6 +654,9 @@
session->enc_write_frame.codec = session->write_codec;
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
+ session->enc_write_frame.m = frame->m;
+ session->enc_write_frame.ssrc = frame->ssrc;
+ session->enc_write_frame.seq = frame->seq;
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
write_frame = &session->enc_write_frame;
break;
@@ -578,6 +664,9 @@
enc_frame->codec = session->write_codec;
enc_frame->samples = enc_frame->datalen / sizeof(int16_t);
enc_frame->timestamp = frame->timestamp;
+ enc_frame->m = frame->m;
+ enc_frame->ssrc = frame->ssrc;
+ enc_frame->seq = frame->seq;
enc_frame->payload = enc_frame->codec->implementation->ianacode;
write_frame = enc_frame;
status = SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Thu Apr 19 17:40:50 2007
@@ -181,18 +181,9 @@
static void switch_core_standard_on_loopback(switch_core_session_t *session)
{
- switch_frame_t *frame;
- int stream_id;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard LOOPBACK\n");
-
- while (switch_channel_get_state(session->channel) == CS_LOOPBACK) {
- for (stream_id = 0; stream_id < session->stream_count; stream_id++) {
- if (switch_core_session_read_frame(session, &frame, -1, stream_id) == SWITCH_STATUS_SUCCESS) {
- switch_core_session_write_frame(session, frame, -1, stream_id);
- }
- }
- }
+ switch_ivr_session_echo(session);
}
static void switch_core_standard_on_transmit(switch_core_session_t *session)
Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c (original)
+++ freeswitch/trunk/src/switch_ivr_async.c Thu Apr 19 17:40:50 2007
@@ -31,6 +31,71 @@
*/
#include <switch.h>
+struct echo_helper {
+ switch_core_session_t *session;
+ int up;
+};
+
+static void *SWITCH_THREAD_FUNC echo_video_thread(switch_thread_t *thread, void *obj)
+{
+ struct echo_helper *eh = obj;
+ switch_core_session_t *session = eh->session;
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ switch_status_t status;
+ switch_frame_t *read_frame;
+
+ eh->up = 1;
+ while(switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_LOOPBACK) {
+ status = switch_core_session_read_video_frame(session, &read_frame, -1, 0);
+
+ if (!SWITCH_READ_ACCEPTABLE(status)) {
+ break;
+ }
+
+ switch_core_session_write_video_frame(session, read_frame, -1, 0);
+
+ }
+ eh->up = 0;
+ return NULL;
+}
+
+SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session)
+{
+ switch_status_t status;
+ switch_frame_t *read_frame;
+ struct echo_helper eh = {0};
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ switch_thread_t *thread;
+ switch_threadattr_t *thd_attr = NULL;
+
+
+ switch_channel_answer(channel);
+
+ if (switch_channel_test_flag(channel, CF_VIDEO)) {
+ eh.session = session;
+ switch_threadattr_create(&thd_attr, switch_core_session_get_pool(session));
+ switch_threadattr_detach_set(thd_attr, 1);
+ switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+ switch_thread_create(&thread, thd_attr, echo_video_thread, &eh, switch_core_session_get_pool(session));
+ }
+
+ while(switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_LOOPBACK) {
+ status = switch_core_session_read_frame(session, &read_frame, -1, 0);
+ if (!SWITCH_READ_ACCEPTABLE(status)) {
+ break;
+ }
+ switch_core_session_write_frame(session, read_frame, -1, 0);
+ }
+
+ if (eh.up) {
+ while(eh.up) {
+ switch_yield(1000);
+ }
+ }
+}
+
+
+
static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, switch_abc_type_t type)
{
switch_file_handle_t *fh = (switch_file_handle_t *) user_data;
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu Apr 19 17:40:50 2007
@@ -352,8 +352,7 @@
rtp_session->sock = new_sock;
new_sock = NULL;
- if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)
- || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK)) {
+ if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK)) {
switch_socket_opt_set(rtp_session->sock, SWITCH_SO_NONBLOCK, TRUE);
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_NOBLOCK);
}
@@ -803,7 +802,7 @@
while (switch_rtp_ready(rtp_session)) {
bytes = sizeof(rtp_msg_t);
status = switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock, 0, (void *) &rtp_session->recv_msg, &bytes);
-
+
if (!SWITCH_STATUS_IS_BREAK(status) && rtp_session->timer.interval) {
switch_core_timer_step(&rtp_session->timer);
}
@@ -900,7 +899,11 @@
if (status == SWITCH_STATUS_BREAK || bytes == 0) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_DATAWAIT)) {
- switch_yield((rtp_session->ms_per_packet / 1000) * 750);
+ if (rtp_session->ms_per_packet) {
+ switch_yield((rtp_session->ms_per_packet / 1000) * 750);
+ } else {
+ switch_yield(1000);
+ }
continue;
}
return 0;
@@ -1136,13 +1139,16 @@
}
bytes = rtp_common_read(rtp_session, &frame->payload, &frame->flags);
-
+
frame->data = rtp_session->recv_msg.body;
frame->packet = &rtp_session->recv_msg;
frame->packetlen = bytes;
frame->source = __FILE__;
frame->flags |= SFF_RAW_RTP;
frame->timestamp = ntohl(rtp_session->recv_msg.header.ts);
+ frame->seq = ntohs(rtp_session->recv_msg.header.seq);
+ frame->ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
+ frame->m = rtp_session->recv_msg.header.m ? SWITCH_TRUE : SWITCH_FALSE;
if (bytes < 0) {
frame->datalen = 0;
@@ -1153,8 +1159,11 @@
} else {
bytes -= rtp_header_len;
}
-
+
frame->datalen = bytes;
+
+
+
return SWITCH_STATUS_SUCCESS;
}
@@ -1350,7 +1359,6 @@
switch_core_timer_check(&rtp_session->timer);
rtp_session->last_write_samplecount = rtp_session->timer.samplecount;
}
-
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void *) send_msg, &bytes);
}
@@ -1478,6 +1486,12 @@
payload = rtp_session->payload;
}
+ if (switch_test_flag(frame, SFF_RTP_HEADER)) {
+ return switch_rtp_write_manual(rtp_session, frame->data, frame->datalen, frame->m, frame->payload,
+ frame->timestamp, frame->seq, frame->ssrc, &frame->flags);
+ }
+
+
if (fwd) {
data = frame->packet;
len = frame->packetlen;
@@ -1551,7 +1565,7 @@
}
return (int) bytes;
- //return rtp_common_write(rtp_session, (void *) &send_msg, rtp_header_len + datalen, m, payload, NULL);
+ //return rtp_common_write(rtp_session, (void *) &send_msg, rtp_header_len + datalen, m, payload);
}
SWITCH_DECLARE(uint32_t) switch_rtp_get_ssrc(switch_rtp_t *rtp_session)
1
0
Author: mikej
Date: Thu Apr 19 15:30:24 2007
New Revision: 4976
Modified:
freeswitch/trunk/libs/sofia-sip/configure.ac
Log:
remove AM_MAINTAINER_MODE macro from development coppies, should only be in release versions
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Thu Apr 19 15:30:24 2007
@@ -29,7 +29,7 @@
SAC_CANONICAL_SYSTEM_CACHE_CHECK
AM_INIT_AUTOMAKE
-AM_MAINTAINER_MODE
+
AC_CONFIG_HEADERS([config.h])
AC_GNU_SOURCE
1
0
[commit] r4975 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/http libsofia-sip-ua/ipt/sofia-sip libsofia-sip-ua/msg libsofia-sip-ua/nua libsofia-sip-ua/sdp libsofia-sip-ua/sip libsofia-sip-ua/tport m4
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: mikej
Date: Thu Apr 19 15:17:12 2007
New Revision: 4975
Modified:
freeswitch/trunk/libs/sofia-sip/RELEASE
freeswitch/trunk/libs/sofia-sip/configure.ac
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/string0.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4
Log:
sync with sofia darcs tree
Modified: freeswitch/trunk/libs/sofia-sip/RELEASE
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/RELEASE (original)
+++ freeswitch/trunk/libs/sofia-sip/RELEASE Thu Apr 19 15:17:12 2007
@@ -74,6 +74,10 @@
Bugs fixed in this release
--------------------------
+- Fixed nua failing to refresh publication with re-PUBLISH.
+ Problem reported by Jan van den Bosch.
+- Fixed encoding of c= lines without IN address.
+ Problem reported by Saurav Sahu.
- Fixed status code sent to network and returned to the client if there was
an internal error while responding to a request.
The problem was reported by Michael Jerris and Joshua Engelbrecht.
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Thu Apr 19 15:17:12 2007
@@ -229,7 +229,6 @@
AC_HEADER_TIME
AC_TYPE_SIZE_T
-AC_STRUCT_SIN6
AC_SYS_SA_LEN
### checks for library functions
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am Thu Apr 19 15:17:12 2007
@@ -71,7 +71,7 @@
MSG_PARSER_AWK = ${srcdir}/../msg/msg_parser.awk
-AWK_HTTP_AWK = ${AWK} -f ${MSG_PARSER_AWK} module=http
+AWK_HTTP_AWK = LC_ALL=C ${AWK} -f ${MSG_PARSER_AWK} module=http
SS_HTTP_H = ${srcdir}/sofia-sip/http.h
@@ -79,15 +79,15 @@
sofia-sip/http_protos.h: ${srcdir}/sofia-sip/http_protos.h.in
@-mkdir sofia-sip 2>/dev/null || true
- ${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
+ ${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/http_protos.h.in ${SS_HTTP_H}
sofia-sip/http_tag.h: ${srcdir}/sofia-sip/http_tag.h.in
@-mkdir sofia-sip 2>/dev/null || true
- ${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
+ ${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/http_tag.h.in ${SS_HTTP_H}
http_tag.c: ${srcdir}/http_tag.c.in
- ${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
+ ${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/http_tag.c.in ${SS_HTTP_H}
http_parser_table.c: ${srcdir}/http_parser_table.c.in
- ${AWK_HTTP_AWK} PT=$@ TEMPLATE=${srcdir}/$@.in \
+ ${AWK_HTTP_AWK} PT=$@ TEMPLATE=${srcdir}/http_parser_table.c.in \
MC_HASH_SIZE=127 ${SS_HTTP_H}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/string0.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/string0.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/string0.h Thu Apr 19 15:17:12 2007
@@ -28,11 +28,11 @@
/**@file sofia-sip/string0.h
*
- * @brief String comparison functions accepting NULL pointers
- *
- * This module contains string comparison functions that can be called
- * with NULL pointer as argument.
+ * @brief Extra string function.
*
+ * String comparison functions accepting NULL pointers: str0cmp(),
+ * str0ncmp(), str0casecmp(), str0ncasecmp(). Also includes span functions
+ * testing at most @a n bytes: strncspn(), strnspn().
*/
#ifndef SU_CONFIG_H
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am Thu Apr 19 15:17:12 2007
@@ -85,7 +85,7 @@
MSG_PARSER_AWK = $(srcdir)/msg_parser.awk
-AWK_MSG_AWK = $(AWK) -f $(MSG_PARSER_AWK)
+AWK_MSG_AWK = LC_ALL=C $(AWK) -f $(MSG_PARSER_AWK)
${GENERATED_HC}: ${MSG_PARSER_AWK}
@@ -95,12 +95,12 @@
test_protos.h: ${srcdir}/test_protos.h.in
$(AWK_MSG_AWK) module=msg_test NO_MIDDLE=1 NO_LAST=1 \
- PR=$@ TEMPLATE=$(srcdir)/$@.in ${TEST_CLASS_H}
+ PR=$@ TEMPLATE=${srcdir}/test_protos.h.in ${TEST_CLASS_H}
test_table.c: ${srcdir}/test_table.c.in
$(AWK_MSG_AWK) module=msg_test prefix=msg \
MC_HASH_SIZE=127 multipart=msg_multipart \
- PT=$@ TEMPLATE=$(srcdir)/$@.in ${TEST_CLASS_H}
+ PT=$@ TEMPLATE=${srcdir}/test_table.c.in ${TEST_CLASS_H}
SS_MIME_H = ${srcdir}/sofia-sip/msg_mime.h
@@ -110,14 +110,17 @@
sofia-sip/msg_protos.h: ${srcdir}/sofia-sip/msg_protos.h.in
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_MSG_AWK) module=msg NO_FIRST=1 NO_MIDDLE=1 \
- PR=$@ TEMPLATE=$(srcdir)/$@.in ${SS_MIME_H}
+ PR=$@ TEMPLATE=${srcdir}/sofia-sip/msg_protos.h.in \
+ ${SS_MIME_H}
sofia-sip/msg_mime_protos.h: ${srcdir}/sofia-sip/msg_mime_protos.h.in
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_MSG_AWK) module=msg NO_FIRST=1 NO_LAST=1 \
- PR=$@ TEMPLATE=$(srcdir)/$@.in ${SS_MIME_H}
+ PR=$@ TEMPLATE=${srcdir}/sofia-sip/msg_mime_protos.h.in \
+ ${SS_MIME_H}
msg_mime_table.c: ${srcdir}/msg_mime_table.c.in
$(AWK_MSG_AWK) module=msg_multipart \
tprefix=msg prefix=mp MC_HASH_SIZE=127 \
- PT=$@ TEMPLATE=$(srcdir)/$@.in ${SS_MIME_H}
+ PT=$@ TEMPLATE=${srcdir}/msg_mime_table.c.in \
+ ${SS_MIME_H}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk Thu Apr 19 15:17:12 2007
@@ -201,7 +201,7 @@
}
else {
# Remove line with #version#
- gsub(/\n[^\n]*#version#[^\n]*\n/, "\n", p);
+ gsub(/\n[^#\n]*#version#[^\n]*/, "", p);
}
print p > PR;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c Thu Apr 19 15:17:12 2007
@@ -236,6 +236,9 @@
static int nua_publish_client_request(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
+static int nua_publish_client_check_restart(nua_client_request_t *cr,
+ int status, char const *phrase,
+ sip_t const *sip);
static int nua_publish_client_response(nua_client_request_t *cr,
int status, char const *phrase,
sip_t const *sip);
@@ -251,7 +254,7 @@
nua_publish_client_template,
nua_publish_client_init,
nua_publish_client_request,
- /* nua_publish_client_check_restart */ NULL,
+ nua_publish_client_check_restart,
nua_publish_client_response,
/* nua_publish_client_preliminary */ NULL
};
@@ -348,6 +351,34 @@
TAG_NEXT(tags));
}
+static int nua_publish_client_check_restart(nua_client_request_t *cr,
+ int status, char const *phrase,
+ sip_t const *sip)
+{
+ char const *restarting = NULL;
+
+ if (cr->cr_terminating || !cr->cr_usage)
+ ;
+ else if (status == 412)
+ restarting = phrase;
+ else if (200 <= status && status < 300 &&
+ sip->sip_expires && sip->sip_expires->ex_delta == 0)
+ restarting = "Immediate re-PUBLISH";
+
+ if (restarting) {
+ struct publish_usage *pu = nua_dialog_usage_private(cr->cr_usage);
+
+ if (pu) {
+ pu->pu_published = 0;
+ su_free(cr->cr_owner->nh_home, pu->pu_etag), pu->pu_etag = NULL;
+ if (nua_client_restart(cr, 100, restarting))
+ return 0;
+ }
+ }
+
+ return nua_base_client_check_restart(cr, status, phrase, sip);
+}
+
static int nua_publish_client_response(nua_client_request_t *cr,
int status, char const *phrase,
sip_t const *sip)
@@ -364,15 +395,7 @@
if (pu->pu_etag)
su_free(nh->nh_home, pu->pu_etag), pu->pu_etag = NULL;
- if (status == 412) {
- if (nua_client_restart(cr, 100, phrase))
- return 0;
- }
- else if (status < 300) {
- if (ex && ex->ex_delta == 0 &&
- nua_client_restart(cr, 100, "Trying re-PUBLISH"))
- return 0;
-
+ if (status < 300) {
pu->pu_published = 1;
pu->pu_etag = sip_etag_dup(nh->nh_home, sip->sip_etag);
@@ -384,6 +407,8 @@
else
SET_STATUS1(NUA_INTERNAL_ERROR);
}
+ else
+ nua_dialog_usage_set_refresh(du, ex->ex_delta);
}
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c Thu Apr 19 15:17:12 2007
@@ -763,6 +763,10 @@
run_c_until(ctx, -1, save_until_final_response);
TEST_1(e = c->events->head);
TEST_E(e->data->e_event, nua_r_unregister);
+ if (e->data->e_status == 100) {
+ TEST_1(e = e->next);
+ TEST_E(e->data->e_event, nua_r_unregister);
+ }
TEST(e->data->e_status, 200);
TEST_1(sip = sip_object(e->data->e_msg));
TEST_1(!sip->sip_contact);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_simple.c Thu Apr 19 15:17:12 2007
@@ -243,6 +243,8 @@
return 0;
}
+char const *test_etag = "tagtag";
+
int respond_with_etag(CONDITION_PARAMS)
{
msg_t *with = nua_current_request(nua);
@@ -256,18 +258,18 @@
char const *etag;
case nua_i_publish:
etag = sip->sip_if_match ? sip->sip_if_match->g_value : NULL;
- if (sip->sip_if_match && (etag == NULL || strcmp(etag, "tagtag"))) {
+ if (sip->sip_if_match && (etag == NULL || strcmp(etag, test_etag))) {
RESPOND(ep, call, nh, SIP_412_PRECONDITION_FAILED,
NUTAG_WITH(with),
TAG_END());
}
else {
- RESPOND(ep, call, nh, SIP_200_OK,
- NUTAG_WITH(with),
- SIPTAG_ETAG_STR("tagtag"),
- SIPTAG_EXPIRES_STR("3600"),
- SIPTAG_EXPIRES(sip->sip_expires), /* overrides 3600 */
- TAG_END());
+ RESPOND(ep, call, nh, SIP_200_OK,
+ NUTAG_WITH(with),
+ SIPTAG_ETAG_STR(test_etag),
+ SIPTAG_EXPIRES_STR("3600"),
+ SIPTAG_EXPIRES(sip->sip_expires), /* overrides 3600 */
+ TAG_END());
}
return 1;
default:
@@ -398,6 +400,7 @@
SIPTAG_EVENT_STR("presence"),
SIPTAG_CONTENT_TYPE_STR("text/urllist"),
SIPTAG_PAYLOAD_STR("sip:example.com\n"),
+ SIPTAG_EXPIRES_STR("5"),
TAG_END());
run_ab_until(ctx, -1, save_until_final_response, -1, respond_with_etag);
@@ -409,7 +412,7 @@
TEST(e->data->e_status, 200);
TEST_1(sip = sip_object(e->data->e_msg));
TEST_1(sip->sip_etag);
- TEST_S(sip->sip_etag->g_string, "tagtag");
+ TEST_S(sip->sip_etag->g_string, test_etag);
TEST_1(!e->next);
/*
@@ -424,6 +427,41 @@
free_events_in_list(ctx, b->events);
nua_handle_destroy(b_call->nh), b_call->nh = NULL;
+ if (!ctx->expensive && 0)
+ goto skip_republish;
+
+ run_ab_until(ctx, -1, save_until_final_response, -1, respond_with_etag);
+
+ /* Client events: nua_r_publish
+ */
+ TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_r_publish);
+ TEST(e->data->e_status, 200);
+ TEST_1(sip = sip_object(e->data->e_msg));
+ TEST_1(sip->sip_etag);
+ TEST_S(sip->sip_etag->g_string, test_etag);
+ TEST_1(!e->next);
+
+ free_events_in_list(ctx, a->events);
+
+ /*
+ Server events:
+ nua_i_publish
+ */
+ TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_i_publish);
+ TEST(e->data->e_status, 100);
+ TEST_1(sip = sip_object(e->data->e_msg));
+ TEST_1(sip = sip_object(e->data->e_msg));
+ TEST_1(sip->sip_if_match);
+ TEST_S(sip->sip_if_match->g_string, "tagtag");
+ TEST_1(!sip->sip_content_type);
+ TEST_1(!sip->sip_payload);
+ TEST_1(!e->next);
+
+ free_events_in_list(ctx, b->events);
+ nua_handle_destroy(b_call->nh), b_call->nh = NULL;
+
+ skip_republish:
+
UNPUBLISH(a, a_call, a_call->nh, TAG_END());
run_ab_until(ctx, -1, save_until_final_response, -1, respond_with_etag);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c Thu Apr 19 15:17:12 2007
@@ -405,7 +405,13 @@
return;
}
- sdp_printf(p, "%s%s%s", nettype, addrtype, c->c_address);
+ if (nettype && addrtype)
+ sdp_printf(p, "%s%s%s", nettype, addrtype, c->c_address);
+ else if (nettype)
+ sdp_printf(p, "%s%s%s", nettype, c->c_address);
+ else
+ sdp_printf(p, "%s", c->c_address);
+
if (c->c_mcast || c->c_ttl) {
sdp_printf(p, "/%u", c->c_ttl);
if (c->c_groups > 1)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c Thu Apr 19 15:17:12 2007
@@ -474,7 +474,7 @@
"o=- 2353687640 2353687640 IN IP4 128.3.4.5\r\n"
"s=marketing\r\n"
"e=john.jones.3(a)chinet.net\r\n"
- "c= TN RFC2543 +1-201-406-4090\r\n"
+ "c=TN RFC2543 +1-201-406-4090\r\n"
"t=2353687640 0\r\n"
"m=audio 1 voice -\r\n"
;
@@ -496,6 +496,8 @@
su_home_t *home = su_home_create();
sdp_parser_t *parser;
sdp_session_t *sdp;
+ sdp_printer_t *printer;
+ char const *m;
BEGIN();
@@ -504,6 +506,11 @@
TEST_1((parser = sdp_parse(home, pint_msg, sizeof(pint_msg) - 1, sdp_f_anynet)));
TEST_1((sdp = sdp_session(parser)));
+ TEST_1((printer = sdp_print(home, sdp, NULL, -1, 0)));
+ TEST_1((m = sdp_message(printer)));
+ TEST_S(m, pint_msg);
+ TEST(sdp_message_size(printer), sizeof(pint_msg) - 1);
+
TEST_1((parser = sdp_parse(home, pint_torture_msg, sizeof(pint_torture_msg) - 1,
sdp_f_anynet)));
TEST_1((sdp = sdp_session(parser)));
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.am Thu Apr 19 15:17:12 2007
@@ -106,7 +106,7 @@
MSG_PARSER_AWK = $(srcdir)/../msg/msg_parser.awk
-AWK_SIP_AWK = $(AWK) -f $(MSG_PARSER_AWK) module=sip
+AWK_SIP_AWK = LC_ALL=C $(AWK) -f $(MSG_PARSER_AWK) module=sip
SS_SIP_H = ${srcdir}/sofia-sip/sip.h
@@ -116,23 +116,27 @@
sofia-sip/sip_hclasses.h: ${srcdir}/sofia-sip/sip_hclasses.h.in
@-mkdir sofia-sip 2>/dev/null || true
- ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H}
+ ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/sip_hclasses.h.in \
+ ${SS_SIP_H}
sofia-sip/sip_protos.h: ${srcdir}/sofia-sip/sip_protos.h.in
@-mkdir sofia-sip 2>/dev/null || true
- ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H}
+ ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/sip_protos.h.in \
+ ${SS_SIP_H}
sofia-sip/sip_tag.h: ${srcdir}/sofia-sip/sip_tag.h.in
@-mkdir sofia-sip 2>/dev/null || true
- ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H}
+ ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/sip_tag.h.in \
+ ${SS_SIP_H}
sip_tag.c: ${srcdir}/sip_tag.c.in ${EXTRA}
- ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H} ${EXTRA}
+ ${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sip_tag.c.in \
+ ${SS_SIP_H} ${EXTRA}
# Note: sip_bad_mask is used by nta to weed out bad messages
sip_parser_table.c: ${srcdir}/sip_parser_table.c.in ${EXTRA} sip_bad_mask
- ${AWK_SIP_AWK} PT=$@ TEMPLATE=${srcdir}/$@.in \
+ ${AWK_SIP_AWK} PT=$@ TEMPLATE=${srcdir}/sip_parser_table.c.in \
FLAGFILE=${srcdir}/sip_bad_mask \
MC_HASH_SIZE=127 MC_SHORT_SIZE=26 \
${SS_SIP_H} ${EXTRA}
@@ -144,4 +148,4 @@
PACKAGE_VERSION="${PACKAGE_VERSION}" \
TEMPLATE1=${srcdir}/sofia-sip/sip_hclasses.h.in \
TEMPLATE2=${srcdir}/sofia-sip/sip_protos.h.in \
- TEMPLATE=${srcdir}/$@.in ${EXTRA}
+ TEMPLATE=${srcdir}/sofia-sip/sip_extra.h.in ${EXTRA}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c Thu Apr 19 15:17:12 2007
@@ -773,13 +773,15 @@
static int tcp_test(tp_test_t *tt)
{
+ BEGIN();
+
+#ifndef WIN32 /* Windows seems to be buffering too much */
+
msg_t *msg = NULL;
int i;
tport_t *tp, *tp0;
char ident[16];
- BEGIN();
-
/* Create a large message, just to force queueing in sending end */
TEST(new_test_msg(tt, &msg, "tcp-0", 1, 16 * 64 * 1024), 0);
test_create_md5(tt, msg);
@@ -856,6 +858,8 @@
tport_decref(&tp0);
+#endif
+
END();
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c Thu Apr 19 15:17:12 2007
@@ -266,10 +266,6 @@
msg = self->tp_msg;
ai = msg_addrinfo(msg);
-
- if (!ai)
- return -1;
-
from = (su_sockaddr_t *)ai->ai_addr, fromlen = (socklen_t)(ai->ai_addrlen);
n = su_vrecv(self->tp_socket, iovec, veclen, 0, from, &fromlen);
Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4 (original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4 Thu Apr 19 15:17:12 2007
@@ -196,13 +196,18 @@
[Define to 1 if you have sa_len in struct sockaddr])
fi
-AC_REQUIRE([AC_STRUCT_SIN6])
+AC_ARG_ENABLE([ip6],
+[ --disable-ip6 disable IPv6 functionality [[enabled]]],,enable_ip6=yes)
+
+if ! test no$enable_ip6 = nono ; then
+AC_STRUCT_SIN6
case $ac_cv_sin6 in
yes) SAC_SU_DEFINE(SU_HAVE_IN6, 1, [
Define to 1 if you have struct sockaddr_in6]) ;;
no) ;;
*) AC_MSG_ERROR([Inconsistent struct sockaddr_sin6 test]) ;;
esac
+fi
AC_CHECK_HEADERS([unistd.h sys/time.h])
1
0
[commit] r4974 - in freeswitch/trunk/libs/sofia-sip: libsofia-sip-ua/stun utils
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: anthm
Date: Thu Apr 19 14:40:10 2007
New Revision: 4974
Modified:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
Log:
workaround explicit link warning from comment??
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c Thu Apr 19 14:40:10 2007
@@ -98,7 +98,7 @@
* @endcode
*
* @section stunc_environment Environment
- * #STUN_DEBUG
+ * STUN_DEBUG
*
* @section stunc_bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c Thu Apr 19 14:40:10 2007
@@ -116,7 +116,7 @@
* @endcode
*
* @section sip_dig_environment Environment
- * #SRESOLV_DEBUG, SRESOLV_CONF
+ * SRESOLV_DEBUG, SRESOLV_CONF
*
* @section sip_dig_bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
1
0
Author: anthm
Date: Thu Apr 19 14:30:14 2007
New Revision: 4973
Modified:
freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
Log:
workaround explicit link warning from comment??
Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-options.c (original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-options.c Thu Apr 19 14:30:14 2007
@@ -77,7 +77,7 @@
* @endcode
*
* @section environment Environment
- * #SIPADDRESS, #sip_proxy, #NTA_DEBUG, #TPORT_DEBUG, #TPORT_LOG.
+ * SIPADDRESS, sip_proxy, NTA_DEBUG, TPORT_DEBUG, TPORT_LOG.
*
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel(a)lists.sourceforge.net>.
1
0
[commit] r4972 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta libsofia-sip-ua/sresolv libsofia-sip-ua/stun libsofia-sip-ua/tport
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: mikej
Date: Thu Apr 19 14:16:05 2007
New Revision: 4972
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
Log:
consistent ifdef for DOXYGEN defined symbols
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Thu Apr 19 14:16:05 2007
@@ -1 +1 @@
-Tue Apr 17 11:04:59 CDT 2007
+Tue Apr 19 14:23:59 EDT 2007
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c Thu Apr 19 14:16:05 2007
@@ -292,7 +292,9 @@
*
* @sa <su_debug.h>, #su_log_global, #SOFIA_DEBUG
*/
-extern char const NTA_DEBUG[];
+#ifdef DOXYGEN
+extern char const NTA_DEBUG[]; /* dummy declaration for Doxygen */
+#endif
#ifndef SU_DEBUG
#define SU_DEBUG 3
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c Thu Apr 19 14:16:05 2007
@@ -549,7 +549,6 @@
#include <winreg.h>
#endif
-#if DOXYGEN_ONLY
/**@ingroup sresolv_env
*
* Environment variable determining the debug log level for @b sresolv
@@ -560,7 +559,8 @@
*
* @sa <su_debug.h>, sresolv_log, SOFIA_DEBUG
*/
-extern SRESOLV_DEBUG;
+#ifdef DOXYGEN
+extern char const SRESOLV_DEBUG[]; /* dummy declaration for Doxygen */
#endif
/**Debug log for @b sresolv module.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h Thu Apr 19 14:16:05 2007
@@ -71,7 +71,9 @@
SOFIA_BEGIN_DECLS
+#ifdef DOXYGEN
extern char const STUN_DEBUG[]; /* dummy declaration for Doxygen */
+#endif
/* XXX -- mela: note that this are 100 times too small */
#if 1
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c Thu Apr 19 14:16:05 2007
@@ -52,7 +52,9 @@
*
* @sa TPORT_DUMP, TPORT_DEBUG, tport_log
*/
+#ifdef DOXYGEN
extern char const TPORT_LOG[]; /* dummy declaration for Doxygen */
+#endif
/**@var TPORT_DUMP
*
@@ -64,7 +66,9 @@
*
* @sa TPORT_LOG, TPORT_DEBUG, tport_log
*/
+#ifdef DOXYGEN
extern char const TPORT_DUMP[]; /* dummy declaration for Doxygen */
+#endif
/**@var TPORT_DEBUG
*
@@ -75,7 +79,9 @@
*
* @sa <su_debug.h>, tport_log, SOFIA_DEBUG
*/
+#ifdef DOXYGEN
extern char const TPORT_DEBUG[]; /* dummy declaration for Doxygen */
+#endif
/**Debug log for @b tport module.
*
1
0
[commit] r4971 - in freeswitch/trunk/src/mod/endpoints/mod_wanpipe: . libsangoma
by Freeswitch SVN 19 Apr '07
by Freeswitch SVN 19 Apr '07
19 Apr '07
Author: anthm
Date: Thu Apr 19 11:34:30 2007
New Revision: 4971
Modified:
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.h
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.h
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
Log:
update wanpipe
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/Makefile Thu Apr 19 11:34:30 2007
@@ -3,7 +3,7 @@
LIBPRI=libpri-1.2.4
LIBPRI_FILE=$(LIBPRI).tar.gz
LIBPRI_DIR=$(BASE)/libs/$(LIBPRI)
-WANPIPE=wanpipe-3.1.0.p15
+WANPIPE=wanpipe-3.1.0.p18
WANPIPE_HOST=ftp://ftp.sangoma.com/linux/custom/3.1
WANPIPE_FILE=$(WANPIPE).tgz
WANPIPE_DIR=$(BASE)/libs/$(WANPIPE)
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.c Thu Apr 19 11:34:30 2007
@@ -1,25 +1,6 @@
-/*****************************************************************************
- * libsangoma.c AFT T1/E1: HDLC API Code Library
- *
- * Author(s): Anthony Minessale II <anthmct(a)yahoo.com>
- * Nenad Corbic <ncorbic(a)sangoma.com>
- * David Rokhvarg <davidr(a)sangoma.com>
- * Michael Jerris <mike(a)jerris.com>
- *
- * Copyright: (c) 2005 Anthony Minessale II
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- * ============================================================================
- *
- * Aug 15, 2006 David Rokhvarg <davidr(a)sangoma.com> Ported to MS Windows 2000/XP
- * Sep 24, 2006 Michael Jerris <mike(a)jerris.com> Windows port, standardize api, cleanup
- *
- */
-
#include "libsangoma.h"
+#include <stdarg.h>
+
#define DFT_CARD "wanpipe1"
#if defined(WIN32)
@@ -265,6 +246,48 @@
return fd;
}
+static char *cut_path(char *in)
+{
+ char *p, *ret = in;
+ char delims[] = "/\\";
+ char *i;
+
+ for (i = delims; *i; i++) {
+ p = in;
+ while ((p = strchr(p, *i)) != 0) {
+ ret = ++p;
+ }
+ }
+ return ret;
+}
+
+
+static void default_logger(char *file, const char *func, int line, int level, char *fmt, ...)
+{
+ char *fp;
+ char data[1024];
+
+ va_list ap;
+
+ fp = cut_path(file);
+
+ va_start(ap, fmt);
+
+ vsnprintf(data, sizeof(data), fmt, ap);
+
+ fprintf(stderr, "%s:%d %s() %s", file, line, func, data);
+
+ va_end(ap);
+
+}
+
+sangoma_logger_t global_logger = default_logger;
+
+void sangoma_set_logger(sangoma_logger_t logger)
+{
+ global_logger = logger;
+}
+
int sangoma_readmsg_tdm(sng_fd_t fd, void *hdrbuf, int hdrlen, void *databuf, int datalen, int flag)
{
int rx_len=0;
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/libsangoma.h Thu Apr 19 11:34:30 2007
@@ -1,18 +1,3 @@
-/*****************************************************************************
- * libsangoma.c AFT T1/E1: HDLC API Code Library
- *
- * Author(s): Anthony Minessale II <anthmct(a)yahoo.com>
- * Nenad Corbic <ncorbic(a)sangoma.com>
- *
- * Copyright: (c) 2005 Anthony Minessale II
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- * ============================================================================
- */
-
#ifndef _LIBSNAGOMA_H
#define _LIBSNAGOMA_H
#include <stdio.h>
@@ -161,6 +146,21 @@
int sangoma_tdm_get_fe_alarms(sng_fd_t fd, wanpipe_tdm_api_t *tdm_api);
int sangoma_tdm_cmd_exec(sng_fd_t fd, wanpipe_tdm_api_t *tdm_api);
+#define WP_PRE __FILE__, __FUNCTION__, __LINE__
+#define WP_LOG_DEBUG WP_PRE, 7
+#define WP_LOG_INFO WP_PRE, 6
+#define WP_LOG_NOTICE WP_PRE, 5
+#define WP_LOG_WARNING WP_PRE, 4
+#define WP_LOG_ERROR WP_PRE, 3
+#define WP_LOG_CRIT WP_PRE, 2
+#define WP_LOG_ALERT WP_PRE, 1
+#define WP_LOG_EMERG WP_PRE, 0
+
+typedef void (*sangoma_logger_t)(char *file, const char *func, int line, int level, char *fmt, ...);
+void sangoma_set_logger(sangoma_logger_t logger);
+
+extern sangoma_logger_t global_logger;
+
#ifndef LIBSANGOMA_GET_HWCODING
#define LIBSANGOMA_GET_HWCODING 1
#endif
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.c Thu Apr 19 11:34:30 2007
@@ -1,18 +1,3 @@
-/*****************************************************************************
- * sangoma_pri.c libpri Sangoma integration
- *
- * Author(s): Anthony Minessale II <anthmct(a)yahoo.com>
- * Nenad Corbic <ncorbic(a)sangoma.com>
- *
- * Copyright: (c) 2005 Anthony Minessale II
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- * ============================================================================
- */
-
#include <libsangoma.h>
#include <sangoma_pri.h>
#ifndef HAVE_GETTIMEOFDAY
@@ -158,6 +143,10 @@
} else {
if ((spri->pri = pri_new_cb((int) dfd, node, swtype, __pri_sangoma_read, __pri_sangoma_write, NULL))) {
spri->span = span;
+ spri->dchan = dchan;
+ spri->swtype = swtype;
+ spri->node = node;
+ spri->debug = debug;
pri_set_debug(spri->pri, debug);
ret = 0;
} else {
@@ -183,7 +172,7 @@
FD_ZERO(&efds);
#ifdef _MSC_VER
-//Windows macro for FD_SET includes a warning C4127: conditional expression is constant
+//Windows macro for FD_SET includes a warning C4127: conditional expression is constant
#pragma warning(push)
#pragma warning(disable:4127)
#endif
@@ -211,6 +200,13 @@
sel = select(spri->pri->fd + 1, &rfds, NULL, &efds, next ? &now : NULL);
event = NULL;
+
+ if (FD_ISSET(spri->pri->fd, &efds)) {
+ wanpipe_tdm_api_t tdm_api = {0};
+
+ sangoma_tdm_read_event(spri->pri->fd, &tdm_api);
+ global_logger(WP_LOG_ERROR, "DCHANNEL ERROR! [span %d]\n", spri->span);
+ }
if (!sel) {
event = pri_schedule_run(spri->pri);
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/libsangoma/sangoma_pri.h Thu Apr 19 11:34:30 2007
@@ -79,6 +79,10 @@
void *private_info;
event_handler eventmap[MAX_EVENT + 1];
loop_handler on_loop;
+ int dfd;
+ int swtype;
+ int node;
+ int debug;
};
struct sangoma_pri_event_list {
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Thu Apr 19 11:34:30 2007
@@ -211,6 +211,19 @@
+static void wp_logger(char *file, const char *func, int line, int level, char *fmt, ...)
+{
+ va_list ap;
+ char *data = NULL;
+ int ret;
+
+ va_start(ap, fmt);
+ if ((ret = switch_vasprintf(&data, fmt, ap)) != -1) {
+ switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, level, "%s", data);
+ }
+ va_end(ap);
+}
+
static int local_sangoma_tdm_read_event(sng_fd_t fd, wp_tdm_api_rx_hdr_t *rx_event)
{
wanpipe_tdm_api_t tdm_api[1];
@@ -1299,6 +1312,8 @@
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
+ sangoma_set_logger(wp_logger);
+
memset(SPANS, 0, sizeof(SPANS));
pri_set_error(s_pri_error);
1
0