Thursday, March 10, 2016
How hard can it possibly be to find a 10-digit phone number?
More difficult that you could imagine.
As initially designed, “Project: Sippy-Cup” was only to be used in North America. It was also designed such that the MDNs (aka “phone number”—the telephony industry has its fair share of TLAs) would be found in a particular format—a TEL URI. And because we only support numbers in North America, they follow the NANP (this is an example of an ETLA) format for numbers.
Of course, that's the theory. In practice, we are dealing with the Monopolistic Phone Company and well … they don't have to care. So it was with that in mind that I was told to look for MDNs in SIP URIs. Okay, so find a 10-digit number in a TEL or SIP URI. The design specification said that the MDN in the TEL URI would have a leading “+1” and then the MDN. Since SIP URIs were a complete afterthought I figured that any MDNs in a SIP URI would also follow the same format, a leading “+1” and the MDN.
So in mid-January, I get a report that “Project: Sippy-Cup” is failing to handle non-NANP MDNs.
“But we only support NANP MDNs,” I said.
“But international MDNs are failing,” was the reply.
“That can happen in production?” I asked.
“It is happening in production.”
“Excuse me? It's in production?”
“Yes. Has been since mid-December.”
“We're still testing with the OEMs!”
“I failed to get the memo,” I said as I headed back towards my computer.
“I'll send you a few copies.”
Code code code.
Test test test.
Code code code.
Test test test.
Hack hack hack.
Test test test.
Mid-February, it was patched and tested.
But because it was in production (seriously, why did no one tell me?) updates are … complicated. Many meetings need to be held to determine if we need a MOP, even more meetings to determine what to MOP, which what to MOP, when to MOP, who needs to MOP, where to MOP, and why to MOP.
One month later, last night (or rather, very early this morning) to be precise, we could install the fix.
An hour and a half in (for some reason the term “Charlie Foxtrot” comes to mind since we seem to have forgotten to discuss “how to MOP”—I'll skip the “Project: Sippy-Cup” production setup house-of-card details due to the OEM testing that is still on-going) I made the call to abort and roll back. The code I had written was mis-identifying NANP MDNs as non-NANP MDNs because some codepath somewhere else was failing to prefix the MDNs in SIP URIs with a “+1” in some cases.
I swear, why did we even bother with a specification?
Sigh.