-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LumenVox CPA support #225
Comments
Existing stuffOf course, mod_rayo now has some CPA support, which we use in our adhearsion-cpa plugin... but that's different than Lumenvox's APIs. Lumenvox provided examples:GrammersExample CPA Grammar:<?xml version='1.0'?>
<grammar xml:lang="en-US" version="1.0" root="root" mode="voice" xmlns="http://www.w3.org/2001/06/grammar" tag-format="semantics/1.0">
<meta name="STREAM|DETECTION_MODE" content="CPA"/>
<meta name="STREAM|CPA_HUMAN_RESIDENCE_TIME" content="1800"/>
<meta name="STREAM|CPA_HUMAN_BUSINESS_TIME" content="1800"/>
<meta name="STREAM|CPA_UNKNOWN_SILENCE_TIMEOUT" content="1800"/>
<meta name="HUMAN_RESIDENCE_CUSTOM_INPUT_TEXT" content="HUMAN RESIDENCE"/>
<meta name="HUMAN_BUSINESS_CUSTOM_INPUT_TEXT" content="HUMAN BUSINESS"/>
<meta name="UNKNOWN_SPEECH_CUSTOM_INPUT_TEXT" content="UNKNOWN SPEECH"/>
<meta name="UNKNOWN_SILENCE_CUSTOM_INPUT_TEXT" content="UNKNOWN SILENCE"/>
<rule id="root" scope="public">
<one-of>
<item>HUMAN RESIDENCE<tag>out="HUMAN RESIDENCE"</tag></item>
<item>HUMAN BUSINESS<tag>out="HUMAN BUSINESS"</tag></item>
<item>UNKNOWN SPEECH<tag>out="UNKNOWN SPEECH"</tag></item>
<item>UNKNOWN SILENCE<tag>out="UNKNOWN SILENCE"</tag></item>
</one-of>
</rule>
</grammar> Example Tone Detection Grammer:<?xml version='1.0'?>
<grammar xml:lang="en-US" version="1.0" root="root" mode="voice" xmlns="http://www.w3.org/2001/06/grammar" tag-format="semantics/1.0.2006">
<meta name="STREAM|DETECTION_MODE" content="Tone"/>
<meta name="AMD_CUSTOM_ENABLE" content="true"/>
<meta name="FAX_CUSTOM_ENABLE" content="true"/>
<meta name="SIT_CUSTOM_ENABLE" content="true"/>
<meta name="AMD_CUSTOM_INPUT_TEXT" content="AMD"/>
<meta name="FAX_CUSTOM_INPUT_TEXT" content="FAX"/>
<meta name="SIT_REORDER_LOCAL_CUSTOM_INPUT_TEXT" content="SIT REORDER LOCAL"/>
<meta name="SIT_VACANT_CODE_CUSTOM_INPUT_TEXT" content="SIT VACANT CODE"/>
<meta name="SIT_NO_CIRCUIT_LOCAL_CUSTOM_INPUT_TEXT" content="SIT NO CIRCUIT LOCAL"/>
<meta name="SIT_INTERCEPT_CUSTOM_INPUT_TEXT" content="SIT INTERCEPT"/>
<meta name="SIT_REORDER_DISTANT_CUSTOM_INPUT_TEXT" content="SIT REORDER DISTANT"/>
<meta name="SIT_NO_CIRCUIT_DISTANT_CUSTOM_INPUT_TEXT" content="SIT NO CIRCUIT DISTANT"/>
<meta name="SIT_OTHER_CUSTOM_INPUT_TEXT" content="SIT OTHER"/>
<rule id="root" scope="public">
<one-of>
<item>AMD<tag>out="AMD"</tag></item>
<item>FAX<tag>out="FAX"</tag></item>
<item>SIT REORDER LOCAL<tag>out="SIT"</tag></item>
<item>SIT VACANT CODE<tag>out="SIT"</tag></item>
<item>SIT NO CIRCUIT LOCAL<tag>out="SIT"</tag></item>
<item>SIT INTERCEPT<tag>out="SIT"</tag></item>
<item>SIT REORDER DISTANT<tag>out="SIT"</tag></item>
<item>SIT NO CIRCUIT DISTANT<tag>out="SIT"</tag></item>
<item>SIT OTHER<tag>out="SIT"</tag></item>
</one-of>
</rule>
</grammar> Results
(There's no examples of an actual response, just what the interpertations provide) DialplansLumenvox provides examples with both Example of CPA and Tone Detection with MRCPRecog:
Example of CPA and Tone Detection with SpeechBackground:
|
The first synchronous detection would be easily implemented atop our existing UniMRCP stuff in Punchblock. This would make use of |
Also see adhearsion/adhearsion#493 |
More notes for @polysics: When PB receives an Input component of 'cpa' type, it will need to start up an appropriate component in place of a DTMF event listener one. Such an implementation will need to be similar to MRCPPrompt, without any of the output stuff, and with grammar conversion from URIs to Lumenvox grammars. |
@polysics If there is anything else you need to move forward, please be specific and thorough about what's stopping you, and I'll fix it first thing in the morning. |
To add LumenVox CPA support to Punchblock, the following items are required:
cpa
http://xmpp.org/extensions/xep-0341.htmlThe text was updated successfully, but these errors were encountered: