String Receive Manipulation
cmatkin
Posts: 86
Hello there.
I am receiving the following strings from a polycom device (each line has a CR and LF at the end)
abk 0. Boardroom spd:384 num:33.04.92389306
abk 1. Boardroom IP spd:4096 num:vc.melbourne.com.au
What I would like to do is capture the following information as strings from the above data.
_Address[1].cName = Boardroom
_Address[1].cSpeed = 384
_Address[1].cNumer= 33.04.92389306
_Address[2].cName = Boardroom IP
_Address[2].cSpeed = 4096
_Address[2].cNumer= vc.melbourne.com.au
The _Address index is set by the abk number. (eg: if abk 0, then index will be 1)
Does any one have functions to do this?
Regards
Craig
I am receiving the following strings from a polycom device (each line has a CR and LF at the end)
abk 0. Boardroom spd:384 num:33.04.92389306
abk 1. Boardroom IP spd:4096 num:vc.melbourne.com.au
What I would like to do is capture the following information as strings from the above data.
_Address[1].cName = Boardroom
_Address[1].cSpeed = 384
_Address[1].cNumer= 33.04.92389306
_Address[2].cName = Boardroom IP
_Address[2].cSpeed = 4096
_Address[2].cNumer= vc.melbourne.com.au
The _Address index is set by the abk number. (eg: if abk 0, then index will be 1)
Does any one have functions to do this?
Regards
Craig
0
Comments
This is a great starting point. It had me stumped.
I'm just changing how the abk 0. bit works. the abk range is 0 to 999 (3 chars).
Thanks again.
Regards
Craig
One thing you need to know about the way it reports back the phonebook is that if you have it filled out with an IP number and a ISDN number it returns the same abk entry for both numbers.
So if you have an entry called Boardroom and have a telephone number, a isdn number and a IP number they will all come back on abk 1.
Its been awhile, but Im pretty confident this is the way it reports back which makes it difficult to use the index. I would try to put in an entry and give it multiple fields and then see how the phonebook reports. I ended up writing my own speeddial codeblock that stores all speeddial numbers in a text file on the controller and then the customer could just copy and paste the text document on all the controllers not having to enter them manually.
You are correct about the address book.
What a pain. For the time, we are making sure that the address book holds only one number per entry.
We have to use the inbuilt addressbook, as we are combining 10+ codecs to use the global addressbook functions.
Lastly, I found that the String handley in the data events did not trigger enough. The codec justs spits the data out all at once.
Thanks for your help and information.
Regards
Craig