<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Asterisk 11.1.0<br>
<br>
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.<br>
<br>
[callmenow]<br>
exten => s,1,NoOp(callmenow: Queue without answer)<br>
same =>n,Queue(sales,tc)<br>
<br>
[dial-to-customer]<br>
exten => s,1,NoOp(to-customer)<br>
same =>n,Wait(1)<br>
same =>n,Playback(custom/callmenow-announce)<br>
same =>n,GoSub(sub-outbound_caller_id,start,1)<br>
same =>n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,<b>b(dial-to-customer-sub,s,1,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})</b>)
<br>
<br>
[dial-to-customer-sub] <br>
; this runs on the customer's channel<br>
exten =>s,1,NoOp()<br>
same
=>n,Set(OPERATORID=${ODBC_OPERATORID_FROM_ADDRESS(${ARG2})})<br>
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)} )<br>
same =>n,Return()<br>
<br>
The whole thing is kicked off by an AMI request:<br>
Action: Originate<br>
Channel: Local/s@callmenow<br>
Context: dial-to-customer<br>
Exten: s<br>
Priority: 1<br>
Async: true<br>
Callerid: Call Me Now <777><br>
Variable: MMCUSTOMER_NUMBER=9995551212<br>
Timeout: 999999<br>
<br>
Output from the subroutine:<br>
-- Executing [s@dial-to-customer-sub:3]
Verbose("SIP/voipms-0000001e", "2, dial-to-customer-sub interface
name customer number operatoriod channel name SIP/voipms-0000001e
unique ID mlcx500-1375465508.61 ") in new stack<br>
<br>
The "U" subroutine seems to work OK<br>
same
=>n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,U(dial-to-customer-sub,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME}))
<br>
<br>
I want the "b" subroutine, because it is call before attempting to
connect the remote end. This gives me plenty of time to notify my
application and have it look up the customer's record while the call
is being placed. The "U" subroutine is called after the call is
connected.<br>
<br>
Am I missing something, or is it broke?<br>
<br>
(This whole thing is development for a "call me now" feature from
the web site.)<br>
<br>
<pre class="moz-signature" cols="72">--
Mitch
</pre>
</body>
</html>