07-28-2011 06:45 AM - edited 03-14-2019 08:17 AM
Does anyone have a XML area code script that I can look at?
07-28-2011 06:48 PM
What do you want to lookup once you have the area code in hand? A CSQ?
07-29-2011 05:11 AM
I have enhanced ver , when a call comes in I need to send it to the xml with ANI so that the area code is match to the correct CSQ when it comes back with the correct area code info.
Thanks>...
07-29-2011 10:05 AM
Ok, so this is not a tested example, just psuedo code to get you pointed in the right direction.
Example XML:
100
101
102
200
201
202
Example Script:
Start
Accept
calling_number = Get Call Contact Info()
area_code = calling_number.substring(0, 3)
set xpath = "//AreaCodes[AreaCode=" + area_code + "]/../@value"
area_code_to_csq = Create XML Document()
primary_csq = Get XML Doc Data(xpath)
Select Resource (primary_csq)
Connected
End
Queued
Call Hold
Delay forever
End
EDIT: Turns out I was spot on with my pseudo code. I had a few minutes to test it out, and here's a screenshot showing that it works:
08-16-2011 10:19 AM
It not working for me , there are five queue , I have all the area code on a XML. When the caller comes in depending on the area code is where the caller go to the csq. If that make any sence.
08-16-2011 10:35 AM
We'll need to see your XML document contents in order to begin troubleshooting.
Please copy and paste your XML contents into a reply, and mark it up with XML syntax highlighting.
*You may need to click the link "Use advanced editor", and then highlight your XML text, followed by selecting to hightlight as XML.
08-16-2011 10:51 AM
the whole scrip is not working right. When a caller comes in it should read from this XML below then route to the correct Rep_csr
jbalderrama@ffex.net is my email..
Thanks>.....
08-16-2011 11:44 AM
You know what, I take it back. I should have not asked you to post the contents, rather to post the file. I cannot tell if your XML document is actaully messed up from the source, or the copy/paste.
I would encourage you to take my example from above, see if you can make it work. I know it works. Just start small, and increase it from there.
Also, with that big of an XML document, you may want to look at minification.
Your original document is 9KB.
This minified vesion is only 3KB, a 66% reduction in size.
201 203 207 212 215 240 267 301 302 315 339 347 351 401 410 412 413 443 475 484 508 516 518 551 570 585 603 607 609 610 617 631 646 716 717 718 724 732 774 781 802 814 835 845 848 856 857 860 862 878 908 914 917 959 973 978 205 228 229 236 239 251 252 256 276 304 305 321 334 336 352 386 404 407 423 434 470 478 540 561 571 601 615 662 678 689 703 704 706 727 731 754 757 762 769 770 772 786 803 804 813 828 843 850 863 864 865 901 904 910 912 919 927 931 941 954 980 984 216 217 218 219 224 231 234 248 260 262 269 270 278 283 309 312 313 314 317 319 320 330 331 380 414 417 419 440 464 502 507 513 515 517 557 563 567 573 574 586 606 608 612 614 616 618 630 636 641 651 660 679 708 712 715 734 740 763 765 773 779 810 812 815 816 847 859 872 906 920 937 947 952 975 989 210 214 225 254 281 308 316 318 325 337 361 402 405 409 430 432 469 479 501 504 512 580 605 620 682 701 713 737 785 806 817 830 832 870 903 913 915 918 936 940 956 972 979 985 206 208 209 213 253 303 307 310 323 341 360 369 385 406 408 415 424 425 435 442 480 503 505 509 510 520 530 541 559 562 564 575 602 619 623 626 627 628 650 661 669 702 707 714 719 720 747 760 764 775 801 805 818 831 858 909 916 925 928 935 949 951 957 970 971
*The forum software is going to hate me for posting that.... =)
08-16-2011 11:51 AM
Your captuer screen and your script are not the same which one is correct?
08-16-2011 12:33 PM
The screenshot is the correct one.
08-17-2011 02:42 PM
Dont I need a accept, get calling number?
08-17-2011 03:02 PM
Not if you are just proving a concept. Notice in my screen shot that I do not have the accept step. I am able to test that script by doing an Active Debug. You press F10 on your keyboard to start it, and then press F10 again to step over each step in the script one at a time.
08-17-2011 03:09 PM
I know how to do the debug but it wont get the number unless I have those two stepts. Can I email you my script and see what I'm missing?
Thanks>....
08-17-2011 03:12 PM
Couldn't you just fake the number, with a set step?
Instead of this:
calling_number = Get Call Contact Info
Do this:
Set calling_number = "6125551212"
This way you can supply any number you want, and test every single area code if your were so inclined.
08-17-2011 03:31 PM
LOL yes tryed that and that works, But it wont go though the script to get the area codes.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide