The following Cisco configuration sheet will enable you do the following:
1. Register Cisco user agent with the SIPTRUNK.com trunking service
2. Place an outbound call and be authenticated
3. Receive inbound calls
Note: This config is not a complete solution, it’s just the key parts for the above.
KEY POINTS:
1) You must modify the INVITE message to re-write the SIP header to use username@gw1.siptrunk.com or username@gw2.siptrunk.com (see below config) in order to use digest authentication.
2) SIPTRUNK.com trunking releases the media to the nearest carrier media gateway to you for optimal performance. Therefore, there is no way of knowing what IP address the RTP will be coming from. Its best to allow all UDP for testing, then if absolutely necessary, look to lock down the UDP range where the media is coming from. (this can be 1024-65535)
Sample SIPTRUNK.com Cisco IOS Sample Config:
(REPEAT FOR GW2.SIPTRUNK.COM BACKUP SERVER)
-----------------------------------------------------------------
!Allow SIP to the router from SIPTRUNK.com
voice service voip
ip address trusted list
ipv4 63.247.69.226
ipv4 205.251.137.154
!Configure SIP profile to modify the INVITE message.
!1. Replace the "username" with actual username
!2. Replace the "ip-address" with the IP address which shouldn't be there
!This will then ensure that all INVITE headers contain the username@gw1.siptrunk.com which is the second field (the replace field)
voice class sip-profiles 1
request INVITE sip-header From modify "<sip:username@ip-address>" "<sip:username@gw1.siptrunk.com>"
!Create translation rule to replace source number / extension number with SIPTRUNK.com username
voice translation-rule 5
rule 1 /^.*/ /username/
voice translation-profile SIPTRUNK.COM-Outgoing
translate calling 5
!Configure SIP user agent
sip-ua
credentials username username password your-password realm gw1.siptrunk.com
retry invite 2
retry register 10
timers connect 100
registrar 1 dns:gw1.siptrunk.com expires 360 refresh-ratio 20 auth-realm gw1.siptrunk.com
!Create dial-peer for outgoing calls
dial-peer voice 2 voip
description **Outgoing Calls to SIPTRUNK.COM SIP Trunk**
translation-profile outgoing SIPTRUNK.COM-Outgoing
destination-pattern 9.T
session protocol sipv2
session target dns:gw1.siptrunk.com
codec g711ulaw
voice-class sip dtmf-relay force rtp-nte
voice-class sip profiles 1
dtmf-relay rtp-nte
no vad
authentication username username password your-password realm gw1.siptrunk.com
Comments