diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8f547bf..9feb679 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -30338,6 +30338,14 @@ static struct ast_channel *sip_request_call(const char *type, struct ast_format_ } } + if (ast_strlen_zero(tmp)) { + *cause = AST_CAUSE_DESTINATION_OUT_OF_ORDER; + ast_debug(3, "Cant create SIP call - destination not specified\n"); + dialog_unlink_all(p); + dialog_unref(p, "unref dialog p destination not specified"); + return NULL; + } + /* Divvy up the items separated by slashes */ AST_NONSTANDARD_APP_ARGS(args, tmp, '/');