AHN after_call not ever running

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

AHN after_call not ever running

Lloyd Hughes
Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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.
lcx
Reply | Threaded
Open this post in threaded view
|

Re: AHN after_call not ever running

lcx
Hi, maybe this helps: 


after that I switched my code to 

       call.on_end do |_|
          account_call
       end

in your case adding the send_notifications call in the call.on_end should solve your problem. 

Cris 

On Jul 8, 2014, at 10:02 , Lloyd <[hidden email]> wrote:

Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: AHN after_call not ever running

Lloyd Hughes
Hi,

Thanks for that. 

The first issue was Sequella wasn't actually connected to my DB. It didn't throw any error when I tried to save something and thus the callback just died with no warning/error. The next issue was what you mentioned where after_call is called before the on_end event. I needed info set in the on_end event for the callback. A third issue which I haven't figured out yet is that the event which returns the file recording URL only returns after on_end. I need that recording URL too.

Any suggestions how I can get it? Can I set the URL/filename before recording starts and force punchblock to save with that filename? That would be of great use to me and many other people I think. Currently I need workers to rename the file on creation, and move it to the folder where our PBX stores calls. It is quite a mess.

Thanks

Lloyd

On Tuesday, 8 July 2014 11:28:05 UTC+2, lcx wrote:
Hi, maybe this helps: 

<a href="https://github.com/adhearsion/adhearsion/issues/385" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;">https://github.com/adhearsion/adhearsion/issues/385

after that I switched my code to 

       call.on_end do |_|
          account_call
       end

in your case adding the send_notifications call in the call.on_end should solve your problem. 

Cris 

On Jul 8, 2014, at 10:02 , Lloyd <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="utgPGB3ewZEJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">hughes...@...> wrote:

Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: <a href="https://gist.github.com/system123/a9b65000cb7968c40365" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;">https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="utgPGB3ewZEJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: AHN after_call not ever running

Ben Langfeld
If recording completion callbacks are called after on_end, that is a bug. Please file it on GitHub.

Em 08/07/2014, às 09:47, Lloyd <[hidden email]> escreveu:

Hi,

Thanks for that. 

The first issue was Sequella wasn't actually connected to my DB. It didn't throw any error when I tried to save something and thus the callback just died with no warning/error. The next issue was what you mentioned where after_call is called before the on_end event. I needed info set in the on_end event for the callback. A third issue which I haven't figured out yet is that the event which returns the file recording URL only returns after on_end. I need that recording URL too.

Any suggestions how I can get it? Can I set the URL/filename before recording starts and force punchblock to save with that filename? That would be of great use to me and many other people I think. Currently I need workers to rename the file on creation, and move it to the folder where our PBX stores calls. It is quite a mess.

Thanks

Lloyd

On Tuesday, 8 July 2014 11:28:05 UTC+2, lcx wrote:
Hi, maybe this helps: 

<a href="https://github.com/adhearsion/adhearsion/issues/385" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;">https://github.com/adhearsion/adhearsion/issues/385

after that I switched my code to 

       call.on_end do |_|
          account_call
       end

in your case adding the send_notifications call in the call.on_end should solve your problem. 

Cris 

On Jul 8, 2014, at 10:02 , Lloyd <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="utgPGB3ewZEJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">hughes...@...> wrote:

Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: <a href="https://gist.github.com/system123/a9b65000cb7968c40365" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;">https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="utgPGB3ewZEJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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.

--
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: AHN after_call not ever running

Ben Klang-2
In reply to this post by Lloyd Hughes
You can use the completion callback on the record method, if that helps.  Something like this:

record async: true do |end_of_recording|
  logger.debug “Recording complete"
  recording_url = end_of_recording.recording.uri
end

/BAK/
-- 
Ben Klang
Principal/Technology Strategist, Mojo Lingo
+1.404.475.4841

Mojo Lingo -- Voice applications that work like magic
Twitter: @MojoLingo

