Contacts with smart BLF

Community based support for the Digium Phone Application Programming Interface (API).

Moderators: jwitt, sruffell, malcolmd, Moderator

Contacts with smart BLF

Postby abbasov » Mon Feb 23, 2015 12:26 pm

How can I make contacts and smart BLF for an application.
Here's what I did.

configuration file:
<smart_blf>
<blf_items>
<blf_item location="main" index="3" paging="0" app_id="Annuaire"/>
</blf_items>
</smart_blf>

contact file:
<phonebooks>
<contacts group_name="Default" editable="0">
<contact first_name="User Test1" last_name="" subscribe_to="sip:112@172.16.22.10" >
<numbers>
<number dial="112" label="Extension" primary="1" />
</numbers>
</contact>
<contact first_name="User Test2" last_name="" subscribe_to="sip:116@172.16.22.10" >
<numbers>
<number dial="116" label="Extension" primary="1" />
</numbers>
</contact>
</contacts>
</phonebooks>

When i add conf for smart blf in file configuration , buttons contacts does not work and if i remove smart blf it work egain.

Do you have an idea to solve this problem.
abbasov
Newsterisk
 
Posts: 4
Joined: Wed Oct 08, 2014 3:41 pm

Re: Contacts with smart BLF

Postby malcolmd » Mon Feb 23, 2015 3:39 pm

The phone's configuration file doesn't have the smart blf items definition in-line. It pulls in an XML file containing all of the smart blf items definitions.

e.g.

Code: Select all
<?xml version="1.0">
<config>
...other things like your phone settings and your account, etc.
...
    <smart_blf>
        <blf_items url="http://server.example.com/myblfitems.xml" />
    </smart_blf>
...
</config>
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Contacts with smart BLF

Postby abbasov » Tue Feb 24, 2015 4:00 am

It does not work, I did it to.

File configuration:

<contacts url="http://172.16.22.10:8667/Digium/000fd3069208-contacts.xml" id="internal" />
<smart_blf>
<blf_items url="http://172.16.22.10:8667/Digium/myblfitems.xml" />
</smart_blf>

File for contacts:
<phonebooks>
<contacts group_name="Default" editable="0">

<contact first_name="User Test1" last_name="" subscribe_to="sip:112@172.16.22.10" >
<numbers>
<number dial="112" label="Extension" primary="1" />
</numbers>
</contact>
<contact first_name="User Test2" last_name="" subscribe_to="sip:116@172.16.22.10" >
<numbers>
<number dial="116" label="Extension" primary="1" />
</numbers>
</contact>
</contacts>
</phonebooks>

myblfitems.xml
<config>
<smart_blf>
<blf_items>
<blf_item location="main" index="3" paging="1" app_id="Annuaire">
</blf_items>
</smart_blf>
</config>

If I did this configuration, it show me only speed button for Usert Test1 and Usert Test2. But speed button for Annuaire it dont show.
Do you have other idea.
abbasov
Newsterisk
 
Posts: 4
Joined: Wed Oct 08, 2014 3:41 pm

Re: Contacts with smart BLF

Postby malcolmd » Tue Feb 24, 2015 9:26 am

Your BLF items file only specifies an entry for an app called Annuaire. Are you loading a custom application onto your phone called Annuaire?
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Contacts with smart BLF

Postby abbasov » Tue Feb 24, 2015 10:27 am

Yes it is application for OpenLdap it work well, I call it Annuaire. My castomer want to have speed buttons contact defined in asterisk and one button to call application Annuaire.

Exemple speeds button in my D50:

UserTest 1 -> it call directly because it is contact in asterisk
UserTest 2 -> it call directly because it is contact in asterisk
Annuaire -> it call application Annuaire

My application Annuaire show me all contacts in database of OpenLdap.

Separately it work well, but when i want to define button Annuaire, it show me gest Annuaire and contacts UserTest1 and UserTest2 are not hear.
abbasov
Newsterisk
 
Posts: 4
Joined: Wed Oct 08, 2014 3:41 pm

Re: Contacts with smart BLF

Postby malcolmd » Tue Feb 24, 2015 11:32 am

ah, okay. Right, if you're using the BLF Items sheet, you can't mix and match that with the older contacts definitions.

In the absence of BLF Items, the phone will draw out the contacts automatically.

But, if you're defining BLF Items at all, you'll have to define each and every item you want, including those other two contacts.

Cheers
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Contacts with smart BLF

Postby abbasov » Fri Feb 27, 2015 3:58 am

So good, how I can realize all this, can you set an example, because I have used all varinty that I know and do not know.


Thank you.
abbasov
Newsterisk
 
Posts: 4
Joined: Wed Oct 08, 2014 3:41 pm

Re: Contacts with smart BLF

Postby malcolmd » Fri Feb 27, 2015 10:40 am

Howdy,

The examples that I wrote are all here:
https://wiki.asterisk.org/wiki/display/DIGIUM/Smart+BLF

Cheers
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US


Return to Digium Phone API

Who is online

Users browsing this forum: No registered users and 2 guests