[Freeswitch-users] Interrupt a switch_ivr_originate

Anthony Minessale anthony.minessale at gmail.com
Tue Jan 14 02:34:53 MSK 2014


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 at gmail.com> wrote:

> Try switch_channel_hangup
>
>
> > On Jan 13, 2014, at 16:04, Stephen Wilde <wstephen80 at 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 at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> > 
> > 
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at 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  ♬

☞ http://freeswitch.org/http://cluecon.com/http://twitter.com/FreeSWITCH
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
<http://freeswitch.org/g+>*

ClueCon Weekly Development Call
☎ sip:888 at conference.freeswitch.org  ☎ +19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140113/ca81b627/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list