Realtime Hints

Home » Asterisk Users » Realtime Hints
Asterisk Users 5 Comments

Hello, I’d like to start using realtime hints in my asterisk 1.8 dialplan, but I
am unable. I haven’t understood if they have to be put inside the extensions realtime table (with priority -1) or if a dedicated realtime hints table can be made. Neither ways seem to work. Have you any working example?

Leandro

5 thoughts on - Realtime Hints

  • We use something like below

    [blf]
    exten =>_ZXX!,hint,SIP/${ODBC_FINDEXTN(sd.name,${EXTEN})}

    This uses an odbc call to create the hint when the phone asks for it. Using snom 760 and 821

    Cheers Stephen

  • Thank you, I think I’ll surrender in trying to use the realtime extension and use instead the simple ODBC interface. However I’d like to access some channel variables. Which ones are available inside the extension hint porcessing? I
    tried ${CDR(accountcode)} and it is not available, nor the
    ${CHANNEL(peername)} … what is the sd.name that you are referring?

    Leandro

    2012/9/25 Stephen Collier

  • I use the following in func_odbc.conf

    [FINDEXTN]
    dsn=asterisk readsql=SELECT ${ARG1} FROM extension_map as em left join sip_devices as sd on s d.id = em.name_id WHERE em.extension =’${ARG2}’ and name_id IS NOT NULL

    this is for our own extension_map table which is part of our mapping to our Avaya users.

    A simple one would be
    [FINDEXTN]
    dsn=asterisk readsql=SELECT ${ARG1} FROM sip_devices as sd WHERE sd.name =’${ARG2}’

    This allows pulling any field from sip_devices which is our realtime sip table.

    You could pull some of the other data you are looking for.

    Cheers Stephen

  • Thank you again, The problem in this setup is the inability to isolate a group of extensions from others. I mean, if all hints are in the same context, each extension can subscribe to any of the hints. The reason I prefer a completely realtime hints was I’d like to dynamically create hints in dynamically created context to jail an extension to only the hints I decide.

    I have tried to contact Digium on this topic and I am ready to setup a bounty to have a true realtime hints management coded if not already available.

    Leandro Il giorno 26/set/2012 00:03, “Stephen Collier”
    ha scritto: