SIP: Return "NO_ANSWER" instead of "NORMAL_CLEARING" if an extension is called with voicemail disabled. Implements patch suggested in Issue 920. Thanks.
This commit is contained in:
parent
7ec16e4dda
commit
ab4d1840b4
|
|
@ -27,7 +27,6 @@
|
|||
<!--<action application="bridge" data="user/${user_data(${destination_number}@${domain_name} attr id)}@${domain_name}"/> -->
|
||||
<!-- handles bridge failures before answer -->
|
||||
<action application="lua" data="app.lua failure_handler"/>
|
||||
<action application="answer"/>
|
||||
<action application="sleep" data="1000"/>
|
||||
<!--<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>-->
|
||||
<action application="set" data="voicemail_action=save"/>
|
||||
|
|
|
|||
|
|
@ -58,19 +58,6 @@
|
|||
|
||||
--if the session exists
|
||||
if (session ~= nil) then
|
||||
--answer the session
|
||||
if (session:ready()) then
|
||||
session:answer();
|
||||
end
|
||||
|
||||
--unset bind meta app
|
||||
session:execute("unbind_meta_app", "");
|
||||
|
||||
--set the callback function
|
||||
if (session:ready()) then
|
||||
session:setVariable("playback_terminators", "#");
|
||||
session:setInputCallback("on_dtmf", "");
|
||||
end
|
||||
|
||||
--get session variables
|
||||
context = session:getVariable("context");
|
||||
|
|
@ -190,6 +177,23 @@
|
|||
if (voicemail_attach_file == nil) then
|
||||
voicemail_attach_file = "true";
|
||||
end
|
||||
|
||||
--valid voicemail
|
||||
if (voicemail_uuid ~= nil) then
|
||||
--answer the session
|
||||
if (session:ready()) then
|
||||
session:answer();
|
||||
end
|
||||
|
||||
--unset bind meta app
|
||||
session:execute("unbind_meta_app", "");
|
||||
|
||||
--set the callback function
|
||||
if (session:ready()) then
|
||||
session:setVariable("playback_terminators", "#");
|
||||
session:setInputCallback("on_dtmf", "");
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -467,6 +471,8 @@
|
|||
if (referred_by) then
|
||||
referred_by = referred_by:match('[%d]+');
|
||||
session:transfer(referred_by, "XML", context);
|
||||
else
|
||||
session:hangup("NO_ANSWER");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue