Asterisk to read the caller ID from FOP's phonebook

  1. 13 years ago

    Hi,
    Is it possible to make asterisk read the information from the phonebook within FOP2?
    I found another thread that states it's already done [1], but it does not work for me.
    I would like to the caller ID to show on my IP phones.
    I'm using FreePBX to manage my system (which comes with it's own phonebook and works), I'm running 1.4.36 with the latest FOP2 2.22.
    I just don't want to have two different places to manage my phonebook entries.

    Thanks,
    [1] View Post 364&p=1323&hilit=caller+id#p1323

  2. admin

    21 Sep 2011 Administrator

    Hi,

    There is an article in the blog explainging how to do that:

    http://www.fop2.com/blog/lookup_source

    Best regards

  3. Very well, this works perfectly!

    Thanks a lot.

  4. 11 years ago

    How can i tweak the sql query to return the company name as well as the name because we have entries that only have company and no name in them.

    thanks

    Ian

  5. admin

    13 Dec 2012 Administrator
    SELECT CONCAT(company, ' - ',firstname,' ',lastname) AS name FROM visual_phonebook WHERE phone1 LIKE CONCAT('%',SUBSTRING('[NUMBER]',-8)) OR phone2 LIKE CONCAT('%',SUBSTRING('[NUMBER]',-8)) ORDER BY LENGTH(CONCAT(phone1,phone2)) LIMIT 1

or Sign Up to reply!