• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            八葉草

            學習資料記錄

            Asterisk Manager Interface C++ Interpretor for Linux [轉]

            Asterisk Manager Interface C++ Interpretor for Linux (http://advancedcodingconcepts.blogspot.com/2011/02/asterisk-manager-interface-c.html

            Through the past number of months in my full-time developer position for an online company and it's sales office, we've migrated to a VOIP telephony platform based on Asterisk, Linux and our custom call centre management application.

            In order to integrate an autodialer in to the application, I had originally written a script in PHP to read from two asterisk servers (local and offshore) to post information about whether an agent is on a call or not, and also inbound calls to the call centre application.

            The PHP script took a matter of hours to set up initially, but lacked proper structure - specifically, it could not track information when we switched to call queues, and was not easily portable between asterisk versions (1.8 locally, 1.2 in offshore)

            For the past week I have worked on the design and initial coding of an app in C++ that acts as a client to both servers, interprets the messages and creates internal structures.  I'm releasing that code here for review, and to help other's save some time, as I haven't noticed any other software out there that could accomplish this elegantly.  Currently, I am calling this application AMIflex based on the flexibility it provides to manage the Asterisk AMI protocol.

            This source code and it's derivatives can not be sold, licensed or packaged with any commercial software without my explicit permission.

            Download the source code here (.tar.bz2, 6kb)

            Installation instructions:

            1. unpack the file via "tar -xvjf" command
            2. create /etc/amiflex directory, and add a "servers.conf" file in the following format
            Server: server name (for display purposes only)
            Host: ip address or host name of ami server 
            Username: AMI manager username
            Secret: AMI manager password/secret

            Optional fields:

            RetryPeriod: number of seconds to wait between connection retries - ie if asterisk is rebooted (default: 300)
            Port: port number (default 5038)

            You can insert more than one server (connections will be maintained together) by entering the first server's details, placing a second new line after the last configration line for that server, and then entering the details for the second server (and so on)

            How to make this useful
            When a server connection is established, there's a AMI::RegisterAllEvents() call after authentication.  Add in your own events, and manipulate the structures or log output

            Example:
            AMI::RegisterEventCB("Dial", &AMI::MyDialCallback)

            void AMI::MyDialCallback(MSG *msg)
            {
                if (msg->Attr("SubEvent").value=="Begin")
                    cout << msg->Attr("Channel").value + " is dialing " +msg->Attr("Dialstring").value<<endl;
            }


            Current limitations
            I have some well known limitations with this software - I'll be resolving them myself for internal use, but my next step is to integrate proprietary MySQL links in to the source code, so I made sure to release this first.  Currently my task list with my employer is too long to not take some shortcuts :)
            1. The channel list linked list is a static member of the channel class - this means that you run AMIflex with multiple servers in the configuration file, all of the channels for all servers will be parallel.  If you have two servers and each server has the same extension, then there will be one device entry created and two channels open on that device, when each extension is busy.
            2. The bridge event currently only registered the first channel's Bridge member to the second member, and vice versa - If you are monitoring channels that will be bridged to more than one other channel, this will have to be expanded to a proper many to many-style linked list.
            /Files/byc/amiflex.0.1.tar.bz2.rar

            posted on 2011-11-27 18:54 八葉草 閱讀(516) 評論(0)  編輯 收藏 引用 所屬分類: asterisk

            久久精品毛片免费观看| 久久久黄色大片| 91久久成人免费| 欧美日韩中文字幕久久久不卡 | 久久天天躁狠狠躁夜夜不卡| 欧美精品丝袜久久久中文字幕 | 亚洲国产精品久久久久| 青青草国产97免久久费观看| 性高湖久久久久久久久| 国内精品伊人久久久久网站| 一本色道久久88精品综合| 色综合久久天天综合| 综合久久国产九一剧情麻豆| 国产亚洲精午夜久久久久久| 久久婷婷五月综合97色一本一本 | 亚洲va中文字幕无码久久| 久久99热这里只有精品国产 | 一个色综合久久| 精品久久一区二区| 少妇人妻88久久中文字幕| 久久精品成人一区二区三区| 99久久精品国产高清一区二区| 欧美大战日韩91综合一区婷婷久久青草| 久久99国产综合精品| 无码人妻少妇久久中文字幕| 99久久精品免费看国产一区二区三区| 亚洲精品乱码久久久久久自慰 | 狠狠色婷婷综合天天久久丁香| 狠狠色婷婷久久一区二区| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 久久久久国产一级毛片高清版| 久久精品人人做人人爽电影| 一本大道久久东京热无码AV| 亚洲精品国产综合久久一线| 一本大道久久东京热无码AV | 狠狠色婷婷综合天天久久丁香| 精品久久久久中文字幕日本 | 久久久久久久国产免费看| 免费观看久久精彩视频| 久久噜噜电影你懂的| 18岁日韩内射颜射午夜久久成人|