Cisco IOS - VoIP.ms Wiki

Check out our YouTube channel to watch our simple tutorials that will help you set up most of our features.

Cisco IOS

From VoIP.ms Wiki

(Difference between revisions)
Jump to: navigation, search
[quality revision][quality revision]
(Cisco IOS)
(SIP Trunk (Username/Password Authentication))
(One intermediate revision not shown)
Line 2: Line 2:
For the configuration below to work, you must have DNS name lookups properly configured on your router.
For the configuration below to work, you must have DNS name lookups properly configured on your router.
The example below is based on IOS 15.1(3)T.  Minor adjustments may be necessary for ealier IOS revisions.
The example below is based on IOS 15.1(3)T.  Minor adjustments may be necessary for ealier IOS revisions.
-
Note that the dial plan shown below will allow you to dial anything and will pass those digits directly to voip.ms, but will take a few seconds to route the call unless you finish the number with a #.
+
This example uses newyork4.voip.ms as a primary route.
-
This example uses newyork.voip.ms as a primary route and chicago.voip.ms as a backup route.  You can use whichever hosts you prefer, so long as you keep them consistent in the configuration.
+
  configure terminal
  configure terminal
Line 9: Line 8:
  voice service voip
  voice service voip
   ip address trusted list
   ip address trusted list
-
   ipv4 74.63.41.218         !Current IP address for newyork.voip.ms at the time of this writing.
+
   ipv4 107.6.67.238         '''Current IP address for newyork4.voip.ms at the time of this writing.'''
-
  ipv4 173.208.83.50        !Current IP address for chicago.voip.ms at the time of this writing
+
   ip address trusted call-block cause not-in-cug
   ip address trusted call-block cause not-in-cug
   gcid
   gcid
Line 21: Line 19:
   transport switch udp tcp
   transport switch udp tcp
   asserted-id ppi
   asserted-id ppi
-
   localhost dns:dns.name.of.your.device
+
   localhost dns:'''dns.name.of.your.device'''
   midcall-signaling passthru
   midcall-signaling passthru
   no call service stop
   no call service stop
   
   
  sip-ua
  sip-ua
-
   credentials username your_account password 0 your_password realm voip.ms
+
   credentials username '''your_account''' password 0 '''your_password''' realm '''newyork4.voip.ms'''
-
   authentication username your_account password 0 your_password realm voip.ms
+
   authentication username '''your_account''' password 0 '''your_password''' realm '''newyork4.voip.ms'''
-
   registrar 1 dns:newyork.voip.ms auth-realm voip.ms  !Pick your preferred first server
+
   registrar 1 dns:newyork4.voip.ms auth-realm voip.ms  !'''Pick your preferred server'''
-
  registrar 2 dns:chicago.voip.ms auth-realm voip.ms  !Pick the next best here
+
-
  !You can configure up to 6 registrar servers for fault-tolerance
+
   
   
-
  !This dial peer will match all incoming calls for DIDs in the range (555)555-1000 to  (555)555-1999
+
  !'''This dial peer will match all incoming calls for an specific DID'''
  dial-peer voice 1 voip
  dial-peer voice 1 voip
-
   incoming called-number 5555551...
+
   huntstop
-
   no voice-class sip block 180
+
   destination-pattern ########## !'''Switch the # with your DID Number'''
-
   no voice-class sip block 181
+
   session protocol sipv2
-
   no voice-class sip block 183
+
   session target ipv4:192.168.X.X !'''Your Call Manager IP Address'''
-
   dtmf-relay rtp-nte
+
   dtmf-relay cisco-rtp rtp-nte
 +
  codec g711ulaw
   no vad
   no vad
-
  voice-class sip bind media source-interface GigabitEthernet0/0      !Use your internet-facing interface here
 
-
  voice-class sip bind control source-interface GigabitEthernet0/0    !Use your internet-facing interface here
 
   
   
-
  !This dial peer is for outgoing calls and matches anything.
+
  !'''This dial peer is for outgoing calls'''
-
!Finish dialing with a # to immediately route the call.
+
-
!This is the first-priority dial peer for if your first-priority registrar server is available
+
  dial-peer voice 2 voip
  dial-peer voice 2 voip
-
   destination-pattern T
+
   destination-pattern [2-9]..[2-9]......
-
  no voice-class sip block 180
+
-
  no voice-class sip block 181
+
-
  no voice-class sip block 183
+
-
  dtmf-relay rtp-nte
+
   session protocol sipv2
   session protocol sipv2
-
  session transport udp
+
   session target ipv4:107.6.67.238 !'''Your preferred server's IP address''' 
-
   session target dns:newyork.voip.ms
+
   no voice-class sip early-offer forced
-
   no vad
+
  dtmf-relay h245-alphanumeric
   codec g711ulaw
   codec g711ulaw
-
   voice-class sip bind media source-interface GigabitEthernet0/0      !Use your internet-facing interface here
+
   no vad
-
  voice-class sip bind control source-interface GigabitEthernet0/0    !Use your internet-facing interface here
+
-
  preference 1
+
   
   
-
  !This dial peer is the same as #2, but lower preference.
+
  !'''This dial peer is for outgoing calls with the 1 prefix.'''
-
!This dial peer will be used for outgoing calls in case the first server is unavailable.
+
-
!If ANY response (failure or success) is received from the first server, this dial peer will not be used.
+
  dial-peer voice 3 voip
  dial-peer voice 3 voip
-
   destination-pattern T
+
   destination-pattern 1[2-9]..[2-9]......
-
  no voice-class sip block 180
+
-
  no voice-class sip block 181
+
-
  no voice-class sip block 183
+
-
  dtmf-relay rtp-nte
+
   session protocol sipv2
   session protocol sipv2
-
  session transport udp
+
   session target ipv4:107.6.67.238 !'''Your preferred server's IP address'''
-
   session target dns:chicago.voip.ms
+
  no voice-class sip early-offer forced
 +
  dtmf-relay rtp-nte cisco-rtp sip-kpml sip-notify
 +
  codec g711ulaw
   no vad
   no vad
 +
 +
!'''Incoming Dial-Peer'''
 +
dial-peer voice 4 voip
 +
  session protocol sipv2
 +
  session target ipv4:107.6.67.238 !'''Your preferred server's IP address'''
 +
  incoming called-number .
 +
  dtmf-relay cisco-rtp rtp-nte
   codec g711ulaw
   codec g711ulaw
-
  voice-class sip bind media source-interface GigabitEthernet0/0      !Use your internet-facing interface here
+
 
-
  voice-class sip bind control source-interface GigabitEthernet0/0    !Use your internet-facing interface here
+
-
  preference 2
+
-
end
+
-
copy run start
+
<br><br><br><br><br>
<br><br><br><br><br>

Revision as of 16:50, 13 January 2015

SIP Trunk (Username/Password Authentication)

For the configuration below to work, you must have DNS name lookups properly configured on your router. The example below is based on IOS 15.1(3)T. Minor adjustments may be necessary for ealier IOS revisions. This example uses newyork4.voip.ms as a primary route.

configure terminal

voice service voip
 ip address trusted list
  ipv4 107.6.67.238         Current IP address for newyork4.voip.ms at the time of this writing.
 ip address trusted call-block cause not-in-cug
 gcid
 clid substitute name
 allow-connections sip to sip
 no supplementary-service sip moved-temporarily
 no supplementary-service sip refer
 sip
  e911
  transport switch udp tcp
  asserted-id ppi
  localhost dns:dns.name.of.your.device
  midcall-signaling passthru
  no call service stop

sip-ua
 credentials username your_account password 0 your_password realm newyork4.voip.ms
 authentication username your_account password 0 your_password realm newyork4.voip.ms
 registrar 1 dns:newyork4.voip.ms auth-realm voip.ms  !Pick your preferred server

!This dial peer will match all incoming calls for an specific DID
dial-peer voice 1 voip
 huntstop
 destination-pattern ########## !Switch the # with your DID Number
 session protocol sipv2
 session target ipv4:192.168.X.X !Your Call Manager IP Address
 dtmf-relay cisco-rtp rtp-nte
 codec g711ulaw
 no vad

!This dial peer is for outgoing calls
dial-peer voice 2 voip
 destination-pattern [2-9]..[2-9]......
 session protocol sipv2
 session target ipv4:107.6.67.238 !Your preferred server's IP address  
 no voice-class sip early-offer forced
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad

!This dial peer is for outgoing calls with the 1 prefix.
dial-peer voice 3 voip
 destination-pattern 1[2-9]..[2-9]......
 session protocol sipv2
 session target ipv4:107.6.67.238 !Your preferred server's IP address
 no voice-class sip early-offer forced
 dtmf-relay rtp-nte cisco-rtp sip-kpml sip-notify
 codec g711ulaw
 no vad
!Incoming Dial-Peer
dial-peer voice 4 voip
 session protocol sipv2
 session target ipv4:107.6.67.238 !Your preferred server's IP address
 incoming called-number .
 dtmf-relay cisco-rtp rtp-nte
 codec g711ulaw






Personal tools
Namespaces
Variants
Actions
VoIP.ms Wiki
Guides 🇨🇦
Guías 🇲🇽