[VoiceOps] Linefeed in CNAM data?

Eric Wieling EWieling at nyigc.com
Thu Mar 20 12:34:13 EDT 2014

Verizon POTS returns "SKYPE CALLER"

Doesn't look like either one has a line feed in it, but that doesn't mean all that much.

-----Original Message-----
From: VoiceOps [mailto:voiceops-bounces at voiceops.org] On Behalf Of Nathan Anderson
Sent: Wednesday, March 19, 2014 9:12 PM
To: 'voiceops at voiceops.org'
Subject: [VoiceOps] Linefeed in CNAM data?

Our CNAM lookup provider is sending us name data for one particular number that includes a linefeed in it.  It's possible that it's their mistake and that this particular number's CNAM data doesn't actually have this character in it, but it raises the question: is this a legal character?

The number in question is a SkypeOut gateway: 661-748-0240 -- I'd be curious to know what other people are seeing on a CNAM lookup for this.  What we are getting is "SKYPE USER\nSKYPE USER".  And, actually, now that I think about it, this can't possibly be the actual value since I believe CNAM is limited to 15 characters.  So I'll talk to our provider about this.  (This is the only number that we have seen anything like this with.)

BTW, it turns out that when Asterisk sends an INVITE and the CALLERID(name) value has been stuffed with a string that contains a newline, it decides to send this in the headers:

SKYPE USER" <sip:6617480240 at>

...so it includes the linefeed (ASCII 10) in the string, but tries to escape it with a '\' (which is not entirely unprecedented).  An Asterisk box on the receiving end of that INVITE, however, will completely ignore the INVITE...it won't log an error and doesn't bother dignifying it with a response, probably because it sees that as two separate lines (it doesn't concatenate two lines that are separated by a '\') and the second line all by itself looks like garbage/wouldn't make sense to a SIP dialog parser.

Nathan Anderson
First Step Internet, LLC
nathana at fsr.com
VoiceOps mailing list
VoiceOps at voiceops.org

More information about the VoiceOps mailing list