This prevents a crash from occurring when a contact with no URI is used
for the creation of an outbound out-of-dialog request with no
associated endpoint.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420949
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
pjsip_tpselector selector = { .type = PJSIP_TPSELECTOR_NONE, };
if (ast_strlen_zero(uri)) {
- if (!endpoint && !contact) {
+ if (!endpoint && (!contact || ast_strlen_zero(contact->uri))) {
ast_log(LOG_ERROR, "An endpoint and/or uri must be specified\n");
return -1;
}