Call the context dynamically - is this possible?

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

Call the context dynamically - is this possible?

maran



My adhearsion dialplan should act same for all the conext in asterisk.

I want to take agi["context"] value before executing the context part

context = agi["context"] ;                like this

send(context){
+__main__
}

__main__{

#foo

}

is this possible in adhearsion?
please let me know;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Call the context dynamically - is this possible?

JasonGoecke

I am not following quite what you are trying to do here, as context is
already in scope. You could simply do:

my_context {
  ahn_log.dialplan.info context
  +next_context
}

next_context {
}

On Feb 24, 8:34 pm, maran <[hidden email]> wrote:

> My adhearsion dialplan should act same for all the conext in asterisk.
>
> I want to take agi["context"] value before executing the context part
>
> context = agi["context"] ;                like this
>
> send(context){
> +__main__
>
> }
>
> __main__{
>
> #foo
>
> }
>
> is this possible in adhearsion?
> please let me know;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Call the context dynamically - is this possible?

maran
In reply to this post by maran



On Feb 25, 9:34 am, maran <[hidden email]> wrote:

> My adhearsion dialplan should act same for all the conext in asterisk.
>
> I want to take agi["context"] value before executing the context part
>
> context = agi["context"] ;                like this
>
> send(context){
> +__main__
>
> }
>
> __main__{
>
> #foo
>
> }
>
> is this possible in adhearsion?
> please let me know;


Yes, I found solution for my question.
#code starts ..

active_calls = Adhearsion.active_calls
call_variables = active_calls.to_a.shift

send( call_variables.context ){

        +__main_ivr_menu__
}

__main_ivr_menu__{

play extension

}

#code ends..

references: http://api.adhearsion.com/






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en
-~----------~----~----~----~------~----~------~--~---