I have done as you say. Thank you for this very useful info!


On Tue, Jan 14, 2014 at 12:34 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote:

the last arg to originate is:

switch_call_cause_t *cancel_cause


create a var of type switch_call_cause_t initialized to SWITCH_CAUSE_NONE


switch_call_cause_t ccause = SWITCH_CAUSE_NONE;

pass a pointer to that value to the last arg of ivr_originate e.g. (&ccause)

if you want to cancel the originate, set ccause to the cause you want to cancel the originate with.

of course you need to make sure the var is shared between threads and has proper lifecycle.
Alternatively you could have the ccause as part of a malloc'd struct etc as long as the pointer passed to ivr_originate is pointing to the real val.










On Mon, Jan 13, 2014 at 5:04 PM, <cmrienzo@gmail.com> wrote:
Try switch_channel_hangup


> On Jan 13, 2014, at 16:04, Stephen Wilde <wstephen80@gmail.com> wrote:
>
> There is a way to interrupt a switch_ivr_originate?
>
> In my code I do:
>
> switch_status_t         status  = switch_ivr_originate(NULL, &session, &cause, dialstring, 60, NULL, NULL, NULL, NULL, NULL, SOF_NO_LIMITS, NULL);
>
> that ends when completed (i.e. early media present) or call answered or for timeout (60 s in my case).
>
> It's possible inside another thread to force the interruption (abort) of this originate?
> Any suggestion?
>
> Stephen
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting@freeswitch.org
> http://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org