How to force "originate" call go through the dialplan

Status
Not open for further replies.

Zivk

Member
Apr 7, 2019
35
6
8
62
I'm implementing a lua script that is invoked for ESL (when there's no active call), dials to an external number, and when answered transfers the call to a local extension.

Done like that:
local session = freeswitch.Session("sofia/gateway/...") session:transfer(extension, "XML", domain)

The call is made successfully, but there's a huge drawback: the first channel (to the external number) doesn't go through the dialplan.
We have rich outbound routes in the dialplan, skipping them is a problem.

So my question is: is there a way to make a call from lua (or ESL) to an external number in a way that the first leg will go through the domain's dialplan.

Thanks.
 
Status
Not open for further replies.