diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk.c | 2 | ||||
-rw-r--r-- | main/dial.c | 7 | ||||
-rw-r--r-- | main/stasis_endpoints.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 4660bf9db..e0a87d6b1 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -601,7 +601,7 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c ast_cli(a->fd, "\nPBX Core settings\n"); ast_cli(a->fd, "-----------------\n"); ast_cli(a->fd, " Version: %s\n", ast_get_version()); - ast_cli(a->fd, " Build Options: %s\n", S_OR(AST_BUILDOPTS, "(none)")); + ast_cli(a->fd, " Build Options: %s\n", S_OR(ast_get_build_opts(), "(none)")); if (ast_option_maxcalls) ast_cli(a->fd, " Maximum calls: %d (Current %d)\n", ast_option_maxcalls, ast_active_channels()); else diff --git a/main/dial.c b/main/dial.c index 34d2f7055..127f327d1 100644 --- a/main/dial.c +++ b/main/dial.c @@ -295,6 +295,7 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe char numsubst[AST_MAX_EXTENSION]; struct ast_format_cap *cap_all_audio = NULL; struct ast_format_cap *cap_request; + struct ast_format_cap *requester_cap = NULL; struct ast_assigned_ids assignedids = { .uniqueid = channel->assignedid1, .uniqueid2 = channel->assignedid2, @@ -305,6 +306,7 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe ast_channel_lock(chan); max_forwards = ast_max_forwards_get(chan); + requester_cap = ao2_bump(ast_channel_nativeformats(chan)); ast_channel_unlock(chan); if (max_forwards <= 0) { @@ -318,8 +320,8 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe if (cap && ast_format_cap_count(cap)) { cap_request = cap; - } else if (chan) { - cap_request = ast_channel_nativeformats(chan); + } else if (requester_cap) { + cap_request = requester_cap; } else { cap_all_audio = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT); ast_format_cap_append_by_type(cap_all_audio, AST_MEDIA_TYPE_AUDIO); @@ -332,6 +334,7 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe return -1; } cap_request = NULL; + ao2_cleanup(requester_cap); ao2_cleanup(cap_all_audio); if (chan) { diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c index f44ce4229..931bbb97d 100644 --- a/main/stasis_endpoints.c +++ b/main/stasis_endpoints.c @@ -247,7 +247,7 @@ static struct ast_json *contactstatus_to_json(struct stasis_message *msg, const return NULL; } - json_final = ast_json_pack("{s: s, s: o, s: o, s: { s: s, s: s, s: s } } ", + json_final = ast_json_pack("{s: s, s: o, s: o, s: { s: s, s: s, s: s, s: s } } ", "type", "ContactStatusChange", "timestamp", ast_json_timeval(*tv, NULL), "endpoint", json_endpoint, |