Predial Hooks

VitalPBX Community Support Wish List Predial Hooks

  • Post
    PitzKey
    Participant
    US
    Hey everyone,

    I want to suggest a predial hook, this will help us tremendously when doing integrations and checks before dialing the callee.

    We would like to see these hooks in:

    • Class of Service
    • Outbound Routes or Trunks
    • Inbound Routes

    Let’s take the inbound routes for an example. There are a lot of companies who want to have the ability to play on most inbound routes an emergency announcement, the same message on all routes. Right now it’s very hard to do it. With a GoSub() and Return() hook we should be able to use the same GoSub in every Inbound Route you want. For example GoSub(emergency-greet,s,1)

    So there’s two ways you may want to implement this.

    1. A hooking module which will allow us to specify all the GoSubs and then in the inbound routes we will be able to select the GoSub we want from a drop-down menu.
    2. Allow us to manually type in the GoSub context.

    Same with all other Hooking points I mentioned.

    See COS example:

    [cos-OfficePhones]
    include => global-hints
    include => cos-OfficePhones-init

    [cos-OfficePhones-init]
    exten => _[-+*#0-9a-zA-Z].,1,NoOp(More than on digit pattern)
     same => n,GosubIf($["${DIALPLAN_EXISTS(cos-OfficePhones-hook,s,1)}" = "1"]?cos-OfficePhones-hook,s,1)
     same => n,Gosub(s,1(${EXTEN}))

    exten => _[-+*#0-9a-zA-Z],1,NoOp(One Digit pattern)
     same => n,GosubIf($["${DIALPLAN_EXISTS(cos-OfficePhones-hook,s,1)}" = "1"]?cos-OfficePhones-hook,s,1)
     same => n,Gosub(s,1(${EXTEN}))

    [cos-OfficePhones-hook]
    exten => s,1,Noop(Entered the COS hook)
     same => n,;Do stuff here...
     same => n,Return()

    Again, I mentioned emergency announcement just as an example, but there’s a million different ways we can use it.

    Let me know if you have any questions

     

    Thanks

    0
  • You must be logged in to reply to this topic.