Home AMX User Forum NetLinx Studio

How does amx further evaluate the captured keywords? But the number of bytes is not necessarily the

How does amx further evaluate the captured keywords? But the number of bytes is not necessarily the value. It may be a regular IP or a regular number. The number of bytes in the string before callNumber is also uncertain.

How does amx further evaluate the captured keywords? But the number of bytes of this value is not necessarily certain.
Examples are as follows.
1. MSG_ON_CALL_INCOMM_NOTIFY\\\\",\\\\"subMsgID\\\\":0,\\\\"param1\\\\": 0,\\\\"param2\\\\":0,\\\\"msgData\\\\":\\\\"{\ \\\\\\\"displayName\\\\\\\\":\\\\\\\\"\ \\\\\\\",\\\\\\\\"calleeNumber\\\\\\\\": \\\\\\\\"192.168.3.126\\\\\\\\"}

I want to get 192.168.3.126 from the keyword of calleeNumber. How to achieve this? Sometimes it's not necessarily the IP or the number of bytes that is necessarily the case.

  1. {"success":1,"data":"{\"state\":{\"siteName\":\"Box\u0020310\u0020for\u0020Huawei\u0020Cloud\",\"speaker\":1, \"mic\":1,\"gk\":0,\"sip\":0,\"upgrade\":0,\"callState\":2,\"callType\":1,\" confType\":1,\"confState\":1,\"siteCall\":0,\"chair\":0,\"isInConf\":1,\"wifi\":0,\"remoteMicStates\ ":0,\"speakerValue\":0,\"micValue\":0,\"portState\":0,\"isSleep\":0,\"camera\":0,\"isOpsModeEnable\": 0,\"shareState\":0,\"decideUpgrade\":0,\"disturb\":0,\"upgradeProc\":0,\"viSourceState\":1},\"msgStruct\":\ "{\\"iResult\\":0,\\"msg\\":[\\"{\\\\"msgID\\\\":9006, \\\\"msgName\\\\":\\\\"MSG_MIC_OPEN_NOTIFY\\\\",\\\\"subMsgID\\\ \":0,\\\\"param1\\\\":1,\\\\"param2\\\\":0,\\ \\"msgData\\\\":\\\\"\\\\"}\\",\\"{\\\\"msgID \\\\":4002,\\\\"msgName\\\\":\\\\"MSG_ON_CALL_INCOMM_NOTIFY\\\\",\\ \\"subMsgID\\\\":0,\\\\"param1\\\\":0,\\\\"param2\\ \\":0,\\\\"msgData\\\\":\\\\"{\\\\\\\" displayName\\\\\\\\":\\\\\\\\"\\\\\\\\" ,\\\\\\\\"calleeNumber\\\\\\\\":\\\\\\\\ "192.168.3.126\\\\\\\"}\\\\"}\\",\\"{\\\\"msgID\ \\\":6100,\\\\"msgName\\\\":\\\\"MSG_ON_CALL_RECENT_REFRESH_NOTIFY\\\\",\\ \\"subMsgID\\\\":0,\\\\"param1\\\\":0,\\\\"param2\\ \":0,\\\\"msgData\\\\":\\\\"{\\\\\\\\"callRecordList \\\\\\\\":[{\\\\\\\\"recordId\\\\\\\ \":13,\\\\\\\\"reco

I want to get 192.168.3.126 from the keyword of calleeNumber. How to achieve this? Sometimes it's not necessarily the IP or the number of bytes that is necessarily the case.

  1. {"success":1,"data":"{\"state\":{\"sitename\":\"HUAWEI\u0020CloudLink\u0020Box\u0020310\",\"speaker\":1,\" mic\":1,\"gk\":0,\"sip\":0,\"upgrade\":0,\"callstate\":1,\"calltype\":1,\"conftype\ ":3,\"confstate\":4,\"sitecall\":0,\"chair\":0,\"miniMcu\":0,\"isInConf\":1,\"pstnstate\": 0,\"t140cap\":0,\"isHwGk\":0,\"h239cap\":0,\"tv_H239_hd2\":0,\"useminimcu\":0,\"wifi\":0, \"RemoteMicStates\":0,\"cfgonebit\":0,\"statebit\":0,\"speakerValue\":0,\"micValue\":0,\"statebit2\":0,\" bluetooth\":0,\"upgradeProc\":0,\"confNetType\":0,\"auditsite\":0,\"streamType\":0,\"isSupportAI\":0,\"curStatusCP\ ":0,\"shareType\":0,\"dontDisturb\":0,\"camStateInConf\":0,\"webExpiredTime\":0,\"imageSwitch\":0},\"msgStruct\" :\"{\\"iResult\\":0,\\"msg\\":[\\"{\\\\"msgID\\\\": 4002,\\\\"msgName\\\\":\\\\"MSG_ON_CALL_INCOMM_NOTIFY\\\\",\\\\"subMsgID\\ \\":0,\\\\"param1\\\\":0,\\\\"param2\\\\":0,\ \\\"msgData\\\\":\\\\"{\\\\\\\\"displayName\\\\ \\\\":\\\\\\\\"\\\\\\\\",\\\\ \\\\"calleeNumber\\\\\\\\":\\\\\\\\"9850476768\\\\ \\\\"}\\\\"}\\",\\"{\\\\"msgID\\\\":6100,\ \\\"msgName\\\\":\\\\"MSG_ON_CALL_RECENT_REFRESH_NOTIFY\\\\",\\\\"subMsgID\\\ \":0,\\\\"param1\\\\":0,\\\\"param2\\\\":0,\\ \"msgData\\\\":\\\\"{\\\\\\\\"callRecordList\\\\\\ \\":[{\\\\\\\\"recordId\\\\\\\\":13,\\\ \\\\\"recordType

I want to get 9850476768 from the keyword of calleeNumber. How to achieve it? Sometimes it's not necessarily the IP or the number of bytes that is necessarily the case.

  1. {"success":1,"data":"{\"state\":{\"siteName\":\"Box\u0020310\u0020for\u0020Huawei\u0020Cloud\",\"speaker\":1, \"mic\":0,\"gk\":0,\"sip\":0,\"upgrade\":0,\"callState\":2,\"callType\":1,\" confType\":1,\"confState\":1,\"siteCall\":0,\"chair\":0,\"isInConf\":1,\"wifi\":0,\"remoteMicStates\ ":0,\"speakerValue\":0,\"micValue\":0,\"portState\":0,\"isSleep\":0,\"camera\":0,\"isOpsModeEnable\": 0,\"shareState\":0,\"decideUpgrade\":0,\"disturb\":0,\"upgradeProc\":0,\"viSourceState\":1},\"msgStruct\":\ "{\\"iResult\\":0,\\"msg\\":[\\"{\\\\"msgID\\\\":4002, \\\\"msgName\\\\":\\\\"MSG_ON_CALL_INCOMM_NOTIFY\\\\",\\\\"subMsgID\\\ \":0,\\\\"param1\\\\":0,\\\\"param2\\\\":0,\\ \\"msgData\\\\":\\\\"{\\\\\\\\"displayName\\\\\ \\\":\\\\\\\\"\\\\\\\\",\\\\\ \\\"calleeNumber\\\\\\\\":\\\\\\\\"192.168.3.127\\\\ \\\\"}\\\\"}\\",\\"{\\\\"msgID\\\\":6100,\ \\\"msgName\\\\":\\\\"MSG_ON_CALL_RECENT_REFRESH_NOTIFY\\\\",\\\\"subMsgID\\\ \":0,\\\\"param1\\\\":0,\\\\"param2\\\\":0,\\ \"msgData\\\\":\\\\"{\\\\\\\\"callRecordList\\\\\\ \\":[{\\\\\\\\"recordId\\\\\\\\":13,\\\ \\\\\"recordType\\\\\\\":1,\\\\\\\\"callName\\ \\\\\\":\\\\\\\\"192.168.3.126\\\\\\\\", \\\\\\\\"callNumber\\\\\\\\":\\\\\\\\" 192.168.3.126\\\\\\\\",\\\\\\\

I want to get 192.168.3.127 from the keyword of calleeNumber. How to achieve this? Sometimes it's not necessarily the IP or the number of bytes that is necessarily the case.

Comments

  • [Deleted User][Deleted User] Harman Integrated Technologies Group (ITG) Posts: 0

    You have to parse the response and stuff the values into some form of data array. The web formatting of your data is a little weird, but is this JSON you are seeking to parse? IF so there are a few netlinx json parsers out on github

  • tttttt Posts: 18

    @HARMAN_Chris said:
    You have to parse the response and stuff the values into some form of data array. The web formatting of your data is a little weird, but is this JSON you are seeking to parse? IF so there are a few netlinx json parsers out on github

    Yes, I need to parse the string returned by http.
    This is text text format, even JSON format, as shown in the figure.
    Please tell me how to achieve the goal of obtaining the value.

  • [Deleted User][Deleted User] Harman Integrated Technologies Group (ITG) Posts: 0

    Simply looking at the response, this is not a friendly integration protocol.
    What have you tried so far?
    Have you engaged your regional technical support team for further guidance?
    Have you spoken to Huawai to understand what others have done to integrate with the product?

  • John NagyJohn Nagy Posts: 1,742
    edited December 2023

    Evaluating this data will not be automatic, your code will need to order it. This appears to be hierarchical data with a main header then repeated updates. The slashes in front of text items look like they specify the nesting, the slashes after the quoted text items but before the colon are padding, and the data related to the text item follows the colon. The time for each repeating record begin with a new record number and conclude with the start and end times of that record. Parsing should not be hard, creating a table in your code to populate with the tags and data after grooming out the padding and heirarchy. What it actually means and what you seek to have your code do with what parts are likely more clear to you than us in your application. You may be looking only for a couple of states, so it could be fast and easy ripping through the stream and finding them as they arrive, updating a table of only what your are interested in, only when you are interested.

  • maybe this 3rd party libs for parsing JSON could help:
    https://github.com/sentry07/netlinx-libJSON

Sign In or Register to comment.