Attended transfers in Adhearsion 3 (Matrioska?)

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

Attended transfers in Adhearsion 3 (Matrioska?)

gsiehien
Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

--
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: Attended transfers in Adhearsion 3 (Matrioska?)

Ben Langfeld
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <[hidden email]> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

--
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: Attended transfers in Adhearsion 3 (Matrioska?)

gsiehien
Hi Ben!

thanks! I didn't notice feature/adhearsion-3 branch in Matrioska earlier. I will give it a try!

I also want to try electric_slide's adhearsion-3 branch. Is it ready for testing? I haven't used it before (2.x) in production because I couldn't get used to its non-blocking nature (the rest of the code was executed, after caller has entered the queue, so I needed enqueue() to be always the last command in Controller). Is it a normal behavior or was I doing something wrong? Synchronous approach of asterisk's Queue() seems more logical for me.

I'm also trying some now stuff like embedding therubyrhino for user-side scripting and precompiled jar packaging, so I should be able to give you some feedback if I notice any unexpected behavior. 

Regards,
Gregory

W dniu sobota, 6 lutego 2016 19:21:59 UTC+1 użytkownik Ben Langfeld napisał:
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="TF0CmfS2AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gsie...@...> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

--
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="TF0CmfS2AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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: Attended transfers in Adhearsion 3 (Matrioska?)

Ben Langfeld

On Feb 6, 2016, at 19:56, gsiehien <[hidden email]> wrote:

Hi Ben!

thanks! I didn't notice feature/adhearsion-3 branch in Matrioska earlier. I will give it a try!

I also want to try electric_slide's adhearsion-3 branch. Is it ready for testing?

Yes.

I haven't used it before (2.x) in production because I couldn't get used to its non-blocking nature (the rest of the code was executed, after caller has entered the queue, so I needed enqueue() to be always the last command in Controller). Is it a normal behavior or was I doing something wrong?

This is normal. I’m sure Ben Klang can talk more about his intent, as the original author.

Synchronous approach of asterisk's Queue() seems more logical for me.

I'm also trying some now stuff like embedding therubyrhino for user-side scripting and precompiled jar packaging, so I should be able to give you some feedback if I notice any unexpected behavior. 

Regards,
Gregory

W dniu sobota, 6 lutego 2016 19:21:59 UTC+1 użytkownik Ben Langfeld napisał:
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="TF0CmfS2AgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" class="">gsie...@...> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

--
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="TF0CmfS2AgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" class="">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;" class="">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: Attended transfers in Adhearsion 3 (Matrioska?)

Ben Klang-2

On Feb 6, 2016, at 6:00 PM, Ben Langfeld <[hidden email]> wrote:


On Feb 6, 2016, at 19:56, gsiehien <[hidden email]> wrote:

Hi Ben!

thanks! I didn't notice feature/adhearsion-3 branch in Matrioska earlier. I will give it a try!

I also want to try electric_slide's adhearsion-3 branch. Is it ready for testing?

Yes.

I haven't used it before (2.x) in production because I couldn't get used to its non-blocking nature (the rest of the code was executed, after caller has entered the queue, so I needed enqueue() to be always the last command in Controller). Is it a normal behavior or was I doing something wrong?

This is normal. I’m sure Ben Klang can talk more about his intent, as the original author.

The reason is that when I first wrote Electric Slide, I did not know how to make a synchronous call to the queue actor without blocking the queue actor. Obviously blocking the queue actor means that no calls ever get answered, so I made it asynchronous. Since I didn’t particularly need it to be synchronous for my use-case, I left it async and worked around it in my application code.

However, this isn’t ideal. #enqueue should behave like other Adhearsion CallController methods, such as #ask and #play, which are synchronous by default. I’ve opened an issue here to track that: https://github.com/adhearsion/electric_slide/issues/49

In the meantime, I’ll describe how I’m currently using the #enqueue method, in case it help you.

