2017-11-08 6 views
1

laravel 5.2を使用しています。「Route an Inbound Call」をhttps://developer.nexmo.com/tutorials/interactive-voice-response#receive-user-input-webhookから作成しようとしています。Nexmoでは、NCCO入力アクションを介してパラメータを渡す方法

私は 'action'として 'input'を使用でき、 'eventUrl'としてルーティングできることを知っていました。 https://developer.nexmo.com/api/voice/ncco#input

たとえば、このページによれば、このように使用できます。

[ 
    { 
    "action": "talk", 
    "text": "Please enter a digit" 
    }, 
    { 
    "action": "input", 
    "eventUrl": ["https://example.com/ivr"] 
    } 
] 

問題はこちらからです。

私はそのルートにいくつかのパラメータを渡したいと思っています - "https://example.com/ivr"。下記のような電話番号から入力してください。

[ 
    { 
    "action": "talk", 
    "text": "Please enter a digit" 
    }, 
    { 
    "action": "input", 
    "eventUrl": ["https://example.com/ivr"], 
    "from": $fromPhoneNumber, 
    } 
] 

しかし、 'eventUrl'にパラメータを渡す方法はないようです。

今は以下のものしかないと言います。

timeOut The result of the callee's activity is sent to the eventUrl webhook endpoint timeOut seconds after the last action. The default value is 3. No 
maxDigits The number of digits the user can press. The maximum value is 20. No 
submitOnHash Set to true so the callee's activity is sent to your webhook endpoint at eventUrl after he or she presses #. If # is not pressed the result is submitted after timeOut seconds. The default value is false. That is, the result is sent to your webhook endpoint after timeOut seconds. No 
eventUrl Nexmo sends the digits pressed by the callee to this URL after timeOut pause in activity or when # is pressed. No 
eventMethod The HTTP method used to send event information to event_url The default value is POST. No 

NCCO経由でパラメータを渡すにはどうすればよいですか?私にお知らせください。

答えて

1

クエリ文字列の一部としてパラメータをeventUrlに追加できます。

サム 開発者の支持者 - Nexmoご回答、@Samマチンのため

+0

感謝。しかし、この '入力'アクションのルートは 'POST'メソッドを使用します。私は例を使ってもっと詳しく説明できますか? – Alex

関連する問題