rfc2897.txt

来自「中、英文RFC文档大全打包下载完全版 .」· 文本 代码 · 共 1,807 行 · 第 1/5 页

TXT
1,807
字号
      Money is specified in the smallest units of a given currency and      is spoken in one or more units of currency as appropriate, e.g.      "110" in U.S. Dollars would be spoken "one dollar and ten cents".      The three letter codes defined in ISO 4217, Currency And Funds      Code List [5] are used to specify the currency subtype. A small      excerpt from ISO 4217 follows:      __________________________________________________________      |Alpha-code | Numeric-code | Currency |      Entity       |      |___________|______________|__________|___________________|      |GQE        | 226          | Ekwele   | Equatorial Guinea |      |GRD        | 300          | Drachma  | Greece            |      |GTQ        | 320          | Quetzal  | Guatemala         |      |___________|______________|__________|___________________|      Money can be specified in negative or positive units of currency.      In the above example "-110" would be spoken as "minus one dollar      and ten cents".   Month:      Speaks the specified month, e.g. "10" is spoken as "October".      Specification is in MM format with "01" denoting January, "02"      denoting February, etc.   Number:      Speaks a number in cardinal form or in ordinal form.  For example,      "100" is spoken as "one hundred" in cardinal form and "one      hundredth" in ordinal form.  Cardinal numbers can be specified as      negative or positive.Cromwell                     Informational                     [Page 20]RFC 2897              MGCP Advanced Audio Package            August 2000   Silence:      Plays a specified period of silence.  Specification is in 100      millisecond units.   String:      Speaks each character of a string, e.g. "a34bc" is spoken "A,      three, four, b, c".  Valid characters are a-z, A-Z, 0-9, #, and *.   Text:      Produces the specified text as speech or displays it on a device.   Time:      Speaks a time in either twelve hour format or twenty four hour      format depending on the specified subtype. For example "1700" is      spoken as "Five pm" in twelve hour format or as "Seventeen hundred      hours" in twenty four hour format.  Specification is in HHMM      format per ISO 8601, International Data and Time Notation [7].   Tone:      Plays an algorithmically generated tone, specification of which is      tbd. Probably most applications will use prerecorded tones.   Weekday:      Speaks the day of the week, e.g. "Monday".  Weekdays are specified      as single digits, with "1" denoting Sunday, "2" denoting Monday,      etc.9.  Selectors   Selector types, except for the pre-defined "Lang" (language)   selector, are definable by the user and may be applied to an   individual segment within an operation or to all the segments in an   operation.  For each selector type, the user must also define a range   of values that the selector can assume.   For example, if the user defines a selector of type "phase-of-the-   moon", he might also define the legal values for that selector to be   "new", "half", "full", "harvest", and "blue".  For the selector to   actually work at runtime, audio associated with each of the selector   values must be provisioned.Cromwell                     Informational                     [Page 21]RFC 2897              MGCP Advanced Audio Package            August 2000   Although not required, it is suggested that the three letter codes   defined in ISO standard 639-2, Code For The Representation Of Names   Of Languages [4] be used as values for user defined language   selectors.  A small excerpt from ISO 639-2 follows:                             _________________                             |Code | Language |                             |_____|__________|                             |cze  | Czech    |                             |cym  | Welsh    |                             |dan  | Danish   |                             |_____|__________|   Selectors can apply to entire operations or to a segment within an   operation.  If an operation contains multiple segments, each segment   may have its own set of selectors. If selectors for an individual   segment and selectors for the entire operation are present, the   selector for the individual segment takes precedence for that   segment.  The selectors for the operation apply to all segments   within that operation that do not have individual segment selectors.   If a selector set is not specified, provisioned defaults are used.   Selectors are applied to variables only after the variable has been   resolved. For instance if a date variable resolved to "October 15th,   1998" the voice with which the variable is spoken could resolve to   either male or female if a gender selector had been defined.10.  Aliases   Aliasing of audio segments is supported.  The alias to segment id   mapping is provisioned and at runtime the alias is resolved to its   associated segment id. The syntax for an alias is inclusion of the   alias between two forward slashes, e.g.:      S: pa(an=/not-in-service/)11.  Examples   This section presents a number of examples of how the syntax is used.   Note that arguments to an event are separated by a one or more   whitespace characters, which can be either an ASCII space character   or an ASCII tabulation character.   Play an announcement that consists of a single segment:      S: pa(an=39)Cromwell                     Informational                     [Page 22]RFC 2897              MGCP Advanced Audio Package            August 2000   Play an announcement that consists of multiple segments:      S: pa(an=39,40,47)   Play an announcement that consists of a recording followed by silence   followed by text to speech followed by a standalone voice variable:      S: pa(an=39 si(30) ts(hello) vb(my,usd,3999))   Play an announcement with an embedded variable.  If the first three   segments of the previous announcement were provisioned as segment 40,   the following would be exactly equivalent to the play in the   preceding example:      S: pa(an=40<3999>)   Play an announcement with two embedded variables:      S: pa(an=113<3999,10151998>)   Play a prompt and collect a single digit.  If need be, play a   reprompt, a no digits prompt, and a success or failure announcement.   Give the user three attempts to enter a digit:      S: pc(ip=21 rp=109 nd=102 fa=81 sa=72 na=3)   Play a prompt and collect a single digit.  If the user does not enter   a digit replay the initial prompt.  Give the user three attempts to   enter a digit:      S: pc(ip=21 na=3)   Play a prompt and record voice.  If the user does not speak play a no   speech prompt.  Give the user two attempts to record:      S: pr(ip=22 ns=42 na=2)   Play an announcement at ninety percent of its original speed and five   decibels softer than its original volume.  Play the announcement   three times with two seconds of silence between plays.      S: pa(an=27 sp=90 vl=-5 it=3 iv=20)   Give the user two attempts to enter a three digit pattern.  Clear the   digit buffer before playing the prompt. The user can signal end of   input using the # key, which is not returned to the call agent with   the collected digits.Cromwell                     Informational                     [Page 23]RFC 2897              MGCP Advanced Audio Package            August 2000      S: pc(ip=43 cb=true mn=3 mx=3 na=2)   Give the user three attempts to enter a three digit pattern.  If the   user enters one digits or two digits on the first or second attempts   a reprompt is played.  If the user enters no digits on the first or   second attempts a no digits reprompt is played.  If all three   attempts fail, a failure announcement is played.  If one of the   attempts is successful, a success announcement is played and the   collected digits are returned to the call agent.  The user can signal   end of input using the # key.  If the # key terminates a successful   input attempt, the collected digits, but not the # key, are returned   to the call agent.      S: pc(ip=87 rp=5 nd=409 fa=9 sa=18 mx=3 na=3)   Give the user a single attempt to enter a a 1 to 4 digit pattern,   allow 8 seconds for the user to enter the first digit, and allow 6   seconds for the user to enter each subsequent digit.  If the   subsequent digit timer expires after the user has less than four   digits, the digits collected are returned to the call agent.  The   user can signal end of input using the # key which is not returned to   the call agent with the collected digits.      S: pc(ip=4 fdt=80 idt=60 mx=4)   Give the user three chances to enter an 11 digit number that begins   with 0 or 1.  If the user makes a mistake while entering digits, he   can press the * key to discard any digits already collected, replay   the prompt, and resume collection.      S: pc(ip=33 mn=11 mx=11 sik=01 rsk=* na=3)   Give the user three chances to enter an 11 digit number that begins   with 0 or 1.  If the user makes a mistake while entering digits, he   can press the key sequence *11 to discard any digits already   collected, replay the prompt, and resume collection.  If the user   enters the key sequence *12 the play collect is terminated along with   any queued events, and the terminating key sequence is returned to   the call agent for processing.      S: pc(ip=33 mn=11 mx=11 sik=01 rsk=*11 rtk=*12 na=3)   Give the user two chances to make a recording.  After playing the   prompt, wait 5 seconds for the user to speak, otherwise replay the   initial prompt and try again.  If the user does speak, wait for seven   seconds after speech stops to make sure the user is finished.  If the   recording is successful, return a reference to the recording to the   call agent.Cromwell                     Informational                     [Page 24]RFC 2897              MGCP Advanced Audio Package            August 2000      S: pr(ip=6 prt=50 pst=70 na=2)   Play an announcement in the default language:      S: pa(an=5)   Play the same announcement the English.  In the first example, the   selector applies to the an segment; in the second it applies to the   pa operation.  For these particular examples, the net effect is the   same.      S: pa(an=5[Lang=eng])    or    S: pa(an=5)[Lang=eng]   Play an announcement in Danish using a female voice with a Cajun   accent.      S: pa(an=6)[Lang=dan,gender=female,accent=cajun]   Play the first part of an announcement in English, the second part in   the default language, and the third part in French.      S: pa(an=5[Lang=eng],6,7[Language=fra])   Play an announcement with an embedded variable in English:      S: pa(an=5<101599>)[Lang=eng]12.  Formal Syntax DescriptionAudPkgEvent = PlayAnnouncement / PlayCollect / PlayRecord /              OperationComplete / OperationFailed / EndSignalPlayAnnouncement =  [ AdvAudioPkgToken SLASH ]  PlayAnnToken                    LPAREN PlayAnnParmList RPAREN  [ OpSelectorList ]PlayCollect  =  [ AdvAudioPkgToken SLASH ]  PlayColToken                LPAREN [ PlayColParmList ]  RPAREN  [ OpSelectorList ]PlayRecord  =  [ AdvAudioPkgToken SLASH ]  PlayRecToken               LPAREN [ PlayRecParmList ]  RPAREN  [ OpSelectorList ]OperationComplete  =  [ AdvAudioPkgToken SLASH ]  OpCompleteToken               LPAREN OpCompleteParmList  RPARENOperationFailed  =  [ AdvAudioPkgToken SLASH ]  OpFailedToken               LPAREN ReturnCodeParm RPARENCromwell                     Informational                     [Page 25]RFC 2897              MGCP Advanced Audio Package            August 2000EndSignal  =  [ AdvAudioPkgToken SLASH ]  EndSignalToken              LPAREN SignalParm RPARENOpSelectorList  =   LSQUARE OpSelector *( COMMA OpSelector ) RSQUAREOpSelector  =  NAME EQUALS NAMEPlayAnnParmList  =  PlayAnnParm *( WSP PlayAnnParm )PlayColParmList  =  PlayColParm *( WSP PlayColParm )PlayRecParmList  =  PlayRecParm *( WSP PlayRecParm )OpCompleteParmList  =  OpCompleteParm *( WSP OpCompleteParm )PlayAnnParm  =  ( AnnouncementParm / IterationsParm / IntervalParm /                  DurationParm / SpeedParm / VolumeParm )PlayColParm  =  ( InitPromptParm / RepromptParm / NoDigitsParm /                  FailAnnParm / SuccessAnnParm / NoInterruptParm /                  SpeedParm / VolumeParm / ClearBufferParm /                  MaxDigitsParm / MinDigitsParm / DigitPatternParm /                  FirstDigitParm / InterDigitParm / ExtraDigitParm /                  RestartKeyParm / ReinputKeyParm / ReturnKeyParm /                  PosKeyParm / StopKeyParm / StartInputKeyParm /                  EndInputKeyParm / IncludeEndInputKey /                  NumAttemptsParm  )PlayRecParm  =  ( InitPromptParm / RepromptParm / NoSpeechParm /                  FailAnnParm / SuccessAnnParm / NoInterruptParm /                  SpeedParm / VolumeParm / ClearBufferParm /                  PreSpeechParm / PostSpeechParm / RecordLenParm /                  RestartKeyParm / ReinputKeyParm / ReturnKeyParm /                  PosKeyParm / StopKeyParm / EndInputKeyParm /                  RecPersistParm / OverrideAudioParm /                  RestoreAudioParm /  DeletePersistParm /                  NumAttemptsParm  )OpCompleteParm  =  ( VoiceInterruptParm / IntKeySeqParm /                     NumAttemptsParm / AmtPlayedParm / DigitsColParm /                     RecordingIdParm / ReturnCodeParm )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?