mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-02 11:19:28 +00:00
blinking lights for xmas presence(2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6851 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5355075c60
commit
a70c313c90
@ -682,21 +682,18 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
|||||||
astate = dft_state;
|
astate = dft_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(event_status, "hold")) {
|
||||||
|
astate = "early";
|
||||||
|
}
|
||||||
|
|
||||||
stream.write_function(&stream,
|
stream.write_function(&stream,
|
||||||
"<?xml version=\"1.0\"?>\n"
|
"<?xml version=\"1.0\"?>\n"
|
||||||
"<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" "
|
"<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" "
|
||||||
"version=\"%s\" state=\"full\" entity=\"%s\">\n",
|
"version=\"%s\" state=\"full\" entity=\"%s\">\n",
|
||||||
switch_str_nil(switch_event_get_header(helper->event, "event_count")), clean_id);
|
switch_str_nil(switch_event_get_header(helper->event, "event_count")), clean_id);
|
||||||
/* astate of aleg/outbound should start @ confirmed not early. direction is recipient or initiator */
|
|
||||||
stream.write_function(&stream, "<dialog id=\"%s\" direction=\"%s\">\n", uuid, direction);
|
stream.write_function(&stream, "<dialog id=\"%s\" direction=\"%s\">\n", uuid, direction);
|
||||||
|
|
||||||
stream.write_function(&stream, "<state>%s</state>\n", astate);
|
stream.write_function(&stream, "<state>%s</state>\n", astate);
|
||||||
|
|
||||||
if (!strcasecmp(event_status, "hold")) {
|
|
||||||
stream.write_function(&stream, "<local>\n<target uri=\"%s\">\n"
|
|
||||||
"<param pname=\"+sip.rendering\" pvalue=\"no\">\n"
|
|
||||||
"</target>\n</local>\n", clean_id);
|
|
||||||
}
|
|
||||||
stream.write_function(&stream, "</dialog>\n</dialog-info>\n");
|
stream.write_function(&stream, "</dialog>\n</dialog-info>\n");
|
||||||
pl = stream.data;
|
pl = stream.data;
|
||||||
ct = "application/dialog-info+xml";
|
ct = "application/dialog-info+xml";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user