Звездочка автоматическая Запись вызовов

Мы выполняем звездочку с 8 портами FXO. FXO соединяется с нашим старым PBX (Samsung Office Serv 100).

Теперь мы хотим записать все вызовы, направленные через FXO (если он был набран к внешней стороне или прибывающий снаружи).

Вот схема

           |------|---------------------------------
           |      |--------------24 Lines ---------- Other clasic Phones
PRI------  | PBX  |---------------------------------
           |      |
           |      |
           |      |-----------|---------|
           |      |--8 lines--|         |---------         
           |      |-----------|Asterisk |---------- 50 SIP phone
           |------|           |         |----------
                              |---------|----------

Существует ли простой способ сделать это?

13
задан Manjoor 13 March 2010 в 12:59
поделиться

2 ответа

Вы используете простой Asterisk? В таком случае вы можете изменить план набора, чтобы начать «мониторинг» канала, который будет записывать вызов.

Документация по команде монитора: http://www.voip-info.org/wiki/view/Asterisk+cmd+monitor

Для полноты картины вот документация:

[root@localhost ~]# asterisk -rx 'core show application monitor'

  -= Info about application 'Monitor' =-

[Synopsis]
Monitor a channel

[Description]
  Monitor([file_format[:urlbase],[fname_base],[options]]):
Used to start monitoring a channel. The channel's input and output
voice packets are logged to files until the channel hangs up or
monitoring is stopped by the StopMonitor application.
  file_format           optional, if not set, defaults to "wav"
  fname_base            if set, changes the filename used to the one specified.
  options:
    m   - when the recording ends mix the two leg files into one and
          delete the two leg files.  If the variable MONITOR_EXEC is set, the
          application referenced in it will be executed instead of
          soxmix and the raw leg files will NOT be deleted automatically.
          soxmix or MONITOR_EXEC is handed 3 arguments, the two leg files
          and a target mixed file name which is the same as the leg file names
          only without the in/out designator.
          If MONITOR_EXEC_ARGS is set, the contents will be passed on as
          additional arguments to MONITOR_EXEC
          Both MONITOR_EXEC and the Mix flag can be set from the
          administrator interface

    b   - Don't begin recording unless a call is bridged to another channel
    i   - Skip recording of input stream (disables m option)
    o   - Skip recording of output stream (disables m option)

By default, files are stored to /var/spool/asterisk/monitor/.

Returns -1 if monitor files can't be opened or if the channel is already
monitored, otherwise 0.

И вот пример того, как вы можете его использовать:

; This fake context records all outgoing calls to /var/spool/asterisk/monitor in wav format.
[fake-outgoing-context]
exten => s,1,Answer()
exten => s,n,Monitor(wav,,b)
exten => s,n,Dial(DAHDI/g0/${EXTEN})
exten => s,n,Hangup()

Очевидно, вам придется внести изменения в мой код, но, надеюсь, это даст вам хорошую идею.

24
ответ дан 1 December 2019 в 19:07
поделиться

В зависимости от технических характеристик вашего компьютера Asterisk, вам может пригодиться этот прием. Создайте довольно большой ramdisk и смонтируйте к нему / var / spool / asterisk / monitor. Таким образом, Asterisk записывает в память, а не на диск. Затем напишите сценарий под cron, чтобы перемещать записи в постоянное хранилище каждые 15-30 минут или около того.

5
ответ дан 1 December 2019 в 19:07
поделиться
Другие вопросы по тегам:

Похожие вопросы: