From 68de11d4af204769972136667846b65ef91bee81 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 23 Jul 2013 12:56:13 +0200 Subject: fallback status header --- misc/freeswitch/scripts/event/presence_update.lua | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3