I have, what seems like a strange problem with the simple script below. This script was written to forward my calls to my cell phone when I left the house. Pretty simple. It dials the number, then dials some pre-set strings with some delays.
I have two problems. First, HS complains that the hsp.LINESendTones function shouldn't have parentheses. If I remove them, it seems to work. Strange.
The second problem is that the script doesn't work. The phone dials the number fine, and I the forwarding service answers, but the tones following don't seem to be accepted and are ignored by the forwarding service. The hsp.LINEDial does return a "3" without a problem. Anyone see the problem? (I changed the PIN and number to protect the innocent.)
Thanks in advance.
sub main()
PhoneStatus = hsp.LINEDial(1,"*78",False,False)
if PhoneStatus = 3 then
hsp.WaitMS(2000)
hsp.LINESendTones 1,"1234#",400
hsp.WaitMS(1000)
hsp.LINESendTones 1,"11",400
hsp.WaitMS(4000)
hsp.LINESendTones 1,"8585551212",400
hsp.WaitMS(3000)
hsp.LINEHangup(1)
else
hsp.LineHangup(1)
end if
end sub
I have two problems. First, HS complains that the hsp.LINESendTones function shouldn't have parentheses. If I remove them, it seems to work. Strange.
The second problem is that the script doesn't work. The phone dials the number fine, and I the forwarding service answers, but the tones following don't seem to be accepted and are ignored by the forwarding service. The hsp.LINEDial does return a "3" without a problem. Anyone see the problem? (I changed the PIN and number to protect the innocent.)
Thanks in advance.
sub main()
PhoneStatus = hsp.LINEDial(1,"*78",False,False)
if PhoneStatus = 3 then
hsp.WaitMS(2000)
hsp.LINESendTones 1,"1234#",400
hsp.WaitMS(1000)
hsp.LINESendTones 1,"11",400
hsp.WaitMS(4000)
hsp.LINESendTones 1,"8585551212",400
hsp.WaitMS(3000)
hsp.LINEHangup(1)
else
hsp.LineHangup(1)
end if
end sub
Comment