Eventos de CDR do Asterisk

0

Estou recebendo os eventos asterisk cdr do aplicativo smal nodejs. As chamadas são feitas usando originate. Através de uma chamada, o asterisco pode verificar vários provedores de comunicação, e depois eu recebo isso:

[2018-09-06 12:26:21.782] [TRACE] predictive - CDR: { event: 'Cdr',
  privilege: 'cdr,all',
  accountcode: '',
  source: '<company_phone_number>',
  destination: '<client_phone_number>',
  destinationcontext: 'mpay_button',
  callerid: '"<company_phone_number>" <<company_phone_number>>',
  channel: 'Local/<client_phone_number>@mpay_button-0000148a;2',
  destinationchannel: 'SIP/<prov1>-00003194',
  lastapplication: 'Dial',
  lastdata: 'SIP/<prov1>/<client_phone_number>,,S(600)',
  starttime: '2018-09-06 12:26:08',
  answertime: '',
  endtime: '2018-09-06 12:26:08',
  duration: '0',
  billableseconds: '0',
  disposition: 'FAILED',
  amaflags: 'DOCUMENTATION',
  uniqueid: '1536225968.45229',
  userfield: '',
  local_sip: '',
  phone_num: '<client_phone_number>',
  rec_file: '1536225968_905085',
  order_id: '2238839',
  count_c: '1' }

[2018-09-06 12:26:21.794] [TRACE] predictive - CDR: { event: 'Cdr',
  privilege: 'cdr,all',
  accountcode: '',
  source: '<company_phone_number>',
  destination: '<client_phone_number>',
  destinationcontext: 'mpay_button',
  callerid: '"<company_phone_number>" <<company_phone_number>>',
  channel: 'Local/<client_phone_number>@mpay_button-0000148a;2',
  destinationchannel: 'SIP/<prov2>-00003195',
  lastapplication: 'Dial',
  lastdata: 'SIP/<prov2>/333<client_phone_number>,,S(600)',
  starttime: '2018-09-06 12:26:08',
  answertime: '',
  endtime: '2018-09-06 12:26:08',
  duration: '0',
  billableseconds: '0',
  disposition: 'FAILED',
  amaflags: 'DOCUMENTATION',
  uniqueid: '1536225968.45229',
  userfield: '',
  local_sip: '',
  phone_num: '<client_phone_number>',
  rec_file: '1536225968_905085',
  order_id: '2238839',
  count_c: '2' }

[2018-09-06 12:26:21.802] [TRACE] predictive - CDR: { event: 'Cdr',
  privilege: 'cdr,all',
  accountcode: '',
  source: '<company_phone_number>',
  destination: '<client_phone_number>',
  destinationcontext: 'mpay_button',
  callerid: '"<company_phone_number>" <<company_phone_number>>',
  channel: 'Local/<client_phone_number>@mpay_button-0000148a;2',
  destinationchannel: 'SIP/<prov3>-00003196',
  lastapplication: 'Dial',
  lastdata: 'SIP/<prov3>/001<client_phone_number>,,S(600)',
  starttime: '2018-09-06 12:26:08',
  answertime: '',
  endtime: '2018-09-06 12:26:49',
  duration: '40',
  billableseconds: '0',
  disposition: 'NO ANSWER',
  amaflags: 'DOCUMENTATION',
  uniqueid: '1536225968.45229',
  userfield: '',
  local_sip: '',
  phone_num: '<client_phone_number>',
  rec_file: '1536225968_905085',
  order_id: '2238839',
  count_c: '3' }

Eu faço apenas um originado. Como você pode ver, todos os 3 eventos ocorrem em um período de tempo muito pequeno, depois de terminar de verificar o terceiro provedor. Então, a questão é que talvez haja alguma configuração para enviar eventos após cada verificação ou com alguma pausa? Nós usamos asterisco 13

/etc/asterisk/extensions.conf

exten => _XXXXX.,1,Noop
        same => n,Macro(monitor)
       same => n,Dial(SIP/<prov1>/${EXTEN},,S(600))
       same => n,GotoIf($["${DIALSTATUS}"="ANSWER"]?next0)
       same => n,Dial(SIP/<prov2>/${EXTEN},,S(600))
       same => n,GotoIf($["${DIALSTATUS}"="ANSWER"]?next0)
       same => n,Dial(SIP/<prov3>/${EXTEN},,S(600))
       same => n(next0),Hangup()
    
por kRicha 06.09.2018 / 11:35

0 respostas

Tags