cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
747
Views
0
Helpful
2
Replies

VCS External Policy Server ALIAS string - need help!

David Anstee
Level 4
Level 4

Working to build a simple External Policy Server, and have it working to a degree, but have gotten stuck with the "ALIAS" details being sent from VCS.

The VCS appears to send all the various ALIAS of an Endpoint in a string that looks like;

ALIAS=david.anstee.office%40fcvc.net&ALIAS=David%20Anstee%20Office&ALIAS=2731

Which gives the H323 ID, E164 and System Name as ALIAS fields. The trouble is that the VCS parses the information under the same "ALIAS" value and not an array (such as ALIAS[1]=value1&ALIAS[2]=value2&ALIAS[3]=value3 - So I am having issues getting all of the ALIAS parameters into my External Policy Server, I can only get the last value - which appears to overwrite all previous values.

Has anyone else come across this issue, and if so how do you overcome it? I was thinking of looking to see if I could use PHP and "foreach" to look at each ALIAS one at a time, but again I could only see 1 value, being the last?

Appreciate any help on ths one

2 Replies 2

Martin Koch
VIP Alumni
VIP Alumni

Thats less a vcs / cisco question then a php one :-)

As your saying you use PHP look at something like:

http://stackoverflow.com/questions/353379/how-to-get-multiple-parameters-with-same-name-from-a-url-in-php

Would be cool to look at your script, just send me a private message with it.

Please remember to rate helpful responses and identify

I have tried all varying methods to try and get the different values under the same name, but fail each time. I tried something very similar to the URL you reference, I had this:

$splitdata  = explode('&', $_SERVER['QUERY_STRING']);

$n=0;

foreach ( $splitdata as $splitvalue )

{

$temp = explode('=', $splitvalue);

if($temp[0] == "ALIAS")

{

$ALIAS[$n]=$temp[1];

echo $ALIAS[$n];

}

$n=$n+1;

}

Which works fine when presenting it with a URL direct to the browser, but it appears that the VCS values are not picked up by $_SERVER, I can only appear to use $_REQUEST which doesnt pickup the array of values.

I am really stuck on this one, the question really is - why have Cisco used the same "key name" for multiple values? And how do you overcome this?