I need help in call controller

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

I need help in call controller

Kishor Vyavahare
Hi,
    I am new to Adhearsion and Ruby also, I am making IVR call having Asterisk server. I am using menu and match given below...

match 1 do 
          #some code
      end

  match 2 do 
          #some code
      end

Now I have repeat menu if match is 9, so can I call controller back or is there any way to run menu record from start?
If I have to come back from sub-menu recording to main-menu what is solution?

Can you please give me more adhearsion notes and information with example so I can build my automatic IVR call

--
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: I need help in call controller

Ben Langfeld-2
class MyMainMenu < Adhearsion::CallController
  def run
    menu ... do
      match 1 do
        invoke MySubMenu
      end
    end
  end
end

class MySubMenu < Adhearsion::CallController
  def run
    menu ... do
      match '*' do
        # Return to top level menu
        pass MyMainMenu
      end
    end
  end
end

Adhearsion documentation is found at http://adhearsion.com/docs and API docs at http://adhearsion.com/api.

On 25 September 2014 07:06, Kishor Vyavahare <[hidden email]> wrote:
Hi,
    I am new to Adhearsion and Ruby also, I am making IVR call having Asterisk server. I am using menu and match given below...

match 1 do 
          #some code
      end

  match 2 do 
          #some code
      end

Now I have repeat menu if match is 9, so can I call controller back or is there any way to run menu record from start?
If I have to come back from sub-menu recording to main-menu what is solution?

Can you please give me more adhearsion notes and information with example so I can build my automatic IVR call

--
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: I need help in call controller

Kishor Vyavahare
Thanks for reply. Actually I am calling another function when there is match as showing below...and I am calling controller again so is it ok?
 But I thing your code is good one ...

class MyMainMenu < Adhearsion::CallController
  def run
    menu ... do
      match 1 do
       submenu
      end
    end
  end
end

def submenu
    menu ... do
      match '*', MyMainMenu
    end
end

Another issue is if i want to repeat the menu the is it ok to call directly the controller? But how many times it will repeat menu? How to stop it after some repetition? And Thank you for helping...


On Thursday, September 25, 2014 6:11:27 PM UTC+5:30, Ben Langfeld wrote:
class MyMainMenu < Adhearsion::CallController
  def run
    menu ... do
      match 1 do
        invoke MySubMenu
      end
    end
  end
end

class MySubMenu < Adhearsion::CallController
  def run
    menu ... do
      match '*' do
        # Return to top level menu
        pass MyMainMenu
      end
    end
  end
end

Adhearsion documentation is found at <a href="http://adhearsion.com/docs" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fdocs\46sa\75D\46sntz\0751\46usg\75AFQjCNG4XjpwmxghTdd39aRsJeO0D5s-7w';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fdocs\46sa\75D\46sntz\0751\46usg\75AFQjCNG4XjpwmxghTdd39aRsJeO0D5s-7w';return true;">http://adhearsion.com/docs and API docs at <a href="http://adhearsion.com/api" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fapi\46sa\75D\46sntz\0751\46usg\75AFQjCNEVt3i5OS950pRXCQzjE2OI4qgPHw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fapi\46sa\75D\46sntz\0751\46usg\75AFQjCNEVt3i5OS950pRXCQzjE2OI4qgPHw';return true;">http://adhearsion.com/api.

On 25 September 2014 07:06, Kishor Vyavahare <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="RWGL-lUaHDIJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">kis...@...> wrote:
Hi,
    I am new to Adhearsion and Ruby also, I am making IVR call having Asterisk server. I am using menu and match given below...

match 1 do 
          #some code
      end

  match 2 do 
          #some code
      end

Now I have repeat menu if match is 9, so can I call controller back or is there any way to run menu record from start?
If I have to come back from sub-menu recording to main-menu what is solution?

Can you please give me more adhearsion notes and information with example so I can build my automatic IVR call

--
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="RWGL-lUaHDIJ" 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: I need help in call controller

Kishor Vyavahare
Hi Ben,
           Thanks for your help I have done in both way and its working fine....

On Thursday, September 25, 2014 6:42:48 PM UTC+5:30, Kishor Vyavahare wrote:
Thanks for reply. Actually I am calling another function when there is match as showing below...and I am calling controller again so is it ok?
 But I thing your code is good one ...

class MyMainMenu < Adhearsion::CallController
  def run
    menu ... do
      match 1 do
       submenu
      end
    end
  end
end

def submenu
    menu ... do
      match '*', MyMainMenu
    end
end

Another issue is if i want to repeat the menu the is it ok to call directly the controller? But how many times it will repeat menu? How to stop it after some repetition? And Thank you for helping...


On Thursday, September 25, 2014 6:11:27 PM UTC+5:30, Ben Langfeld wrote:
class MyMainMenu < Adhearsion::CallController
  def run
    menu ... do
      match 1 do
        invoke MySubMenu
      end
    end
  end
end

class MySubMenu < Adhearsion::CallController
  def run
    menu ... do
      match '*' do
        # Return to top level menu
        pass MyMainMenu
      end
    end
  end
end

Adhearsion documentation is found at <a href="http://adhearsion.com/docs" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fdocs\46sa\75D\46sntz\0751\46usg\75AFQjCNG4XjpwmxghTdd39aRsJeO0D5s-7w';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fdocs\46sa\75D\46sntz\0751\46usg\75AFQjCNG4XjpwmxghTdd39aRsJeO0D5s-7w';return true;">http://adhearsion.com/docs and API docs at <a href="http://adhearsion.com/api" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fapi\46sa\75D\46sntz\0751\46usg\75AFQjCNEVt3i5OS950pRXCQzjE2OI4qgPHw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fadhearsion.com%2Fapi\46sa\75D\46sntz\0751\46usg\75AFQjCNEVt3i5OS950pRXCQzjE2OI4qgPHw';return true;">http://adhearsion.com/api.

On 25 September 2014 07:06, Kishor Vyavahare <[hidden email]> wrote:
Hi,
    I am new to Adhearsion and Ruby also, I am making IVR call having Asterisk server. I am using menu and match given below...

match 1 do 
          #some code
      end

  match 2 do 
          #some code
      end

Now I have repeat menu if match is 9, so can I call controller back or is there any way to run menu record from start?
If I have to come back from sub-menu recording to main-menu what is solution?

Can you please give me more adhearsion notes and information with example so I can build my automatic IVR call

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.