@nogueiralazaro posted a new topic, subject "How to add queue member in recording file name". It read:

   I need a Help to add in mey record file name the queue member, inbound calls.
    
    I know when the group is called I really dont´t have thias information but I searched some macro methods.

After which, @johnkiniston added

    I don't believe this can be done as you don't know which agent will answer the call before the caller enters the queue.
    
    You can set the MONITOR_FILENAME variable before you call Queue() and store that saved file into your CDR.

To which @ambiorixg12 replied

    I'm dont understand very well your request, but you can try the queue gosub option to achieve this task

@nogueiralazaro replied

    I need create a record file using MixMonitor where the file name contais de member group extension.
    
    After the call Queue, is there no option to capture the member dialed?
    
    Thanks a lot.

So @nogueiralazaro replied

    It´s a possibility. I´ll try.
    
    Regars.

@ambiorixg12 replied

    Use MEMBERINTERFACE variable and gosub, if MEMBERINTERFACE is numeric value use SayNumber plus MixMonitor to record the sound file

So @satish4asterisk replied

    As ambiorixg12 suggested, use gosub option with queue and start recording your call inside gosub with MEMBERINTERFACE in filename.  
    You'll have to set setinterfacevar=yes in queues.conf to have MEMBERINTERFACE variable set in gosub
    
    –Satish Barot

To which @johnkiniston replied

    I've been thinking about this and you may be able to accomplish what you want.
    
    there is the ChangeMonitor() Application https://wiki.asterisk.org/wiki/display/AST/Application_ChangeMonitor
    
    You can use the gosub option on your Queue() command to run a gosub when the called party is connected to the calling party, at that point in time you can use ChangeMonitor along with the MEMBERINTERFACE variable mentioned above to alter the filename used for recording.
    
    I have not tried this myself.

After which, @satish4asterisk added

    @johnkiniston , ChangeMonitor() probably won't work if we call Mixmonitor() on caller channel and then ChangeMonitor() on Called part's channel(channel that executes gosub i.e. Queue member's channel).
    
    ChangeMonitor() Changes monitoring filename of a channel.
    
    –Satish Barot

After which, @johnkiniston added

    I just tested and you are correct.
    
    ChangeMonitor when called from the gosub is unable to alter the filename at least on my old 1.8 test box.
    
    I tested with both using the monitor-type setting in queues.conf and with using MixMonitor before the call.

@arthur.nogueira replied

    Regards.  
    I´ll try this code.


{'source': 'discourse', 'url': 'https://community.asterisk.org/t/how-to-add-queue-member-in-recording-file-name/67907', 'title': 'How to add queue member in recording file name', 'views': 1893, 'has_accepted_answer': False, 'word_count': 372, 'like_count': 0, 'reply_count': 4, 'participant_count': 5, 'posts': 11, 'tags': '', 'author': '@nogueiralazaro', 'participants': '@nogueiralazaro, @johnkiniston, @ambiorixg12, @satish4asterisk, @arthur.nogueira', 'image_url': [None], 'created_at': '2016-08-29T20:05:29.171Z', 'last_posted_at': '2016-08-31T19:54:46.695Z'}