Howto:Absence Memo with VoiceMail XML Script: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
Some customers like to automatically transmit a memo to callers.  
Some customers like to automatically transmit a memo to callers.  


In traditional PBX when a system phone or an operator calls a telephone, were the absence memo is enabled, on the display of the caller appears a short message like “in meeting until 14:00” or similar.  The phone will ring anyway because the display information is just “add on” info and not all callers will see it.  
In traditional PBX when a system phone or an operator calls a telephone, where the absence memo is enabled, on the display of the caller appears a short message like “in meeting until 14:00” or similar.  The phone will ring anyway because the display information is just “add on” info and not all callers will see it.  
The disadvantage in those old fashioned PBX is on the one hand the limited number of messages (typically 10 different types) and on the other hand the fact that the memo is only visible for callers using a phone with display capabilities. If the caller uses an analogue or DECT phone, or if it is an external caller (e.g. calling via ISDN trunk), he will not see the memo.
The disadvantage in those old fashioned PBX is on the one hand the limited number of messages (typically 10 different types) and on the other hand the fact that the memo is only visible for callers using a phone with display capabilities. If the caller uses an analogue or DECT phone, or if it is an external caller (e.g. calling via ISDN trunk), he will not see the memo.


A customer who would like such a feature, however without the described disadvantages, could do this by implementing the innovaphone absence memo.
A customer who would like such a feature, however without the described disadvantages, could do this by implementing the innovaphone absence memo.


Here is how.  
Here is how.


==Applies To==
==Applies To==
Line 50: Line 50:
Make a new directory in your CF.  
Make a new directory in your CF.  


