what this does, is if you dial 900 it will wait for you to enter a 4 digit number. If i did not have the DIAL line in it, it would then procede to say the number.
But I want it to dial SIP/100, once they answer it I want it to SayNumber.
What would even be better is to call SIP/100, then SayNumber, then connect the call with whoever dialed 900…
thanks for any help i have been reading on how to do this for 1hr 30min with no progress really…
Ok, if I dial 902, and i type in 1212, it should store that in variable ‘Number’.
Then it will proceed to Dial Sip/100, and on connection it goes to macro-test-macro passing NUMBER as ARG1.
It then tells the person who picked up the call ‘ZERO’
Im not sure why its not telling them 1212 instead.
Thanks
-- Executing [902@internal:1] Read("SIP/101-b6511d88", "NUMBER||4|3") in new stack
-- Accepting a maximum of 4 digits.
-- User entered '1111'
-- Executing [902@internal:2] Dial("SIP/101-b6511d88", "SIP/100|60|M(test-macro|NUMBER)") in new stack
-- Called 100
-- SIP/100-081b89a8 is ringing
-- SIP/100-081b89a8 answered SIP/101-b6511d88
-- Executing [s@macro-test-macro:1] SayNumber("SIP/100-081b89a8", "NUMBER") in new stack
-- <SIP/100-081b89a8> Playing 'digits/0' (language 'en')
-- Packet2Packet bridging SIP/101-b6511d88 and SIP/100-081b89a8
Here is my finsished code. I was actually wanting for when someone to call in, it would ask them for thier account number, they would enter it, it would tell them thank you. It would then call me and tell me what thier account number is and connect the call.
After you hear thier account number you could accept or deny the call if you want, thier was some information in here to do that: voip-info.org/wiki/index.php … +cmd+Macro
This could be modified very easily to ask thier name and present that to you. If anyone wants that I dont mind modifying it to work.
[code][LTS-DEMO]
;Please enter your 4 digit account number
exten => 902,1,Playback(custom/9)
exten => 902,n,Read(NUMBER,4,3)
;Thank you, your call will now be connected
exten => 902,n,Playback(custom/10)
exten => 902,n,Dial(SIP/100|60|M(test-macro,${NUMBER}))
[macro-test-macro]
;User account number is
exten => s,1,Playback(custom/11)
exten => s,n,SayNumber(${ARG1})
[/code]