forked from Mirrors/freeswitch
fire presence_out when reg is flushed manually
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16564 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b45f71bbe8
commit
b1ca4e289b
|
@ -511,6 +511,25 @@ int sofia_reg_del_callback(void *pArg, int argc, char **argv, char **columnNames
|
|||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "user-agent", argv[7]);
|
||||
switch_event_fire(&s_event);
|
||||
}
|
||||
|
||||
if (switch_event_create(&s_event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "proto", SOFIA_CHAT_PROTO);
|
||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "rpid", "away");
|
||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "login", profile->url);
|
||||
|
||||
if (argv[4]) {
|
||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "user-agent", argv[4]);
|
||||
}
|
||||
|
||||
if (argv[1] && argv[2]) {
|
||||
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from", "%s@%s", argv[1], argv[2]);
|
||||
}
|
||||
|
||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "status", "Unregistered");
|
||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "event_type", "presence");
|
||||
switch_event_fire(&s_event);
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue