Skip to content

Changes

Summary

  1. asterisk: Implement AMI_Adapter using IPL4 instead of TELNET (details)
Commit 502dfeb5150a3e67fc02e914991f43b4378b81ef by Pau Espin Pedrol
asterisk: Implement AMI_Adapter using IPL4 instead of TELNET

Change Telnet_PT to a regular TCP socket for the AMI interface.

I started using Telnet_PT port since initial use of the interface
was done through telnet, but it's not really a telnet interface and
stuff starts becoming difficult to maintain properly when events
(generated by Asterisk at any time) arrive.

The current TEXT decoder/encoder from Titan seems to be struggling in 2
scenarios, so for now we are adding some workarounds in
dec_AMI_Msg_ext() before calling it in order to be able to go forward
and avoid errors:
1- Fields of format "MyFieldName: \r\n" (empty value). I tried changing
the "value" field in record AMI_Field to "optional", but then apparently
the TEXT decoder fails to decode values consisting of several words.
Ideally, I'd expect the TEXT decoder to put an empty "" string in the
"value" field in that case if "optional" is not flagged in the record.
2- Fields of format "MyFieldName: foobar: hey there \r\n" containing a
": " token in the value. I'd expect TEXT decoder to put all subsequent
strings in the last field "value" if no more fields are described in the
record.

Change-Id: Icaf2860c1dd4befa4498f0d176cfadf26cfa8d1d
The file was modified asterisk/AMI_Functions.ttcn
The file was modified asterisk/Asterisk_Tests.default
The file was modified asterisk/Asterisk_Tests.ttcn
The file was modified asterisk/Asterisk_Tests.cfg