mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 19:43:03 +00:00
Cleanup dialog-info+xml Notify dialog
Make similar to other Notify messages. sample output: <?xml version="1.0"?> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="715" state="full" entity="sip:8523@192.168.x.xx"> <dialog id="8523"> <state>terminated</state> </dialog> </dialog-info> Tested with Asterisk 1.8.8.2 with Grandstream phones. alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1693/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@352704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -12503,8 +12503,8 @@ static void state_notify_build_xml(int state, int full, const char *exten, const
|
|||||||
ast_str_append(tmp, 0, "</tuple>\n</presence>\n");
|
ast_str_append(tmp, 0, "</tuple>\n</presence>\n");
|
||||||
break;
|
break;
|
||||||
case DIALOG_INFO_XML: /* SNOM subscribes in this format */
|
case DIALOG_INFO_XML: /* SNOM subscribes in this format */
|
||||||
ast_str_append(tmp, 0, "<?xml version=\"1.0\"?>");
|
ast_str_append(tmp, 0, "<?xml version=\"1.0\"?>\n");
|
||||||
ast_str_append(tmp, 0, "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"%d\" state=\"%s\" entity=\"%s\">", p->dialogver, full ? "full" : "partial", mto);
|
ast_str_append(tmp, 0, "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"%d\" state=\"%s\" entity=\"%s\">\n", p->dialogver, full ? "full" : "partial", mto);
|
||||||
if ((state & AST_EXTENSION_RINGING) && sip_cfg.notifyringing) {
|
if ((state & AST_EXTENSION_RINGING) && sip_cfg.notifyringing) {
|
||||||
const char *local_display = exten;
|
const char *local_display = exten;
|
||||||
char *local_target = ast_strdupa(mto);
|
char *local_target = ast_strdupa(mto);
|
||||||
@@ -12557,7 +12557,7 @@ static void state_notify_build_xml(int state, int full, const char *exten, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ast_str_append(tmp, 0, "<dialog id=\"%s\">", exten);
|
ast_str_append(tmp, 0, "<dialog id=\"%s\">\n", exten);
|
||||||
}
|
}
|
||||||
ast_str_append(tmp, 0, "<state>%s</state>\n", statestring);
|
ast_str_append(tmp, 0, "<state>%s</state>\n", statestring);
|
||||||
if (state == AST_EXTENSION_ONHOLD) {
|
if (state == AST_EXTENSION_ONHOLD) {
|
||||||
|
|||||||
Reference in New Issue
Block a user