Some more detail is needed as while you may understand the full extent of the symptoms, a statement such as "they are not working" is not very telling.
1. You indicated that somehow or another the extensions in question got "this call cannot be completed........". Was this message for calls being made by the extensions themselves or calls to the extensions?
2. Can the extensions in question make internal calls, extension to extension?
3. Are the extensions enabled? Look for the check box under the extension in the "other tab".
4. Extension 777 is normally reserved for the echo test and can only be accessed by the dial code *777. I do not know if this can be changes as this is a system extension.
5. What is extension 666? What is it used for and is there a phone attached?
By virtue of the fact that there was a message is indicative that something happened as the phones did not generate the message, but rather 3CX or perhaps your provider did. The server activity log should reflect the details. Perhaps you looked in the server event log....which will not show this level.