08-22-2012 09:32 AM - edited 03-17-2019 11:39 PM
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
08-22-2012 11:32 AM
Thats less a vcs / cisco question then a php one :-)
As your saying you use PHP look at something like:
Would be cool to look at your script, just send me a private message with it.
Please remember to rate helpful responses and identify
08-23-2012 03:37 AM
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?
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