For most of my use-cases, once a caller enters the queue, I don’t need any more interactivity.  That means that I can present an IVR at the beginning to route the caller to a queue, then call #enqueue and let the controller end.  The caller will be held alive until an agent takes the call (or the caller hangs up), then it ends normally.  If I need some kind of post-call activity, I can use call.on_end.  Here’s a simplified example:

```
class InboundHandler < Adhearsion::CallController
  def run
    answer
    say “Thank you for calling. Please hold for an agent.”

    call.on_end do
      logger.info “The call has ended."
    end

    call.auto_hangup = false # This prevents the call from being hung up when the CallController exits
    ElectricSlide.get_queue(:my_queue).enqueue call
  end
end
```

That “auto_hangup” piece is important; without it, the call will be hung up right after being enqueued because the CallController is exiting.  Turning off “auto_hangup” lets the call sit in limbo, under the assumption that something external (in this case, ElectricSlide), will take care of it.

I hope that helps! Let me know if you have further questions on using it.

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

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


Synchronous approach of asterisk's Queue() seems more logical for me.

I'm also trying some now stuff like embedding therubyrhino for user-side scripting and precompiled jar packaging, so I should be able to give you some feedback if I notice any unexpected behavior. 

Regards,
Gregory

W dniu sobota, 6 lutego 2016 19:21:59 UTC+1 użytkownik Ben Langfeld napisał:
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <[hidden email]> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

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

--
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: Attended transfers in Adhearsion 3 (Matrioska?)

gsiehien
Hi!

thanks for explaining me how it works. I remember that I've had another problem with outbound calls to agents. They where hitting adhearsion's default route (when agent answered the phone, he was getting the main IVR, not a bridge with the caller). I don't remember how I've got around it with adherasion/freeswitch configuration, but maybe it's something worth documenting.

As for my case, I'm letting my users to do some scripting inside Adhearsion, so I can't trust that they will properly handle electric_slide. For now I'm using a simple dial() based queue.

I've tested adhearsion-3 matrioska branch (FS 1.4.x, JRuby-9k) - so far, it's ok.

Thanks!

Regards,
Gregory







W dniu niedziela, 7 lutego 2016 00:29:37 UTC+1 użytkownik Ben Klang napisał:

On Feb 6, 2016, at 6:00 PM, Ben Langfeld <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="tT2rSb7HAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">b...@...> wrote:


On Feb 6, 2016, at 19:56, gsiehien <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="tT2rSb7HAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gsie...@...> wrote:

Hi Ben!

thanks! I didn't notice feature/adhearsion-3 branch in Matrioska earlier. I will give it a try!

I also want to try electric_slide's adhearsion-3 branch. Is it ready for testing?

Yes.

I haven't used it before (2.x) in production because I couldn't get used to its non-blocking nature (the rest of the code was executed, after caller has entered the queue, so I needed enqueue() to be always the last command in Controller). Is it a normal behavior or was I doing something wrong?

This is normal. I’m sure Ben Klang can talk more about his intent, as the original author.

The reason is that when I first wrote Electric Slide, I did not know how to make a synchronous call to the queue actor without blocking the queue actor. Obviously blocking the queue actor means that no calls ever get answered, so I made it asynchronous. Since I didn’t particularly need it to be synchronous for my use-case, I left it async and worked around it in my application code.

However, this isn’t ideal. #enqueue should behave like other Adhearsion CallController methods, such as #ask and #play, which are synchronous by default. I’ve opened an issue here to track that: <a href="https://github.com/adhearsion/electric_slide/issues/49" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Felectric_slide%2Fissues%2F49\46sa\75D\46sntz\0751\46usg\75AFQjCNFDAS34odilP0lNqvwh-J6FMNCt8w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Felectric_slide%2Fissues%2F49\46sa\75D\46sntz\0751\46usg\75AFQjCNFDAS34odilP0lNqvwh-J6FMNCt8w&#39;;return true;">https://github.com/adhearsion/electric_slide/issues/49

In the meantime, I’ll describe how I’m currently using the #enqueue method, in case it help you.

For most of my use-cases, once a caller enters the queue, I don’t need any more interactivity.  That means that I can present an IVR at the beginning to route the caller to a queue, then call #enqueue and let the controller end.  The caller will be held alive until an agent takes the call (or the caller hangs up), then it ends normally.  If I need some kind of post-call activity, I can use call.on_end.  Here’s a simplified example:

```
class InboundHandler < Adhearsion::CallController
  def run
    answer
    say “Thank you for calling. Please hold for an agent.”

    call.on_end do
      <a href="http://logger.info" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Flogger.info\46sa\75D\46sntz\0751\46usg\75AFQjCNGOfWV_MqSEYOUyz77vBSYyM6smOg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Flogger.info\46sa\75D\46sntz\0751\46usg\75AFQjCNGOfWV_MqSEYOUyz77vBSYyM6smOg&#39;;return true;">logger.info “The call has ended."
    end

    call.auto_hangup = false # This prevents the call from being hung up when the CallController exits
    ElectricSlide.get_queue(:my_queue).enqueue call
  end
end
```

That “auto_hangup” piece is important; without it, the call will be hung up right after being enqueued because the CallController is exiting.  Turning off “auto_hangup” lets the call sit in limbo, under the assumption that something external (in this case, ElectricSlide), will take care of it.

I hope that helps! Let me know if you have further questions on using it.

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

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


Synchronous approach of asterisk's Queue() seems more logical for me.

I'm also trying some now stuff like embedding therubyrhino for user-side scripting and precompiled jar packaging, so I should be able to give you some feedback if I notice any unexpected behavior. 

Regards,
Gregory

W dniu sobota, 6 lutego 2016 19:21:59 UTC+1 użytkownik Ben Langfeld napisał:
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <[hidden email]> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

-- 
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" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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="tT2rSb7HAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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:" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" gdf-obfuscated-mailto="tT2rSb7HAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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: Attended transfers in Adhearsion 3 (Matrioska?)

gsiehien
Hi,

update on Matrioska and 3.0rc1:

when using app like https://mojolingo.com/blog/2013/call-apps-please-hold/ and putting caller on hold for a few times in a row I'm getting errors like:

