Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. Howto: Using 'quick dial' numbers with FOP2

Howto: Using 'quick dial' numbers with FOP2

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 114 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    K
    Kurgan
    wrote on last edited by
    #1

    I have set up my Asterisk server to allow me to use "short" numbers to quick dial from dumb phones that cannot use a phonebook.

    The idea is that I have added a field to the FOP2 (version 2.26) phonebook (or you can use "phone2" if you like) and I enter a short number (in my case, from 8000 to 8999) in that field, while I enter the real phone number in "phone1". Then, when a dumb phone (a simple cordless for example) dials an 8xxx number, Asterisk automatically dials the real number.

    This is a quite simple setup, if you have mysql support in Asterisk. I am using asterisk 1.6 in Debian, and mysql support can be added by installing the "asterisk-mysql" package. My setup is a plain asterisk configured by hand, I am not using any specialized distribution.

    In my setup, I have added a section in extensions.conf that allows me to dial quick numbers that begin with 8 (and I actually have no lenght limit in quick dial numbers, but I suggest that you keep them short, otherwise they are not "quick" anymore).

    This is my extensions.conf snippet. It must be modified to be used in your setup, so you need to have some experience in configuring asterisk to make it work.

    exten => _8.,1,MYSQL(Connect connid localhost db_user db_password db_name)
    exten => _8.,n,MYSQL(Query resultid ${connid} SELECT phone1  FROM `visual_phonebook` WHERE `phone2` = '${EXTEN}')
    exten => _8.,n,MYSQL(Fetch fetchid ${resultid} number_to_dial)
    exten => _8.,n,MYSQL(Clear ${resultid})
    exten => _8.,n,MYSQL(Disconnect ${connid})
    exten => _8.,n,GotoIf($["${number_to_dial}" = ""]?error)
    exten => _8.,n,Dial(SIP/provider/${number_to_dial:1})
    exten => _8.,n,Hangup
    exten => _8.,n(error),Playback(invalid)
    exten => _8.,n(error),Hangup
    

    You have to modify the Connect statement on the first line (db_user, db_password and db_name have to be set to the proper username, password, and database name) and then you have to modify the Dial statement line to make it work with your outbound channel type and eventually remove the ":1" that means "strip the first character from the number before dialing it".

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Thanks for the tip!

      1 Reply Last reply
      0
      • K
        K
        Kurgan
        wrote on last edited by
        #3

        You're welcome!

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups