Fix. Allow intercept only outbound calls.

Now it is possible intercept call from local extension to the world.

Fix. intercept channels also in EARLY state.

One of my softphones return 180 Ringing with SDP (no 183 Progress).
And FreeSWITCH shows such channel as `EARLY` not as `RINGING`)
This commit is contained in:
Alexey Melnichuk
2015-08-12 10:09:56 +04:00
parent e6a85e776b
commit 1bac6fa097
2 changed files with 9 additions and 5 deletions

View File

@@ -120,7 +120,8 @@ if ( session:ready() ) then
--check the database to get the uuid of a ringing call
sql = "select call_uuid as uuid, hostname, callee_num, ip_addr from channels ";
sql = sql .. "where callstate = 'RINGING' ";
sql = sql .. "where callstate in ('RINGING', 'EARLY') ";
sql = sql .. "AND direction = 'outbound' ";
if (extension) then
sql = sql .. "and presence_id = '"..extension.."@"..domain_name.."' ";
else