Copy the XML file and the sound files ([[Howto:Absence_memo#Related_Files|Related Files]])in this directory (means: copy all the files of the innovaphone absence memo center in this directory).  
Copy the XML file and the sound files ([[Howto:Absence_Memo_with_VoiceMail_XML_Script#Download|Download]])in this directory (means: copy all the files of the innovaphone absence memo center in this directory).  


Now open a new voicemail object in your PBX. Please note that you will not require a VM license or a registration license for this object (means: this feature is for free). Give a number to this object. This number will be the access code for the innovaphone absence memo center (the number for recording a memo and the number for the call forwarding). Insert the path of your previously created directory and the name of the XML File in the Script URL (AWM.XML).
Now open a new voicemail object in your PBX. Please note that you will not require a VM license or a registration license for this object (means: this feature is for free). Give a number to this object. This number will be the access code for the innovaphone absence memo center (the number for recording a memo and the number for the call forwarding). Insert the path of your previously created directory and the name of the XML File in the Script URL (AWM.XML).
Line 59: Line 59:


===Known Problems===
===Known Problems===
The code of the XML is quite simple and can be easy modified.  
The code of the XML is quite simple and can easily be modified.  
Please note that all the XML commands and even the structure is well described in the file “schema” which you will find in every innovaphone Voice-Mail installation or in the section [[Howto:Absence_memo#Related_Files|Related Files]].
Please note that all the XML commands and even the structure is well described in the file “schema” which you will find in every innovaphone Voice-Mail installation or in the section [[Howto:Absence_memo#Related_Files|Related Files]].


<pre><?xml version="1.0" encoding="utf-8" ?> this line indicates technical parameter
<code xml>
<voicemail> each innovaphone VM script file requires this header
<!-- this line indicates technical parameter -->
<!-- innovaphone AbwesenheitsManager == inno srl kwa 2008 V210 --> just a remark
<?xml version="1.0" encoding="utf-8" ?>
     <function define="Main"> this line indicates where the routine “main” is starting (*)
 
         <pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" /> get info from the call
<!-- each innovaphone VM script file requires this header, just a remark  -->
         <pbx-finduser-e164 e164="$leg2" out-cn="$cn" /> check if call came direct form a PBX member
<voicemail>
         <if cond="$cn"> if the call came trough a call forward then
    <!-- this line indicates where the routine “main” is starting (*) -->
               <call name="Play" /> go to the routine witch is playing  the message
     <function define="Main">
         </if>  
        <!-- get info from the call -->
         <while notcond="$cn">´ if not
         <pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" />
             <pbx-finduser-e164 e164="$cgpn" out-cn="$cn" /> check that the caller is a PBX user
        <!-- check if call came direct form a PBX member -->
            <if cond="$cn"> and if yes
         <pbx-finduser-e164 e164="$leg2" out-cn="$cn" />
                 <call name="Record" /> go to the recording routine
        <!-- if the call came trough a call forward then -->
         <if cond="$cn">
               <!-- go to the routine witch is playing  the message -->
              <call name="Play" />
         </if>
        <!-- if not -->
         <while notcond="$cn">
            <!-- check that the caller is a PBX user -->
             <pbx-finduser-e164 e164="$cgpn" out-cn="$cn" />
            <!-- and if yes -->
            <if cond="$cn">
                <!-- go to the recording routine -->
                 <call name="Record" />
             </if>
             </if>
             <pbx-disc/>  
             <pbx-disc/>  
         </while>
         </while>
     </function> (*) end of routine main
     <!-- (*) end of routine main -->
<nowiki><!-- =======================Record==================================== --></nowiki>  
    </function>
     <function define="Record"> this is the recording routine
<!-- =======================Record==================================== -->  
           <store-get root="" name="en_registrazione.g729" out-url="$ctrl"/> load the voice file “en_registrazione.g729” (contains the    message “recording”)
    <!-- this is the recording routine -->
           <pbx-prompt url="$ctrl"/> play it to the caller
     <function define="Record">
           <store-get root="" name="beep.g729" out-url="$ctrl"/> load the file “beep”
          <!-- load the voice file “en_registrazione.g729” (contains the message “recording”) -->
           <pbx-prompt url="$ctrl"/> play it to the caller
           <store-get root="" name="en_registrazione.g729" out-url="$ctrl"/>
           <lib-strcat string="$cgpn" string2=".G711a" out-string="$user"/> load the string $user with the extension (if the calling extension is 1234 the file with the message will be 1234.G711a).
          <!-- play it to the caller -->
           <store-get root="" name="$user" out-url="$file"/> read the schema file to understand everything
           <pbx-prompt url="$ctrl"/>
           <pbx-record url="$file" sec="10"/> record in the file. Note that here is the limit of the 10 seconds; if you want more just modify the value…
          <!-- load the file “beep” -->
      </function>
           <store-get root="" name="beep.g729" out-url="$ctrl"/>
<nowiki><!-- =======================Play==================================== --></nowiki>   
          <!-- play it to the caller -->
           <pbx-prompt url="$ctrl"/>
           <!-- load the string $user with the extension (if the calling -->
          <!-- extension is 1234 the file with the message will be 1234.G711a). -->
           <lib-strcat string="$cgpn" string2=".G711a" out-string="$user"/>
          <!-- read the schema file to understand everything -->
           <store-get root="" name="$user" out-url="$file"/>
          <!-- record in the file. Note that here is the limit of the 10 -->
          <!-- seconds; if you want more just modify the value -->       
          <pbx-record url="$file" sec="10"/>
    </function>
<!-- =======================Play==================================== -->  
     <function define="Play">
     <function define="Play">
           <lib-strcat string="$leg2" string2=".G711a" out-string="$user"/> prepare the string for the file
          <!-- prepare the string for the file -->
           <store-get root="" name="$user" out-url="$file"/> if you have called the extension 1234 the string 1234.G711a is prepared
           <lib-strcat string="$leg2" string2=".G711a" out-string="$user"/>
           <pbx-prompt url="$file"/> play the file to the caller
          <!-- if you have called the extension 1234 the string 1234.G711a is prepared -->
           <pbx-fwd e164="$leg2" out-cause="$cause"/> transfer the call to the originally called extension  
           <store-get root="" name="$user" out-url="$file"/>
              <nowiki><case not-equal="0"> if it not was o.k. (user busy or something else) then</nowiki>  
          <!-- play the file to the caller -->
  <nowiki><store-get root="" name="beep.g729" out-url="$ctrl"/> play a “beep”</nowiki>
           <pbx-prompt url="$file"/>
        <nowiki><pbx-prompt url="$ctrl"/> </nowiki>  
          <!-- transfer the call to the originally called extension -->
<nowiki><pbx-disc/>   and disconnect</nowiki>         
           <pbx-fwd e164="$leg2" out-cause="$cause"/>
          <switch var="$cause">
              <!-- if it was not o.k. (user busy or something else) then -->
              <case not-equal="0">
                    <!--  play a “beep” -->  
                    <store-get root="" name="beep.g729" out-url="$ctrl"/>
                    <pbx-prompt url="$ctrl"/>
                    <!-- and disconnect -->
                    <pbx-disc/>      
               </case>
               </case>
           </switch>
           </switch>
       </function>  
       </function>  
  </voicemail></pre>
  </voicemail>
</code>
 
== Download ==
*[http://download.innovaphone.com/ice/wiki-src#absencememo http://download.innovaphone.com/ice/wiki-src#absencememo] - download the complete file package of scripts and files described in this article.


== Related Files ==
[[Media:Absence_memo_1.zip | Absence Memo files]]


[[Category:Howto|{{PAGENAME}}]]
[[Category:Howto|{{PAGENAME}}]]


[[Category:Sample|{{PAGENAME}}]]
[[Category:Sample|{{PAGENAME}}]]

Revision as of 13:23, 1 September 2011

Summary

Some customers like to automatically transmit a memo to callers.

In traditional PBX when a system phone or an operator calls a telephone, where the absence memo is enabled, on the display of the caller appears a short message like “in meeting until 14:00” or similar. The phone will ring anyway because the display information is just “add on” info and not all callers will see it. The disadvantage in those old fashioned PBX is on the one hand the limited number of messages (typically 10 different types) and on the other hand the fact that the memo is only visible for callers using a phone with display capabilities. If the caller uses an analogue or DECT phone, or if it is an external caller (e.g. calling via ISDN trunk), he will not see the memo.

A customer who would like such a feature, however without the described disadvantages, could do this by implementing the innovaphone absence memo.

Here is how.

Applies To

This information applies to

  • All V6 PBX platforms

Build v6 SR1 and later.


More Information

Problem Details

The innovaphone absence memo allows a user to leave a voice absence memo. A caller will hear first the message, than the set will ring normally. The voice absence memo can be activated from any phone type(IP, Dect, analogue, SIP, third party). The absence memo is automatically played for any type of caller (IP, Dect, analogue, SIP, third party, external calls from trunk or tie lines). To switch on the feature it is necessary to activate a call forward to the message center. Typically the call forward is unconditional, but it is possible to also activate a call forward on no response or on busy. The behaviour is different depending on the call forward installed:

  • Call forward unconditional: message is played, than sets rings
  • Call forward no response: sets rings, message is played after time-out, then sets rings again.
  • Call forward on busy: message is played, then caller will hear a busy tone. This also occurs if a call forward unconditional is active but the set called is busy.

System Requirements

The feature is based on an XML script typically installed on the compact flash. For freaks yes, it will work also on external Webdav sever. In order to switch the feature on and off, the phone must be able to activate and clear a call forward.

Installation

Currently all calls passing through an XML script will not be released until the end of the call even if transferred. This is from a signaling point of view, not for the voice stream. So if a call has passed the innovaphone absence memo center you will always find two calls in the call monitor. Please note also that the PBX's voicemail script cannot be read from another innovaphone box. So either put your script on the PBX's local flash card or put it on your web server and have the PBX retrieve it from there.

The actual script files uses G711 codec and must be modified to accept all types of coders. An updated version will follow, please contact us for this newer version.

Feature description for user

Call the innovaphone absence memo center in order to record an absence memo. You will hear the message “recording” followed by a “beep”; now your message will be recorded. You can modify and call your message box however many times you want. However please note that each new message will substitute (clear) the previous.

To check your recorded message, switch on a call forward unconditional to the innovaphone absence memo center and call your own number. You will hear your recorded message, at the end of the message you will hear the busy tone. Your absence memo is now switched on. A caller will hear your message and then your extension will ring normally and the caller hears the call control tone. You clear your call forward to the innovaphone absence memo center in order to switch off the feature.

Please note that the length of your message is limited to 10 seconds (but can be extended if required) and that this feature can be activated on all the phone sets in a PBX.

Installation

The installation is based on two steps, the first is to copy the right files and the second one is to set up the innovaphone PBX. Here is how:

Connect the CF as a network drive using the normal explorer option.

Make a new directory in your CF.

Copy the XML file and the sound files (Download)in this directory (means: copy all the files of the innovaphone absence memo center in this directory).

Now open a new voicemail object in your PBX. Please note that you will not require a VM license or a registration license for this object (means: this feature is for free). Give a number to this object. This number will be the access code for the innovaphone absence memo center (the number for recording a memo and the number for the call forwarding). Insert the path of your previously created directory and the name of the XML File in the Script URL (AWM.XML).

Example: http://172.16.0.10/DRIVE/CF0/AWN/AWM.xml 

In the example the created directory is AWN (like the XML file name). Now your job is done and the feature is switched on.

Known Problems

The code of the XML is quite simple and can easily be modified. Please note that all the XML commands and even the structure is well described in the file “schema” which you will find in every innovaphone Voice-Mail installation or in the section Related Files.

<?xml version="1.0" encoding="utf-8" ?>

<voicemail>

    <function define="Main">
        <pbx-getcallinfo out-cgpn="$cgpn" out-cdpn="$cdpn" out-leg2="$leg2" />
        <pbx-finduser-e164 e164="$leg2" out-cn="$cn" />
        <if cond="$cn">  
             <call name="Play" />
        </if>
        <while notcond="$cn">
            <pbx-finduser-e164 e164="$cgpn" out-cn="$cn" />
            <if cond="$cn">
                <call name="Record" />
            </if>
            <pbx-disc/> 
        </while>
    </function>
    <function define="Record">
         <store-get root="" name="en_registrazione.g729" out-url="$ctrl"/>
         <pbx-prompt url="$ctrl"/>
         <store-get root="" name="beep.g729" out-url="$ctrl"/>
         <pbx-prompt url="$ctrl"/>
         <lib-strcat string="$cgpn" string2=".G711a" out-string="$user"/>
         <store-get root="" name="$user" out-url="$file"/>
         <pbx-record url="$file" sec="10"/>
    </function>
    <function define="Play">
         <lib-strcat string="$leg2" string2=".G711a" out-string="$user"/>
         <store-get root="" name="$user" out-url="$file"/>
         <pbx-prompt url="$file"/>
         <pbx-fwd e164="$leg2" out-cause="$cause"/>
         <switch var="$cause">
              <case not-equal="0">
                    <store-get root="" name="beep.g729" out-url="$ctrl"/>
                    <pbx-prompt url="$ctrl"/>
                    <pbx-disc/>       
              </case>
         </switch>
      </function> 
</voicemail>

Download