Regarding call variables in Adhearsion

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

Regarding call variables in Adhearsion

maran

dear folks,
 I'm new to the Adhearsions, I have problem in accessing the variables

context = get_variable("CONTEXT")    # error ( method not available )
send(context) {
            context = get_variable("CONTEXT") # working
            jump_to :main_ivr
}

main_ivr{

}

Is is this possible?


{:channel=>"SIP/
900-0828a748", :type=>"SIP", :enhanced=>0.0, :dnid=>900, :callingpres=>0, :uniqueid=>1235488305.439, :request=>#<URI::Generic:
0xfdb9e853a URL:agi://
192.168.1.182>, :threadid=>-1228010576, :callingtns=>0, :query=>
{}, :calleridname=>"asterisk", :version=>"1.6.0.3-
rc1", :callerid=>900, :network=>true, :rdnis=>nil, :context=>"sample_ivr", :language=>"en", :extension=>900, :type_of_calling_number=>:unknown, :callingani2=>0, :priority=>1, :accountcode=>""}

I want to get those variables inside the dialplan. please help me..
--~--~---------~--~----~------------~-------~--~----~
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: Regarding call variables in Adhearsion

JasonGoecke

Context is already in scope, and is what launches the section of your
diaplan.rb. So, if your conext is 'sample_ivr' you should have:

sample_ivr {
 +main_ivr
}

main_ivr {
  #foo
}

And, if you wanted to say log the value of context to the log to see
it you could do:

sample_ivr {
  ahn_log.info.dialplan context
}

More on dialplans here:

http://docs.adhearsion.com/display/adhearsion/Dialplan

On Feb 24, 1:21 am, maran <[hidden email]> wrote:

> dear folks,
>  I'm new to the Adhearsions, I have problem in accessing the variables
>
> context = get_variable("CONTEXT")    # error ( method not available )
> send(context) {
>             context = get_variable("CONTEXT") # working
>             jump_to :main_ivr
>
> }
>
> main_ivr{
>
> }
>
> Is is this possible?
>
> {:channel=>"SIP/
> 900-0828a748", :type=>"SIP", :enhanced=>0.0, :dnid=>900, :callingpres=>0, :uniqueid=>1235488305.439, :request=>#<URI::Generic:
> 0xfdb9e853a URL:agi://
> 192.168.1.182>, :threadid=>-1228010576, :callingtns=>0, :query=>
> {}, :calleridname=>"asterisk", :version=>"1.6.0.3-
> rc1", :callerid=>900, :network=>true, :rdnis=>nil, :context=>"sample_ivr", :language=>"en", :extension=>900, :type_of_calling_number=>:unknown, :callingani2=>0, :priority=>1, :accountcode=>""}
>
> I want to get those variables inside the dialplan. please help me..
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---