Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36755?usp=email )
Change subject: asterisk: Implement AMI_Adapter using IPL4 instead of TELNET ......................................................................
Patch Set 3:
(1 comment)
File asterisk/AMI_Functions.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36755/comment/a6484644_acca2... PS3, Line 260: /* TEXT Enc/dec is not happy with values containing "; ", get rid of them: : * "AppData: 5,0502: Call pjsip endpoint from 0501\r\n" */ : var integer pos := f_strstr(patched_txt, "AppData: ", 0); : if (pos >= 0) { : var integer pos_end := f_strstr(patched_txt, "\r\n", pos) + lengthof("\r\n"); : var charstring to_remove := substr(patched_txt, pos, pos_end - pos); : patched_txt := f_str_replace(patched_txt, to_remove, ""); : }
I don't understand what this does. […]
It's removing the full line "AppData: 5,0502: Call pjsip endpoint from 0501\r\n", since we don't need it for now and just breaks the decoder (yes, this all should be fixed better at a later point in in TITAN TEXT decoder).
1- Find pos of "AppData" substr start. 2- From there, find where the line finishes by finding "\r\n". 3- Create a substr of that line. 4- Use f_str_replace() to remove that line entirely.
EDIT: Ah! I see what you mean, I put a typo in the comment, I meant ": ".