<Adhearsion::Rayo::Component::InvalidActionError> Cannot stop a Output that is complete
/home/ubuntu/testapp/vendor/jruby/2.2.0/gems/adhearsion-3.0.0.rc1/lib/adhearsion/rayo/component/component_node.rb:84:in `stop!'
/home/ubuntu/testapp/app/call_controllers/music_on_hold_controller.rb:4:in `block in run'
org/jruby/RubyProc.java:318:in `call'
/home/ubuntu/testapp/vendor/jruby/2.2.0/gems/adhearsion-3.0.0.rc1/lib/adhearsion/call.rb:282:in `block in on_joined'
org/jruby/RubyProc.java:318:in `call'
        [..]

Regards,
Gregory


W dniu niedziela, 7 lutego 2016 21:09:36 UTC+1 użytkownik gsiehien napisał:
Hi!

thanks for explaining me how it works. I remember that I've had another problem with outbound calls to agents. They where hitting adhearsion's default route (when agent answered the phone, he was getting the main IVR, not a bridge with the caller). I don't remember how I've got around it with adherasion/freeswitch configuration, but maybe it's something worth documenting.

As for my case, I'm letting my users to do some scripting inside Adhearsion, so I can't trust that they will properly handle electric_slide. For now I'm using a simple dial() based queue.

I've tested adhearsion-3 matrioska branch (FS 1.4.x, JRuby-9k) - so far, it's ok.

Thanks!

Regards,
Gregory







W dniu niedziela, 7 lutego 2016 00:29:37 UTC+1 użytkownik Ben Klang napisał:

On Feb 6, 2016, at 6:00 PM, Ben Langfeld <[hidden email]> wrote:


On Feb 6, 2016, at 19:56, gsiehien <[hidden email]> wrote:

Hi Ben!

thanks! I didn't notice feature/adhearsion-3 branch in Matrioska earlier. I will give it a try!

I also want to try electric_slide's adhearsion-3 branch. Is it ready for testing?

Yes.

I haven't used it before (2.x) in production because I couldn't get used to its non-blocking nature (the rest of the code was executed, after caller has entered the queue, so I needed enqueue() to be always the last command in Controller). Is it a normal behavior or was I doing something wrong?

This is normal. I’m sure Ben Klang can talk more about his intent, as the original author.

The reason is that when I first wrote Electric Slide, I did not know how to make a synchronous call to the queue actor without blocking the queue actor. Obviously blocking the queue actor means that no calls ever get answered, so I made it asynchronous. Since I didn’t particularly need it to be synchronous for my use-case, I left it async and worked around it in my application code.

However, this isn’t ideal. #enqueue should behave like other Adhearsion CallController methods, such as #ask and #play, which are synchronous by default. I’ve opened an issue here to track that: <a href="https://github.com/adhearsion/electric_slide/issues/49" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Felectric_slide%2Fissues%2F49\46sa\75D\46sntz\0751\46usg\75AFQjCNFDAS34odilP0lNqvwh-J6FMNCt8w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fadhearsion%2Felectric_slide%2Fissues%2F49\46sa\75D\46sntz\0751\46usg\75AFQjCNFDAS34odilP0lNqvwh-J6FMNCt8w&#39;;return true;">https://github.com/adhearsion/electric_slide/issues/49

In the meantime, I’ll describe how I’m currently using the #enqueue method, in case it help you.

For most of my use-cases, once a caller enters the queue, I don’t need any more interactivity.  That means that I can present an IVR at the beginning to route the caller to a queue, then call #enqueue and let the controller end.  The caller will be held alive until an agent takes the call (or the caller hangs up), then it ends normally.  If I need some kind of post-call activity, I can use call.on_end.  Here’s a simplified example:

```
class InboundHandler < Adhearsion::CallController
  def run
    answer
    say “Thank you for calling. Please hold for an agent.”

    call.on_end do
      <a href="http://logger.info" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Flogger.info\46sa\75D\46sntz\0751\46usg\75AFQjCNGOfWV_MqSEYOUyz77vBSYyM6smOg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Flogger.info\46sa\75D\46sntz\0751\46usg\75AFQjCNGOfWV_MqSEYOUyz77vBSYyM6smOg&#39;;return true;">logger.info “The call has ended."
    end

    call.auto_hangup = false # This prevents the call from being hung up when the CallController exits
    ElectricSlide.get_queue(:my_queue).enqueue call
  end
