|
Использую плагин, и настройки его по вашей вики + исправления для файла 1С_CDR которые описал выше Asterisk (Ver. 1.8.18.1) + FreePBX 2.10.1.5, все обновлено до последних версий Код |
---|
Asterisk AJAM Settings 2.10.0.17 telefon1c.ru Enabled |
в файле 1C_Playback.php, убрал проверку на существование cdr_sqlite3_custom.so, ибо файл библиотека существует, а данные пишутся в cdr-custom/cdr_pdf.csv (проверено на 100%) открываю Журнал звонков, нажимаю правой кнопкой, выбираю Воспроизвести запись идем входящий вызов на софтфон, подымаю трубку и сразу разрыв соединения лог с 1С Код |
---|
Инициирован запрос имени файла записи CDR
[Newchannel] <generic event="Newchannel" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;1" channelstate="0" channelstatedesc="Down" calleridnum="" calleridname="" accountcode="" exten="0000777" context="miko_ajam" uniqueid="1361382071.1957" />
[Newchannel] <generic event="Newchannel" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;2" channelstate="4" channelstatedesc="Ring" calleridnum="" calleridname="" accountcode="" exten="0000777" context="miko_ajam" uniqueid="1361382071.1958" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;1" variable="uniqueid1c" value="1361381818" uniqueid="1361382071.1957" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;1" variable="chan" value="SIP/999" uniqueid="1361382071.1957" />
[NewAccountCode] <generic event="NewAccountCode" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;1" uniqueid="1361382071.1957" accountcode="" oldaccountcode="" />
[NewCallerid] <generic event="NewCallerid" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;1" calleridnum="" calleridname="" uniqueid="1361382071.1957" cid_callingpres="67 (Number Unavailable)" />
[Newexten] <generic event="Newexten" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;2" context="miko_ajam" extension="0000777" priority="1" application="NoCDR" appdata="" uniqueid="1361382071.1958" />
[Newexten] <generic event="Newexten" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;2" context="miko_ajam" extension="0000777" priority="2" application="Answer" appdata=",nocdr" uniqueid="1361382071.1958" />
[Newstate] <generic event="Newstate" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;2" channelstate="6" channelstatedesc="Up" calleridnum="" calleridname="" connectedlinenum="" connectedlinename="" uniqueid="1361382071.1958" />
[Newstate] <generic event="Newstate" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;1" channelstate="6" channelstatedesc="Up" calleridnum="" calleridname="" connectedlinenum="" connectedlinename="" uniqueid="1361382071.1957" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;1" variable="uniqueid1c" value="1361381818" uniqueid="1361382071.1957" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;1" variable="chan" value="SIP/999" uniqueid="1361382071.1957" />
[NewAccountCode] <generic event="NewAccountCode" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;1" uniqueid="1361382071.1957" accountcode="" oldaccountcode="" />
[Registry] <generic event="Registry" privilege="system,all" channeltype="SIP" domain="91.142.165.206" status="Registered" />
[Newexten] <generic event="Newexten" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;2" context="miko_ajam" extension="0000777" priority="3" application="NoOp" appdata="internal calling application: 1??_SetupEnv" uniqueid="1361382071.1958" />
[Newexten] <generic event="Newexten" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;2" context="miko_ajam" extension="0000777" priority="4" application="AGI" appdata="1C_Playback.php" uniqueid="1361382071.1958" />
[UserEvent] <generic event="UserEvent" privilege="user,all" userevent="CallRecord" channel="SIP/999" filename="/var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818.1950.gsm" />
Начало прослушивания разговора /var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="Local/0000777@miko_ajam-0000026a;2" variable="AGISTATUS" value="HANGUP" uniqueid="1361382071.1958" />
[Hangup] <generic event="Hangup" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;2" uniqueid="1361382071.1958" calleridnum="<unknown>" calleridname="<unknown>" connectedlinenum="<unknown>" connectedlinename="<unknown>" cause="0" cause_txt="Unknown" />
[Hangup] <generic event="Hangup" privilege="call,all" channel="Local/0000777@miko_ajam-0000026a;1" uniqueid="1361382071.1957" calleridnum="<unknown>" calleridname="<unknown>" connectedlinenum="<unknown>" connectedlinename="<unknown>" cause="0" cause_txt="Unknown" />
[Newchannel] <generic event="Newchannel" privilege="call,all" channel="SIP/999-0000029f" channelstate="0" channelstatedesc="Down" calleridnum="999" calleridname="999" accountcode="" exten="" context="from-internal" uniqueid="1361382072.1959" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="SIPCALLID" value="49072ef64ec53ff62abc03f8180f6075@10.12.0.1:5060" uniqueid="1361382072.1959" />
[NewAccountCode] <generic event="NewAccountCode" privilege="call,all" channel="SIP/999-0000029f" uniqueid="1361382072.1959" accountcode="" oldaccountcode="" />
[NewCallerid] <generic event="NewCallerid" privilege="call,all" channel="SIP/999-0000029f" calleridnum="999" calleridname="CDR_RECORDS" uniqueid="1361382072.1959" cid_callingpres="0 (Presentation Allowed, Not Screened)" />
[ExtensionStatus] <generic event="ExtensionStatus" privilege="call,all" exten="999" context="ext-local" hint="SIP/999" status="8" />
[Cdr] <generic event="Cdr" privilege="cdr,all" accountcode="" source="" destination="0000777" destinationcontext="miko_ajam" callerid="" channel="Local/0000777@miko_ajam-0000026a;1" destinationchannel="" lastapplication="Wait" lastdata="10" starttime="2013-02-20 19:41:11" answertime="2013-02-20 19:41:11" endtime="2013-02-20 19:41:12" duration="1" billableseconds="1" disposition="ANSWERED" amaflags="DOCUMENTATION" uniqueid="1361382071.1957" userfield="" />
[Newstate] <generic event="Newstate" privilege="call,all" channel="SIP/999-0000029f" channelstate="5" channelstatedesc="Ringing" calleridnum="999" calleridname="CDR_RECORDS" connectedlinenum="" connectedlinename="CDR_RECORDS" uniqueid="1361382072.1959" />
[Newstate] <generic event="Newstate" privilege="call,all" channel="SIP/999-0000029f" channelstate="6" channelstatedesc="Up" calleridnum="999" calleridname="CDR_RECORDS" connectedlinenum="" connectedlinename="CDR_RECORDS" uniqueid="1361382072.1959" />
[NewAccountCode] <generic event="NewAccountCode" privilege="call,all" channel="SIP/999-0000029f" uniqueid="1361382072.1959" accountcode="" oldaccountcode="" />
[ExtensionStatus] <generic event="ExtensionStatus" privilege="call,all" exten="999" context="ext-local" hint="SIP/999" status="1" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="PLAYBACKSTATUS" value="FAILED" uniqueid="1361382072.1959" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="RTPAUDIOQOS" value="ssrc=71594860;themssrc=0;lp=0;rxjitter=0.000000;rxcount=0;txjitter=0.000000;txcount=0;rlp=0;rtt=0.000000" uniqueid="1361382072.1959" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="RTPAUDIOQOSJITTER" value="minrxjitter=0.000000;maxrxjitter=0.000000;avgrxjitter=0.000000;stdevrxjitter=0.000000;reported_minjitter=0.000000;reported_maxjitter=0.000000;reported_avgjitter=0.000000;reported_stdevjitter=0.000000;" uniqueid="1361382072.1959" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="RTPAUDIOQOSLOSS" value="minrxlost=0.000000;maxrxlost=0.000000;avgrxlost=0.000000;stdevrxlost=0.000000;reported_minlost=0.000000;reported_maxlost=0.000000;reported_avglost=0.000000;reported_stdevlost=0.000000;" uniqueid="1361382072.1959" />
[ExtensionStatus] <generic event="ExtensionStatus" privilege="call,all" exten="999" context="ext-local" hint="SIP/999" status="0" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="RTPAUDIOQOSRTT" value="minrtt=0.000000;maxrtt=0.000000;avgrtt=0.000000;stdevrtt=0.000000;" uniqueid="1361382072.1959" />
[VarSet] <generic event="VarSet" privilege="dialplan,all" channel="SIP/999-0000029f" variable="RTPAUDIOQOS" value="ssrc=71594860;themssrc=0;lp=0;rxjitter=0.000000;rxcount=0;txjitter=0.000000;txcount=0;rlp=0;rtt=0.000000" uniqueid="1361382072.1959" />
[Hangup] <generic event="Hangup" privilege="call,all" channel="SIP/999-0000029f" uniqueid="1361382072.1959" calleridnum="999" calleridname="CDR_RECORDS" connectedlinenum="<unknown>" connectedlinename="CDR_RECORDS" cause="16" cause_txt="Normal Clearing" />
[Cdr] <generic event="Cdr" privilege="cdr,all" accountcode="" source="999" destination="s" destinationcontext="from-internal" callerid=""CDR_RECORDS" <999>" channel="SIP/999-0000029f" destinationchannel="" lastapplication="Playback" lastdata="\/var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-13" starttime="2013-02-20 19:41:12" answertime="2013-02-20 19:41:16" endtime="2013-02-20 19:41:16" duration="4" billableseconds="0" disposition="ANSWERED" amaflags="DOCUMENTATION" uniqueid="1361382072.1959" userfield="" />
[Registry] <generic event="Registry" privilege="system,all" channeltype="SIP" domain="sip1.binotel.com" status="Registered" />
[Registry] <generic event="Registry" privilege="system,all" channeltype="SIP" domain="sip1.binotel.com" status="Registered" /> |
лог с Asterisk Log Files, последние 20 строк (было две попытки воспроизвести после первой лог 1С почистил) Код |
---|
[2013-02-20 19:35:19] VERBOSE[2743] tcptls.c: SSL certificate ok
[2013-02-20 19:36:13] VERBOSE[2750] res_agi.c: 1C_CDR.php: awk -F ',' 'BEGIN {OFS=@.@} ((((substr($10,1,4) substr($10,6,2) substr($10,9,2))>=20130220) && ((substr($10,1,4) substr($10,6,2) substr($10,9,2))<20130221))&& ( (($8==Transferred
[2013-02-20 19:36:19] VERBOSE[2774] tcptls.c: SSL certificate ok
[2013-02-20 19:36:32] VERBOSE[2778] res_agi.c: 1C_CDR.php: awk -F ',' 'BEGIN {OFS=@.@} ((((substr($10,1,4) substr($10,6,2) substr($10,9,2))>=20130219) && ((substr($10,1,4) substr($10,6,2) substr($10,9,2))<20130220))&& ( (($8==Transferred
[2013-02-20 19:36:58] NOTICE[2801] channel.c: Dropping incompatible voice frame on SIP/sip-life-0000029c of format ulaw since our native format has changed to 0x8 (alaw)
[2013-02-20 19:37:19] VERBOSE[2853] tcptls.c: SSL certificate ok
[2013-02-20 19:37:28] WARNING[2881] file.c: File /var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818 does not exist in any format
[2013-02-20 19:37:28] WARNING[2881] file.c: Unable to open /var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818 (format 0x8 (alaw)): No such file or directory
[2013-02-20 19:37:28] WARNING[2881] app_playback.c: ast_streamfile failed on SIP/999-0000029e for \/var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818
[2013-02-20 19:38:00] VERBOSE[2899] res_agi.c: 1C_CDR.php: awk -F ',' 'BEGIN {OFS=@.@} ((((substr($10,1,4) substr($10,6,2) substr($10,9,2))>=20130220) && ((substr($10,1,4) substr($10,6,2) substr($10,9,2))<20130221))&& ( (($8==Transferred
[2013-02-20 19:38:19] VERBOSE[2925] tcptls.c: SSL certificate ok
[2013-02-20 19:39:19] VERBOSE[2947] tcptls.c: SSL certificate ok
[2013-02-20 19:40:19] VERBOSE[2970] tcptls.c: SSL certificate ok
[2013-02-20 19:41:16] WARNING[3001] file.c: File /var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818 does not exist in any format
[2013-02-20 19:41:16] WARNING[3001] file.c: Unable to open /var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818 (format 0x8 (alaw)): No such file or directory
[2013-02-20 19:41:16] WARNING[3001] app_playback.c: ast_streamfile failed on SIP/999-0000029f for \/var/spool/asterisk/monitor/2013/02/20/exten-999-0939115058-20130220-193708-1361381818
[2013-02-20 19:41:19] VERBOSE[3007] tcptls.c: SSL certificate ok
[2013-02-20 19:42:19] VERBOSE[3043] tcptls.c: SSL certificate ok
[2013-02-20 19:43:19] VERBOSE[3065] tcptls.c: SSL certificate ok
[2013-02-20 19:44:19] VERBOSE[3082] tcptls.c: SSL certificate ok
|
Примичание, проверено! в фале 1C_Playback.php, который я так понимаю отвечает за формирование запроса на перезвон и прослушивание записи в самом низу файла в строку Код |
---|
$agi->exec("UserEvent", $response); |
передается петь к файлу прослушивания, к примеру $response = CallRecord,Channel:SIP/999,FileName:/var/spool/asterisk/monitor/2013/02/20/exten-999-211-20130220-095128-1361346688.38.gsm (проверено на 100%) то есть где-то обрезается формат файла и астериск не может его обнаружить, о чем и свидетельствуют его логи
|