[cisco-voip] Implement UCCX Geographic Inbound Call Routing using callers area code

Anthony Holloway avholloway+cisco-voip at gmail.com
Tue Oct 1 11:14:33 EDT 2013


Hi Dennis,

I would agree with you on this.  If Premium is already in play, then DB
integration is your best bet.  However, moving to Premium just for this one
task would be very expensive.  So, it just depends on what's already in
play.

Great recommendation.


On Tue, Oct 1, 2013 at 9:21 AM, Heim, Dennis <Dennis.Heim at wwt.com> wrote:

> If you have a large amount of area code, and have premium, database lookup
> is probably more efficient.****
>
> ** **
>
> *Dennis Heim | Solution Architect (Collaboration)*****
>
> World Wide Technology, Inc. | 314-212-1814****
>
> ** **
>
> *PS Engineering: ** Innovate & Ignite.*****
>
> * *
>
> ** **
>
> *From:* cisco-voip [mailto:cisco-voip-bounces at puck.nether.net] *On Behalf
> Of *Anthony Holloway
> *Sent:* Monday, September 30, 2013 10:00 PM
> *To:* Chase Mergenthal
> *Cc:* cisco-voip at puck.nether.net
> *Subject:* Re: [cisco-voip] Implement UCCX Geographic Inbound Call
> Routing using callers area code****
>
> ** **
>
> Chase,****
>
> ** **
>
> That XPATH can be condense like so:****
>
> ** **
>
> "//[@number='" + ani + "']/csq"****
>
> ** **
>
> You could also condense the XML to:****
>
> ** **
>
> <?xml version="1.0" encoding="utf-8"?>****
>
> <triggers>****
>
> <trigger number="17631112222">CSQ</trigger>****
>
> </triggers>****
>
> ** **
>
> And then your XPATH is simply:****
>
> ** **
>
> "//[@number='" + ani + "']"****
>
> ** **
>
> However, Grace is looking for a solution based on caller's area code,
> which would involve at least one more step: pulling the area code out of
> the calling number.  So Grace, this is how you pull an area code from the
> calling number.****
>
> ** **
>
> ani = Get Call Contact Info (Calling Number)****
>
> Set area_code = ani.substring(0, 3)****
>
> ** **
>
> And now at this point, one could use the XML file approach as Chase has
> pointed out.****
>
> ** **
>
> <?xml version="1.0" encoding="utf-8"?>****
>
> <areas>****
>
> <area code="612">Midwest_CSQ</area>****
>
> <area code="305">East_CSQ</area>****
>
> </areas>****
>
> ** **
>
> Of course that can be a large file considering there are almost 300 area
> codes in use today, and that number is growing towards its current maximum
> potential of 800 numbers.  In an effort to shrink that document, you could
> compress the data yourself like this:****
>
> ** **
>
> <?xml version="1.0" encoding="utf-8"?>****
>
> <a><b c="612">0</b><b c="305">1</b></a>****
>
> ** **
>
> We're just using single characters to represent the tag names, and numeric
> values for the CSQ names.  You will need a String Array to convert the
> digit value of the CSQ into the actual CSQ like this:****
>
> ** **
>
> Variable****
>
> String[] csq_map = new String[] {"Midwest_CSQ", "East_CSQ"}****
>
> ** **
>
> Script****
>
> result = Get XML Document Data(xml_doc, "//[@c='" + ani + "']")****
>
> Set csq = csq_map[Integer.parseInt(result)]****
>
> ** **
>
> If you haven't worked with String Arrays yet, just know that each element
> in the array has an associated value, or index, and it starts with 0 on the
> left, and goes up incrementally from there to the right.  So in the above
> example, Midwest_CSQ is 0 and East_CSQ is 1.****
>
> ** **
>
> At this point, your csq variable holds the name of the CSQ, and you saved
> yourself some amount of JVM heap usage.  The reason this saves space is
> because if you have 150 area codes for which CSQ NorthCentralSupport_CSQ (a
> 23 character name) serves, then without the trick you need at least 150 *
> length of CSQ Name, which is 3.4KB.  With the trick I used, you get the
> text alone down to 150Bytes (the character "0" used 150 times).  That's a
> 96% decrease.  Now, the String Array doesn't come for free, and there is a
> formula to figure it out, but I'd wager you're fine doing without the
> compression at all, therefore compression is just icing on the cake.  Just
> use RTMT perfmon counters to watch your JVM heap usage.****
>
> ** **
>
> You could alternatively use a java switch block and keep all dependencies
> right inside the script, but I don't know if the XML functionality is a
> requirement for you or not.****
>
> ** **
>
> Example:****
>
> ** **
>
> Do {****
>
> switch (area_code) {****
>
> case "612": case "763": case "651":****
>
> csq = "Midwest_CSQ";****
>
> break;****
>
> case "305": case "786":****
>
> csq = "East_CSQ";****
>
> break;****
>
> default:****
>
> csq = "Default_CSQ";****
>
> }****
>
> }****
>
> ** **
>
> This has the advantage of not having to assign the csq variable for each
> area code in the US, rather you do it for blocks of csq's rather easily, as
> I have demonstrated.  If you needed this to be available to a few other
> scripts, consider making it a sub flow which takes 1 input mapping of the
> ani, and provides 1 output mapping of the mapped csq name like so:****
>
> ** **
>
> area_code_lookup.aef****
>
> Variables****
>
> String csq = ""****
>
> String ani = ""****
>
> ** **
>
> Script****
>
> Start****
>
> On Exception (WFExecutionException) Goto End of Script****
>
> Do {****
>
> switch (ani.substring(0, 3)) {****
>
> case "612": case "763": case "651":****
>
> csq = "Midwest_CSQ":****
>
> break;****
>
> case "305": case "786":****
>
> csq = "East_CSQ";****
>
> break; ****
>
> }****
>
> }****
>
> End of Script:****
>
> End****
>
> ** **
>
> main_aa.aef****
>
> Variables****
>
> String csq = ""****
>
> String ani = ""****
>
> ** **
>
> Script****
>
> Start****
>
> Accept(--Triggering Contact--)****
>
> ani = Get Call Contact Info (Calling Number)****
>
> csq = Call Subflow (SCRIPT[area_code_lookup.aef], Input: ani, Output: csq)
> ****
>
> Set csq (csq == null || csq.trim() == "") ? "Default_CSQ" : csq****
>
> Select Resource (--Triggering Contact-- from csq)****
>
> Connected****
>
> End****
>
> Queued****
>
> ...queue logic...****
>
> End****
>
> ** **
>
> There's many different ways to solve for this requirement.  Which one you
> pick should meet the objective first, and then be easy to troubleshoot and
> administer second.  The rest is subjective.  In my opinion...of course!
>  Haha.****
>
> ** **
>
> Good luck.****
>
> ** **
>
> On Mon, Sep 30, 2013 at 3:29 PM, Chase Mergenthal <
> cmergenthal at digitalriver.com> wrote:****
>
> Conceptually this is how you could do it:****
>
>  ****
>
> ****
>
>  ****
>
> Xml doc:****
>
>  ****
>
> <triggers>****
>
>  ****
>
> <trigger number="17631112222”>****
>
> <csq>CSQ</csq>****
>
> </trigger>****
>
>  ****
>
> </triggers>****
>
>  ****
>
>  ****
>
> Chase Mergenthal *|* Digital River****
>
> p: +1 952 225 3202 *|* cmergenthal at digitalriver.com *|* digitalriver.com<http://www.digitalriver.com/>
> ****
>
> 10380 Bren Road West, Minnetonka, MN 55343, United States****
>
>  ****
>
> *From:* cisco-voip [mailto:cisco-voip-bounces at puck.nether.net] *On Behalf
> Of *Grace Maximuangu
> *Sent:* Monday, September 30, 2013 3:14 PM
> *To:* Anthony Holloway; Ryan LaFountain (rlafount);
> cisco-voip at puck.nether.net
> *Subject:* [cisco-voip] Implement UCCX Geographic Inbound Call Routing
> using callers area code****
>
>  ****
>
> Hi all,****
>
> I have a customer requirement, when a call is placed into the call center,
> the script needs to query an xml file using Xpath (they do not want to do a
> database lookup at this time)  to determine what CSQ to place the call in.
> ****
>
> Has anyone done this before?****
>
> Or does anyone have a sample code that can be modified to satisfy this
> requirement?****
>
>  ****
>
> :-:gm****
>
>  ****
>
> Grace Maximuangu****
>
> Voice Solutions Engineer****
>
> *Black Box Network Services*****
>
> Cell: 213.268.6342****
>
> grace.maximuangu at blackbox.com****
>
> www.blackbox.com ****
>
>  ****
>
> [image: bbox logo.JPG]****
>
>  ****
>
>  ****
> ------------------------------
>
> This email and any files transmitted with it are confidential and are
> intended for the sole use of the individual to whom they are addressed.
> Black Box Corporation reserves the right to scan all e-mail traffic for
> restricted content and to monitor all e-mail in general. If you are not the
> intended recipient or you have received this email in error, any use,
> dissemination or forwarding of this email is strictly prohibited. If you
> have received this email in error, please notify the sender by replying to
> this email.****
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20131001/e7e92504/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 4336 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20131001/e7e92504/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 7182 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20131001/e7e92504/attachment.png>


More information about the cisco-voip mailing list