2

これは簡単な問題だと思います。おそらく、これまでに尋ねられたことがないほど単純なのでしょうか?答えを見つけたり、理解したりすることができないようです。

発信者に表示される最初の TwiML は次のようになります。

<Response>
    <Gather action="handle-extension.php" numDigits="3">
        <Play>greatings/maingreating.mp3</Play>
        <!-- Hello, if you know your party's 3 digit extenstion, please dial it at any time or press 0 for the directory. Otherwise, pelase hold while we find someone to take your call.  -->
    </Gather>
    <!-- If customer doesn't input anything, prompt and try again. -->
    <Redirect>handle-queue-main.php</Redirect>
</Response> 

発信者は 3 桁の内線番号をダイヤルできる必要があり、その情報は「handle-extension.php」に渡される必要があります。これは正常に機能しますが、発信者がディレクトリに対して「0」をダイヤルすると、gather は追加の 2 桁を待機し続けます。

検索中に、次のように numDigits で "<" と ">" を使用できることが明らかになりました。

<Gather action="handle-extension.php" numDigits="&lt; 3">

しかし、元のコードと同じ結果が得られました。

私が考えた別の解決策は、次を使用することでした。

<Gather action="handle-extension.php" numDigits="3" finishOnKey="0">

しかし、ゼロが含まれる拡張機能では機能しませんでした (101 は次のスクリプトに「1」を送信し、110 は「11」を送信するなど)。

おそらく簡単な解決策は、ディレクトリ拡張子を # に変更することですが、率直に言って、それは私が探しているものではありません。

助言がありますか?私がやろうとしていることは可能ですか?

お時間をいただきありがとうございます!:)

4

1 に答える 1