diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d0c0fffa3..a33a0ddd1 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -25347,6 +25347,12 @@ static struct ast_channel *sip_request_call(const char *type, format_t format, c } ast_debug(1, "Asked to create a SIP channel with formats: %s\n", ast_getformatname_multiple(tmp, sizeof(tmp), oldformat)); + if (ast_strlen_zero(dest)) { + ast_log(LOG_ERROR, "Unable to create channel with empty destination.\n"); + *cause = AST_CAUSE_CHANNEL_UNACCEPTABLE; + return NULL; + } + if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE, NULL))) { ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory or socket error)\n", dest); *cause = AST_CAUSE_SWITCH_CONGESTION; |