Метка конца данных AMI
Сообщений: 261
|
Метка конца данных AMI
Не могу понять, как определить, что все данные мы получили и их нужно отправить на обработку?
Вот кусок данных, видны границы пакетов, но конец данных неоднозначен... :(
[22:13:18] SendPkt >>>>>>>>>>
----------------------------------------------------------
Action: ListCommands
----------------------------------------------------------
[22:13:18] RecvPkt <<<<<<<<<<
----------------------------------------------------------
Response: Success
WaitEvent: Wait for an event to occur (Priv: <none>)
SKINNYshowline: Show SKINNY line (text format) (Priv: system,reporting,all)
SKINNYlines: List SKINNY lines (text format) (Priv: system,reporting,all)
SKINNYshowdevice: Show SKINNY device (text format) (Priv: system,reporting,all)
SKINNYdevices: List SKINNY devices (text format) (Priv: system,reporting,all)
MeetmeList: List participants in a conference (Priv: reporting,all)
MeetmeUnmute: Unmute a Meetme user (Priv: call,all)
MeetmeMute: Mute a Meetme user (Priv: call,all)
IAXregistry: Show IAX registrations (Priv: system,reporting,all)
IAXnetstats: Show IAX Netstats (Priv: system,reporting,all)
IAXpeerlist: List IAX Peers (Priv: system,reporting,all)
IAXpeers: List IAX Peers (Priv: system,reporting,all)
PlayDTMF: Play DTMF signal on a specific channel. (Priv: call,all)
SIPnotify: Send a SIP notify (Priv: system,all)
SIPshowregistry: Show SIP registrations (text format) (Priv: system,reporting,all)
SIPqualifypeer: Show SIP peer (text format) (Priv: system,reporting,all)
SIPshowpeer: Show SIP peer (text format) (Priv: system,reporting,all)
SIPpeers: List SIP peers (text format) (Priv: system,reporting,all)
VoicemailUsersList: List All Voicemail User Information (Priv: call,reporting,all)
AgentLogoff: Sets an agent as no longer logged in (Priv: agent,all)
Agents: Lists agents and their status (Priv: agent,all)
QueueReset: Reset queue statistics (Priv: <none>)
QueueReload: Reload a queue, queues, or any sub-section of a queue or queues (Priv: <none>)
QueueRule: Queue Rules (Priv: <none>)
QueuePenalty: Set the penalty for a queue member (Priv: agent,all)
QueueLog: Adds custom entry in queue_log (Priv: agent,all)
QueuePause: Makes a queue member temporarily unavailable (Priv: agent,all)
QueueRemove: Remove interface from queue. (Priv: agent,all)
QueueAdd: Add interface to queue. (Priv: agent,all)
QueueSummary: Queue Summary (Priv: <none>)
QueueStatus: Queue Status (Priv: <none>)
Queues: Queues (Priv: <none>)
UnpauseMonitor: Unpause monitoring of a channel (Priv: call,all)
PauseMonitor: Pause monitoring of a channel (Priv: call,all)
ChangeMonitor: Change monitoring filename of a channel (Priv: call,all)
StopMonitor: Stop monitoring a channel (Priv: call,all)
Monitor: Monitor a channel (Priv: call,all)
DBDelTree: Delete DB Tree (Priv: system,all)
DBDel: Delete DB Entry (Priv: system,all)
DBPut: Put DB Entry (Priv: system,all)
DBGet: Get DB Entry (Priv: system,reporting,all)
Bridge: Bridge two channels already in the PBX (Priv: call,all)
Park: Park a channel (Priv: call,all)
ParkedCalls: List parked calls (Priv: <none>)
ShowDialPlan: List dialplan (Priv: config,reporting,all)
ModuleCheck: Check if module is loaded (Priv: system,all)
ModuleLoad: Module management (Priv: system,all)
CoreShowChannels: List currently active channels (Priv: system,reporting,all)
Reload: Send a reload event (Priv: system,config,all)
CoreStatus: Show PBX core status variables (Priv: system,reporting,all)
CoreSettings: Show PBX core settings (version etc) (Priv: system,reporting,all)
UserEvent: Send an arbitrary event (Priv: user,all)
UpdateConfig: Update basic configuration (Priv: config,all)
----------------------------------------------------------
[22:13:19] RecvPkt <<<<<<<<<<
----------------------------------------------------------
SendText: Send text message to channel (Priv: call,all)
ListCommands: List available manager commands (Priv: <none>)
MailboxCount: Check Mailbox Message Count (Priv: call,reporting,all)
MailboxStatus: Check Mailbox (Priv: call,reporting,all)
AbsoluteTimeout: Set Absolute Timeout (Priv: system,call,all)
ExtensionState: Check Extension Status (Priv: call,reporting,all)
Command: Execute Asterisk CLI Command (Priv: command,all)
Originate: Originate Call (Priv: originate,all)
Atxfer: Attended transfer (Priv: call,all)
Redirect: Redirect (transfer) a call (Priv: call,all)
ListCategories: List categories in configuration file (Priv: config,all)
CreateConfig: Creates an empty file in the configuration directory (Priv: config,all)
Status: Lists channel status (Priv: system,call,reporting,all)
GetConfigJSON: Retrieve configuration (JSON format) (Priv: system,config,all)
GetConfig: Retrieve configuration (Priv: system,config,all)
Getvar: Gets a Channel Variable (Priv: call,reporting,all)
Setvar: Set Channel Variable (Priv: call,all)
Ping: Keepalive command (Priv: <none>)
Hangup: Hangup Channel (Priv: system,call,all)
Challenge: Generate Challenge for MD5 Auth (Priv: <none>)
Login: Login Manager (Priv: <none>)
----------------------------------------------------------
[22:13:19] RecvPkt <<<<<<<<<<
----------------------------------------------------------
Logoff: Logoff Manager (Priv: <none>)
Events: Control Event Flow (Priv: <none>)
----------------------------------------------------------
Intel Core 2 Duo E6400 @ 2.40GHz / 6GB / 160GB | Gentoo Linux 2.6.32 || Asterisk 1.6.2.9 | SFA + FFA | Linksys SPA922 + D-Link DPH-300S + D-Link DVG-7111S + 3xHuawei E1550
|
Откуда: Киев
Сообщений: 749
|
Re: Метка конца данных AMI
пустую строку выдает в конце.
вообще возмите любую библиотеку для ами, на перле например, и посмотрите ;)
|
Откуда: Киев
Сообщений: 1096
|
Re: Метка конца данных AMI
не так все просто, пустая строка выдается между каждым типом пакетов. Например при оригинации звонка вместе с response: success выдается еще кучу событий разделенных пустой строкой в течении всего соединения. в конце разговора, например проскакивает событие hangup c кодом разрыва, но вот дождаться его и правильно идентифицировать в нагруженной системе нелегко, даже с библиотеками.. :)
|
Откуда: Уфа
Сообщений: 5856
|
Re: Метка конца данных AMI
Вообще AMI в этом плане по-мудацки сделан
переделали бы его, фильтрацию сделали чтоли.
ужоснах
|
|