summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-30 15:57:07 +0100
committerspag <spag@golwen.net>2013-01-30 15:57:07 +0100
commit44337fb9a2bcbb8766e7c2b508cf2206afa09c05 (patch)
tree20699a78defbe74100ed2b6366b28da269d5ecf8 /misc/freeswitch/scripts/dialplan
parentd959f30fbfde9d10811f04da6ab4891e2b94fdd7 (diff)
route endpoints
Diffstat (limited to 'misc/freeswitch/scripts/dialplan')
-rw-r--r--misc/freeswitch/scripts/dialplan/dialplan.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua
index ff4adc6..6e9bf68 100644
--- a/misc/freeswitch/scripts/dialplan/dialplan.lua
+++ b/misc/freeswitch/scripts/dialplan/dialplan.lua
@@ -814,11 +814,13 @@ function Dialplan.switch(self, destination)
self.caller:set_callee_id(destination.callee_id_number, destination.callee_id_name);
for index, route in ipairs(routes) do
- if route.endpoint_type == 'hangup' then
- return { continue = false, code = route.endpoint, phrase = route.phrase, cause = route.value }
+ if route.type == 'hangup' then
+ self.log:notice('SWITCH_HANGUP - code: ', route.code, ', phrase: ', route.phrase, ', cause: ', route.cause);
+ return { continue = false, code = route.code or '404', phrase = route.phrase, cause = route.cause }
end
- if route.endpoint_type == 'forward' then
- return { continue = true, call_forwarding = { number = route.value, service = 'route', type = 'phonenumber' }}
+ if route.type == 'forward' then
+ self.log:notice('SWITCH_CALL_FORWARDING - number: ', route.number);
+ return { continue = true, call_forwarding = { number = route.number, service = 'route', type = 'phonenumber' }}
end
for key, value in pairs(route) do