hello,
i’m trying to use asterisk manager to show active channels $AMI->command(‘core show channels concise’).
but the output is missing some lines example:
SIP/mamon-00000c92!mamondialplan!00966542252211!1!Up!Dial!sip/siptrafficashyat/00966542252211,60,tT!mamon!mamon123!mamon123!2!143!07a2bbb5-e65d-4e02-adfd-47c1e4dadec9!1490792723.20528
although the output of the same command is
SIP/mamon-00000ca6!mamondialplan!000009625233349!1!Up!Dial!sip/siptrafficashyat/000009625233349,60,tT!mamon!mamon123!mamon123!2!16!3b696fb8-5f97-4fee-8866-12fb17d02ed5!1490792911.20657
SIP/mamon-00000ca4!mamondialplan!00000966559798436!1!Up!Dial!sip/siptrafficashyat/00000966559798436,60,tT!mamon!mamon123!mamon123!2!22!37ee0863-34b7-4d5d-9e4a-7efb72640f64!1490792904.20653
SIP/mamon-00000ca2!mamondialplan!00966563070999!1!Ring!Dial!sip/siptrafficashyat/00966563070999,60,tT!mamon!mamon123!!2!52!!1490792875.20626
SIP/siptrafficashyat-00000ca7!public!!1!Up!AppDial!(Outgoing Line)!000009625233349!mamon123!mamon123!3!16!3b696fb8-5f97-4fee-8866-12fb17d02ed5!1490792911.20659
SIP/siptrafficashyat-00000ca5!public!!1!Up!AppDial!(Outgoing Line)!00000966559798436!mamon123!mamon123!3!22!37ee0863-34b7-4d5d-9e4a-7efb72640f64!1490792904.20655
SIP/siptrafficashyat-00000ca3!public!00966563070999!1!Down!AppDial!(Outgoing Line)!00966563070999!mamon123!mamon123!3!52!!1490792875.20628
anyone have this issue before?
asterisk 14.3
the output of var_dump
array(3) {
[“Response”]=>
string(7) “Success”
[“Message”]=>
string(22) “Command output follows”
[“Output”]=>
string(180) “SIP/mamon-00000ce2!mamondialplan!0097433431564!1!Up!Dial!sip/siptrafficashyat/0097433431564,60,tT!mamon!mamon123!mamon123!2!57!94a59791-fef3-482c-8f33-68e8e5c18cdd!1490793573.21035”
}
the outpput of 'core show channels ’
array(3) {
[“Response”]=>
string(7) “Success”
[“Message”]=>
string(22) “Command output follows”
[“Output”]=>
string(20) “1656 calls processed”
}
i think this is totally wrong, please help
jcolp
March 29, 2017, 1:26pm
4
This is a problem with the library or solution you are using. When executing a CLI command each line is output as a separate ‘Output’ line in the Manager response. If it does not take this into account (for example using a hash to store the result) then you will only have the last line.
hello,
thank you for reply.
can you please show me how?
kind regards
jcolp
March 29, 2017, 1:29pm
6
I don’t know what library or solution you are using and have no knowledge of it, so I can not.
hello,
i’m using php agi manager. can you help please?
kind regards
jcolp
March 29, 2017, 1:32pm
8
I don’t know PHP or that library, you may have to try to figure out how to make it work yourself or see if someone else has experience.
hello,
i think there is a bug in asterisk manager v14.3 with php AGI_AsteriskManager, i will downgrade to version 13
kind regards
jcolp
March 30, 2017, 12:39pm
10
That PHP solution may not have been updated with changes done in 14.
hello,
can we tell us the difference between manager in the two version, then i may solve the issue
jcolp
March 30, 2017, 12:43pm
12
The change in question is mentioned in the UPGRADE.txt document:
AMI:
- The Command action now sends the output from the CLI command as a series
of Output headers for each line instead of as a block of text with the
--END COMMAND-- delimiter to match the output from other actions.
Commands that fail to execute (no such command, invalid syntax etc.) now
return an Error response instead of Success.
hello,
so if i run command ‘core show channels concise’, what will we receive ?
can you answer this please.
kind regards