No subject
Sun Jul 19 19:54:31 CDT 2009
Many sip headers in many sip methods contain the ABNF structure
name-andor-addr = name-addr / addr-spec
Examples include the to-header, from-header, contact-header, replyto-header
At the moment chan_sip.c makes various different attempts to parse this name-andor-addr structure for each header type and for each sip method with sometimes limited degrees of success.
I recommend that this name-andor-addr structure be parsed by a dedicated function and that it be used irrespective of the specific method or header that contains the name-andor-addr structure
Nick has also included unit tests for verifying these routines as well, so...heck yeah.
(closes issue #16708)
Reported by: Nick_Lewis
Patches:
reqresp_parser-nameandoraddr2.patch uploaded by Nick Lewis (license 657
Review: https://reviewboard.asterisk.org/r/549
................
r256569 | rmudgett | 2010-04-09 18:43:30 +0200 (Fri, 09 Apr 2010) | 1 line
Remove PRI CCSS BUGBUG message and update configure script.
................
r256608 | rmudgett | 2010-04-09 21:46:54 +0200 (Fri, 09 Apr 2010) | 1 line
Merge CCSS architecture document from CCSS branch.
................
r256646 | mmichelson | 2010-04-09 23:41:30 +0200 (Fri, 09 Apr 2010) | 8 lines
Prevent crash when originating a call to a local channel.
Call completion code tries to grab the call completion parameters
from the requesting channel during local_request. When originating
a call to a local channel, however, this channel is NULL. This
was causing an issue for me when trying to run a test script.
................
r256661 | mmichelson | 2010-04-10 00:20:22 +0200 (Sat, 10 Apr 2010) | 3 lines
Remove status_response callbacks where they are not needed.
................
r256704 | tzafrir | 2010-04-10 10:33:57 +0200 (Sat, 10 Apr 2010) | 7 lines
fix hyphen vs. minus in man pages
In troff '-' is used for a hyphen. A minus is denoted by '\-' . This is
normally also used for a dash.
This patch converts all '-'-s that are minuses or dashes to '\-'.
................
r256745 | russell | 2010-04-12 00:04:01 +0200 (Mon, 12 Apr 2010) | 2 lines
Add ASTERISK_FILE_VERSION() macro
................
r256783 | russell | 2010-04-12 04:19:02 +0200 (Mon, 12 Apr 2010) | 2 lines
test_substitution expects func_curl to be present to work.
................
r256821 | lmadsen | 2010-04-12 16:39:37 +0200 (Mon, 12 Apr 2010) | 8 lines
CLI command logger set level auto complete.
A simple patch to enable auto tab complete.
(closes issue #17152)
Reported by: pabelanger
Patches:
0017152.patch uploaded by pabelanger (license 224)
................
r256823 | dvossel | 2010-04-12 16:47:16 +0200 (Mon, 12 Apr 2010) | 7 lines
gives channel reference before unlocking it and using setvar helper.
To guarantee the channel is valid when calling setvar on the MASTER_CHANNEL
dialplan function, a channel reference must be taken before unlocking. Thanks
to russell for pointing out the error.
................
r256860 | lmadsen | 2010-04-12 18:16:43 +0200 (Mon, 12 Apr 2010) | 3 lines
Remove silly debug message that is not useful.
(issue #17159)
................
r256901 | lmadsen | 2010-04-12 19:29:53 +0200 (Mon, 12 Apr 2010) | 23 lines
Merged revisions 256900 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r256900 | lmadsen | 2010-04-12 12:29:26 -0500 (Mon, 12 Apr 2010) | 15 lines
Add How-To document on collecting debugging info for issues.asterisk.org
Paul Belanger has been helping a lot with bug tracking recently and created
this document that we can now point to when additional debugging information
is required. This document will help those filing issues to know how to get
the information required when filing their issues. This will make things
easier on the developers.
Initial text and changes by pabelanger. Tweaks and editing by myself.
(closes issue #17159)
Reported by: pabelanger
Patches:
HOWTO_collect_debug_information.txt.patch uploaded by lmadsen (license 10)
Tested by: tzafrir, pabelanger, lmadsen
........
................
r256985 | mmichelson | 2010-04-13 00:27:07 +0200 (Tue, 13 Apr 2010) | 31 lines
Fix issue where recall would not happen when it should.
Specifically, the situation would happen when multiple
callers would request CC for a single generically-monitored
device. If the monitored device became available but the
caller did not answer the recall, then there was nothing
that would poke the CC core to let it know that it should
attempt to recall someone else instead.
After careful consideration, I came to the conclusion that
the only area of Asterisk that needed to be touched was the
generic CC monitor. All other types of CC would require something
outside of Asterisk to invoke a recall for a separate device.
This was accomplished by changing the generic monitor destructor
to poke other generic monitor instances if the device is currently
available and the specific instance was currently not suspended.
In order to not accidentally trigger recalls at bad times, the
fit_for_recall flag was also added to the generic_monitor_instance_list
struct. This gets set as soon as a monitored device becomes available.
It gets cleared if a CCNR request triggers the creation of a new
generic monitor instance. By doing this, we don't accidentally try
to recall a device when the monitored device was being monitored
for CCNR and never actually became available for recall in the first
place.
This error was discovered by Steve Pitts during in-house testing
at Digium.
................
r257025 | mmichelson | 2010-04-13 18:15:36 +0200 (Tue, 13 Apr 2010) | 8 lines
Address Russell's comments on func_srv from reviewboard.
* Change copyright date
* Place channel in autoservice when doing SRV lookup
* Get rid of trailing whitespace
* Change logic in load_module function
................
r257032 | mmichelson | 2010-04-13 18:18:16 +0200 (Tue, 13 Apr 2010) | 3 lines
Update sample dialstrings in sip.conf.sample file.
................
r257065 | tilghman | 2010-04-13 18:33:21 +0200 (Tue, 13 Apr 2010) | 8 lines
Ensure that we can have commas within cdr values.
(closes issue #17001)
Reported by: snuffy
Patches:
20100412__issue17001.diff.txt uploaded by tilghman (license 14)
Tested by: snuffy
................
r257146 | mnicholson | 2010-04-13 20:10:30 +0200 (Tue, 13 Apr 2010) | 16 lines
Merged revisions 257070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r257070 | mnicholson | 2010-04-13 11:46:30 -0500 (Tue, 13 Apr 2010) | 9 lines
Add an option to restore past broken behavor of the Events manager action
Before r238915, certain values for the EventMask parameter of the Events action would result in no response being returned. This patch adds an option to restore that broken behavior. Also while fixing this bug I discovered that passing an empty EventMasks parameter would also result in no response being returned, this has been fixed as well while being preserved when the broken behavior is requested.
(closes issue #17023)
Reported by: nblasgen
Review: https://reviewboard.asterisk.org/r/602/
........
................
r257191 | tilghman | 2010-04-13 21:17:48 +0200 (Tue, 13 Apr 2010) | 10 lines
Also unref the pvt when we delete the provisional keepalive job.
(closes issue #16774)
Reported by: kowalma
Patches:
20100315__issue16774.diff.txt uploaded by tilghman (license 14)
Tested by: falves11, jamicque
Review: https://reviewboard.asterisk.org/r/591/
................
r257262 | tilghman | 2010-04-15 00:57:35 +0200 (Thu, 15 Apr 2010) | 15 lines
Yet another issue where the conversion of the application delimiter to comma caused an issue.
Application arguments within the feature map could possibly contain a comma,
which conflicts with the syntax of the features.conf configuration file. This
patch allows the argument to be wrapped in parentheses or quoted, to allow the
application arguments to be interpreted as a single configuration parameter.
(closes issue #16646)
Reported by: pinga-fogo
Patches:
20100414__issue16646.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman
Review: https://reviewboard.asterisk.org/r/547/
................
r257267 | tilghman | 2010-04-15 01:08:52 +0200 (Thu, 15 Apr 2010) | 16 lines
Blocked revisions 257266 via svnmerge
........
r257266 | tilghman | 2010-04-14 18:08:11 -0500 (Wed, 14 Apr 2010) | 10 lines
When forwarding a message, ensure that prepending works correctly.
This is a regression in 1.4, only.
(closes issue #17103)
Reported by: mglazer
Patches:
20100408__issue17103.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman
........
................
r257343 | lmadsen | 2010-04-15 15:44:38 +0200 (Thu, 15 Apr 2010) | 9 lines
Merged revisions 257342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r257342 | lmadsen | 2010-04-15 08:41:45 -0500 (Thu, 15 Apr 2010) | 1 line
Update address of the bug tracker.
........
................
r257427 | lmadsen | 2010-04-15 21:41:05 +0200 (Thu, 15 Apr 2010) | 21 lines
Merged revisions 257426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r257426 | lmadsen | 2010-04-15 14:40:33 -0500 (Thu, 15 Apr 2010) | 13 lines
Update backtrace.txt documentation.
Update the backtrace.txt documentation so it conforms to the same layout as
other documents we've been working on recently. Additionally, add a bunch of
new information about gathering backtraces for crashes and deadlocks, along
with ways of verifying your file before uploading it. Create a couple of one
line commands for people to generate the files we need.
(closes issue #17190)
Reported by: lmadsen
Patches:
backtrace.txt.patch-2 uploaded by lmadsen (license 10)
Tested by: lmadsen, pabelanger
........
................
r257493 | tilghman | 2010-04-15 22:30:15 +0200 (Thu, 15 Apr 2010) | 20 lines
Merged revisions 257467 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r257467 | tilghman | 2010-04-15 15:24:50 -0500 (Thu, 15 Apr 2010) | 13 lines
Don't recreate peer, when responding to a repeated deregistration attempt.
When a reply to a deregistration is lost in transmit, the client retries the
deregistration. Previously, this would cause a realtime/autocreate peer to be
loaded back into memory, after it had already been correctly purged. Instead,
we just want to resend the reply without loading the peer.
(closes issue #16908)
Reported by: kkm
Patches:
20100412__issue16908.diff.txt uploaded by tilghman (license 14)
Tested by: kkm
........
................
r257560 | tilghman | 2010-04-15 23:26:19 +0200 (Thu, 15 Apr 2010) | 13 lines
Merged revisions 257544 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r257544 | tilghman | 2010-04-15 16:23:24 -0500 (Thu, 15 Apr 2010) | 6 lines
Allow application options with arguments to contain parentheses, through a variety of escaping techniques.
Fixes SWP-1194 (ABE-2143).
Review: https://reviewboard.asterisk.org/r/604/
........
................
r257642 | dhubbard | 2010-04-16 21:25:30 +0200 (Fri, 16 Apr 2010) | 14 lines
Enable PRI SERVICE message support in chan_dahdi for the 'national' switchtype
Revision 1072 of libpri added SERVICE message support for the 'national'
switchtype. The attached patch enables the use of 'pri service' CLI commands
on dahdi channels that are configured for the 'national' switchtype.
(closes issue #17142)
Reported by: dhubbard
Patches:
dw-ni2.patch uploaded by dhubbard (license 733)
Tested by: elguero, dhubbard
Review: https://reviewboard.asterisk.org/r/612/
................
r257646 | mmichelson | 2010-04-16 21:50:43 +0200 (Fri, 16 Apr 2010) | 3 lines
Make sure to fail a monitor if we receive a negative response for a CC SUBSCRIBE.
................
r257713 | dhubbard | 2010-04-16 23:22:30 +0200 (Fri, 16 Apr 2010) | 28 lines
Merged revisions 257686 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r257686 | dhubbard | 2010-04-16 16:15:43 -0500 (Fri, 16 Apr 2010) | 21 lines
Make the mixmonitor thread process audio frames faster
Mantis issue 17078 reports MixMonitor recordings have shorter durations than
the call duration. This was because the mixmonitor thread was not processing
frames from the audiohook fast enough. The mixmonitor thread would slowly fall
behind the most recent audio frame and when the channel hangs up, the mixmonitor
thread would exit without processing the same number of frames as the channel;
leaving the mixmonitor recording shorter than actual call duration.
This revision fixes this issue by moving the ast_audiohook_trigger_wait() and
the subsequent audiohook.status check into the block where the
ast_audiohook_read_frame() function returns NULL.
(closes issue #17078)
Reported by: geoff2010
Patches:
dw-M17078.patch uploaded by dhubbard (license 733)
Tested by: dhubbard, geoff2010
Review: https://reviewboard.asterisk.org/r/611/
........
................
r257768 | tilghman | 2010-04-18 19:25:53 +0200 (Sun, 18 Apr 2010) | 2 lines
Removing unused configuration parameters
................
r257810 | twilson | 2010-04-19 19:57:41 +0200 (Mon, 19 Apr 2010) | 5 lines
Fix incomplete CDR merge from r195881
Because res/res_features.c was removed and main/cdr.c added, these changes
didn't make it to trunk and the 1.6.x branches
................
r257851 | mmichelson | 2010-04-19 20:42:31 +0200 (Mon, 19 Apr 2010) | 12 lines
Commit compromise I suggested on review 608.
This allows for multiple SRV queries to be done
from the dialplan for the same service on a single call while
still allowing one to bypass the call to SRVQUERY if they so
please.
Taking action since no comments had been left for a while.
This can easily be reverted if needed. External tests
still pass.
................
r257857 | jpeeler | 2010-04-19 21:10:18 +0200 (Mon, 19 Apr 2010) | 8 lines
Blocked revisions 257856 via svnmerge
........
r257856 | jpeeler | 2010-04-19 14:09:46 -0500 (Mon, 19 Apr 2010) | 1 line
make app_voicemail compile with IMAP_STORAGE
........
................
r257883 | tilghman | 2010-04-19 21:23:41 +0200 (Mon, 19 Apr 2010) | 2 lines
Bad merge fix
................
r257947 | qwell | 2010-04-19 23:49:30 +0200 (Mon, 19 Apr 2010) | 6 lines
Don't consider a missing indications.conf to be a critical error.
There were many changes in revision 176627 which would avoid the error that a
missing config would have caused. Other than this, there are no other config
files (including asterisk.conf, surprisingly) that are required.
................
r257949 | qwell | 2010-04-19 23:57:56 +0200 (Mon, 19 Apr 2010) | 1 line
Change log message to match severity.
................
Added:
team/phsultan/jingle-support/configs/ccss.conf.sample
- copied unchanged from r257949, trunk/configs/ccss.conf.sample
team/phsultan/jingle-support/doc/CCSS_architecture.pdf
- copied unchanged from r257949, trunk/doc/CCSS_architecture.pdf
team/phsultan/jingle-support/doc/HOWTO_collect_debug_information.txt
- copied unchanged from r257949, trunk/doc/HOWTO_collect_debug_information.txt
team/phsultan/jingle-support/doc/tex/ccss.tex
- copied unchanged from r257949, trunk/doc/tex/ccss.tex
team/phsultan/jingle-support/funcs/func_callcompletion.c
- copied unchanged from r257949, trunk/funcs/func_callcompletion.c
team/phsultan/jingle-support/include/asterisk/ccss.h
- copied unchanged from r257949, trunk/include/asterisk/ccss.h
team/phsultan/jingle-support/include/asterisk/channelstate.h
- copied unchanged from r257949, trunk/include/asterisk/channelstate.h
team/phsultan/jingle-support/main/ccss.c
- copied unchanged from r257949, trunk/main/ccss.c
Modified:
team/phsultan/jingle-support/ (props changed)
team/phsultan/jingle-support/CHANGES
team/phsultan/jingle-support/apps/app_dial.c
team/phsultan/jingle-support/apps/app_mixmonitor.c
team/phsultan/jingle-support/apps/app_voicemail.c
team/phsultan/jingle-support/cdr/cdr_sqlite3_custom.c
team/phsultan/jingle-support/channels/chan_dahdi.c
team/phsultan/jingle-support/channels/chan_local.c
team/phsultan/jingle-support/channels/chan_sip.c
team/phsultan/jingle-support/channels/sig_analog.c
team/phsultan/jingle-support/channels/sig_analog.h
team/phsultan/jingle-support/channels/sig_pri.c
team/phsultan/jingle-support/channels/sig_pri.h
team/phsultan/jingle-support/channels/sip/include/reqresp_parser.h
team/phsultan/jingle-support/channels/sip/include/sip.h
team/phsultan/jingle-support/channels/sip/reqresp_parser.c
team/phsultan/jingle-support/configs/cdr_odbc.conf.sample
team/phsultan/jingle-support/configs/chan_dahdi.conf.sample
team/phsultan/jingle-support/configs/features.conf.sample
team/phsultan/jingle-support/configs/manager.conf.sample
team/phsultan/jingle-support/configs/sip.conf.sample
team/phsultan/jingle-support/configure
team/phsultan/jingle-support/configure.ac
team/phsultan/jingle-support/contrib/scripts/astgenkey.8
team/phsultan/jingle-support/contrib/scripts/autosupport.8
team/phsultan/jingle-support/contrib/scripts/safe_asterisk.8
team/phsultan/jingle-support/doc/asterisk.8
team/phsultan/jingle-support/doc/backtrace.txt
team/phsultan/jingle-support/doc/tex/asterisk.tex
team/phsultan/jingle-support/funcs/func_srv.c
team/phsultan/jingle-support/include/asterisk/app.h
team/phsultan/jingle-support/include/asterisk/autoconfig.h.in
team/phsultan/jingle-support/include/asterisk/channel.h
team/phsultan/jingle-support/include/asterisk/devicestate.h
team/phsultan/jingle-support/include/asterisk/frame.h
team/phsultan/jingle-support/include/asterisk/manager.h
team/phsultan/jingle-support/include/asterisk/rtp_engine.h
team/phsultan/jingle-support/include/asterisk/xml.h
team/phsultan/jingle-support/main/app.c
team/phsultan/jingle-support/main/asterisk.c
team/phsultan/jingle-support/main/channel.c
team/phsultan/jingle-support/main/features.c
team/phsultan/jingle-support/main/indications.c
team/phsultan/jingle-support/main/logger.c
team/phsultan/jingle-support/main/manager.c
team/phsultan/jingle-support/main/xml.c
team/phsultan/jingle-support/tests/test_app.c
team/phsultan/jingle-support/tests/test_gosub.c
team/phsultan/jingle-support/tests/test_pbx.c
team/phsultan/jingle-support/tests/test_substitution.c
Propchange: team/phsultan/jingle-support/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/phsultan/jingle-support/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/phsultan/jingle-support/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Apr 20 05:07:27 2010
@@ -1,1 +1,1 @@
-/trunk:1-256509
+/trunk:1-257985
Modified: team/phsultan/jingle-support/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/jingle-support/CHANGES?view=diff&rev=257986&r1=257985&r2=257986
==============================================================================
--- team/phsultan/jingle-support/CHANGES (original)
+++ team/phsultan/jingle-support/CHANGES Tue Apr 20 05:07:27 2010
@@ -387,6 +387,13 @@
iCalendar, CalDAV, and Exchange Server calendars are supported (Exchange support
only tested on Exchange Server 2003 with no support for forms-based authentication).
+Call Completion Supplementary Services for Asterisk
+---------------------------------------------------
+ * Call completion support has been added for SIP, DAHDI/ISDN, and DAHDI/analog.
+ DAHDI/ISDN supports call completion for the following switch types:
+ EuroIsdn(ETSI) for PTP and PTMP modes, and Qsig.
+ See doc/CCSS_architecture.pdf and doc/tex/ccss.tex(asterisk.pdf) for details.
+
Multicast RTP Support
---------------------
* A new RTP engine and channel driver have been added which supports Multicast RTP.
Modified: team/phsultan/jingle-support/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/jingle-support/apps/app_dial.c?view=diff&rev=257986&r1=257985&r2=257986
==============================================================================
--- team/phsultan/jingle-support/apps/app_dial.c (original)
+++ team/phsultan/jingle-support/apps/app_dial.c Tue Apr 20 05:07:27 2010
@@ -62,6 +62,7 @@
#include "asterisk/global_datastores.h"
#include "asterisk/dsp.h"
#include "asterisk/cel.h"
+#include "asterisk/ccss.h"
#include "asterisk/indications.h"
/*** DOCUMENTATION
@@ -810,6 +811,12 @@
ast_channel_make_compatible(o->chan, in);
ast_channel_inherit_variables(in, o->chan);
ast_channel_datastore_inherit(in, o->chan);
+ /* When a call is forwarded, we don't want to track new interfaces
+ * dialed for CC purposes. Setting the done flag will ensure that
+ * any Dial operations that happen later won't record CC interfaces.
+ */
+ ast_ignore_cc(o->chan);
+ ast_log(LOG_NOTICE, "Not accepting call completion offers from call-forward recipient %s\n", o->chan->name);
} else
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
}
@@ -904,7 +911,8 @@
struct chanlist *outgoing, int *to, struct ast_flags64 *peerflags,
char *opt_args[],
struct privacy_args *pa,
- const struct cause_args *num_in, int *result, char *dtmf_progress)
+ const struct cause_args *num_in, int *result, char *dtmf_progress,
+ const int ignore_cc)
{
struct cause_args num = *num_in;
int prestart = num.busy + num.congestion + num.nochan;
@@ -917,6 +925,10 @@
#endif
struct ast_party_connected_line connected_caller;
struct ast_str *featurecode = ast_str_alloca(FEATURE_MAX_LEN + 1);
+ int cc_recall_core_id;
+ int is_cc_recall;
+ int cc_frame_received = 0;
+ int num_ringing = 0;
ast_party_connected_line_init(&connected_caller);
if (single) {
@@ -937,6 +949,8 @@
ast_party_connected_line_free(&connected_caller);
}
}
+
+ is_cc_recall = ast_cc_is_recall(in, &cc_recall_core_id, NULL);
#ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->next)
@@ -970,6 +984,9 @@
ast_verb(3, "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);
}
*to = 0;
+ if (is_cc_recall) {
+ ast_cc_failed(cc_recall_core_id, "Everyone is busy/congested for the recall. How sad");
+ }
return NULL;
}
winner = ast_waitfor_n(watchers, pos, to);
@@ -1014,6 +1031,15 @@
/* here, o->chan == c == winner */
if (!ast_strlen_zero(c->call_forward)) {
pa->sentringing = 0;
+ if (!ignore_cc && (f = ast_read(c))) {
+ if (f->frametype == AST_FRAME_CONTROL && f->subclass.integer == AST_CONTROL_CC) {
+ /* This channel is forwarding the call, and is capable of CC, so
+ * be sure to add the new device interface to the list
+ */
+ ast_handle_cc_control_frame(in, c, f->data.ptr);
+ }
+ ast_frfree(f);
+ }
do_forward(o, &num, peerflags, single, to);
continue;
}
@@ -1088,13 +1114,41 @@
handle_cause(AST_CAUSE_CONGESTION, &num);
break;
case AST_CONTROL_RINGING:
- ast_verb(3, "%s is ringing\n", c->name);
- /* Setup early media if appropriate */
- if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
- ast_channel_early_bridge(in, c);
- if (!(pa->sentringing) && !ast_test_flag64(outgoing, OPT_MUSICBACK) && ast_strlen_zero(opt_args[OPT_ARG_RINGBACK])) {
- ast_indicate(in, AST_CONTROL_RINGING);
- pa->sentringing++;
+ /* This is a tricky area to get right when using a native
+ * CC agent. The reason is that we do the best we can to send only a
+ * single ringing notification to the caller.
+ *
+ * Call completion complicates the logic used here. CCNR is typically
+ * offered during a ringing message. Let's say that party A calls
+ * parties B, C, and D. B and C do not support CC requests, but D
+ * does. If we were to receive a ringing notification from B before
+ * the others, then we would end up sending a ringing message to
+ * A with no CCNR offer present.
+ *
+ * The approach that we have taken is that if we receive a ringing
+ * response from a party and no CCNR offer is present, we need to
+ * wait. Specifically, we need to wait until either a) a called party
+ * offers CCNR in its ringing response or b) all called parties have
+ * responded in some way to our call and none offers CCNR.
+ *
+ * The drawback to this is that if one of the parties has a delayed
+ * response or, god forbid, one just plain doesn't respond to our
+ * outgoing call, then this will result in a significant delay between
+ * when the caller places the call and hears ringback.
+ *
+ * Note also that if CC is disabled for this call, then it is perfectly
+ * fine for ringing frames to get sent through.
+ */
+ ++num_ringing;
+ if (ignore_cc || cc_frame_received || num_ringing == numlines) {
+ ast_verb(3, "%s is ringing\n", c->name);
+ /* Setup early media if appropriate */
+ if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
+ ast_channel_early_bridge(in, c);
+ if (!(pa->sentringing) && !ast_test_flag64(outgoing, OPT_MUSICBACK) && ast_strlen_zero(opt_args[OPT_ARG_RINGBACK])) {
+ ast_indicate(in, AST_CONTROL_RINGING);
+ pa->sentringing++;
+ }
}
break;
case AST_CONTROL_PROGRESS:
@@ -1163,6 +1217,12 @@
case AST_CONTROL_FLASH:
/* Ignore going off hook and flash */
break;
+ case AST_CONTROL_CC:
+ if (!ignore_cc) {
+ ast_handle_cc_control_frame(in, c, f->data.ptr);
+ cc_frame_received = 1;
+ }
+ break;
case -1:
if (!ast_test_flag64(outgoing, OPT_RINGBACK | OPT_MUSICBACK)) {
ast_verb(3, "%s stopped sounds\n", c->name);
@@ -1212,6 +1272,9 @@
}
ast_frfree(f);
}
+ if (is_cc_recall) {
+ ast_cc_completed(in, "CC completed, although the caller hung up (cancelled)");
+ }
return NULL;
}
@@ -1229,6 +1292,9 @@
strcpy(pa->status, "CANCEL");
ast_frfree(f);
ast_channel_unlock(in);
+ if (is_cc_recall) {
+ ast_cc_completed(in, "CC completed, but the caller used DTMF to exit");
+ }
return NULL;
}
ast_channel_unlock(in);
@@ -1241,6 +1307,9 @@
strcpy(pa->status, "CANCEL");
ast_cdr_noanswer(in->cdr);
ast_frfree(f);
+ if (is_cc_recall) {
+ ast_cc_completed(in, "CC completed, but the caller hung up with DTMF");
+ }
return NULL;
}
}
@@ -1283,6 +1352,9 @@
}
#endif
+ if (is_cc_recall) {
+ ast_cc_completed(in, "Recall completed!");
+ }
return peer;
}
@@ -1656,6 +1728,8 @@
char *opt_args[OPT_ARG_ARRAY_SIZE];
struct ast_datastore *datastore = NULL;
int fulldial = 0, num_dialed = 0;
+ int ignore_cc = 0;
+ char device_name[AST_CHANNEL_NAME];
/* Reset all DIAL variables back to blank, to prevent confusion (in case we don't reset all of them). */
pbx_builtin_setvar_helper(chan, "DIALSTATUS", "");
@@ -1683,6 +1757,10 @@
if (ast_strlen_zero(args.peers)) {
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
+ goto done;
+ }
+
+ if (ast_cc_call_init(chan, &ignore_cc)) {
goto done;
}
@@ -1871,7 +1949,16 @@
if (!rest) /* we are on the last destination */
chan->hangupcause = cause;
chanlist_free(tmp);
+ if (!ignore_cc && (cause == AST_CAUSE_BUSY || cause == AST_CAUSE_CONGESTION)) {
+ if (!ast_cc_callback(chan, tech, numsubst, ast_cc_busy_interface)) {
+ ast_cc_extension_monitor_add_dialstring(chan, interface, "");
+ }
+ }
continue;
+ }
+ ast_channel_get_device_name(tc, device_name, sizeof(device_name));
+ if (!ignore_cc) {
+ ast_cc_extension_monitor_add_dialstring(chan, interface, device_name);
}
pbx_builtin_setvar_helper(tc, "DIALEDPEERNUMBER", numsubst);
@@ -1965,6 +2052,7 @@
chan->hangupcause = tc->hangupcause;
}
ast_channel_unlock(chan);
+ ast_cc_call_failed(chan, tc, interface);
ast_hangup(tc);
tc = NULL;
chanlist_free(tmp);
@@ -2038,7 +2126,7 @@
}
}
- peer = wait_for_answer(chan, outgoing, &to, peerflags, opt_args, &pa, &num, &result, dtmf_progress);
+ peer = wait_for_answer(chan, outgoing, &to, peerflags, opt_args, &pa, &num, &result, dtmf_progress, ignore_cc);
/* The ast_channel_datastore_remove() function could fail here if the
* datastore was moved to another channel during a masquerade. If this is
@@ -2513,6 +2601,7 @@
if (config.start_sound) {
ast_free((char *)config.start_sound);
}
+ ast_ignore_cc(chan);
return res;
}
Modified: team/phsultan/jingle-support/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/jingle-support/apps/app_mixmonitor.c?view=diff&rev=257986&r1=257985&r2=257986
==============================================================================
--- team/phsultan/jingle-support/apps/app_mixmonitor.c (original)
+++ team/phsultan/jingle-support/apps/app_mixmonitor.c Tue Apr 20 05:07:27 2010
@@ -270,13 +270,14 @@
while (mixmonitor->audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING && !mixmonitor->mixmonitor_ds->fs_quit) {
struct ast_frame *fr = NULL;
- ast_audiohook_trigger_wait(&mixmonitor->audiohook);
-
- if (mixmonitor->audiohook.status != AST_AUDIOHOOK_STATUS_RUNNING)
- break;
-
- if (!(fr = ast_audiohook_read_frame(&mixmonitor->audiohook, SAMPLES_PER_FRAME, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR)))
+ if (!(fr = ast_audiohook_read_frame(&mixmonitor->audiohook, SAMPLES_PER_FRAME, AST_AUDIOHOOK_DIRECTION_BOTH, AST_FORMAT_SLINEAR))) {
+ ast_audiohook_trigger_wait(&mixmonitor->audiohook);
+
+ if (mixmonitor->audiohook.status != AST_AUDIOHOOK_STATUS_RUNNING) {
+ break;
+ }
continue;
+ }
/* audiohook lock is not required for the next block.
* Unlock it, but remember to lock it before looping or exiting */
Modified: team/phsultan/jingle-support/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/jingle-support/apps/app_voicemail.c?view=diff&rev=257986&r1=257985&r2=257986
==============================================================================
--- team/phsultan/jingle-support/apps/app_voicemail.c (original)
+++ team/phsultan/jingle-support/apps/app_voicemail.c Tue Apr 20 05:07:27 2010
@@ -4483,7 +4483,7 @@
#ifdef IMAP_STORAGE
{
/* Convert body to native line terminators for IMAP backend */
- char *line = passdata, *next;
+ char *line = ast_str_buffer(str1), *next;
do {
/* Terminate line before outputting it to the file */
if ((next = strchr(line, '\n'))) {
@@ -12659,7 +12659,6 @@
/* Mark Urgent */
if ((flag && ast_strlen_zero(flag)) || (!ast_strlen_zero(flag) && strcmp(flag, "Urgent"))) {
ast_verbose(VERBOSE_PREFIX_3 "marking message as Urgent\n");
- ast_debug(1000, "This message is too urgent!\n");
res = ast_play_and_wait(chan, "vm-marked-urgent");
strcpy(flag, "Urgent");
} else if (flag) {
Modified: team/phsultan/jingle-support/cdr/cdr_sqlite3_custom.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/jingle-support/cdr/cdr_sqlite3_custom.c?view=diff&rev=257986&r1=257985&r2=257986
==============================================================================
--- team/phsultan/jingle-support/cdr/cdr_sqlite3_custom.c (original)
+++ team/phsultan/jingle-support/cdr/cdr_sqlite3_custom.c Tue Apr 20 05:07:27 2010
@@ -50,6 +50,7 @@
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/cli.h"
+#include "asterisk/app.h"
AST_MUTEX_DEFINE_STATIC(lock);
@@ -63,8 +64,8 @@
static char *columns;
struct values {
- char *expression;
AST_LIST_ENTRY(values) list;
+ char expression[1];
};
static AST_LIST_HEAD_STATIC(sql_values, values);
@@ -117,9 +118,12 @@
static int load_values_config(const char *tmp)
{
- char *val = NULL;
char *vals = NULL, *save = NULL;
struct values *value = NULL;
+ int i;
+ AST_DECLARE_APP_ARGS(val,
+ AST_APP_ARG(ues)[200]; /* More than 200 columns in this CDR? Yeah, right... */
+ );
if (ast_strlen_zero(tmp)) {
ast_log(LOG_WARNING, "Values not specified. Module not loaded.\n");
@@ -129,17 +133,17 @@
ast_log(LOG_ERROR, "Out of memory creating temporary buffer for value '%s'\n", tmp);
return -1;
}
- while ((val = strsep(&vals, ","))) {
+ AST_STANDARD_RAW_ARGS(val, vals);
+ for (i = 0; i < val.argc; i++) {
/* Strip the single quotes off if they are there */
- val = ast_strip_quoted(val, "'", "'");
- value = ast_calloc(sizeof(char), sizeof(*value) + strlen(val) + 1);
+ char *v = ast_strip_quoted(val.ues[i], "'", "'");
+ value = ast_calloc(sizeof(char), sizeof(*value) + strlen(v));
if (!value) {
- ast_log(LOG_ERROR, "Out of memory creating entry for value '%s'\n", val);
+ ast_log(LOG_ERROR, "Out of memory creating entry for value '%s'\n", v);
ast_free(save);
return -1;
}
- value->expression = (char *) value + sizeof(*value);
- ast_copy_string(value->expression, val, strlen(val) + 1);
+ strcpy(value->expression, v); /* SAFE */
AST_LIST_INSERT_TAIL(&sql_values, value, list);
}
ast_free(save);
Modified: team/phsultan/jingle-support/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/jingle-support/channels/chan_dahdi.c?view=diff&rev=257986&r1=257985&r2=257986
==============================================================================
--- team/phsultan/jingle-support/channels/chan_dahdi.c (original)
+++ team/phsultan/jingle-support/channels/chan_dahdi.c Tue Apr 20 05:07:27 2010
@@ -116,6 +116,7 @@
#include "asterisk/event.h"
#include "asterisk/devicestate.h"
#include "asterisk/paths.h"
+#include "asterisk/ccss.h"
/*** DOCUMENTATION
<application name="DAHDISendKeypadFacility" language="en_US">
@@ -607,6 +608,11 @@
};
static struct dahdi_pri pris[NUM_SPANS];
+
+#if defined(HAVE_PRI_CCSS)
+/*! DAHDI PRI CCSS agent and monitor type name. */
+static const char dahdi_pri_cc_type[] = "DAHDI/PRI";
+#endif /* defined(HAVE_PRI_CCSS) */
#else
/*! Shut up the compiler */
@@ -1252,6 +1258,14 @@
/*! \brief TRUE if confrence is muted. */
int muting;
void *sig_pvt;
+ struct ast_cc_config_params *cc_params;
+ /* DAHDI channel names may differ greatly from the
+ * string that was provided to an app such as Dial. We
+ * need to save the original string passed to dahdi_request
+ * for call completion purposes. This way, we can replicate
+ * the original dialed string later.
+ */
+ char dialstring[AST_CHANNEL_NAME];
};
static struct dahdi_pvt *iflist = NULL; /*!< Main interface list start */
@@ -1314,6 +1328,12 @@
.localdialplan = PRI_NATIONAL_ISDN + 1,
.nodetype = PRI_CPE,
.qsigchannelmapping = DAHDI_CHAN_MAPPING_PHYSICAL,
+
+#if defined(HAVE_PRI_CCSS)
+ .cc_ptmp_recall_mode = 1,/* specificRecall */
+ .cc_qsig_signaling_link_req = 1,/* retain */
+ .cc_qsig_signaling_link_rsp = 1,/* retain */
+#endif /* defined(HAVE_PRI_CCSS) */
.minunused = 2,
.idleext = "",
@@ -1398,6 +1418,7 @@
.buf_policy = DAHDI_POLICY_IMMEDIATE,
.buf_no = numbufs,
.usefaxbuffers = 0,
+ .cc_params = ast_cc_config_params_init(),
},
.timing = {
.prewinktime = -1,
@@ -1433,6 +1454,8 @@
static int dahdi_queryoption(struct ast_channel *chan, int option, void *data, int *datalen);
[... 9565 lines stripped ...]
More information about the asterisk-commits
mailing list