Was this page helpful?

AGI: PHPIVR

    內容表格
    沒有標頭

    官網位址:http://phpivr.sourceforge.net/
    使用 PHP 開發的 API 用來建立 IVR。

    說明文件(使用 Google 從俄文翻譯成英文)

    SUPPORT
    
    Gregory Maistrenko
        [email protected]
    
    http://sourceforge.net/projects/phpivr
    
    Descriptions
    
        PHP IVR - Interactive voice menu - AGI application for the Asterisk PBX.
    
    Dependencies
    
        PHP + phpagi - (phpagi goes along with the draft included) for the runtime
        Asterisk PBX
    
    INSTALLATION
    
        1. Copy the folder phpivr in /var/lib/asterisk/agi-bin/
        2. Create a symlink to a number IVR.php, that asterisk it discovered
    
            $ ln -s /var/lib/asterisk/agi-bin/phpivr/ivr/IVR.php /var/lib/asterisk/agi-bin/IVR
    
        3. Copy the configuration file phpivr.conf in the folder /etc/asterisk/
    
            $ cp phpivr.conf /etc/asterisk/
    
        4. Edit the file with nstroykami. By default, the menu runs the [common].
        The parameter `options' - a necessary minimum start menu (welcomed).
    
        5. The default settings assumes the existence of sound files ivr /*, for this copy
        folder. /sounds/ivr (demosounds.tar.bz2) in a folder with audio files asterisk
    
            $ cp ./Sounds/ivr /var/lib/asterisk/sounds
        check that your files are reproduced asterisk gsm, before isplzovaniem example, by default.
    
        6. Add to /etc/asterisk/extensions.conf
    
            ; IVR test menu
            exten => 7777,1,Answer
            exten => 7777,n,Wait (1)
            exten => 7777,n,AGI (IVR); default will read the menu [common]
            exten => 7777,n,Wait (1)
            exten => 7777,n,Hangup ()
    
        Or
    
            ; IVR test menu
            exten => 7777,1,Answer
            exten => 7777,n,Wait (1)
            exten => 7777,n,AGI (IVR, justthanks); where justthanks - the name of the menu to start
            exten => 7777,n,Wait (1)
            exten => 7777,n,Hangup ()
    
    
        then from the console asterisk
            asterisk * CLI> dialplan reload
    
        7. Determine the correct rights to the folder for the user that runs asterisk
    
            $ sudo chown astreisk.asterisk /var/lib/astreisk/agi-bin/phpivr /var/lib/asterisk/sounds/ivr
    
        8. Call on 7777 and try to IVR. By default, the button to press 0, 2, 1.
        By clicking on the 1 will make the transition into another menu, 0 - output, 2 More info.
        Exit when you enter the wrong sequence.
    
    
    IVR Options
    
    Welcome To:
        "options": "OPTIONS"
    
    For the handler entered sequence:
        "<input sequence>": "OPTIONS"
    
    Where:
        OPTIONS - expr_1[,expr_2...][|expr_N[,expr_N+1...]]
        expr - VAR[=VAL]
    
    
        VAR is the name of such function implemented FUNCTIONS:
        menu     - the menu ID for the transition
        transfer - redirects to the number transmitted by the parameter (eg: transfer=060),
                 If the parameter is not expected to be handed over to enter the tone from the keyboard of the client terminal
                 entry ends with the symbol "#" or by a timeout -
        exit     - completes IVR menu with code -1 transmitted value ignores
        hangup   - the same exit, but before leaving hangup calls a function for channel
        say      - losing a voice message. Parameter specifies the name without extension
                 the directory /var/lib/asterisk/sounds. For example say = ivr/demo-instruct
        prompt   - the maximum number of tones of parcels expected from the client terminal, input ends
                 symbol "#" or by a timeout-in, makes sense only in conjunction with say, the default is
                 value of "maximum permissible Asterisk PBX ~35-40".
        loop     - the number of repetition of the voice message say with pauses of 2 seconds.,
                 makes sense only in conjunction with say, the default is 1.
        *        - Runs the command Asterisk, it makes sense when used separately from the other teams,
                 If a comma indicated several teams "*=Wait 2, *=TRANSFER 7000" they will be implemented
                 in the order. Also, the use of efficacy for the organization of the pauses between Playback
                 messages. "say=some-wav|*=Wait 5|say=onother-wav"
    
    OPTIONS processed block approach, the blocks are divided among themselves the symbols "|". Every watch block will be executed
    subject to all the functions of the previous one. The next block will never be executed if the previous is
    executed transfer, exit, hangup or menu.
    
    Sample
    phpivr.conf:
    {
            "1stmenu": {
                    "name": "1st menu"
                    ,"Options": "say=ivr/welcome-message,prompt,loop=3"
                    ,"Inputs": {
                            "2": "transfer=911"
                            ,"1": "say=ivr/moreinfo-about-company"
                    }
    
                    ,"Inputnotfound_act": "menu=2ndmenu"
            }
    
            , "2ndmenu": {
                    "name": "2nd menu"
                    ,"Options": "say=ivr/text-of-2ndmenu|menu=1stmenu"
            }
    }
    
    extensions.conf:
        ; IVR test menu
        exten => 7777,1, Answer
        exten => 7777,n,Wait (1)
        exten => 7777,n,AGI (IVR, 1stmenu)
        exten => 7777,n,Wait (1)
        exten => 7777,n,Hangup ()
    
    In his greeting message will be lost 3 times with the expectation of the 1st dtmf signal, if I will not be
    then we set up. If introduced unset sequence, then lose the menu [2ndmenu]
    then - return to the menu [1stmenu]
    
    after pressing:
    2   - certainly divert at 911
    1   - tell about the company
    
    
    Compatibility
    
    No rake tested on 1.4.hh, 1.6.1
    
    

     

     

    Was this page helpful?
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core