More difficult that you could imagine.
As initially designed, “Project: Sippy-Cup [1]” was only to be used in North America. It was also designed such that the MDN (Mobile Device Number)s (aka “phone number”—the telephony industry has its fair share of TLA (Three Letter Acronym)s) would be found in a particular format—a TEL URI (Uniform Resource Indicator) [2]. And because we only support numbers in North America, they follow the NANP (North American Numbering Plan) (this is an example of an ETLA (Extended Three Letter Acronym)) 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 (Session Initiation Protocol) URIs [3]. 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 OEM (Original Equipment Manufacturer)s!”
“Did you not get the memo [4]?”
“I failed to get the memo [5],” 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 (Maintenance Operation Plan), 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.
[2] https://www.ietf.org/rfc/rfc3966.txt
[3] http://www.3cx.com/pbx/sip-uri/
[4] https://www.youtube.com/watch?v=Fy3rjQGc6lA
[5] http://www.urbandictionary.com/define.php?term=didn%27t+get+the+memo