HangupRequest not Handled from my controller

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HangupRequest not Handled from my controller

Marcel Schlimper
Hi,

I use the originate methode to make a call to a receiver and call a controller if the call is answered by the receiver to handle the call flow.

In the normal case, the receiver answered the call, my controller is called.
For the case that it is not possible to make a call, (wrong number, receiver not available) Adhearsion get a "Event: HangupRequest" but my controller is not called and my app can't handle the event.

Is there a way to handle this case?


thanks.
marcel

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: HangupRequest not Handled from my controller

Ben Langfeld-2
You would have to do something like this:

call = Adhearsion::OutboundCall.new
call.execute_controller_or_router_on_answer FooController
call.on_end { |event| ... do something even if never answered }
call.dial '[hidden email]'

Suggestions for a better API welcome as issues on Github.

On 17 November 2014 17:26, Marcel Schlimper <[hidden email]> wrote:
Hi,

I use the originate methode to make a call to a receiver and call a controller if the call is answered by the receiver to handle the call flow.

In the normal case, the receiver answered the call, my controller is called.
For the case that it is not possible to make a call, (wrong number, receiver not available) Adhearsion get a "Event: HangupRequest" but my controller is not called and my app can't handle the event.

Is there a way to handle this case?


thanks.
marcel

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.