remote-lab.net learn by doing

Free US local number pointed to your Cisco VoIP gateway

In today’s post I will show how to get a free US DID - a local number and point it to your VoIP network. For this setup I will use an analog phone plugged into a FXS port of a Cisco 1751-V router. The use of a voice router isn’t necessary, you may also use an ATA - Analog Telephone Adapter.


So now let’s get to the steps involved in having this done:

  • Go to http://www.ipkall.com/ , sign up and you will receive your DID by email. After receiving the email you should login and change the SIP Phone Number to whatever number you’d like to send to your SIP server. Also the SIP Proxy must match your server’s IP address used for receiving the calls, in my case this will be the Cisco 1751 voice gateway.

  • Configure the voice router: In order to have the calls completed you must tell the router what to do when receiving a calls:
  • Create an inbound voip dial-peer:
dial-peer voice 1 voip
 destination-pattern .T
 session protocol sipv2
 codec g711ulaw
  • Create a pots dial-peer which routes the calls made to 2064248860 - the DID I received from IPKall - on the analog voice port 2/0:
dial-peer voice 2 pots
 destination-pattern 2064248860
 port 2/0
  • Forward the signaling and media ports to the voice gateway: I am using NAT for my home network so I will have to set the 871 router to forward all the packets coming on the SIP signaling port UDP 5060 and also the RTP media ports - which is the UDP range between 8000 and 32000 to the voice gateway.
  • Create an access list which matches the SIP signaling and the RTP media ports:
ip access-list extended SIP-RTP
 permit udp any any eq 5060
 permit udp any any range 8000 30000
  • Create a route map policy which uses the access list created earlier:
route-map SIP-RTP permit 10
 match ip address SIP-RTP
  • Create a static inside NAT entry which matches the ports and translates the private address of the voice gateway to the public address
ip nat inside source static 10.0.0.10 86.106.164.150 route-map SIP-RTP extendable

And that should do it, I now have a local US number ringing back to my home phone in Bucharest without any charges :)