[svn-commits] russell: branch russell/messaging r321542 - in /team/russell/messaging: ./ ad...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 1 15:56:43 CDT 2011
Author: russell
Date: Wed Jun 1 15:56:37 2011
New Revision: 321542
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321542
Log:
sync with trunk
Modified:
team/russell/messaging/ (props changed)
team/russell/messaging/addons/chan_ooh323.c
team/russell/messaging/addons/ooh323c/src/oochannels.c
team/russell/messaging/addons/ooh323c/src/ooh245.c
team/russell/messaging/apps/app_voicemail.c
Propchange: team/russell/messaging/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/russell/messaging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 1 15:56:37 2011
@@ -1,1 +1,1 @@
-/trunk:1-321522
+/trunk:1-321541
Modified: team/russell/messaging/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/addons/chan_ooh323.c?view=diff&rev=321542&r1=321541&r2=321542
==============================================================================
--- team/russell/messaging/addons/chan_ooh323.c (original)
+++ team/russell/messaging/addons/chan_ooh323.c Wed Jun 1 15:56:37 2011
@@ -1044,6 +1044,7 @@
static int ooh323_answer(struct ast_channel *ast)
{
struct ooh323_pvt *p = ast->tech_pvt;
+ char *callToken = (char *)NULL;
if (gH323Debug)
ast_verbose("--- ooh323_answer\n");
@@ -1051,8 +1052,18 @@
if (p) {
ast_mutex_lock(&p->lock);
+ callToken = (p->callToken ? strdup(p->callToken) : NULL);
if (ast->_state != AST_STATE_UP) {
ast_channel_lock(ast);
+ if (!p->alertsent) {
+ if (gH323Debug) {
+ ast_debug(1, "Sending forced ringback for %s, res = %d\n",
+ callToken, ooManualRingback(callToken));
+ } else {
+ ooManualRingback(callToken);
+ }
+ p->alertsent = 1;
+ }
ast_setstate(ast, AST_STATE_UP);
if (option_debug)
ast_debug(1, "ooh323_answer(%s)\n", ast->name);
@@ -1220,6 +1231,7 @@
}
p->alertsent = 1;
}
+ p->alertsent = 1;
}
break;
case AST_CONTROL_SRCUPDATE:
Modified: team/russell/messaging/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/addons/ooh323c/src/oochannels.c?view=diff&rev=321542&r1=321541&r2=321542
==============================================================================
--- team/russell/messaging/addons/ooh323c/src/oochannels.c (original)
+++ team/russell/messaging/addons/ooh323c/src/oochannels.c Wed Jun 1 15:56:37 2011
@@ -682,10 +682,11 @@
if (0 != call->pH245Channel && 0 != call->pH245Channel->sock)
{
- if(call->pH245Channel->outQueue.count>0)
- {
- if(ooPDWrite(pfds, nfds, call->pH245Channel->sock))
- ooSendMsg(call, OOH245MSG);
+ if(ooPDWrite(pfds, nfds, call->pH245Channel->sock)) {
+ while (call->pH245Channel->outQueue.count>0) {
+ if (ooSendMsg(call, OOH245MSG) != OO_OK)
+ break;
+ }
}
}
else if(call->h245listener)
@@ -702,20 +703,23 @@
{
if(ooPDWrite(pfds, nfds, call->pH225Channel->sock))
{
- if(call->pH225Channel->outQueue.count>0)
+ while (call->pH225Channel->outQueue.count>0)
{
OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
call->callType, call->callToken);
- ooSendMsg(call, OOQ931MSG);
+ if (ooSendMsg(call, OOQ931MSG) != OO_OK)
+ break;
}
if(call->pH245Channel &&
call->pH245Channel->outQueue.count>0 &&
- OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- {
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ while (call->pH245Channel->outQueue.count>0) {
OOTRACEDBGC3("H245 message needs to be tunneled. "
"(%s, %s)\n", call->callType,
call->callToken);
- ooSendMsg(call, OOH245MSG);
+ if (ooSendMsg(call, OOH245MSG) != OO_OK)
+ break;
+ }
}
}
}
@@ -1330,7 +1334,7 @@
{
OOTRACEDBGA3("Warning:Call marked for cleanup. Can not send message."
"(%s, %s)\n", call->callType, call->callToken);
- return OO_OK;
+ return OO_FAILED;
}
if(type == OOQ931MSG)
Modified: team/russell/messaging/addons/ooh323c/src/ooh245.c
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/addons/ooh323c/src/ooh245.c?view=diff&rev=321542&r1=321541&r2=321542
==============================================================================
--- team/russell/messaging/addons/ooh323c/src/ooh245.c (original)
+++ team/russell/messaging/addons/ooh323c/src/ooh245.c Wed Jun 1 15:56:37 2011
@@ -2126,6 +2126,8 @@
ooClearAllLogicalChannels(call);
}
ooSendEndSessionCommand(call);
+ if (call->callState < OO_CALL_CLEAR)
+ call->callState = OO_CALL_CLEAR;
}
Modified: team/russell/messaging/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/russell/messaging/apps/app_voicemail.c?view=diff&rev=321542&r1=321541&r2=321542
==============================================================================
--- team/russell/messaging/apps/app_voicemail.c (original)
+++ team/russell/messaging/apps/app_voicemail.c Wed Jun 1 15:56:37 2011
@@ -2177,11 +2177,16 @@
int ret; /* for better error checking */
char *imap_flags = NIL;
int msgcount = (messagecount(vmu->context, vmu->mailbox, "INBOX") + messagecount(vmu->context, vmu->mailbox, "Old"));
-
- /* Back out early if this is a greeting and we don't want to store greetings in IMAP */
- if (msgnum < 0 && !imapgreetings) {
- return 0;
- }
+ int box = NEW_FOLDER;
+
+ /* Back out early if this is a greeting and we don't want to store greetings in IMAP */
+ if (msgnum < 0) {
+ if(!imapgreetings) {
+ return 0;
+ } else {
+ box = GREETINGS_FOLDER;
+ }
+ }
if (imap_check_limits(chan, vms, vmu, msgcount)) {
return -1;
@@ -2264,9 +2269,9 @@
}
((char *) buf)[len] = '\0';
INIT(&str, mail_string, buf, len);
- ret = init_mailstream(vms, NEW_FOLDER);
+ ret = init_mailstream(vms, box);
if (ret == 0) {
- imap_mailbox_name(mailbox, sizeof(mailbox), vms, NEW_FOLDER, 1);
+ imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1);
ast_mutex_lock(&vms->lock);
if(!mail_append_full(vms->mailstream, mailbox, imap_flags, NIL, &str))
ast_log(LOG_ERROR, "Error while sending the message to %s\n", mailbox);
More information about the svn-commits
mailing list