Agent can't hangup a leg of meetme() based autodialer

I wrote an autodialer using meetme().

A bash script generates a call file for the agent pointing to context that routes the call into a meetmeroom associated with its account.

The same script generates a call file calling a local channel. The call file has a variable that holds all the numbers to call separated by a space. The callfile points to a context processing this variable in a way that the numbers are called one after the other using the M and g parameters. The string is read by the script from a flat file holding the numbers to call.

scriptname

The numbers extracted from the string holding all the numbers is dialed with the line below.

exten => s,n,Dial(SIP/$[${NUMBER_TO_CALL}]@085xxxxxxx,40,gM(enter_conference,${ACCOUNT}))

The g parameter enables the dialplan to continue after the called party hangs up. The local channel can run in a loop until all numbers are processed.

This is the macro:

[macro-enter_conference]
exten => s,n,Meetme(${ARG1})
exten => s,n,MacroExit()

The agent stays in the conference and the numbers to call pass one by one and it is actually working perfectly. But there is just one show stopper: The agent has no way to end the call and wait for the next call to enter the conference. So when a called party doesn’t hangup there is a problem.

Option 3 from the admin menu of meetme doesn’t work because this doesn’t only ends the sip call to my sip provider but also the underlying local channel.

I tried to work it out with features.conf [applicationmap] but that doesn’t seem to work in combination with Meetme(). It worked with a normal call but not with meetme()

The question is: what are the options to enable the agent to end a call and move on to the next call by pressing # until the end of the list is reached. Have it written by someone is one but are there alternatives based on what is available within Asterisk 1.4.26.1