Showing posts with label Call manager. Show all posts
Showing posts with label Call manager. Show all posts

Thursday, December 11, 2014

SIP Normalization Script for removing the Diversion Header

When we forward a call from one  phone to another or from one hunt group to a phone, the Diversion header gets added to the SIP messages.
Some of the SIP gateways or Voice mail systems doesnt have the ability pick the required Diversion header.  For example look at the below message, we are calling the operator(1408) and the operator forwards the calls to Vishnu on 1100  so the Diversion headers are added to it.
When the call is forwarded to the Voice mail system. The server looks at the latest Diversion that is 1408 and provides the voice mail of Operator, instead of Vishnu.
If there is no Voice Mail box exist for 1408 then the System will say "The person you have tried does not have a valid Voice mail box configured on this system"  error message.

INVITE sip:9997@172.17.8.6:5060 SIP/2.0
Via: SIP/2.0/TCP 172.16.8.4:5060;branch=
From: <sip:1112@172.16.8.4>;tag=470449ec-8a27-f7e4c9c946e7-30683727
To: <sip:9997@172.17.8.6>
Date: Thu, 11 Dec 2014 13:41:36 GMT
Call-ID: 6bcc2d80-48919f10-704b6-40810ac@172.16.8.4
Supported: timer,resource-priority,replaces
Min-SE:  1800
User-Agent: Cisco-CUCM10.5
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence, kpml
Supported: X-cisco-srtp-fallback
Supported: Geolocation
Call-Info: <sip:172.16.8.4:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=VIDEO_UNSPECIFIED
Cisco-Guid: 1808543104-0000065536-0000008029-0067637420
Session-Expires:  1800
Diversion: "Vishnu" <sip:1100@172.16.8.4>;reason=no-answer;privacy=off;screen=yes
Diversion: "Operator" <sip:1408@172.16.8.4>;reason=no-answer;privacy=off;screen=yes

So We need to need to configure the Voice mail server to pick the other Diversion .I.e 1100 instead of 1408
Cisco Unity connection or Microsoft Unified messaging has the option of selecting the Diversion header. But Microsoft Office 365 or any other voice mail servers doesnt have this option.

We need to remove the Extra Diversion from the SIP messages while sending out of the SIP trunk to the Voice mail server.
This can be acheived by using the SIP Normalization Script in the CUCM.
We need to create a Script in the CUCM server and assign it in the SIP trunk.
Step1: Login to Call manager.
Step2: Click Device --> Device Settings --> SIP Normalization Script
             Click Add New and add the below config and save the script  

Step 3: Then go to the  SIP truck.
              Click Device ---> Trunk and select the SIP trunk which goes to Voice mail server.
              Go to Normalization script section and select the UseLastDiversion script
              Save the Config.
              Reset the trunk.
After applying the script the script will remove the Lastbefore Diversion
So the output of SIP Message will look like below.

INVITE sip:9997@172.17.8.6:5060 SIP/2.0
Via: SIP/2.0/TCP 172.16.8.4:5060;branch=
From: <sip:1112@172.16.8.4>;tag=470449ec-8a27-f7e4c9c946e7-30683727
To: <sip:9997@172.17.8.6>
Date: Thu, 11 Dec 2014 13:41:36 GMT
Call-ID: 6bcc2d80-48919f10-704b6-40810ac@172.16.8.4
Supported: timer,resource-priority,replaces
Min-SE:  1800
User-Agent: Cisco-CUCM10.5
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence, kpml
Supported: X-cisco-srtp-fallback
Supported: Geolocation
Call-Info: <sip:172.16.8.4:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=VIDEO_UNSPECIFIED
Cisco-Guid: 1808543104-0000065536-0000008029-0067637420
Session-Expires:  1800
Diversion: "Vishnu" <sip:1100@172.16.8.4>;reason=no-answer;privacy=off;screen=yes


P.S: Use http://ipsubnetcalculator.net/  for calculating IP subnet mask Online





Tuesday, November 4, 2014

How to Migrate/Move Cisco VPN Phones to Different CUCM and ASA

