switchvox icon indicating copy to clipboard operation
switchvox copied to clipboard

switchvox

Open sgalbur opened this issue 14 years ago • 4 comments

Carl, please post an example using switchvox.users.call method with variables option for some reason it wouldn't take for me.

Many thanks in a advance

sgalbur avatar Apr 19 '11 01:04 sgalbur

Try this:

new_call = switchvox.request("switchvox.users.call", {
  "account_id"  => 1106,
  "dial_first"  => 301,
  "dial_second" => 800,
  "variables"   => {"variable" => "balance=300"}
})

Or this:

new_call = switchvox.request("switchvox.users.call", {
  "account_id"  => 1106,
  "dial_first"  => 301,
  "dial_second" => 800,
  "variables"   => ["balance=300"]
})

It's not clear from the API documentation how the JSON request should be formatted for the variable list, but both are reasonable guesses.

I would test it, but I don't have a switchvox system to test against anymore! :/

chicks avatar Apr 19 '11 02:04 chicks

First gives back: switchvox.users.call: Response: {"response"=> {"method"=>"switchvox.users.call", "errors"=> {"error"=> {"code"=>84904, "message"=> "Invalid variable format for parameter (HASH(0x86676928)). Variable format must be VARIABLE_NAME=VARIABLE_VALUE."}}}}

second: works but IVR variable is not getting set

sgalbur avatar Apr 19 '11 16:04 sgalbur

You might log a ticket with them asking for clarification, or a JSON Example. If you get that I can tell you how to make it work.

chicks avatar Apr 20 '11 02:04 chicks

Any update on this? Just curious if you got anything back :)

chicks avatar May 04 '11 05:05 chicks