Personal Address Book and Call Forwarding

Version 1
    This document was generated from CDN thread

    Created by: Gary Springer on 19-06-2009 01:23:10 AM
    I just started working with the Cisco AXL services so please excuse my ignorance.  I am developing using VS2008 and C#.
     
    I have been tasked with creating a site with similar functionality that the CCMUSER page provides, call forwarding, personal address book etc.
     
    I am able to get most of my call forwarding done without a problem, however one snag I am running into is, when I set a call forwarding option to voicemail such as...
     
    updateReq.callForwardAll.forwardToVoiceMail = true;
     
    This works fine and the phone reflects the new forwarding.  However a subsequent call of:
     
    updateReq.callForwardAll.forwardToVoiceMail = false;
     
    does not terminate the call forwarding.  Is there additional parameters I need to set that I am missing to disable the forwarding to voicemail?  I do not have the same issue when forwarding to a new destination and turning that off.
     
    Now on to my second question....
     
    I need to recreate the basic functionality of the personal address book in CCMUSER but I am not seeing anything available in the AXL API to manage this.  Am I totally missing something or can someone point me in the right direction?
     
    Any help is appreciated and hopefully I wasn't too verbose.
     
    Thanks!
     
    Gary
     

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Axel Schemberg on 19-06-2009 08:33:03 AM
    Hi Gary,
     
    we are working on the same task ... may be this is caused by the "user experience" of ccmuser.
    I can't help you with the first problem, because we don't use generated classes (driven from wsdl).
     
    As far as I know the personal address book is part of LDAP. So if you really want to use it, you have to research in that direction.
     
    Kind regards
     
    Axel

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Gary Springer on 19-06-2009 05:34:53 PM
    Axel,
     
    Thanks for the reply.  In regards to the first question, when you say you don't use the generated proxy class from the WSDL, what method are you utilizing to talk to the AXL services, are you manually posting SOAP requests?
     
    Thanks for the info on LDAP, I'll do some research.
     
    Thanks!
     
    Gary
     
     
    Hi Gary,
     
    we are working on the same task ... may be this is caused by the "user experience" of ccmuser.
    I can't help you with the first problem, because we don't use generated classes (driven from wsdl).
     
    As far as I know the personal address book is part of LDAP. So if you really want to use it, you have to research in that direction.
     
    Kind regards
     
    Axel


    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Gary Springer on 22-06-2009 05:16:38 PM
    Could still use some direction on either of these questions if anyone has any input...thanks!
     
     

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Stephan Steiner on 24-06-2009 05:06:07 PM
    Which CCM Version are we talking about? CCM4 is indeed LDAP based, and the IP Phone Services SDK has two sample apps (one ASP (javascript) based, the other java based) which query the LDAP directory - it is like any other LDAP directory. You can use the DC Directory Admin Tool on the CCM to browse the directory to have a look around.
     
    With CCM Versions higher than 4, the personal directory is part of the SQL database.. you can access it using the executeSqlQuery AXL command - refer to the data dictionary for the appropriate CCM version that you can find here for the table structure.
     
    To jumpstart your development, here's an SQL query which returns the personal directory entry with phone number = number from the personal directory of the user with userid = user
     
    String query = "SELECT addr.firstname, addr.lastname, tp.name FROM enduser e INNER JOIN personalphonebook p ON p.fkenduser = e.pkid AND e.userid = '" + user
                    + "' INNER JOIN personaladdressbook addr ON addr.pkid = p.fkpersonaladdressbook AND p.phonenumber = '" + number
                    + "' INNER JOIN typepersonalphonenumber tp ON tp.enum = p.tkpersonalphonenumber";
     
     
    As for the other question.. there are two approaches I'd use if I were in your situation: packet sniffing in case the connection is not encrypted, and AXL traces in case the connection is encrypted. CCM logs all messages you sent it and it sends you back per default.. so just download those from the CCM and have a look.. do you really send what you think you're sending (you know the WSDL file is hand edited and all so I wouldn't trust it 100%). If you have verified that you're indeed sending what you think you're sending, have a look at the CCM after the update command.. has the line configuration changed or not? I could go on but a lot depends on your CCM version here.. 4, 5, 6 they all behave differently (7 should be similar to 7 as far as I can tell though I don't have much experience with that version yet).

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Tim Dransfield on 26-06-2009 04:09:20 PM
    Ok so this almost works.. I can set the values to true but it wont revert to false..
     
    Please Help
     
                 AXLAPIService axl = new AXLAPIService("10.0.0.0", "xxxxxxx", "xxxxx");
                listBox1.Items.Clear();
                ListRoutePlanByTypeReq lrreq = new ListRoutePlanByTypeReq();
                lrreq.usage = "Device";
                ListRoutePlanByTypeRes lrres = axl.listRoutePlanByType(lrreq);
                foreach (ListRoutePlanByTypeResRoutePlan plan in lrres.@return)
                {
                    if (plan.directoryNumber == "6483")
                    {
                        /* --- GET LINE INFO */
                        GetLineReq glr = new GetLineReq();
                        glr.uuid = plan.uuid;
                        GetLineRes glresp = axl.getLine(glr);
                        XNPDirectoryNumber dir = glresp.@return.directoryNumber;
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardBusy.forwardToVoiceMail: " + dir.callForwardBusy.forwardToVoiceMail.ToString());
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardBusyInt.forwardToVoiceMail: " + dir.callForwardBusyInt.forwardToVoiceMail.ToString());
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardNoAnswer.forwardToVoiceMail: " + dir.callForwardNoAnswer.forwardToVoiceMail.ToString());
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardNoAnswerInt.forwardToVoiceMail: " + dir.callForwardNoAnswerInt.forwardToVoiceMail.ToString());
                        /* UPDATE LINE INFO */
                        UpdateLineReq lr = new UpdateLineReq();
                        lr.uuid = plan.uuid;
                        lr.callForwardBusy = dir.callForwardBusy;
                        lr.callForwardBusy.forwardToVoiceMail = (dir.callForwardBusy.forwardToVoiceMail) ? false : true;
                        lr.callForwardBusyInt = dir.callForwardBusy;
                        lr.callForwardBusyInt.forwardToVoiceMail = (dir.callForwardBusyInt.forwardToVoiceMail) ? false : true;
                        lr.callForwardNoAnswer = dir.callForwardNoAnswer;
                        lr.callForwardNoAnswer.forwardToVoiceMail = (dir.callForwardNoAnswer.forwardToVoiceMail) ? false : true;
                        lr.callForwardNoAnswerInt = dir.callForwardNoAnswerInt;
                        lr.callForwardNoAnswerInt.forwardToVoiceMail = (dir.callForwardNoAnswerInt.forwardToVoiceMail) ? false : true;

                        StandardResponse sr = axl.updateLine(lr);
                        lr = null;
                        listBox1.Items.Add("-----------------UPDATE------------------");
                        /* --- GET LINE INFO 2 */
                        GetLineReq glr2 = new GetLineReq();
                        glr2.uuid = plan.uuid;
                        GetLineRes glresp2 = axl.getLine(glr2);
                        XNPDirectoryNumber dir2 = glresp2.@return.directoryNumber;
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardBusy.forwardToVoiceMail: " + dir2.callForwardBusy.forwardToVoiceMail.ToString());
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardBusyInt.forwardToVoiceMail: " + dir2.callForwardBusyInt.forwardToVoiceMail.ToString());
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardNoAnswer.forwardToVoiceMail: " + dir2.callForwardNoAnswer.forwardToVoiceMail.ToString());
                        listBox1.Items.Add(dir.description.ToString() + " - callForwardNoAnswerInt.forwardToVoiceMail: " + dir2.callForwardNoAnswerInt.forwardToVoiceMail.ToString());
                    }
                }

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Gary Springer on 26-06-2009 11:28:56 PM
    Stephen,
     
    Thank you for the detailed reply.  We are using CCM 7.0.  Your information for the Personal Address Book was extremely helpful and I have most of my functionality for this imeplemented now.
     
    However, even after looking at the request/response for the call forwarding, I am not seeing a reason as to why I can enable call forwarding to voicemail but cannot turn it off.
     
    If you, or anyone else, has any addtional thoughts on this issue please let me know.
     
    Thanks!
     
    Gary
     

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Tim Dransfield on 29-06-2009 09:28:22 AM
    PROBLEM SOLVED.

    forwardToVoiceMail set to false.

    This is how i fixed the problem for my situation.

    After looking at the request xml using Fiddler I found that the request to set the forwardToVoiceMail to false didn't contain the actual expected line "<forwardToVoiceMail>true</forwardToVoiceMail>".

    Therefore after some digging around in the  AXMLAPIService.cs that i created with the SQLToolKit I found the code below and commented out the line that sets the default value of the request to false hence removing the request.

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    // [System.ComponentModel.DefaultValueAttribute(false)]
    public bool forwardToVoiceMail {
        get {
              return this.forwardToVoiceMailField;
         }
         set {
             this.forwardToVoiceMailField = value;
    }
     
    I hope this helps
     
    Tim

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: David Staudt on 21-10-2009 01:54:22 AM
    There are currently no established 'thick' AXL requests for personal address book management.  Certainly for bulk operations, SQL would be a good idea anyway, as you should be able to submit multiple records  via a single SQL request.

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: DARREN KITTERINGHAM on 21-10-2009 12:58:04 AM
    Hi there,
    I have a follow up question on the response below. What is the best technique to programatically add personal address book entries for a large amount of users? I was unable to locate an appropriate API.
     
    We
    could potentially use executeSQLQuery / executeSQLUpdate AXL commands
    with some hand-crafted SQL, but this would be a messy solution.
     
    What we are really looking for is an API call that does this for us....
     
    Looking forward to your feeback
    PS Using CCM7
    Thanks,
    Darren
     
    Which CCM Version are we talking about? CCM4 is indeed LDAP based, and the IP Phone Services SDK has two sample apps (one ASP (javascript) based, the other java based) which query the LDAP directory - it is like any other LDAP directory. You can use the DC Directory Admin Tool on the CCM to browse the directory to have a look around.
     
    With CCM Versions higher than 4, the personal directory is part of the SQL database.. you can access it using the executeSqlQuery AXL command - refer to the data dictionary for the appropriate CCM version that you can find here for the table structure.
     
    To jumpstart your development, here's an SQL query which returns the personal directory entry with phone number = number from the personal directory of the user with userid = user
     
    String query = "SELECT addr.firstname, addr.lastname, tp.name FROM enduser e INNER JOIN personalphonebook p ON p.fkenduser = e.pkid AND e.userid = '" + user
                    + "' INNER JOIN personaladdressbook addr ON addr.pkid = p.fkpersonaladdressbook AND p.phonenumber = '" + number
                    + "' INNER JOIN typepersonalphonenumber tp ON tp.enum = p.tkpersonalphonenumber";
     
     
    As for the other question.. there are two approaches I'd use if I were in your situation: packet sniffing in case the connection is not encrypted, and AXL traces in case the connection is encrypted. CCM logs all messages you sent it and it sends you back per default.. so just download those from the CCM and have a look.. do you really send what you think you're sending (you know the WSDL file is hand edited and all so I wouldn't trust it 100%). If you have verified that you're indeed sending what you think you're sending, have a look at the CCM after the update command.. has the line configuration changed or not? I could go on but a lot depends on your CCM version here.. 4, 5, 6 they all behave differently (7 should be similar to 7 as far as I can tell though I don't have much experience with that version yet).


    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: Benno Tool on 29-03-2010 12:12:09 PM
    I succeeded with getting personal address book configuration out of the Callmanager environment.
    Now I want to go a step further and insert personal address book information from one Callmanager (all users) environment to another. Somebody can give me some help with this since there are alot of releationships in the database.
     
    Thnx in advance

    Subject: RE: Personal Address Book and Call Forwarding
    Replied by: David Staudt on 29-03-2010 04:00:15 PM
    As you say, there is quite a bit to such a solution...starting at the top, what is your first question?