Change output format for AMI/CLI commands

I issuing the AMI command “ooh323 show peer 123” and while it works, some of the key’s in the key value pairs list are being cut off because of formatting.

I think I recall that there is a way to tell the AMI/CLI to format the output of a command in a less pretty (or more machine readable) format. But I can’t find it.

Anyone know how to do that?

There isn’t. The implementation of the CLI/AMI stuff is what ultimately determines the formatting/contents/look. It’s not standardized for the CLI, and only loosely for AMI.

Maybe it’s a bug in the Asterisk code how it outputs? For example, here’s the output of ‘ooh323 show peer’ command:

pbx*CLI> ooh323 show peer 123
Name:          123
FastStart/H.245 Tunneling:yes,yes
DirectRTP      yes
EarlyDirectRTP no
DTMF Mode:     rfc2833
DTMF Codec:    101
T.38 Mode:     faxgw/chan_sip compatible
FAX Detect:         Cng
AccountCode:   ast_h323
AMA flags:     Unknown
IP:Port:       192.168.1.78:1720
OutgoingLimit: 0
rtptimeout:    60
nat:           no

As you can see the DirectRTP and EarlyDirectRTP keys have no “:” next to them (making it a bit more challenging to split into key value pairs). And of course IP:Port violates the no : in key name rule.

I can work around this with more specific regexes to extract what I need, just through maybe there was a simple formatting option.

That would be in the chan_ooh323 module. It probably isn’t putting it in.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.