What I would do is take a page from the
LSL2 copy protection.
When the player types "pick up phone", ego sits down and picks up the phone, you could pop up a window
just like the "Enter input" prompt, but it's not the same. This gives you a string buffer with the thing that was entered.
StrCmp the input against the number you want, itself as a string. If it matches, go off. If it matches "hang up", that's easy. Anything else, you can probably assume is an incorrect number.
You could ensure that it's a number by checking the first character of the input. If *that* is between 0x30 and 0x39, it's likely the rest of the input was a number. If it's not, and it
might be "hang up", you could make that a little more flexible with an in-place
Parse and
Said so that things like "hang up the phone" can also work. Ask me how that might be done.
Personally, if it's a text parser game, I would expect the phone to be controlled by keyboard --
pick up phone,
209-6838989,
hang up.
I like the idea of a graphical input, like a number pad. Then, instead of checking a large number against their input, you could check each number against 8 individual variables (or just an array of variables more likely)
I was going to say something about multiplying the number so far by ten and adding the button's value, but that'd leave you with only five very range-limited digits. So I looked into LSL1 and found it uses arrays of numbers:
(local ajax = [5 5 5 8 0 3 9 0 0 0])