Thursday 18 July 2013

Counting Length of a String Variable in CCX editior

Many time while designing a ccx script i came across a common requirement that is checking the length of the number of character in a variable .
Here i am defining a method that can be used to count the number of character in a string.

For this define two variable , One is of type string and other is of type interger

Type integer variable (intExtnNo)
Type  string variable (strExtno)

The use the below statement to count the number of character of the string variable

intExtnNo= strExtno .length()

The function strExtno .length() will calculate the number of character and return a integer value.

Tuesday 16 July 2013

Barge-in feature in CUCM

Barge in feature are used with shared line to be a part of a active call between parties.
Lets take an example.

Phone A and Phone B have one shared line , Phone C call Phone B and two are in a call the Phone A can barge into the active call and can listren to the converstaion.
Now based on the Party Entrance Tone parameter the parties alreday in call may hear a beep done when someone barge into  the call .

There are few basic parameter that need to be taken care of for configuring barge .

Turn Privacy to OFF (default is ON)

Set Built In Bridge to ON

Select Single Button Barge to either Barge or cBarge (default is OFF)

Select a Softkey Template. For Barge, a Standard User template is sufficient
 

The softkey template layout can be changed from Device Setting > Softphone layout

Add a shared-line DN, i.e   10005 for both test phones .
Now when some one is in conversation on the share line you can select the  share line to barge in






To disconnect from call just select the EndCall.

Done..........

Thursday 11 July 2013

Configuring callback feature in CUCM

Callback feature in CUCM as the name suggest is used to indicate a dialed number availability status on your IP Phone ..

Take a example Phone A call Phone B ,Suppose the call is not successful due to any reason (Busy ., no answer or use doesn't pick the call) and you want that when the user is available to take call next time will be notified to you you need to press the "Callback Softkey " on the phone and the phone will monitor the status of the Called phone Phone B .

The below are the steps to configure the Callback Feature

1. Create a Softkey template
2. Assign the Callback softkey to the template
3. Assign the Softkey template to the Phone

done..

Now to check

 From Phone A call Phone B
Press the Callback Softkey in Phone A




The below screen will appear, Press Ok to activate callback


Press Exit

Now if the Phone B will become onhook or in state of taking call below message will appear in the screen of Phone A with a Audio  beep ..

Wednesday 10 July 2013

Cisco Unified attendant console searching using multiple field

In the attendant console  client version by default you can search a contact based only on one field.
However you can easily tweak the behaviour by changing one parameter

The Parameter can be found in Option >Preference. filter search.

Click/Check the checkbox before " I want to use AND searching "

This will enable search on multiple field

Tuesday 9 July 2013

MGCP gateway Call preservation

Many times when i think about the behaviour of  H323 and MGCP one think that commonly came to my mind is the call preservation.
after doing some research in internet i tried to consolidate the behaviour of call preservation in case of MGCP.

MGCP actually do a PRI backhaul to CUCM to pass the   layer 3(q931) information to the CUCM from the gateway so What will happen if the MGCP gateway is registered to a Subscriber in a cluster and subscriber goes down.

The information that is received by the subsciber will be shared by the publisher , So if the subscriber goes down those information will be available with the Publisher.As the D channel terminate on the MGCP gateway so it will be UP

  • CUCM send AUEP (Audit Endpoint) to the gateway to find the state of each B-channel
  • CUCM send AUCX for any Endpoint for which the gateway reports a preserved call
  • Send Q.931 Status Enquiry messages to the PRI device attached to the gateway to confirm the status of any calls CUCM believes are preserved.
hence the call in this case will be preserved

Now what will happen in case of SRST fall back ????

In case of SRST fallback  as it will reset the PRI backhaul hence the Layer 2 (Q921 ) will also reset and the call will drop, so no call preservation will work in case of SRST fallback ..

Configuring Queue based hunting in Cisco unified communication manager version ( CUCM ) 9

There is a new feature added on CUCM version 9 which provide call queueing while doing hunting  .
Few days back i tried simulating it in my Lab which i want to share in this blog.

To start with you first need to create a Line group i created a test  one as below :




Then add the DN to the Line group ..

Next create a Hunt list and include the Line group in that Hunt list .


Next is to create a Hunt Pilot ..

To create  a hunt pilot by navigating to Call Routing > Route/Hunt > Hunt Pilot

Then create a Hunt Pilot and navigate to bottom section of Hunt pilot   in the queue section mention the Audio file and queue settings.


Now whenever all the line group member are busy the caller will be put into the queue and will hear the queue music ..



Tuesday 2 July 2013

UCCX Script for passing timezone as a parameter

Recently faced a requirement from one of our client to implement script for there different location which are in different timezone in in the same time to check the Working hour and weekdays.

After doing some research in the internet came across few valuable post but the one that i found will fulfill my requirement is from Johnathan in cisco support forum

In my script i have used the same one as a subflow for many of the subflow that  i have used in the main script.

That script will used predefined java classes   and fetch the data from the calender value in java

We defined a  a string value called currentTime as a string  and from the below code pass the value of the java script to currentTime and then change the current time to integer value as below .


Below script can be user to get the time and change the time zone based on the parameter of a string variable called timeZone :

You can use the set step to define the return value to currentTime (an integret variable defined in the script)

{
    //Initialize variables
    String strHourOfDay = "";
    String strMinute = "";
    String strSecond = "";
    //Set the time from local values
    java.util.Calendar callCalendar = new java.util.GregorianCalendar();
    int intHourOfDay = callCalendar.get(java.util.Calendar.HOUR_OF_DAY);
    int intMinute = callCalendar.get(java.util.Calendar.MINUTE);
    int intSecond = callCalendar.get(java.util.Calendar.SECOND);
    //Adjust to the timezone if specified
    if((timeZone != null) && (timeZone.length() >= 1))
    {
        callCalendar = new java.util.GregorianCalendar(java.util.TimeZone.getTimeZone( timeZone ));
        //Update the time for the timezone
        intHourOfDay = callCalendar.get(java.util.Calendar.HOUR_OF_DAY);
        intMinute = callCalendar.get(java.util.Calendar.MINUTE);
        intSecond = callCalendar.get(java.util.Calendar.SECOND);
    }
 
       if (intHourOfDay < 10)
                strHourOfDay  =  "0" + intHourOfDay;
    else
                strHourOfDay = "" + intHourOfDay;

    if (intMinute < 10)
                strMinute = "0" + intMinute;
    else
                strMinute = "" + intMinute;
      if (intSecond < 10)
                strSecond  =  "0" + intSecond;
    else
                strSecond = "" + intSecond;
    //STOP changing to string values

    //Return the time in a custom formatted form
    return strHourOfDay + strMinute + strSecond;
}

The current timeZone(string varaible) value  can be assigned from its preceding script using the subflow step and pass into this script.

and you can pass the time returned in the variable currentTimeint  to the preceeding call flow  and preeceding call flow can be can use this varaible to check the value with some predefined  integer variable passed as parameter in format hhmmss  and use an if statement to chenage boolean variable to change in true or flase based on working hour or not


I used it in my lab and  seesms to be good....