Mass delete Phone Book entries

  1. 10 years ago

    Hi i have made a mess of my phone book and wondered is their a way to delete the whole thing so that i can re-import from scratch? At the moment i cant delete any more then 5 at a time.
    Many Thanks

  2. admin

    29 Jan 2014 Administrator

    You can use mysql directly. Assuming you use FreePBX, from your server command line:

    mysql -u root -p asterisk -e "delete from visual_phonebook"

  3. Ok, Many thanks for that.

    when you import a phone book will it only be for one user? i was under the impression that FOP had a global address book but i can only see it for the user that i installed it from?

    Thanks again

  4. admin

    30 Jan 2014 Administrator

    The visual_phonebook table has two fields that control the record scope: owner and private.

    If a record is set with private='yes' only the extension that is set in 'owner' can see that record.

    So, if extension 200 has private records, and 201 some others, then set them like:

    owner='200',private='yes'
    owner='201',private='yes'

or Sign Up to reply!