[asterisk-commits] oej: branch oej/codename-pineapple r48278 - in
/team/oej/codename-pineapple: ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Dec 5 13:41:11 MST 2006
Author: oej
Date: Tue Dec 5 14:41:11 2006
New Revision: 48278
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48278
Log:
Update to trunk
Modified:
team/oej/codename-pineapple/ (props changed)
team/oej/codename-pineapple/.cleancount
team/oej/codename-pineapple/agi/Makefile
team/oej/codename-pineapple/apps/app_osplookup.c
team/oej/codename-pineapple/apps/app_voicemail.c
team/oej/codename-pineapple/channels/chan_sip.c
team/oej/codename-pineapple/configs/sip.conf.sample
team/oej/codename-pineapple/configs/voicemail.conf.sample
team/oej/codename-pineapple/doc/snmp.txt
team/oej/codename-pineapple/include/asterisk/frame.h
team/oej/codename-pineapple/include/asterisk/fskmodem.h
team/oej/codename-pineapple/main/frame.c
team/oej/codename-pineapple/main/fskmodem.c
team/oej/codename-pineapple/main/rtp.c
team/oej/codename-pineapple/sounds/Makefile
Propchange: team/oej/codename-pineapple/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/oej/codename-pineapple/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/oej/codename-pineapple/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Dec 5 14:41:11 2006
@@ -1,1 +1,1 @@
-/trunk:1-48206
+/trunk:1-48274
Modified: team/oej/codename-pineapple/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/.cleancount?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/.cleancount (original)
+++ team/oej/codename-pineapple/.cleancount Tue Dec 5 14:41:11 2006
@@ -1,1 +1,1 @@
-26
+27
Modified: team/oej/codename-pineapple/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/agi/Makefile?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/agi/Makefile (original)
+++ team/oej/codename-pineapple/agi/Makefile Tue Dec 5 14:41:11 2006
@@ -21,7 +21,7 @@
include $(ASTTOPDIR)/Makefile.rules
-#all: $(AGIS)
+all: $(AGIS)
strcompat.c: ../main/strcompat.c
@cp $< $@
Modified: team/oej/codename-pineapple/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/apps/app_osplookup.c?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/apps/app_osplookup.c (original)
+++ team/oej/codename-pineapple/apps/app_osplookup.c Tue Dec 5 14:41:11 2006
@@ -2159,7 +2159,7 @@
" OSPFINISHSTATUS The status of the OSP Finish attempt as a text string, one of\n"
" SUCCESS | FAILED | ERROR \n";
-static const char osp_usage[] =
+static char osp_usage[] =
"Usage: osp show\n"
" Displays information on Open Settlement Protocol support\n";
Modified: team/oej/codename-pineapple/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/apps/app_voicemail.c?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/apps/app_voicemail.c (original)
+++ team/oej/codename-pineapple/apps/app_voicemail.c Tue Dec 5 14:41:11 2006
@@ -142,6 +142,7 @@
/* Don't modify these here; set your umask at runtime instead */
#define VOICEMAIL_DIR_MODE 0777
#define VOICEMAIL_FILE_MODE 0666
+#define CHUNKSIZE 65536
#define VOICEMAIL_CONFIG "voicemail.conf"
#define ASTERISK_USERNAME "asterisk"
@@ -1099,6 +1100,7 @@
goto yuck;
}
if (!strcasecmp(coltitle, "recording")) {
+ off_t offset;
res = SQLGetData(stmt, x + 1, SQL_BINARY, NULL, 0, &colsize2);
fdlen = colsize2;
if (fd > -1) {
@@ -1109,24 +1111,27 @@
fd = -1;
continue;
}
- if (fd > -1) {
- if ((fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == -1) {
+ /* Read out in small chunks */
+ for (offset = 0; offset < colsize2; offset += CHUNKSIZE) {
+ /* +1 because SQLGetData likes null-terminating binary data */
+ if ((fdm = mmap(NULL, CHUNKSIZE + 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset)) == (void *)-1) {
ast_log(LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
goto yuck;
+ } else {
+ res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, CHUNKSIZE + 1, NULL);
+ munmap(fdm, 0);
+ if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+ ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+ unlink(full_fn);
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ goto yuck;
+ }
}
}
- }
- if (fdm) {
- memset(fdm, 0, fdlen);
- res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, fdlen, &colsize2);
- if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
- ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
- SQLFreeHandle (SQL_HANDLE_STMT, stmt);
- ast_odbc_release_obj(obj);
- goto yuck;
- }
+ truncate(full_fn, fdlen);
}
} else {
res = SQLGetData(stmt, x + 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
@@ -1147,8 +1152,6 @@
yuck:
if (f)
fclose(f);
- if (fdm)
- munmap(fdm, fdlen);
if (fd > -1)
close(fd);
return x - 1;
@@ -8003,6 +8006,8 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
ast_stream_and_wait(chan, "vm-msgsaved", "");
+ STORE(recordfile, vmu->mailbox, vmu->context, -1, chan, vmu, fmt, duration, vms);
+ DISPOSE(recordfile, -1);
cmd = 't';
return res;
}
Modified: team/oej/codename-pineapple/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/channels/chan_sip.c?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/channels/chan_sip.c (original)
+++ team/oej/codename-pineapple/channels/chan_sip.c Tue Dec 5 14:41:11 2006
@@ -242,15 +242,15 @@
\note this is for the INVITE that sets up the dialog
*/
enum invitestates {
- INV_NONE = 0, /*!< No state at all, maybe not an INVITE dialog */
- INV_CALLING, /*!< Invite sent, no answer */
- INV_PROCEEDING, /*!< We got 1xx message */
- INV_EARLY_MEDIA, /*!< We got 18x message with to-tag back */
- INV_COMPLETED, /*!< Got final response with error. Wait for ACK, then CONFIRMED */
- INV_CONFIRMED, /*!< Confirmed response - we've got an ack (Incoming calls only) */
- INV_TERMINATED, /*!< Transaction done - either successful (AST_STATE_UP) or failed, but done
- The only way out of this is a BYE from one side */
- INV_CANCELLED /*!< Transaction cancelled by client or server in non-terminated state */
+ INV_NONE = 0, /*!< No state at all, maybe not an INVITE dialog */
+ INV_CALLING = 1, /*!< Invite sent, no answer */
+ INV_PROCEEDING = 2, /*!< We got/sent 1xx message */
+ INV_EARLY_MEDIA = 3, /*!< We got 18x message with to-tag back */
+ INV_COMPLETED = 4, /*!< Got final response with error. Wait for ACK, then CONFIRMED */
+ INV_CONFIRMED = 5, /*!< Confirmed response - we've got an ack (Incoming calls only) */
+ INV_TERMINATED = 6, /*!< Transaction done - either successful (AST_STATE_UP) or failed, but done
+ The only way out of this is a BYE from one side */
+ INV_CANCELLED = 7, /*!< Transaction cancelled by client or server in non-terminated state */
};
/* Do _NOT_ make any changes to this enum, or the array following it;
@@ -1659,6 +1659,14 @@
ast_verbose("Initreq: %d headers, %d lines\n", p->initreq.headers, p->initreq.lines);
}
+/*! \brief Encapsulate setting of SIP_ALREADYGONE to be able to trace it with debugging */
+static void sip_alreadygone(struct sip_pvt *dialog)
+{
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Setting SIP_ALREADYGONE on dialog %s\n", dialog->callid);
+ ast_set_flag(&dialog->flags[0], SIP_ALREADYGONE);
+}
+
/*! \brief returns true if 'name' (with optional trailing whitespace)
* matches the sip method 'id'.
@@ -1937,7 +1945,7 @@
sip_pvt_lock(pkt->owner);
}
if (pkt->owner->owner) {
- ast_set_flag(&pkt->owner->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(pkt->owner);
ast_log(LOG_WARNING, "Hanging up call %s - no reply to our critical packet.\n", pkt->owner->callid);
ast_queue_hangup(pkt->owner->owner);
ast_channel_unlock(pkt->owner->owner);
@@ -3405,7 +3413,7 @@
return 0;
}
/* If the call is not UP, we need to send CANCEL instead of BYE */
- if (ast->_state == AST_STATE_RING || ast->_state == AST_STATE_RINGING) {
+ if (p->invitestate < INV_COMPLETED) {
needcancel = TRUE;
if (option_debug > 3)
ast_log(LOG_DEBUG, "Hanging up channel in state %s (not UP)\n", ast_state2str(ast->_state));
@@ -3426,7 +3434,7 @@
*/
if (ast_test_flag(&p->flags[0], SIP_ALREADYGONE))
needdestroy = 1; /* Set destroy flag at end of this function */
- else
+ else if (p->invitestate != INV_CALLING)
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
/* Start the process if it's not already started */
@@ -3488,6 +3496,7 @@
but we can't send one while we have "INVITE" outstanding. */
ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
ast_clear_flag(&p->flags[0], SIP_NEEDREINVITE);
+ sip_cancel_destroy(p);
}
}
}
@@ -3737,6 +3746,7 @@
switch(condition) {
case AST_CONTROL_RINGING:
if (ast->_state == AST_STATE_RING) {
+ p->invitestate = INV_EARLY_MEDIA;
if (!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) ||
(ast_test_flag(&p->flags[0], SIP_PROG_INBAND) == SIP_PROG_INBAND_NEVER)) {
/* Send 180 ringing if out-of-band seems reasonable */
@@ -3753,7 +3763,8 @@
case AST_CONTROL_BUSY:
if (ast->_state != AST_STATE_UP) {
transmit_response(p, "486 Busy Here", &p->initreq);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ p->invitestate = INV_TERMINATED;
+ sip_alreadygone(p);
ast_softhangup_nolock(ast, AST_SOFTHANGUP_DEV);
break;
}
@@ -3762,7 +3773,8 @@
case AST_CONTROL_CONGESTION:
if (ast->_state != AST_STATE_UP) {
transmit_response(p, "503 Service Unavailable", &p->initreq);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ p->invitestate = INV_TERMINATED;
+ sip_alreadygone(p);
ast_softhangup_nolock(ast, AST_SOFTHANGUP_DEV);
break;
}
@@ -3773,6 +3785,7 @@
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
!ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
transmit_response(p, "100 Trying", &p->initreq);
+ p->invitestate = INV_PROCEEDING;
break;
}
res = -1;
@@ -3781,6 +3794,7 @@
if ((ast->_state != AST_STATE_UP) &&
!ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
!ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
+ p->invitestate = INV_EARLY_MEDIA;
transmit_response_with_sdp(p, "183 Session Progress", &p->initreq, XMIT_UNRELIABLE);
ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
break;
@@ -11896,7 +11910,7 @@
if (p->authtries == MAX_AUTHTRIES || do_proxy_auth(p, req, resp, SIP_INVITE, 1)) {
ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From"));
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
if (p->owner)
ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
}
@@ -11910,20 +11924,23 @@
if (!ast_test_flag(req, SIP_PKT_IGNORE) && p->owner)
ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
break;
case 404: /* Not found */
transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE))
ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
break;
case 481: /* Call leg does not exist */
- /* Could be REFER or INVITE */
+ /* Could be REFER caused INVITE with replaces */
ast_log(LOG_WARNING, "Re-invite to non-existing call leg on other UA. SIP dialog '%s'. Giving up.\n", p->callid);
transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
+ if (p->owner)
+ ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
break;
case 491: /* Pending */
@@ -11976,7 +11993,16 @@
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
}
break;
-
+ case 481: /* Call leg does not exist */
+
+ /* A transfer with Replaces did not work */
+ /* OEJ: We should Set flag, cancel the REFER, go back
+ to original call - but right now we can't */
+ ast_log(LOG_WARNING, "Remote host can't match REFER request to call '%s'. Giving up.\n", p->callid);
+ if (p->owner)
+ ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ break;
case 500: /* Server error */
case 501: /* Method not implemented */
@@ -12334,21 +12360,9 @@
break;
case 481: /* Call leg does not exist */
if (sipmethod == SIP_INVITE) {
- /* First we ACK */
- transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
- if (option_debug)
- ast_log(LOG_DEBUG, "Got 481 on Invite. Assuming INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
- if (owner)
- ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+ handle_response_invite(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_REFER) {
- /* A transfer with Replaces did not work */
- /* OEJ: We should Set flag, cancel the REFER, go back
- to original call - but right now we can't */
- ast_log(LOG_WARNING, "Remote host can't match request %s to call '%s'. Giving up.\n", sip_methods[sipmethod].text, p->callid);
- if (owner)
- ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
- ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ handle_response_refer(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_BYE) {
/* The other side has no transaction to bye,
just assume it's all right then */
@@ -12390,7 +12404,6 @@
/* Fatal response */
if ((option_verbose > 2) && (resp != 487))
ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(p->sa.sin_addr));
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
@@ -12449,7 +12462,7 @@
/* ACK on invite */
if (sipmethod == SIP_INVITE)
transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
if (!p->owner)
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
} else if ((resp >= 100) && (resp < 200)) {
@@ -13538,7 +13551,7 @@
transmit_response(p, "503 Unavailable", req); /* OEJ - Right answer? */
else
transmit_response_reliable(p, "503 Unavailable", req);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
/* Unlock locks so ast_hangup can do its magic */
sip_pvt_unlock(p);
c->hangupcause = AST_CAUSE_CALL_REJECTED;
@@ -13862,7 +13875,7 @@
transmit_response(p, "603 Declined (No dialog)", req);
if (!ast_test_flag(req, SIP_PKT_IGNORE)) {
append_history(p, "Xfer", "Refer failed. Outside of dialog.");
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
}
return 0;
@@ -14121,7 +14134,7 @@
{
check_via(p, req);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
p->invitestate = INV_CANCELLED;
if (p->owner && p->owner->_state == AST_STATE_UP) {
@@ -14164,7 +14177,7 @@
if (sipdebug && option_debug)
ast_log(LOG_DEBUG, "Initializing initreq for method %s - callid %s\n", sip_methods[req->method].text, p->callid);
check_via(p, req);
- ast_set_flag(&p->flags[0], SIP_ALREADYGONE);
+ sip_alreadygone(p);
/* Get RTCP quality before end of call */
if (!ast_test_flag(&p->flags[0], SIP_NO_HISTORY) || p->owner) {
Modified: team/oej/codename-pineapple/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/configs/sip.conf.sample?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/configs/sip.conf.sample (original)
+++ team/oej/codename-pineapple/configs/sip.conf.sample Tue Dec 5 14:41:11 2006
@@ -218,6 +218,8 @@
; both parties have T38 support enabled in their Asterisk configuration
; This has to be enabled in the general section for all devices to work. You can then
; disable it on a per device basis.
+;
+; T.38 faxing only works in SIP to SIP calls, with no local or agent channel being used.
;
; t38pt_udptl = yes ; Default false
;
Modified: team/oej/codename-pineapple/configs/voicemail.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/configs/voicemail.conf.sample?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/configs/voicemail.conf.sample (original)
+++ team/oej/codename-pineapple/configs/voicemail.conf.sample Tue Dec 5 14:41:11 2006
@@ -87,6 +87,12 @@
;fromstring=The Asterisk PBX
; Permit finding entries for forward/compose from the directory
;usedirectory=yes
+; Voicemail can be stored in a database using the ODBC driver.
+; The value of odbcstorage is the database connection configured
+; in res_odbc.conf.
+;odbcstorage=asterisk
+; The default table for ODBC voicemail storage is voicemessages.
+;odbctable=voicemessages
;
; Change the from, body and/or subject, variables:
; VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM,
Modified: team/oej/codename-pineapple/doc/snmp.txt
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/doc/snmp.txt?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/doc/snmp.txt (original)
+++ team/oej/codename-pineapple/doc/snmp.txt Tue Dec 5 14:41:11 2006
@@ -8,8 +8,11 @@
Note that on some (many?) Linux-distributions the dependency list in
the net-snmp-devel list is not complete, and additional RPMs will need
to be installed. This is typically seen as attempts to build res_snmp
-as net-snmp-devel is available, but then failures to find certain
-libraries.
+as net-snmp-devel is available, but then fails to find certain
+libraries. The packages may include the following:
+ * bzip2-devel
+ * lm_sensors-devel
+ * newt-devel
SNMP support comes in two varieties -- as a sub-agent to a running SNMP
daemon using the AgentX protocol, or as a full standalone agent. If
Modified: team/oej/codename-pineapple/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/frame.h?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/frame.h (original)
+++ team/oej/codename-pineapple/include/asterisk/frame.h Tue Dec 5 14:41:11 2006
@@ -52,7 +52,7 @@
\arg \b VIDEO: Video data, subclass is codec (AST_FORMAT_*)
\arg \b DTMF: A DTMF digit, subclass is the digit
\arg \b IMAGE: Image transport, mostly used in IAX
- \arg \b TEXT: Text messages
+ \arg \b TEXT: Text messages and character by character (real time text)
\arg \b HTML: URL's and web pages
\arg \b MODEM: Modulated data encodings, such as T.38 and V.150
\arg \b IAX: Private frame type for the IAX protocol
@@ -261,6 +261,11 @@
/*! Maximum video format */
#define AST_FORMAT_MAX_VIDEO (1 << 24)
#define AST_FORMAT_VIDEO_MASK (((1 << 25)-1) & ~(AST_FORMAT_AUDIO_MASK))
+/*! T.140 Text format - ITU T.140, RFC 4351*/
+#define AST_FORMAT_T140 (1 << 25)
+/*! Maximum text mask */
+#define AST_FORMAT_MAX_TEXT (1 << 26)
+#define AST_FORMAT_TEXT_MASK (((1 << 27)-1) & ~(AST_FORMAT_AUDIO_MASK) & ~(AST_FORMAT_VIDEO_MASK)))
enum ast_control_frame_type {
AST_CONTROL_HANGUP = 1, /*!< Other end has hungup */
Modified: team/oej/codename-pineapple/include/asterisk/fskmodem.h
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/include/asterisk/fskmodem.h?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/include/asterisk/fskmodem.h (original)
+++ team/oej/codename-pineapple/include/asterisk/fskmodem.h Tue Dec 5 14:41:11 2006
@@ -19,7 +19,6 @@
/*! \file
* \brief FSK Modem Support
* \note Includes code and algorithms from the Zapata library.
- * \todo Translate Emiliano Zapata's spanish comments to english, please.
*/
#ifndef _ASTERISK_FSKMODEM_H
@@ -42,20 +41,20 @@
float x1;
float x2;
float cont;
- int bw; /*!< Ancho de Banda */
+ int bw; /*!< Bandwidth */
double fmxv[8],fmyv[8]; /*!< filter stuff for M filter */
int fmp; /*!< pointer for M filter */
double fsxv[8],fsyv[8]; /*!< filter stuff for S filter */
int fsp; /*!< pointer for S filter */
double flxv[8],flyv[8]; /*!< filter stuff for L filter */
int flp; /*!< pointer for L filter */
- int f_mark_idx; /*!< Indice de frecuencia de marca (f_M-500)/5 */
- int f_space_idx; /*!< Indice de frecuencia de espacio (f_S-500)/5 */
+ int f_mark_idx; /*!< Mark frequency index (f_M-500)/5 */
+ int f_space_idx; /*!< Space frequency index (f_S-500)/5 */
int state;
- int pcola; /*!< Puntero de las colas de datos */
- float cola_in[NCOLA]; /*!< Cola de muestras de entrada */
- float cola_filtro[NCOLA]; /*!< Cola de muestras tras filtros */
- float cola_demod[NCOLA]; /*!< Cola de muestras demoduladas */
+ int pcola; /*!< Pointer to data queues */
+ float cola_in[NCOLA]; /*!< Queue of input samples */
+ float cola_filtro[NCOLA]; /*!< Queue of samples after filters */
+ float cola_demod[NCOLA]; /*!< Queue of demodulated samples */
} fsk_data;
/* \brief Retrieve a serial byte into outbyte.
Modified: team/oej/codename-pineapple/main/frame.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/frame.c?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/main/frame.c (original)
+++ team/oej/codename-pineapple/main/frame.c Tue Dec 5 14:41:11 2006
@@ -130,6 +130,10 @@
{ 0, 0, "nothing", "undefined" },
{ 0, 0, "nothing", "undefined" },
{ 0, AST_FORMAT_MAX_VIDEO, "maxvideo", "Maximum video format" },
+ { 1, AST_FORMAT_T140, "t140", "Passthrough T.140 Realtime Text" },
+ { 0, 0, "nothing", "undefined" },
+ { 0, 0, "nothing", "undefined" },
+ { 0, AST_FORMAT_MAX_TEXT, "maxtext", "Maximum text format" },
};
struct ast_frame ast_null_frame = { AST_FRAME_NULL, };
Modified: team/oej/codename-pineapple/main/fskmodem.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/fskmodem.c?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/main/fskmodem.c (original)
+++ team/oej/codename-pineapple/main/fskmodem.c Tue Dec 5 14:41:11 2006
@@ -26,8 +26,6 @@
*
* \arg Includes code and algorithms from the Zapata library.
*
- * \todo - REMOVE ALL SPANISH COMMENTS AND TRANSLATE THEM TO ENGLISH. Thank you.
- * Swedish will work too :-)
*/
#include "asterisk.h"
@@ -59,12 +57,13 @@
#define GET_SAMPLE get_sample(&buffer, len)
-/* Coeficientes para filtros de entrada */
-/* Tabla de coeficientes, generada a partir del programa "mkfilter" */
-/* Formato: coef[IDX_FREC][IDX_BW][IDX_COEF] */
-/* IDX_COEF = 0 => 1/GAIN */
-/* IDX_COEF = 1-6 => Coeficientes y[n] */
-
+/*! \brief Coefficients for input filters
+ * Coefficients table, generated by program "mkfilter"
+ * mkfilter is part of the zapatatelephony.org distribution
+ * Format: coef[IDX_FREC][IDX_BW][IDX_COEF]
+ * IDX_COEF = 0 => 1/GAIN
+ * IDX_COEF = 1-6 => Coefficientes y[n]
+*/
static double coef_in[NF][NBW][8] = {
{
{ 1.8229206611e-04,-7.8997325866e-01,2.2401819940e+00,-4.6751353581e+00,5.5080745712e+00,-5.0571565772e+00,2.6215820004e+00,0.0000000000e+00, },
@@ -92,19 +91,19 @@
},
};
-/* Coeficientes para filtro de salida */
-/* Tabla de coeficientes, generada a partir del programa "mkfilter" */
-/* Formato: coef[IDX_BW][IDX_COEF] */
-/* IDX_COEF = 0 => 1/GAIN */
-/* IDX_COEF = 1-6 => Coeficientes y[n] */
-
+/*! \brief Coefficients for output filter
+ * Coefficients table, generated by program "mkfilter"
+ * Format: coef[IDX_BW][IDX_COEF]
+ * IDX_COEF = 0 => 1/GAIN
+ * IDX_COEF = 1-6 => Coefficientes y[n]
+ */
static double coef_out[NBW][8] = {
{ 1.3868644653e-08,-6.3283665042e-01,4.0895057217e+00,-1.1020074592e+01,1.5850766191e+01,-1.2835109292e+01,5.5477477340e+00,0.0000000000e+00, },
{ 3.1262119724e-03,-7.8390522307e-03,8.5209627801e-02,-4.0804129163e-01,1.1157139955e+00,-1.8767603680e+00,1.8916395224e+00,0.0000000000e+00, },
};
-/*! Filtro pasa-banda para frecuencia de MARCA */
+/*! Band-pass filter for MARK frequency */
static inline float filtroM(fsk_data *fskd,float in)
{
int i, j;
@@ -123,7 +122,7 @@
return s;
}
-/*! Filtro pasa-banda para frecuencia de ESPACIO */
+/*! Band-pass filter for SPACE frequency */
static inline float filtroS(fsk_data *fskd,float in)
{
int i, j;
@@ -142,7 +141,7 @@
return s;
}
-/*! Filtro pasa-bajos para datos demodulados */
+/*! Low-pass filter for demodulated data */
static inline float filtroL(fsk_data *fskd,float in)
{
int i, j;
@@ -187,7 +186,7 @@
static int get_bit_raw(fsk_data *fskd, short *buffer, int *len)
{
- /* Esta funcion implementa un DPLL para sincronizarse con los bits */
+ /* This function implements a DPLL to synchronize with the bits */
float x,spb,spb2,ds;
int f;
@@ -200,7 +199,7 @@
for (f = 0;;) {
if (demodulador(fskd, &x, GET_SAMPLE))
return -1;
- if ((x * fskd->x0) < 0) { /* Transicion */
+ if ((x * fskd->x0) < 0) { /* Transition */
if (!f) {
if (fskd->cont<(spb2))
fskd->cont += ds;
@@ -236,7 +235,7 @@
case STATE_GET_BYTE:
goto getbyte;
}
- /* Esperamos bit de start */
+ /* We await for start bit */
do {
/* this was jesus's nice, reasonable, working (at least with RTTY) code
to look for the beginning of the start bit. Unfortunately, since TTY/TDD's
@@ -254,7 +253,7 @@
beginning of a start bit in the TDD sceanario. It just looks for sufficient
level to maybe, perhaps, guess, maybe that its maybe the beginning of
a start bit, perhaps. This whole thing stinks! */
- if (demodulador(fskd,&fskd->x1,GET_SAMPLE))
+ if (demodulador(fskd, &fskd->x1, GET_SAMPLE))
return -1;
samples++;
for(;;) {
@@ -264,7 +263,7 @@
return 0;
}
samples++;
- if (demodulador(fskd,&fskd->x2,GET_SAMPLE))
+ if (demodulador(fskd, &fskd->x2, GET_SAMPLE))
return(-1);
#if 0
printf("x2 = %5.5f ", fskd->x2);
@@ -273,14 +272,14 @@
break;
}
search_startbit3:
- /* Esperamos 0.5 bits antes de usar DPLL */
+ /* We await for 0.5 bits before using DPLL */
i = fskd->spb/2;
if (*len < i) {
fskd->state = STATE_SEARCH_STARTBIT3;
return 0;
}
for(;i;i--) {
- if (demodulador(fskd,&fskd->x1,GET_SAMPLE))
+ if (demodulador(fskd, &fskd->x1, GET_SAMPLE))
return(-1);
#if 0
printf("x1 = %5.5f ", fskd->x1);
@@ -288,7 +287,7 @@
samples++;
}
- /* x1 debe ser negativo (confirmación del bit de start) */
+ /* x1 must be negative (start bit confirmation) */
} while (fskd->x1 > 0);
fskd->state = STATE_GET_BYTE;
@@ -304,7 +303,7 @@
if (*len < 80)
return 0;
}
- /* Leemos ahora los bits de datos */
+ /* Now we read the data bits */
j = fskd->nbit;
for (a = n1 = 0; j; j--) {
olen = *len;
@@ -320,7 +319,7 @@
j = 8-fskd->nbit;
a >>= j;
- /* Leemos bit de paridad (si existe) y la comprobamos */
+ /* We read parity bit (if exists) and check parity */
if (fskd->paridad) {
olen = *len;
i = get_bit_raw(fskd, buffer, len);
@@ -329,16 +328,16 @@
return(-1);
if (i)
n1++;
- if (fskd->paridad == 1) { /* paridad = 1 (par) */
+ if (fskd->paridad == 1) { /* parity=1 (even) */
if (n1&1)
a |= 0x100; /* error */
- } else { /* paridad = 2 (impar) */
+ } else { /* parity=2 (odd) */
if (!(n1&1))
a |= 0x100; /* error */
}
}
- /* Leemos bits de STOP. Todos deben ser 1 */
+ /* We read STOP bits. All of them must be 1 */
for (j = fskd->nstop;j;j--) {
r = get_bit_raw(fskd, buffer, len);
@@ -348,9 +347,9 @@
a |= 0x200;
}
- /* Por fin retornamos */
- /* Bit 8 : Error de paridad */
- /* Bit 9 : Error de Framming */
+ /* And finally we return */
+ /* Bit 8 : Parity error */
+ /* Bit 9 : Framming error*/
*outbyte = a;
fskd->state = STATE_SEARCH_STARTBIT;
Modified: team/oej/codename-pineapple/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/main/rtp.c?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/main/rtp.c (original)
+++ team/oej/codename-pineapple/main/rtp.c Tue Dec 5 14:41:11 2006
@@ -1408,6 +1408,7 @@
{{1, AST_FORMAT_H263}, "video", "H263"},
{{1, AST_FORMAT_H263_PLUS}, "video", "h263-1998"},
{{1, AST_FORMAT_H264}, "video", "H264"},
+ {{1, AST_FORMAT_T140}, "text", "T140"},
};
/* Static (i.e., well-known) RTP payload types for our "AST_FORMAT..."s:
@@ -1439,6 +1440,7 @@
[97] = {1, AST_FORMAT_ILBC},
[99] = {1, AST_FORMAT_H264},
[101] = {0, AST_RTP_DTMF},
+ [102] = {1, AST_FORMAT_T140}, /* Real time text chat */
[110] = {1, AST_FORMAT_SPEEX},
[111] = {1, AST_FORMAT_G726},
[112] = {1, AST_FORMAT_G726_AAL2},
Modified: team/oej/codename-pineapple/sounds/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/codename-pineapple/sounds/Makefile?view=diff&rev=48278&r1=48277&r2=48278
==============================================================================
--- team/oej/codename-pineapple/sounds/Makefile (original)
+++ team/oej/codename-pineapple/sounds/Makefile Tue Dec 5 14:41:11 2006
@@ -52,7 +52,10 @@
MM:=$(subst -G722,-g722,$(MM))
MOH:=$(MM:MOH-%=asterisk-moh-%.tar.gz)
MOH_TAGS:=$(MM:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
+# If "fetch" is used, --continue is not a valid option.
+ifeq ($(WGET),wget)
WGET_ARGS:=--continue
+endif
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
More information about the asterisk-commits
mailing list