Sharpen Astesrisk to work with Cisco BLF

    BLF (Busy Lamp Field) - in general, this is a set of indicators on the IP phone that show the status of the line: free or busy.



    In this article, we will teach Asterisk to work correctly with Cisco phones to display BLF statuses.

    Theory


    Enter the command in the Asterisk console:
    asterisk*CLI> core show hints
        -= Registered Asterisk Dial Plan Hints =-
                       1196@ext-local           : SIP/1196              State:Ringing         Watchers  3
                       1188@ext-local           : SIP/1188              State:InUse           Watchers  3
                       5030@ext-local           : SIP/5030              State:Idle            Watchers  1
    

    The State column shows, in fact, the state of the line, Watchers - the number of listeners to this line. When the line status changes, Asterisk sends a message to the phone and the phone turns on the indication. The performance of BLF on Asterisk can first be checked on a softphone, for example, on DrayTek SoftPhone. After adding contacts, you can see the line busy indication. By default, Asterisk sends messages that the Cisco phone cannot read, and, accordingly, the BLF does not work on them.

    Patch Asterisk source codes


    Download the patch: issues.asterisk.org/jira/secure/attachment/32739/cisco-blf-asterisk.1.8.0.patch
    When this patch is installed, asterisk will not compile.
    There is a small typo in the patch, it needs to be fixed.
    On line 23, switch (state) fix to switch (data-> state) ;
    in line 40 state fix to data-> state ;
    in line 60 state fix to data ;
    in line 66 state fix to data .

    Next, copy the Asterisk sources to a folder, for example / usr / src / asterisk.
    We put the patch in the channels folder and immediately rename it, for example, in patch.
    We execute the command:
    patch chan_sip.c patch
    

    At the request “File to patch” we enter the path where sip.h is located (usually in include / sip / sip.h).
    If Asterisk is installed, then you need to remove it. To do this, stop Asterisk:
    service asterisk stop
    

    Remove Asterisk:
    yum remove asterisk
    

    Before installing asterisk, you must install all the modules for compiling the sources, in particular gcc, gcc-c ++, kernel-devel, ncurses-devel, openssl-devel, m2crypto, libssl-devel.
    Next we do:
    ./configure
    make menuselect  -- выбираем необходимые модули
    make
    make  install
    

    We launch:
    asterisk start
    

    This ended with Asterisk.

    Configuring phone config files


    config.file
    trueSIPciscociscoY-M-DCentral Asia Standard TimePBX-IP AddressUnicast200050605061PBX-IP AddressDisable200020002000506050605060false120truetruex-cisco-serviceuri-cfwdallx-cisco-serviceuri-pickupx-cisco-serviceuri-opickupx-cisco-serviceuri-gpickupx-cisco-serviceuri-meetmex-cisco-serviceuri-abbrdialfalse2truetrue220truefalse610180360051201205500400070trueNone1falsetruefalsefalsenone1013avt3falsefalse2true1500010falsefalse16384327669USECALLMANAGER506023false345truefalsefalsetrueLineName 5037LineName50375037password21DescriptionDirectory Number50601840dialplan.xmltrue1falsefalse101000011,709:0012:0001:001210.1.96.31010050005110.1.96.31000000111200501729-ee9247c4-1a10-481c-8fdc-612737c5aadd10960962003804PBX-ip-addressfalse1


    Let's consider the main lines for working with BLF
    21DescriptionDirectory Number

    featureID 21 means that for this Directory Number you must use BLF.
    In the /etc/asterisk/sip_general_additional.conf file, add or change, if any, the lines:
    allowsubscribe=yes
    notifyhold=yes
    callcounter=yes
    notifyringing=yes
    limitonpeers=yes
    buggymwi=yes
    


    Used devices


    The following devices were used to organize BLF:
    Phones: Cisco 7961, 7962, FreePBX 2.0.2, Asterisk 1.8.11.

    Also popular now: