Custom context module Return to destination

VitalPBX Community Support General Discussion Custom context module Return to destination

  • Post
    PitzKey
    Participant
    US

    Hello,

    We tried setting up a custom context, it goes to the custom dialplan just fine, but when using the Return() application, it does not go to the destination specified in the GUI. 

    Our custom dialplan:

    [front-door]
    exten => s,1,Noop()
    same => n,System(do something here)
    same => n,Return()

    So to troubleshoot I looked at the dialplan, and I see the below what the PBX generated:

    [custom-contexts]
    exten => cc-3,1,NoOp(Main_Door)
    same => n,Gosub(front-door,s,1(app-time-condition,TC-11,1))
    same => n,Hangup()

    So now I see why it does not work, because it passes the destination as a argument

    I know we can use something like:

    [front-door]
    exten => s,1,Noop()
    same => n,System(do something here)
    same => n,Goto(${ARG1},${ARG2},${ARG3})

    But that is not clean and missing the point of using Gosub() and Return()

    Am I missing something here?

    Thank you

    0
Viewing 2 replies - 1 through 2 (of 2 total)
  • Replies
    mo10
    Moderator
    none
    Up
    0
    Down
    The destination is send as variable to your custom context.
     

    The parameters are in the format: context,extension,priority
    ${ARG1}, ${ARG2}, ${ARG3}
     
    You can do whatever you want with it.
    Like jump to another custom context and so on.
     
    What would you need instead?
     
    0
    PitzKey
    Participant
    US
    Up
    0
    Down
    As explained above, if it’s being used as a GoSub, then the easiest way would be to allow using a Return()
    0
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.