push2phone - Push message according to select group of phones

Version 1
    This document was generated from CDN thread

    Created by: Xavier Diokno on 07-05-2009 09:59:17 PM
    I was able to implement push2phone with pushauthenticate. The sample program, as is, returns a list of all phones beginning with ¿SEP.¿

    However, I would like to return a list of phones according to the contents of the phone¿s description field.  In our environment, a specific naming convention is followed for the phone¿s description field for all phones in CCM.  For example, ¿jdoe-900-5600¿, where ¿jdoe¿ is the user¿s ID, "900¿ is the user¿s building location, and ¿5600¿ is the user's extension.

    I would like to send the push-message according to the user¿s building location. Based on the above example, is there a way I can modify the query to return a list of phones containing "-900-" in the phone description field? Or at least a way to return the entire phone description field so that I can tokenize the string and then list the phones according to the building number.

    Thanks in advance.

    Xavier

    Subject: RE: push2phone - Push message according to select group of phones
    Replied by: David Staudt on 08-05-2009 02:31:55 PM
    For this, I might suggest something like:
     
    - Periodically (say, every hour) use the AXL SOAP interface to query a list of phone names and descriptions using <executeSQLQuery>.  The SQL might be something like 'select name, description from device where tkclass = 1'
    - In the app, parse the description field and store the name and location fields in a database
    - When the user access the application, you can query the DB to display the available locations
    - When the notification needs to be made, query the DB for a list of all the phone device names that match your criteria
    - Use the Serviceability SOAP <SelectCmDevice> request to obtain the IP addresses and registration status of the phones.  Note you can submit up to 200 devices at a time via this request, but since individual phones can appear more than once (if they have registered to different UCM nodes) I would suggest 100 at a time
    - Proceed to Push the notification XML using the IP's.  Note the response for SelectCmDevice includes an <httpd> field to indicate if the phone has an onboard web server (needed for Push.)