====== Translations ====== A translation table is a simple one-to-one mapping of one set of digits to another, different set of digits. For PMS translation tables, it is a mapping from the room (or extension) numbers sent by the PMS to the mailbox numbers used by the 7.00 voice server (VS). The translations may be created by the administrator using any of several different methods (adding or subtracting a value, pre-pending or appending one or more digits, removing leading zeros, etc.). However, the final translation table is simply a collection of one-to-one mappings to replace a given room number with an associated mailbox number. For systems configured with multiple PMS instances, each PMS instance will have its own unique translation table. Only that table will be used to translate room numbers to and from the PMS. **Translating the calling party and/or called party extension numbers to associated mailbox numbers during call processing is handled by the call routing table, not the PMS translation tables.** The Translations page of the Hospitality Configuration dialog is used to configure the translations for the given PMS instance. {{:images:vs7:manual:hosp-trans.png?nolink|}} Each translation is listed on a separate line (or row) in the table and displays what is being matched and what that translates to. To perform the translation, the VS would take the string given in the //Room Number (PMS value)// field and replace it with the string in the //Mailbox// field. For example, in the above translation table, if the room number was 71101, it would be replaced with 1101 as the mailbox number. On the other hand, when the VS is sending a message to the PMS, it will perform a reverse lookup, replacing the mailbox number with the associated room number. If more than one //Room Number (PMS value)// is associated with the given //Mailbox// (as may be the case if the PMS is sending extension rather than room numbers), then the VS will send the message for each PMS value found. For example, if the VS is sending a maid status update for mailbox 1101 and there are translation entries for both 71101 and 81101, a maid status update will be sent for each one. |< 70% 15% >| ^Button^Description^ |[[vs7:manual:syscon:hosp:trans:add|Add]]|Add translations for one or more room numbers, including ranges of room numbers.| |[[vs7:manual:syscon:hosp:trans:edit|Edit]]|Edit a single translation.| |[[vs7:manual:syscon:hosp:trans:delete|Delete]]|Delete one or more selected translations.| |[[vs7:manual:syscon:hosp:trans:delete|Delete All]]|Delete the entire translation table.| |[[vs7:manual:syscon:hosp:trans:import|Import]]|Import translations from a CSV file.| |[[vs7:manual:syscon:hosp:trans:export|Export]]|Export translations to a CSV file.| |//OK//|Close the translation table dialog.| ===== Translation Types ===== Translation types are used when adding translations so that you can add multiple, or a range of, translations without having to manually enter each individual translation. Once a translation is added to the table, it is essentially a simple one-to-one replacement. The 7.00 supports the following translation types. |< 70% 20% >| ^Type^Description^ |//Add value//|Adds the modifier value to the room number value to produce the mailbox.| |//Subtract value//|Subtracts the modifier value from the room number value to produce the mailbox.| |//Add prefix//|Adds the modifier to the front of the room number string.| |//Add suffix//|Adds the modifier to the end of the room number string.| |//Replace with//|Replaces the room number string with the modifier string.| |//Apply mask//|Applies the modifier (as a mask) to the room number string to produce the mailbox.| |//Remove leading zeros//|Removes all leading zeros from the room number string to produce the mailbox.| ==== Examples ==== The following table provides an example of each translation type in action, except //Mask//, which is discussed in the next section. |< 50% 30% 25% 25% >| ^Type^Room #^Modifier^Mailbox #^ |//Add value//|101|7000|7101| |//Subtract value//|7101|7000|101| |//Add prefix//|101|7|7101| |//Add suffix//|101|0|1010| |//Replace with//|101|8500|8500| |//Remove leading zeros//|00101|//Not used//|101| For examples on using the //Apply mask// type, see below. ==== Apply Mask ==== Uses the modifier string as a mask for converting the Room Number string into the final result. The mask string is interpreted according to the following rules: |< 70% 20% >| ^ Character ^Means^ | //*// |Copy the next digit to the mailbox string no matter what it is.| | //^// |Skip over and discard the next digit in the room number string.| | //0-9// |Any number in the mask string is copied as-is to the mailbox string. The room number string is not affected in this case.| The mask is interpreted left-to-right, one character at a time. Each instance of the ''*'' character copies a single digit from the room number (source) string to the mailbox (result) string, again working left-to-right. Likewise, each ''^'' character in the mask will discard the next character in the room number string, again proceeding from left-to-right order. Finally, any actual digit ''0-9'' that appears in the mask will be copied directly to the end of the mailbox string. This translation type is the most complicated and, therefore, the most prone to being misconfigured. Consequently, it is recommended that you always use one of the other translation types unless you really need the flexibility that the //Apply mask// type offers. === Mask Examples === The following table provides a selection of examples using the mask translation type. |< 85% 10% 10% 10% >| ^Room #^Modifier (Mask)^Mailbox #^Comments^ |7110|''***''|711|The asterisk symbol copies the next digit from the room number string to the mailbox string. It only copies one digit.\\ \\ So, in this example, the mask ''***'' copies the first three digits only. The last digit is discarded.| |7110|''^***''|110|The caret symbol skips over and discards the next digit in the room number string. Only the one digit is discarded and nothing is copied to the mailbox string.\\ \\ So, in this example, the mask ''^***'' throws out the first digit, ''7'', and copies over the next three, ''110''.| |101|''8***''|8101|A number in the mask is copied over as-is to the mailbox string.\\ \\ So, in this example, the 8 is copied to the result string and then the ''***'' part of the mask copies the three digits from the source string to the result string.| |201|''70^**''|7001|In this example, the ''70'' from the mask is copied to the mailbox sting first, then the ''2'' from ''201'' is discarded, and finally the ''01'' is copied to the result.| === Expanded Example === To better understand how the mask string and room number string are processed together to create the mailbox number string, let's consider a more complex (if unlikely) example. First, the translation in summary form: |< 50% 30% 35% >| ^Room Number^Modifier (Mask)^Mailbox Number^ |7101101|''^^^8****''|81101| Consider the steps used to arrive at the above result. In each step, the mask digit and the room number digit being processed are shown enclosed in square brackets, like so: ''[^]'' |< 90% 5% 55% 12% 15% >| ^ Step ^Description^Mask^Room Number^Mailbox Number^ | 1 |Apply first ^ to first digit in room number. Since ^ means discard, the mailbox number is unchanged.|''[^]^^8****''|[''7'']''101101''| | 2 |Apply second ^ to the second digit in the room number.|''^[^]^8****''|''7''[''1'']''01101''| | 3 |Apply third ^ to the third digit in the room number.|''^^[^]8****''|''71''[''0'']''1101''| | 4 |Copy the 8 directly to the end of the mailbox number. Since the mailbox number is currently empty, the 8 becomes the first digit.\\ \\ No digits in the room number are copied or discarded in this case, so the next step will address the 4th digit, not the fifth.|''^^^[8]****''|(ignored)|8| | 5 |Apply the first * to the fourth digit of the room number. Since * means copy, the digit 1 is copied to the end of the mailbox number.|''^^^8[*]***''|''710''[''1'']''101''|81| | 6 |Apply the second * to the fifth digit of the room number.|''^^^8*[*]**''|''7101''[''1'']''01''|811| | 7 |Apply the third * to the sixth digit of the room number.|''^^^8**[*]*''|''71011''[''0'']''1''|8110| | 8 |Apply the last * to the last digit of the room number.\\ \\ We have reached the end of the mask, so the final mailbox number is 81101.|''^^^8***[*]''|''710110''[''1'']|81101|