Twilio拨号失败

问题描述:

在我的应用程序中,我试图将呼叫转移到另一个电话号码。目前它重定向到正确的XML页面,说转移到一个代理,然后电话挂断。不知道我在这里做错了什么,会喜欢一双额外的眼睛。Twilio拨号失败

的routes.rb

post 'call_logs/connect' => 'call_logs#connect' 
post 'call_logs/directions' => 'call_logs#directions' 

控制器

def connect 
    @post_to = BASE_URL + "/directions" 
    render :action => "reminder.xml.builder", :layout => false 
end 

def directions 

    if params['Digits'] == '1' 
    render :action => "transfer.xml.builder", :layout => false 
    return 
    end 
end 

transfer.xml.builder

xml.instruct! 
xml.Response do 
    xml.Gather(:action => @post_to, :numDigits => 1) do 
    xml.Say "transferring you to an agent" 
    xml.Dial "+12142222222", :timeout => "60", :callerID => 'MY_TWILIO_NUMBER' 
    end 
end 

Twilio开发者传道这里。

问题是you cannot use a <Dial> verb inside of the <Gather> verb。我不确定你试图用这种设置实现什么,但这就是为什么它只是挂断了。

让我知道,如果我可以进一步帮助。