diff options
-rw-r--r-- | apps/app_directory.c | 7 | ||||
-rw-r--r-- | channels/chan_pjsip.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index dd80c3467..6866aa387 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -509,6 +509,11 @@ static struct ast_config *realtime_directory(char *context) const char *mailbox = ast_variable_retrieve(rtdata, category, "mailbox"); const char *ctx = ast_variable_retrieve(rtdata, category, "context"); + if (ast_strlen_zero(mailbox)) { + ast_debug(3, "Skipping result with missing or empty mailbox\n"); + continue; + } + fullname = ast_variable_retrieve(rtdata, category, "fullname"); hidefromdir = ast_variable_retrieve(rtdata, category, "hidefromdir"); if (ast_true(hidefromdir)) { @@ -529,7 +534,7 @@ static struct ast_config *realtime_directory(char *context) /* Does the context exist within the config file? If not, make one */ if (!(cat = ast_category_get(cfg, ctx, NULL))) { - if (!(cat = ast_category_new(ctx, "", 99999))) { + if (!(cat = ast_category_new_dynamic(ctx))) { ast_log(LOG_WARNING, "Out of memory\n"); ast_config_destroy(cfg); if (rtdata) { diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index 677dfd3dd..841654c92 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -941,6 +941,8 @@ static int chan_pjsip_write_stream(struct ast_channel *ast, int stream_num, stru res = media->write_callback(session, media, frame); } break; + case AST_FRAME_CNG: + break; default: ast_log(LOG_WARNING, "Can't send %u type frames with PJSIP\n", frame->frametype); break; |