--- channels/chan_sip.c 2007-03-31 00:27:31.000000000 +0200 +++ channels/chan_sip.c 2007-03-31 01:18:38.000000000 +0200 @@ -7511,16 +7511,19 @@ case DIALOG_INFO_XML: /* SNOM subscribes in this format */ ast_build_string(&t, &maxbytes, "\n"); ast_build_string(&t, &maxbytes, "\n", p->dialogver++, full ? "full":"partial", mto); - if ((state & AST_EXTENSION_RINGING) && global_notifyringing) + if ((state & AST_EXTENSION_RINGING) && global_notifyringing) { ast_build_string(&t, &maxbytes, "\n", p->exten); - else + ast_build_string(&t, &maxbytes, "%s\n", p->exten, mto, mto); + ast_build_string(&t, &maxbytes, "%s\n", "caller", "*@unknown", ast_pickup_ext(), p->exten, p->fromdomain); + } else if (state == AST_EXTENSION_ONHOLD) { ast_build_string(&t, &maxbytes, "\n", p->exten); - ast_build_string(&t, &maxbytes, "%s\n", statestring); - if (state == AST_EXTENSION_ONHOLD) { ast_build_string(&t, &maxbytes, "\n\n" "\n" "\n\n", mto); + } else { + ast_build_string(&t, &maxbytes, "\n", p->exten); } + ast_build_string(&t, &maxbytes, "%s\n", statestring); ast_build_string(&t, &maxbytes, "\n\n"); break; case NONE: