2017-11-08 22 views
1

laravel 5.2를 사용 중이고 'Route an Inbound Call'을 https://developer.nexmo.com/tutorials/interactive-voice-response#receive-user-input-webhook에서 만들려고합니다.Nexmo에서 NCCO 입력 동작을 통해 매개 변수를 전달하는 방법

그래서 'action'과 '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 machin의에 대한

+0

감사합니다. 하지만이 '입력'작업의 경로는 'POST'방법을 사용합니다. 예를 들어 더 자세히 설명해 줄 수 있습니까? – Alex