Il giorno Jul 8, 2014, alle ore 8:47 AM, Lloyd <[hidden email]> ha scritto:

Hi,

Thanks for that. 

The first issue was Sequella wasn't actually connected to my DB. It didn't throw any error when I tried to save something and thus the callback just died with no warning/error. The next issue was what you mentioned where after_call is called before the on_end event. I needed info set in the on_end event for the callback. A third issue which I haven't figured out yet is that the event which returns the file recording URL only returns after on_end. I need that recording URL too.

Any suggestions how I can get it? Can I set the URL/filename before recording starts and force punchblock to save with that filename? That would be of great use to me and many other people I think. Currently I need workers to rename the file on creation, and move it to the folder where our PBX stores calls. It is quite a mess.

Thanks

Lloyd

On Tuesday, 8 July 2014 11:28:05 UTC+2, lcx wrote:
Hi, maybe this helps: 

<a href="https://github.com/adhearsion/adhearsion/issues/385" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;">https://github.com/adhearsion/adhearsion/issues/385

after that I switched my code to 

       call.on_end do |_|
          account_call
       end

in your case adding the send_notifications call in the call.on_end should solve your problem. 

Cris 

On Jul 8, 2014, at 10:02 , Lloyd <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="utgPGB3ewZEJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">hughes...@...> wrote:

Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: <a href="https://gist.github.com/system123/a9b65000cb7968c40365" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;">https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="utgPGB3ewZEJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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.


signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AHN after_call not ever running

Lloyd Hughes
Hi Ben & Ben,

1: Completion of recording callback is after the on_end. 
2: I am using that to grab the URL, but I write the data on_end as I need the call end code too, and recordings don't always run. It depends on the call. The problem here being I only get the recording URL after the on_end as that is when it runs.

I will file a bug report on Github.

QQ: What is the reasoning behind not having a custom record directory or allowing the app to specify the recording name?

Thanks

On Tuesday, 8 July 2014 16:10:15 UTC+2, Ben Klang wrote:
You can use the completion callback on the record method, if that helps.  Something like this:

record async: true do |end_of_recording|
  logger.debug “Recording complete"
  recording_url = end_of_recording.recording.uri
end

/BAK/
-- 
Ben Klang
Principal/Technology Strategist, Mojo Lingo
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="djHX9NlNc24J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">bkl...@...
+1.404.475.4841

Mojo Lingo -- Voice applications that work like magic
<a href="http://mojolingo.com/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmojolingo.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNEdz1VI9Wu7PPmqtzifmF6XsODIog';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fmojolingo.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNEdz1VI9Wu7PPmqtzifmF6XsODIog';return true;">http://mojolingo.com
Twitter: @MojoLingo

Il giorno Jul 8, 2014, alle ore 8:47 AM, Lloyd <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="djHX9NlNc24J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">hughes...@...> ha scritto:

Hi,

Thanks for that. 

The first issue was Sequella wasn't actually connected to my DB. It didn't throw any error when I tried to save something and thus the callback just died with no warning/error. The next issue was what you mentioned where after_call is called before the on_end event. I needed info set in the on_end event for the callback. A third issue which I haven't figured out yet is that the event which returns the file recording URL only returns after on_end. I need that recording URL too.

Any suggestions how I can get it? Can I set the URL/filename before recording starts and force punchblock to save with that filename? That would be of great use to me and many other people I think. Currently I need workers to rename the file on creation, and move it to the folder where our PBX stores calls. It is quite a mess.

Thanks

Lloyd

On Tuesday, 8 July 2014 11:28:05 UTC+2, lcx wrote:
Hi, maybe this helps: 

<a href="https://github.com/adhearsion/adhearsion/issues/385" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Fadhearsion%2Fissues%2F385\46sa\75D\46sntz\0751\46usg\75AFQjCNFnktQHlqDgEMnTx075OZA-_7mRtQ';return true;">https://github.com/adhearsion/adhearsion/issues/385

after that I switched my code to 

       call.on_end do |_|
          account_call
       end

in your case adding the send_notifications call in the call.on_end should solve your problem. 

Cris 

On Jul 8, 2014, at 10:02 , Lloyd <[hidden email]> wrote:

Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: <a href="https://gist.github.com/system123/a9b65000cb7968c40365" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fsystem123%2Fa9b65000cb7968c40365\46sa\75D\46sntz\0751\46usg\75AFQjCNGvV-bfSYunU_JHWAGJq8zu2K4Qyg';return true;">https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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 adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="djHX9NlNc24J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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.
Reply | Threaded
Open this post in threaded view
|

Re: AHN after_call not ever running

Ben Langfeld-2
On 9 July 2014 05:50, Lloyd <[hidden email]> wrote:
Hi Ben & Ben,

1: Completion of recording callback is after the on_end. 
2: I am using that to grab the URL, but I write the data on_end as I need the call end code too, and recordings don't always run. It depends on the call. The problem here being I only get the recording URL after the on_end as that is when it runs.

I will file a bug report on Github.

QQ: What is the reasoning behind not having a custom record directory or allowing the app to specify the recording name?

This is because Rayo, the protocol Adhearsion uses to communicate with a media server, is designed for PaaS-type multi-tenant environments. It does not provide a mechanism to specify a storage medium for recordings because it is supposed to be the server's job to do this, providing a URI. The server may store the recording anywhere, such as its local disk, Amazon S3, serve the file up via FTP, etc. Such storage is intended to be short term. The application is then responsible for fetching the recording and placing it into permanent storage, likely with metadata known only to the application. Your desire to "move it to the folder where our PBX stores calls" is very closely coupled with your application, and not the general purpose of Adhearsion/Rayo/Asterisk.
 

Thanks


On Tuesday, 8 July 2014 16:10:15 UTC+2, Ben Klang wrote:
You can use the completion callback on the record method, if that helps.  Something like this:

record async: true do |end_of_recording|
  logger.debug “Recording complete"
  recording_url = end_of_recording.recording.uri
end

/BAK/
-- 
Ben Klang
Principal/Technology Strategist, Mojo Lingo
<a href="tel:%2B1.404.475.4841" value="+14044754841" target="_blank">+1.404.475.4841

Mojo Lingo -- Voice applications that work like magic
Twitter: @MojoLingo

Il giorno Jul 8, 2014, alle ore 8:47 AM, Lloyd <[hidden email]> ha scritto:

Hi,

Thanks for that. 

The first issue was Sequella wasn't actually connected to my DB. It didn't throw any error when I tried to save something and thus the callback just died with no warning/error. The next issue was what you mentioned where after_call is called before the on_end event. I needed info set in the on_end event for the callback. A third issue which I haven't figured out yet is that the event which returns the file recording URL only returns after on_end. I need that recording URL too.

Any suggestions how I can get it? Can I set the URL/filename before recording starts and force punchblock to save with that filename? That would be of great use to me and many other people I think. Currently I need workers to rename the file on creation, and move it to the folder where our PBX stores calls. It is quite a mess.

Thanks

Lloyd

On Tuesday, 8 July 2014 11:28:05 UTC+2, lcx wrote:
Hi, maybe this helps: 


after that I switched my code to 

       call.on_end do |_|
          account_call
       end

in your case adding the send_notifications call in the call.on_end should solve your problem. 

Cris 

On Jul 8, 2014, at 10:02 , Lloyd <[hidden email]> wrote:

Hi,

I have setup a simple click2call application however I have noticed that th after_call callbacks never ever run. Whether or not the 2nd dial was answered.

Here is my Trace log as well as my call controller implementation and my Gemfile.lock: https://gist.github.com/system123/a9b65000cb7968c40365

The calls get made and are joined and everything works except for the after_call callback.

--
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 adhearsion+...@googlegroups.com.
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 adhearsion+...@googlegroups.com.
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.

--
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.