Re: [asterisk-users] Dial application b subroutine arguments not passing?
On Fri, Aug 2, 2013 at 3:05 PM, Mitch Claborn mitch...@claborn.net wrote: On 08/02/2013 01:28 PM, Matthew Jordan wrote: On Fri, Aug 2, 2013 at 12:57 PM, Mitch Claborn mitch...@claborn.net mailto:mitch...@claborn.net wrote: 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})*) Use a '^' to delineate arguments pass to subroutines. This is actually true for the U option as well. See: https://wiki.asterisk.org/**wiki/display/AST/Pre-Dial+**Handlershttps://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers And: https://wiki.asterisk.org/**wiki/display/AST/Asterisk+11+** Application_Dialhttps://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- __**__**_ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/**mailman/listinfo/asterisk-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users That is not working for me either. same =n,Dial(${TOLL}/${MMCUSTOMER_**NUMBER},,b(dial-to-customer-**sub^s^1^fred^$george^$arrrgh)) You are missing a set of parentheses in your invocation: same =n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,b(dial-to-customer-sub^s^1(fred^$george^$arrrgh))) See: https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Dial application b subroutine arguments not passing?
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=9995551212 Timeout: 99 Output from the subroutine: -- Executing [s@dial-to-customer-sub:3] Verbose(SIP/voipms-001e, 2, dial-to-customer-sub interface name customer number operatoriod channel name SIP/voipms-001e unique ID mlcx500-1375465508.61 ) in new stack The U subroutine seems to work OK same =n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,U(dial-to-customer-sub,${MMCUSTOMER_NUMBER},${MEMBERINTERFACE},${MEMBERNAME})) 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. Am I missing something, or is it broke? (This whole thing is development for a call me now feature from the web site.) -- Mitch -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Dial application b subroutine arguments not passing?
On Fri, Aug 2, 2013 at 12:57 PM, Mitch Claborn mitch...@claborn.net wrote: 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}) *) Use a '^' to delineate arguments pass to subroutines. This is actually true for the U option as well. See: https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers And: https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Dial application b subroutine arguments not passing?
On 08/02/2013 01:28 PM, Matthew Jordan wrote: On Fri, Aug 2, 2013 at 12:57 PM, Mitch Claborn mitch...@claborn.net mailto:mitch...@claborn.net wrote: 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})*) Use a '^' to delineate arguments pass to subroutines. This is actually true for the U option as well. See: https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers And: https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users That is not working for me either. same =n,Dial(${TOLL}/${MMCUSTOMER_NUMBER},,b(dial-to-customer-sub^s^1^fred^$george^$arrrgh)) output is -- Executing [s@dial-to-customer:8] Dial(SIP/mlcm800-0039, SIP/voipms/9725232703,,b(dial-to-customer-sub^s^1^fred^$george^$arrrgh)) in new stack -- SIP/voipms-003a Internal Gosub(dial-to-customer-sub,s,1) start -- Executing [s@dial-to-customer-sub:2] Verbose(SIP/voipms-003a, 2, number interface name ) in new stack PS - a link from the Dial page to the Pre-Dial Hanlders page would be useful. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users