summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/event/presence_update.lua
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-07-23 12:56:13 +0200
committerPeter Kozak <spag@golwen.net>2013-07-23 12:56:13 +0200
commit68de11d4af204769972136667846b65ef91bee81 (patch)
treea21907921d4678fd8f264af8f4a67f11586ff41b /misc/freeswitch/scripts/event/presence_update.lua
parent40747e644e4d9d72378a8a9cee83f5046a16ccfa (diff)
fallback status header
Diffstat (limited to 'misc/freeswitch/scripts/event/presence_update.lua')
-rw-r--r--misc/freeswitch/scripts/event/presence_update.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/event/presence_update.lua b/misc/freeswitch/scripts/event/presence_update.lua
index fd85f03..cf29ca9 100644
--- a/misc/freeswitch/scripts/event/presence_update.lua
+++ b/misc/freeswitch/scripts/event/presence_update.lua
@@ -134,6 +134,9 @@ function PresenceUpdate.presence_in(self, event)
self.log:info('[', uuid,'] PRESENCE_CONFERENCE_', call_direction:upper(), ' ', common.str.to_i(account), ' - identifier: ', account, ', state: ', state);
self:conference(direction, account, domain, state, uuid);
elseif protocol == 'sip' or protocol == 'any' then
+ if common.str.blank(state) then
+ state = event:getHeader('answer-state');
+ end
if protocol == 'sip' and common.str.blank(state) then
self.log:debug('[', uuid,'] PRESENCE_', call_direction:upper(),' no state - protocol: ', protocol, ', account: ', account);
return;