summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES7
-rw-r--r--apps/app_agent_pool.c1
-rw-r--r--apps/app_originate.c12
-rw-r--r--include/asterisk/res_pjsip.h4
-rw-r--r--include/asterisk/rtp_engine.h2
-rw-r--r--res/res_pjsip.c30
-rw-r--r--res/res_rtp_asterisk.c3
7 files changed, 44 insertions, 15 deletions
diff --git a/CHANGES b/CHANGES
index 09a7659d4..ac50a6dc9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,13 @@ app_fax
* The app_fax module is now deprecated, users should migrate to the
replacement module res_fax.
+app_originate
+------------------
+ * An 'a' option has been added to the Originate dialplan application which
+ will execute the originate in an asynchronous fashion. If set then the
+ application will return immediately without waiting for the originated
+ channel to answer.
+
Build System
------------------
* MALLOC_DEBUG no longer has an effect on Asterisk's ABI. Asterisk built
diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c
index 3c2ea3870..805c403f5 100644
--- a/apps/app_agent_pool.c
+++ b/apps/app_agent_pool.c
@@ -438,6 +438,7 @@ static void *agent_cfg_alloc(const char *name)
cfg = ao2_alloc_options(sizeof(*cfg), agent_cfg_destructor,
AO2_ALLOC_OPT_LOCK_NOLOCK);
if (!cfg || ast_string_field_init(cfg, 64)) {
+ ao2_cleanup(cfg);
return NULL;
}
ast_string_field_set(cfg, username, name);
diff --git a/apps/app_originate.c b/apps/app_originate.c
index 30fa565be..107be846d 100644
--- a/apps/app_originate.c
+++ b/apps/app_originate.c
@@ -74,6 +74,10 @@ static const char app_originate[] = "Originate";
</parameter>
<parameter name="options" required="false">
<optionlist>
+ <option name="a">
+ <para>Originate asynchronously. In other words, continue in the dialplan
+ without waiting for the originated channel to answer.</para>
+ </option>
<option name="b" argsep="^">
<para>Before originating the outgoing call, Gosub to the specified
location using the newly created channel.</para>
@@ -123,6 +127,7 @@ static const char app_originate[] = "Originate";
enum {
OPT_PREDIAL_CALLEE = (1 << 0),
OPT_PREDIAL_CALLER = (1 << 1),
+ OPT_ASYNC = (1 << 2),
};
enum {
@@ -133,6 +138,7 @@ enum {
};
AST_APP_OPTIONS(originate_exec_options, BEGIN_OPTIONS
+ AST_APP_OPTION('a', OPT_ASYNC),
AST_APP_OPTION_ARG('b', OPT_PREDIAL_CALLEE, OPT_ARG_PREDIAL_CALLEE),
AST_APP_OPTION_ARG('B', OPT_PREDIAL_CALLER, OPT_ARG_PREDIAL_CALLER),
END_OPTIONS );
@@ -250,7 +256,8 @@ static int originate_exec(struct ast_channel *chan, const char *data)
res = ast_pbx_outgoing_exten_predial(chantech, cap_slin, chandata,
timeout * 1000, args.arg1, exten, priority, &outgoing_status,
- AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, 0, NULL,
+ ast_test_flag64(&opts, OPT_ASYNC) ? AST_OUTGOING_NO_WAIT : AST_OUTGOING_WAIT,
+ NULL, NULL, NULL, NULL, NULL, 0, NULL,
predial_callee);
} else {
ast_debug(1, "Originating call to '%s/%s' and connecting them to %s(%s)\n",
@@ -258,7 +265,8 @@ static int originate_exec(struct ast_channel *chan, const char *data)
res = ast_pbx_outgoing_app_predial(chantech, cap_slin, chandata,
timeout * 1000, args.arg1, args.arg2, &outgoing_status,
- AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, NULL,
+ ast_test_flag64(&opts, OPT_ASYNC) ? AST_OUTGOING_NO_WAIT : AST_OUTGOING_WAIT,
+ NULL, NULL, NULL, NULL, NULL, NULL,
predial_callee);
}
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index c017e62db..26439986b 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -263,7 +263,7 @@ struct ast_sip_contact {
struct timeval expiration_time;
/*! Frequency to send OPTIONS requests to contact. 0 is disabled. */
unsigned int qualify_frequency;
- /*! If true authenticate the qualify if needed */
+ /*! If true authenticate the qualify challenge response if needed */
int authenticate_qualify;
/*! Qualify timeout. 0 is diabled. */
double qualify_timeout;
@@ -346,7 +346,7 @@ struct ast_sip_aor {
unsigned int default_expiration;
/*! Frequency to send OPTIONS requests to AOR contacts. 0 is disabled. */
unsigned int qualify_frequency;
- /*! If true authenticate the qualify if needed */
+ /*! If true authenticate the qualify challenge response if needed */
int authenticate_qualify;
/*! Maximum number of external contacts, 0 to disable */
unsigned int max_contacts;
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index b552948d2..8f044ce17 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -296,6 +296,8 @@ struct ast_rtp_payload_type {
#define AST_RTP_RTCP_PSFB 206
/* Common RTCP feedback message types */
+/*! Picture loss indication (From RFC4585) */
+#define AST_RTP_RTCP_FMT_PLI 1
/*! Full INTRA-frame Request (From RFC5104) */
#define AST_RTP_RTCP_FMT_FIR 4
/*! REMB Information (From draft-alvestrand-rmcat-remb-03) */
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 935a5598e..7c9929740 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -1366,12 +1366,17 @@
If <literal>0</literal> no timeout. Time in fractional seconds.
</para></description>
</configOption>
- <configOption name="authenticate_qualify" default="no">
- <synopsis>Authenticates a qualify request if needed</synopsis>
- <description><para>
- If true and a qualify request receives a challenge or authenticate response
+ <configOption name="authenticate_qualify">
+ <synopsis>Authenticates a qualify challenge response if needed</synopsis>
+ <description>
+ <para>If true and a qualify request receives a challenge response then
authentication is attempted before declaring the contact available.
- </para></description>
+ </para>
+ <note><para>This option does nothing as we will always complete
+ the challenge response authentication if the qualify request is
+ challenged.
+ </para></note>
+ </description>
</configOption>
<configOption name="outbound_proxy">
<synopsis>Outbound proxy used when sending OPTIONS request</synopsis>
@@ -1565,12 +1570,17 @@
If <literal>0</literal> no timeout. Time in fractional seconds.
</para></description>
</configOption>
- <configOption name="authenticate_qualify" default="no">
- <synopsis>Authenticates a qualify request if needed</synopsis>
- <description><para>
- If true and a qualify request receives a challenge or authenticate response
+ <configOption name="authenticate_qualify">
+ <synopsis>Authenticates a qualify challenge response if needed</synopsis>
+ <description>
+ <para>If true and a qualify request receives a challenge response then
authentication is attempted before declaring the contact available.
- </para></description>
+ </para>
+ <note><para>This option does nothing as we will always complete
+ the challenge response authentication if the qualify request is
+ challenged.
+ </para></note>
+ </description>
</configOption>
<configOption name="outbound_proxy">
<synopsis>Outbound proxy used when sending OPTIONS request</synopsis>
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index b010f6c51..c87e6fb77 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -5525,10 +5525,11 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
f = &transport_rtp->f;
break;
case RTCP_PT_FUR:
- /* Handle RTCP FUR as FIR by setting the format to 4 */
+ /* Handle RTCP FUR as FIR by setting the format to 4 */
rc = AST_RTP_RTCP_FMT_FIR;
case RTCP_PT_PSFB:
switch (rc) {
+ case AST_RTP_RTCP_FMT_PLI:
case AST_RTP_RTCP_FMT_FIR:
if (rtcp_debug_test_addr(addr)) {
ast_verbose("Received an RTCP Fast Update Request\n");