end
```

That “auto_hangup” piece is important; without it, the call will be hung up right after being enqueued because the CallController is exiting.  Turning off “auto_hangup” lets the call sit in limbo, under the assumption that something external (in this case, ElectricSlide), will take care of it.

I hope that helps! Let me know if you have further questions on using it.

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

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


Synchronous approach of asterisk's Queue() seems more logical for me.

I'm also trying some now stuff like embedding therubyrhino for user-side scripting and precompiled jar packaging, so I should be able to give you some feedback if I notice any unexpected behavior. 

Regards,
Gregory

W dniu sobota, 6 lutego 2016 19:21:59 UTC+1 użytkownik Ben Langfeld napisał:
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <[hidden email]> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

-- 
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" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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 adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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 adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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: Attended transfers in Adhearsion 3 (Matrioska?)

Giorgio Bianchi
Hi Gregory,

Based on this example (https://github.com/benlangfeld/ahn_complex_dial_examples) I did an app to simulate switchboard functionalities. 
You can put the caller on hold while transferring the call to another co-worker, talk with your co-worker before definitely pass the call or abandon the transfer and get back to talk with the caller. The co-worker can start the transfer process again.
To achieve this I did a monkeypatch to Adhearsion::CallController::Dial::ParallelConfirmationDial and a I wrote a new module based on matrioska/dial_with_apps.
The main problem to solve is in join/unjoin targets and related events : with the clean repository code each time you split / rejoin the calls actors a new Matrioska::AppRunner is created and started in remote call and this lead to unexpected behaviors.
Also, you should check if the output is executing before stopping it.
My app works with adhearsion (~> 2.6) and matrioska (0.3.0) but I think the problems should be the same.
Hope this helps.

Regards,
Giorgio

Il giorno martedì 9 febbraio 2016 02:09:25 UTC+1, gsiehien ha scritto:
Hi,

update on Matrioska and 3.0rc1:

when using app like <a href="https://mojolingo.com/blog/2013/call-apps-please-hold/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmojolingo.com%2Fblog%2F2013%2Fcall-apps-please-hold%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH68lK88FoOXErRD7R7apMGr_qNxg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmojolingo.com%2Fblog%2F2013%2Fcall-apps-please-hold%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH68lK88FoOXErRD7R7apMGr_qNxg&#39;;return true;">https://mojolingo.com/blog/2013/call-apps-please-hold/ and putting caller on hold for a few times in a row I'm getting errors like:

<Adhearsion::Rayo::Component::InvalidActionError> Cannot stop a Output that is complete
/home/ubuntu/testapp/vendor/jruby/2.2.0/gems/adhearsion-3.0.0.rc1/lib/adhearsion/rayo/component/component_node.rb:84:in `stop!'
/home/ubuntu/testapp/app/call_controllers/music_on_hold_controller.rb:4:in `block in run'
org/jruby/RubyProc.java:318:in `call'
/home/ubuntu/testapp/vendor/jruby/2.2.0/gems/adhearsion-3.0.0.rc1/lib/adhearsion/call.rb:282:in `block in on_joined'
org/jruby/RubyProc.java:318:in `call'
        [..]

Regards,
Gregory


W dniu niedziela, 7 lutego 2016 21:09:36 UTC+1 użytkownik gsiehien napisał:
Hi!

thanks for explaining me how it works. I remember that I've had another problem with outbound calls to agents. They where hitting adhearsion's default route (when agent answered the phone, he was getting the main IVR, not a bridge with the caller). I don't remember how I've got around it with adherasion/freeswitch configuration, but maybe it's something worth documenting.

As for my case, I'm letting my users to do some scripting inside Adhearsion, so I can't trust that they will properly handle electric_slide. For now I'm using a simple dial() based queue.

I've tested adhearsion-3 matrioska branch (FS 1.4.x, JRuby-9k) - so far, it's ok.

Thanks!

Regards,
Gregory







W dniu niedziela, 7 lutego 2016 00:29:37 UTC+1 użytkownik Ben Klang napisał:

On Feb 6, 2016, at 6:00 PM, Ben Langfeld <[hidden email]> wrote:


On Feb 6, 2016, at 19:56, gsiehien <[hidden email]> wrote:

Hi Ben!

thanks! I didn't notice feature/adhearsion-3 branch in Matrioska earlier. I will give it a try!

I also want to try electric_slide's adhearsion-3 branch. Is it ready for testing?

Yes.

I haven't used it before (2.x) in production because I couldn't get used to its non-blocking nature (the rest of the code was executed, after caller has entered the queue, so I needed enqueue() to be always the last command in Controller). Is it a normal behavior or was I doing something wrong?

This is normal. I’m sure Ben Klang can talk more about his intent, as the original author.

