mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-30 05:56:12 +00:00
tweak presence
This commit is contained in:
parent
1abe3b9337
commit
18695c75f2
@ -1348,6 +1348,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
|||||||
astate = "confirmed";
|
astate = "confirmed";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_dialog) {
|
||||||
if (!strcasecmp(astate, "ringing")) {
|
if (!strcasecmp(astate, "ringing")) {
|
||||||
if (!strcasecmp(direction, "recipient")) {
|
if (!strcasecmp(direction, "recipient")) {
|
||||||
astate = "early";
|
astate = "early";
|
||||||
@ -1355,10 +1356,15 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
|||||||
astate = "confirmed";
|
astate = "confirmed";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_dialog) {
|
|
||||||
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);
|
||||||
|
} else {
|
||||||
|
if (!strcasecmp(astate, "ringing")) {
|
||||||
|
astate = "confirmed";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcasecmp(astate, "early") || !strcasecmp(astate, "confirmed")) {
|
if (!strcasecmp(astate, "early") || !strcasecmp(astate, "confirmed")) {
|
||||||
|
|
||||||
clean_to_user = switch_mprintf("%s", sub_to_user ? sub_to_user : to_user);
|
clean_to_user = switch_mprintf("%s", sub_to_user ? sub_to_user : to_user);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user