Dial Application “b” Subroutine Arguments Not Passing?

Home » Asterisk Users » Dial Application “b” Subroutine Arguments Not Passing?
Asterisk Users 3 Comments

Asterisk 11.1.0

I’m trying to use the “b” subroutine of the Dial application so that I
can do some stuff with our internal applications that need to have access to the called channel information. I can see that the subroutine is being executed, but the arguments I pass don’t see to make it to the subroutine.

[callmenow]
exten => s,1,NoOp(callmenow: Queue without answer)
same =>n,Queue(sales,tc)

[dial-to-customer]
exten => s,1,NoOp(to-customer)
same =>n,Wait(1)
same =>n,Playback(custom/callmenow-announce)
same =>n,GoSub(sub-outbound_caller_id,start,1)
same
=>n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,*b(dial-to-customer-sub,s,1,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})*)

[dial-to-customer-sub]
; this runs on the customer’s channel exten =>s,1,NoOp()
same =>n,Set(OPERATORID=${ODBC_OPERATORID_FROM_ADDRESS(${ARG2})})
same =>n,Verbose(2, dial-to-customer-sub interface ${ARG2} name
${ARG3} customer number ${ARG1} operatoriod ${OPERATORID} channel name
${CHANNEL(name)} unique ID ${CHANNEL(uniqueid)} )
same =>n,Return()

The whole thing is kicked off by an AMI request:
Action: Originate Channel: Local/s@callmenow Context: dial-to-customer Exten: s Priority: 1
Async: true Callerid: Call Me Now <777>
Variable: MMCUSTOMER_NUMBER

3 thoughts on - Dial Application “b” Subroutine Arguments Not Passing?