|
|
@ -125,6 +125,7 @@ struct local_pvt {
|
|
|
|
#define LOCAL_LAUNCHED_PBX (1 << 3) /*!< PBX was launched */
|
|
|
|
#define LOCAL_LAUNCHED_PBX (1 << 3) /*!< PBX was launched */
|
|
|
|
#define LOCAL_NO_OPTIMIZATION (1 << 4) /*!< Do not optimize using masquerading */
|
|
|
|
#define LOCAL_NO_OPTIMIZATION (1 << 4) /*!< Do not optimize using masquerading */
|
|
|
|
#define LOCAL_BRIDGE (1 << 5) /*!< Report back the "true" channel as being bridged to */
|
|
|
|
#define LOCAL_BRIDGE (1 << 5) /*!< Report back the "true" channel as being bridged to */
|
|
|
|
|
|
|
|
#define LOCAL_MOH_PASSTHRU (1 << 6) /*!< Pass through music on hold start/stop frames */
|
|
|
|
|
|
|
|
|
|
|
|
static AST_LIST_HEAD_STATIC(locals, local_pvt);
|
|
|
|
static AST_LIST_HEAD_STATIC(locals, local_pvt);
|
|
|
|
|
|
|
|
|
|
|
@ -412,9 +413,9 @@ static int local_indicate(struct ast_channel *ast, int condition, const void *da
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
|
|
/* If this is an MOH hold or unhold, do it on the Local channel versus real channel */
|
|
|
|
/* If this is an MOH hold or unhold, do it on the Local channel versus real channel */
|
|
|
|
if (condition == AST_CONTROL_HOLD) {
|
|
|
|
if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_HOLD) {
|
|
|
|
ast_moh_start(ast, data, NULL);
|
|
|
|
ast_moh_start(ast, data, NULL);
|
|
|
|
} else if (condition == AST_CONTROL_UNHOLD) {
|
|
|
|
} else if (!ast_test_flag(p, LOCAL_MOH_PASSTHRU) && condition == AST_CONTROL_UNHOLD) {
|
|
|
|
ast_moh_stop(ast);
|
|
|
|
ast_moh_stop(ast);
|
|
|
|
} else if (condition == AST_CONTROL_CONNECTED_LINE || condition == AST_CONTROL_REDIRECTING) {
|
|
|
|
} else if (condition == AST_CONTROL_CONNECTED_LINE || condition == AST_CONTROL_REDIRECTING) {
|
|
|
|
struct ast_channel *this_channel;
|
|
|
|
struct ast_channel *this_channel;
|
|
|
@ -759,6 +760,9 @@ static struct local_pvt *local_alloc(const char *data, int format)
|
|
|
|
if (strchr(opts, 'b')) {
|
|
|
|
if (strchr(opts, 'b')) {
|
|
|
|
ast_set_flag(tmp, LOCAL_BRIDGE);
|
|
|
|
ast_set_flag(tmp, LOCAL_BRIDGE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strchr(opts, 'm')) {
|
|
|
|
|
|
|
|
ast_set_flag(tmp, LOCAL_MOH_PASSTHRU);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Look for a context */
|
|
|
|
/* Look for a context */
|
|
|
|