cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3380
Views
5
Helpful
22
Replies

XML Area Code Script

jbalderrama
Level 1
Level 1

Does anyone have a XML area code script that I can look at?

22 Replies 22

Anthony Holloway
Cisco Employee
Cisco Employee

What do you want to lookup once you have the area code in hand? A CSQ?

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>...

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:

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.

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.

    

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>.....

-

-

-

  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

 

 

 

Your captuer screen and your script are not the same which one is correct?

The screenshot is the correct one.

Dont I need a accept, get calling number?

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.

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>....

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.

LOL yes tryed that and that works, But it wont go though the script to get the area codes.