The reason is that when I first wrote Electric Slide, I did not know how to make a synchronous call to the queue actor without blocking the queue actor. Obviously blocking the queue actor means that no calls ever get answered, so I made it asynchronous. Since I didn’t particularly need it to be synchronous for my use-case, I left it async and worked around it in my application code.

However, this isn’t ideal. #enqueue should behave like other Adhearsion CallController methods, such as #ask and #play, which are synchronous by default. I’ve opened an issue here to track that: <a href="https://github.com/adhearsion/electric_slide/issues/49" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fadhearsion%2Felectric_slide%2Fissues%2F49\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFDAS34odilP0lNqvwh-J6FMNCt8w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fadhearsion%2Felectric_slide%2Fissues%2F49\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFDAS34odilP0lNqvwh-J6FMNCt8w&#39;;return true;">https://github.com/adhearsion/electric_slide/issues/49

In the meantime, I’ll describe how I’m currently using the #enqueue method, in case it help you.

For most of my use-cases, once a caller enters the queue, I don’t need any more interactivity.  That means that I can present an IVR at the beginning to route the caller to a queue, then call #enqueue and let the controller end.  The caller will be held alive until an agent takes the call (or the caller hangs up), then it ends normally.  If I need some kind of post-call activity, I can use call.on_end.  Here’s a simplified example:

```
class InboundHandler < Adhearsion::CallController
  def run
    answer
    say “Thank you for calling. Please hold for an agent.”

    call.on_end do
      <a href="http://logger.info" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flogger.info\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOfWV_MqSEYOUyz77vBSYyM6smOg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flogger.info\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOfWV_MqSEYOUyz77vBSYyM6smOg&#39;;return true;">logger.info “The call has ended."
    end

    call.auto_hangup = false # This prevents the call from being hung up when the CallController exits
    ElectricSlide.get_queue(:my_queue).enqueue call
  end
end
```

That “auto_hangup” piece is important; without it, the call will be hung up right after being enqueued because the CallController is exiting.  Turning off “auto_hangup” lets the call sit in limbo, under the assumption that something external (in this case, ElectricSlide), will take care of it.

I hope that helps! Let me know if you have further questions on using it.

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

Mojo Lingo -- Voice applications that work like magic
<a href="http://mojolingo.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fmojolingo.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAEbyCarHA3eZ3l-4MZTzTsvka5A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fmojolingo.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFAEbyCarHA3eZ3l-4MZTzTsvka5A&#39;;return true;">http://mojolingo.com
Twitter: @MojoLingo


Synchronous approach of asterisk's Queue() seems more logical for me.

I'm also trying some now stuff like embedding therubyrhino for user-side scripting and precompiled jar packaging, so I should be able to give you some feedback if I notice any unexpected behavior. 

Regards,
Gregory

W dniu sobota, 6 lutego 2016 19:21:59 UTC+1 użytkownik Ben Langfeld napisał:
Hey Gregory!

Thanks for trying out Adhearsion 3. Please do continue to provide feedback about how it works for you; it will help us get to a final release.

You'll notice that some other plugins (have branches named feature/adhearsion-3 with the necessary changes for comparability. Matrioska will need these same class of changes.

There is no other plan or replacement for Matrioska, it is simply that I do not use that plugin and therefore haven't updated it yet. I would love for someone who does to have a go at updating it to get some community participation into the process.

If you fancy giving it a try, I'd be happy to review or answer your questions, but I suspect that if you follow the example of other plugins and look through the core change log then you'll likely do just fine!

Enviado do meu iPhone

Em 6 Feb 2016, às 13:23, gsiehien <[hidden email]> escreveu:

Hi,

I'm trying to port my app to Adhearsion 3. So far it works really nice (great job btw!). The only problem is that I can't see any solution for attended transfers. Earlier I was using Matrioska but the gem requires ~> Adhearsion 2.4 and I doubt if I it's compatible with 3.0. Any hints?

Thanks!

Regards,
Gregory

-- 
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" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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 adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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 adhearsion+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;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.