[asterisk-commits] oej: branch oej/invitestate-1.4 r48267 - in
/team/oej/invitestate-1.4: ./ app...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Dec 5 08:55:49 MST 2006
Author: oej
Date: Tue Dec 5 09:55:48 2006
New Revision: 48267
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48267
Log:
Updating to trunk 1.4
Modified:
team/oej/invitestate-1.4/ (props changed)
team/oej/invitestate-1.4/apps/app_voicemail.c
team/oej/invitestate-1.4/channels/chan_sip.c
team/oej/invitestate-1.4/configs/sip.conf.sample
team/oej/invitestate-1.4/configs/voicemail.conf.sample
team/oej/invitestate-1.4/doc/snmp.txt
team/oej/invitestate-1.4/sounds/Makefile
Propchange: team/oej/invitestate-1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/oej/invitestate-1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/invitestate-1.4/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Dec 5 09:55:48 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-48207
+/branches/1.4:1-48266
Modified: team/oej/invitestate-1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/apps/app_voicemail.c?view=diff&rev=48267&r1=48266&r2=48267
==============================================================================
--- team/oej/invitestate-1.4/apps/app_voicemail.c (original)
+++ team/oej/invitestate-1.4/apps/app_voicemail.c Tue Dec 5 09:55:48 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"
@@ -1088,6 +1089,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) {
@@ -1098,24 +1100,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);
@@ -1136,8 +1141,6 @@
yuck:
if (f)
fclose(f);
- if (fdm)
- munmap(fdm, fdlen);
if (fd > -1)
close(fd);
return x - 1;
@@ -7876,6 +7879,8 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
ast_stream_and_wait(chan, "vm-msgsaved", chan->language, "");
+ STORE(recordfile, vmu->mailbox, vmu->context, -1, chan, vmu, fmt, duration, vms);
+ DISPOSE(recordfile, -1);
cmd = 't';
return res;
}
Modified: team/oej/invitestate-1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/channels/chan_sip.c?view=diff&rev=48267&r1=48266&r2=48267
==============================================================================
--- team/oej/invitestate-1.4/channels/chan_sip.c (original)
+++ team/oej/invitestate-1.4/channels/chan_sip.c Tue Dec 5 09:55:48 2006
@@ -11740,9 +11740,12 @@
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 */
@@ -11802,7 +11805,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 */
@@ -12137,21 +12149,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 */
Modified: team/oej/invitestate-1.4/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/configs/sip.conf.sample?view=diff&rev=48267&r1=48266&r2=48267
==============================================================================
--- team/oej/invitestate-1.4/configs/sip.conf.sample (original)
+++ team/oej/invitestate-1.4/configs/sip.conf.sample Tue Dec 5 09:55:48 2006
@@ -208,6 +208,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/invitestate-1.4/configs/voicemail.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/configs/voicemail.conf.sample?view=diff&rev=48267&r1=48266&r2=48267
==============================================================================
--- team/oej/invitestate-1.4/configs/voicemail.conf.sample (original)
+++ team/oej/invitestate-1.4/configs/voicemail.conf.sample Tue Dec 5 09:55:48 2006
@@ -83,6 +83,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/invitestate-1.4/doc/snmp.txt
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/doc/snmp.txt?view=diff&rev=48267&r1=48266&r2=48267
==============================================================================
--- team/oej/invitestate-1.4/doc/snmp.txt (original)
+++ team/oej/invitestate-1.4/doc/snmp.txt Tue Dec 5 09:55:48 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/invitestate-1.4/sounds/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate-1.4/sounds/Makefile?view=diff&rev=48267&r1=48266&r2=48267
==============================================================================
--- team/oej/invitestate-1.4/sounds/Makefile (original)
+++ team/oej/invitestate-1.4/sounds/Makefile Tue Dec 5 09:55:48 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