Doug Lytle
2021-Jan-04 19:01 UTC
[asterisk-users] ast_app_exec_macro: Cannot run 'Macro(atb)'. The application is not available.
>>> Gosub(check-number-forwarding,Dial(SIP/718xxxxxxxxxxpstn-5665,20,U(atb-sub))>>> Is ARG1 = atb-sub ?No. My complete line exten => _45XX,1,Set(_ARG1=${EXTEN} same => n,Gosub(check-number-forwarding,s,1(${ARG1})) So, if someone were to dial a 4 digit number starting with 45 (i.e. 4522), it would jump to the sub-routine called check-number-forwarding and supply the variable of 4522 to that sub-routine. It could have been just as easily written as same => n,Gosub(check-number-forwarding,s,1(4522)) Your sub-routine will need to pass what dialing options you are wanting to use. A good source of information https://wiki.asterisk.org/wiki/display/AST/Gosub Doug
thelma at sys-concept.com
2021-Jan-04 19:39 UTC
[asterisk-users] ast_app_exec_macro: Cannot run 'Macro(atb)'. The application is not available.
On 1/4/21 12:01 PM, Doug Lytle wrote:>>>> Gosub(check-number-forwarding,Dial(SIP/718xxxxxxxxxxpstn-5665,20,U(atb-sub)) > >>>> Is ARG1 = atb-sub ? > > No. > > My complete line > > exten => _45XX,1,Set(_ARG1=${EXTEN} > same => n,Gosub(check-number-forwarding,s,1(${ARG1})) > > So, if someone were to dial a 4 digit number starting with 45 (i.e. 4522), it would jump to the sub-routine called check-number-forwarding and supply the variable of 4522 to that sub-routine. > > It could have been just as easily written as > > same => n,Gosub(check-number-forwarding,s,1(4522)) > > Your sub-routine will need to pass what dialing options you are wanting to use. > > A good source of information > > https://wiki.asterisk.org/wiki/display/AST/Gosub > > DougOK, both combination worked but still silence until the all numbers are dialed. exten => 65,1,Progress() ;plays the music on internal call exten => 65,n,Answer exten => 65,n,Dial(SIP/718xxxxxxxxxx at pstn-5665,20,U(atb-sub)) [atb-sub] exten => s,1,Wait(6) exten => s,n,SendDTMF(1) exten => s,n,SendDTMF(xxxxxxxxxxxxx#) exten => s,n,SendDTMF(xxxxxxxxx#) exten => s,n,SendDTMF(1) [atb-sub] exten => s,1,Wait(6) exten => s,n,SendDTMF(1) exten => s,n,Gosub(check-number-forwarding,s,1(xxxxxxxxxx#)) exten => s,n,Gosub(check-number-forwarding,s,1(xxxxxxxx#) exten => s,n,SendDTMF(1) What I want is hear the phone dialing the number or play music, so I know it is dialing or doing something. in the first line I have "Progress()" it used to play music but it doesn't anymore.