Cisco Support Community

session target dns and enum

Does anyone have some experience with using session target dns and session target enum in SIP environments?

Here is what I'm trying to achieve. My CUBE receives calls for hundreds of different NANP 10-digit numbers with pretty much every 3-digit area code in the US. Depending on which region (East Coast, Midwest, South, West Coast, etc.) the area code belongs to I need to send the call to a specific SIP IVR server. Configuring a dial-peer per area code is a pain! Instead, I want to try use external service, SIP server or DNS, to map area codes to specific IP.

For example, if SIP call comes to sip:4145551212@CUBE, I want CUBE to look up 414 via DNS or SIP Server and send call to sip:4145551212@

sip:8475551212@CUBE should be sent to sip:8475551212@

The user portion of the SIP URI must remain as the original phone number 4145551212 or 8475551212. My first thought is to do:

voice dial-peer 1 voip

destination-pattern ..........

session target dns:$e$

If a call comes for sip:4145551212@CUBE, then IOS will send DNS request for NAPTR record: IN NAPTR 100 10 "U" "E2U+sip" "!^.*$!sip:\1@!"

DNS response would yeild 4145551212@

The problem with this solution though is that I need to create a separate DNS record for every phone number. Is there any way to do just one DNS record per area code? I was thinking about using ENUM tables, but if I strip the 4145551212 to just 414 and do NAPTR lookup of, I can get it resolved to sip:414@, but I lose the original phone number, which I need to deliver to the SIP server.

Is my only solution to use some SIP server that can map 10 digit numbers based on area codes to specific IPs?

Am I overthinking this? If I do NAPTR DNS look up of and my NAPTR record is: IN NAPTR 100 10 "U" "E2U+sip" "!^(.*)$!sip:\1@!" .

would it match this record and return sip:4145551212@ ?

UPDATE: Yeah, looks like if I were to create a separate zone per area code, for example, I could then do record * that translates to !^(.*)$!sip:\1@! . My only issue now is to get BIND working with regexp replacement "\1". ISC BIND 9.9 doesn't seem to support it.

Everyone's tags (3)
CreatePlease to create content