Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (révision 295998) +++ channels/chan_sip.c (copie de travail) @@ -7721,6 +7721,7 @@ ast_copy_string(buf, value, sizeof(buf)); sip_parse_host(buf, lineno, &username, &portnum, &transport); + printf("mwi= %s / %s\n", buf, username); if ((hostname = strrchr(username, '@'))) { *hostname++ = '\0'; @@ -25251,6 +25252,16 @@ /* Divvy up the items separated by slashes */ AST_NONSTANDARD_APP_ARGS(args, tmp, '/'); + if(args.peerorhost == NULL) { + dialog_unlink_all(p, TRUE, TRUE); + dialog_unref(p, "unref dialog p from mem fail"); + /* sip_destroy(p); */ + ast_log(LOG_ERROR, "SIP resource name is not set or empty"); + + *cause = AST_CAUSE_CHANNEL_UNACCEPTABLE; + return NULL; + } + /* Find at sign - @ */ host = strchr(args.peerorhost, '@'); if (host) {