views:

78

answers:

1

i have searched google, tried to read adhearsion docs and make sense of the examples. i understand parts of it but am not able to put it together. i can edit extensions.conf and do agi(agi://localhost) and handle incoming calls in the dialplan.rb. i have written an ivr that way which is in use in the real world.

i have edited manager.conf and config/setup.rb and when i do ahn - i see

 INFO ami: Successful AMI actions-only connection into [email protected]
 INFO ami: Successful AMI events-only connection into [email protected]

now what i want to know is very specifically the following:

  1. where and how do i write code that executes when the adhearsion app starts. i.e. without any event or agi call.
  2. what exactly do i write to dial out.

please dont give me partial responses like

methods_for :dialplan
  sub foo
    # stuff here
  end

please dont give me vague responses like "create component and fork it to the left", or something... i have been reading stuff like that, and i am not able get it. please tell me specific steps.

+2  A: 

Your google foo is quite obviously sub par

Use the 'after_initialized' event namespace for 1

When do you want to dial out? You need to look at either "dial" in the dialplan, or "originate" elsewhere.

Ben Langfeld