How to pass variable from queue to macro-dialout-one-predial-hook?

i created a dynamic route for the queue as described here,
in the return of the function, I placed the text that I wanted to use later as a filter in the context of macro-dialout-one-predial-hook
in the logs I see that my text is assigned to a variable GOSUB_RETVAL

    -- Executing [[email protected]:4] Return("Local/[email protected];1", "MYTEST-123") in new stack
  == Spawn extension (from-queue, 500, 1) exited non-zero on 'Local/[email protected];1'
    -- Local/[email protected];1 Internal Gosub(sub-queue-answer,s,1) complete GOSUB_RETVAL=MYTEST-123

but DumpChan in this context does not display the value of this variable, so my plan to use this variable in the macro-dialout-one-predial-hook context failed
how should I proceed so that this value is received in the context macro-dialout-one-predial-hook?

Variable Inheritance - Asterisk Project - Asterisk Project Wiki

I solved the issue using the database AstDB
in context [sub-queue-answer] I write the parameter I need to the database, and in the [macro-dialout-one-predial-hook] I get this value, it turned out to be very convenient

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.