Asterisk Custom Dynamic Features

VitalPBX Community Support General Discussion Asterisk Custom Dynamic Features

  • Post
    PitzKey
    Participant
    US
    Hello,

    We are trying to implement a Dynamic Feature for specific phone calls only, but it wouldn’t work. We reviewed the dialplan, and we saw that VitalPBX is setting in the global vars the following:

    same => n,Set(__DYNAMIC_FEATURES=custom-features)

    This is overriding any Custom Dynamic Feature set previously – making it impossible to set it on specific calls.

    After looking at the Asterisk Docs we see that you can have multiple Dynamic Features on the same channels, you just have to separate them with a # https://wiki.asterisk.org/wiki/display/AST/Custom+Dynamic+Features

    So I am thinking we should change that line in the global vars to:

    same => n,Set(__DYNAMIC_FEATURES=${IF($[ $["${DYNAMIC_FEATURES}" = ""] | $["${DYNAMIC_FEATURES}" = "custom-features"] ]?custom-features:custom-features#${DYNAMIC_FEATURES})})

    This will check the if there’s already a Dynamic Feature on the channel and add both Dynamic Features. But if it doesn’t have any Dynamic Features set or if the Dynamic Feature is set to “custom-features” then it will only set it to “custom-features”

    Is it possible to implement this?

     

    Thank you

    0
Viewing 6 replies - 1 through 6 (of 6 total)
  • Replies
    Up
    -1
    Down
    We can add this change for the next version.
    0
    Up
    -1
    Down
    What do you think of this:

    same => n,Set(__DYNAMIC_FEATURES=${IF($[“${CUSTOM_DYNAMIC_FEATURES}” = “”]?custom-features:custom-features#${CUSTOM_DYNAMIC_FEATURES})})

    So, if the variable CUSTOM_DYNAMIC_FEATURES is provided, then, it is appended automatically instead of using only the custom-features.

    0
    PitzKey
    Participant
    US
    Up
    0
    Down
    Yeah, that’s even better. Well done, Jose!
    0
    PitzKey
    Participant
    US
    Up
    0
    Down
    FYI, I added your line yesterday, works great so far!
    0
    PitzKey
    Participant
    US
    Up
    0
    Down
    Hi Jose, was this added yet? I don’t see it in the latest V2 and V3.

    Thanks

    0
    Up
    0
    Down
    We have no added this to the dialplan yet. I am going to make sure this to be included in the next update.
    0
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.