This document explains the procedure to migrate a VPN phone to a different call manager and ASA without taking the phone to office.

As per the Cisco documents we cannot make  VPN configuration changes to the phone when the phone is outside of corporate network. But sometimes the User might be there in a remote location  and  cannot be connected to corporate network.
This document will help you to solve those problem. This is a tested procedure.

Considering that there is a New ASA and New call manager is installed with different IP addresses and the phone needs to connected to these new devices.

Step 1: Export the Certificate from the Old ASA and Import it to the New ASA.
        Use the below command on the old ASA. Once entered, the ASA will output a key. 
                    crypto ca export <trust-point-name> pkcs12 <passphrase>
        Copy the output and save it in a file. Save the file with the extension as .pki
        Please copy the BEGIN PKCS12  and END PKCS12 also to the file.
        If you dont remember the passphrase of the old ASA. Then you can use the below command.
                crypto ca export <trust-point-name> identity-certificate
        The problem with the identity-certificate command is that this will not export the rsa keys. so you have to figure out a way to export the rsa keys also.

Step 2 :Import the CA Crtificate to new ASA.
         Enter the below command on the New ASA and this will ask you to enter the certificate. Paste the output from the old ASA to this New ASA (Paste the BEGIN PKCS12 and END PKCS12 line also.
                   crypto ca import <trust-point-name> pkcs12 <passphrase>

Step 3: Import the CA  Certificate to New CUCM.
        From Cisco Unified Communications Operating System Administration, choose Security > Certificate Management.
        Click Upload Certificate and from the certificate name pull-down-menu, choosr Phone-VPN-trust
        Click browse to choose the file you want to upload .
        The remaining configuration (Phone and Cucm) can be copy pasted from old devices. 
Please refer Cisco for more details

Step 4: Configure the VPN Phone Username/ Passowd in the New ASA
        Make sure the username and password matches the old ASA config.
                username vishnu password hRoasdasQoPWF/3 encrypted

Step 5 : Configure the Phones  in the New CUCM
        Configure the VPN Phones in the New CUCM and make sure the ssl vpn profile is assigned to it and it matches the old CUCM

Step 6: Change the TFTF Server in the VPN Phone Point to New CUCM
        Contact the Remote user and ask him to change the TFTP Server in the VPN Phone pointing to the New CUCM
  • Click on Setting --> Network Configuration --> IPv4 Configuration --> TFTP Server 1 
    • type **# to unblock the access to edit the setting
    • click edit and type <New CUCM IP> and click Validate
  • Click on Setting --> Network Configuration --> IPv4 Configuration --> TFTP Server 2
    • type **# to unblock the access to edit the setting
    • click edit and type <Nwe CUMP IP> and click Validate
         After Changing the Configuration VPN Disconnects and Connects again (No Password Asked). Wait for the Extension Number to Show up.

Step 7 : Delete the ITL File from the VPN Phone
        Next delete the ITL file.
  • Click on Settings --> Security Configuration --> Trust list --> ITL File
    • type **# to unblock the access to edit the setting
    • click more --> erase
        Phone starts upgrading by taking the config from New CUCM. It takes minimum 2 hours to complete the UPgrade. This Upgrade time is totally detpends on the distance between the CUCM and VPN Phone(latency)
       Once the upgrade is done.You may need to Enable the VPN on the Phone again.
       At this point it will upgrade all over again but takes only 10 Minutes.

Step 8: Connects to the New ASA
       Once upgraded it pops up for the Username/password
       Enter the Username/Password
       Now it connects to the New ASA and updates its Locale and other files and disconnects from the VPN
       Again it pops up for the Username/Password. Enter the username/Password and wait for 10 Min. The phone connects to  US call manager.

Step 9: Migration Completed.


Configuring SSL/Anyconnect VPN phone in ASA and CUCM

Below are the Requirements for Configuring a VPN phone with CUCM
  • ASA runs 8.2 or higher IOS version
  • Anyconnect SSL VPN license 
Step1 : Create  Certificate on ASA and Upload it in CUCM

#crypto ca certificate chain localtrust

This will give you an output of the certificate, copy paste the output to an notepad file and save it as *.pem file
Upload this file to CUCM.

Step2 : ASA Configuration

# crypto ca trustpoint localtrust
# enrollment self
# fqdn sslvpn.test.com
# subject-name CN=sslvpn.test.com
# keypair sslvpnkeypair
# crl configure

#ip local pool vpnpool2 172.17.24.10-172.17.24.254 mask 255.255.255.0

#ssl trust-point localtrust outside
#webvpn
 enable outside
 no anyconnect-essentials
 svc image disk0:/anyconnect-win-3.1.00495-k9.pkg 1
 svc enable
 tunnel-group-list enable

group-policy test-ssl-group internal
group-policy test-ssl-group attributes
 dns-server value 172.17.1.15
 vpn-tunnel-protocol svc
 default-domain value corp.test.com
 address-pools value vpnpool2

#tunnel-group test-ssl-group type remote-access
tunnel-group test-ssl-group general-attributes
 default-group-policy test-ssl-group
tunnel-group test-ssl-group webvpn-attributes
 group-alias SSLVPNClient enable
 group-url https://1.1.1.1/ enable


username vishnu password vishnu
username vishnu attributes
 service-type remote-access

Step3 : CUCM Configuration

Work in progress!!!!


CTI Route Point in VOIP

What is CTI route point and CTI port?

         CTI ports are like soft phones with extensions and CTI route points are like an Hunt group.
Normally this is used in IVR system. When the incoming call comes first it gets forwarded to the CTI route point which has an extension configured. That extension provides the IVR option to the user.
Based on the USer input the calls are forwarded to the CTI port which has the actual extension configured.

Wednesday, February 12, 2014

Troubleshooting Voice Gateway incoming issue when using ISDN


If the incoming call is getting disconnected with the message "The call cannot be connected" then mostly it could be because of the IVR down issue.
To troubleshoot the same first enable the debug "debug isdn q931" on the voice gateway. See if you are seeing any cause for the call disconnection.


045951: Feb  4 02:38:28.074: ISDN Se0/0/0:23 Q931: SETUP pd = 8  callref = 0x1943
Bearer Capability i = 0x8090A2
Standard = CCITT
Transfer Capability = Speech 
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA98381
Exclusive, Channel 1
Progress Ind i = 0x8283 - Origination address is non-ISDN 
Calling Party Number i = 0x1180, '919902384363'
Plan:ISDN, Type:International
Called Party Number i = 0xA1, '--------------'
Plan:ISDN, Type:National
045953: Feb  4 02:38:28.074: ISDN Se0/0/0:23 Q931: Received SETUP  callref = 0x9943 callID = 0x221B switch = primary-ni interface = User
045954: Feb  4 02:38:28.078: ISDN Se0/0/0:23 SERROR: process_pri_simple: NO name in GTD
 --More--         045955: Feb  4 02:38:28.082: ISDN Se0/0/0:23 Q921: User TX -> INFO sapi=0 tei=0, ns=29 nr=1
045956: Feb  4 02:38:28.082: ISDN Se0/0/0:23 Q931: CALL_PROC pd = 8  callref = 0x9943
Channel ID i = 0xA98381
Exclusive, Channel 1
045959: Feb  4 02:38:28.322: ISDN Se0/0/0:23 Q931: DISCONNECT pd = 8  callref = 0x9943
Cause i = 0x8081 - Unallocated/unassigned number


The above casue indicates that there is some issue with called party number.

Check where the incoing call lands:

Check the incoming calls translations configuration on done properly or not.
The easiest way to do this is enable "debug dialpeer" on the vgw and see if it through any errors.
or check the voice-port configuration for incoming call translation rule name using the "show run | sec voice-port <port number>"

voice-port 0/0/0:23
 translation-profile incoming pstn-in
 timeouts call-disconnect 5


Then check the translation-profile and respective translation rule for the pstn-in.
This will show you the extension number where the call lands after the translation. This may be your IVR system extension number.
check the status of your IVR system.


P.S: Use http://ipsubnetcalculator.net/  for calculating IP subnet mask Online