K
K
karibskii_koks2016-12-24 18:11:59
Asterisk
karibskii_koks, 2016-12-24 18:11:59

How to record conversations in Asterisk?

Hello, while studying Asterisk, I decided to make a simple recording of conversations in the
/etc/voice
folder. I did chmod 777 voice for the folder. Added the
following to the context of outgoing calls:
exten => _XX,1,Set(fname=${STRFTIME(${EPOCH},, %Y%m%d%H%M)}-${CALLERID(number)}-${EXTEN})
exten => _XX,n,MixMonitor(/etc/voice/${fname}.wav)
exten => _XX,n,Dial(SIP/${EXTEN})
The Asterisk console is stubbornly silent about this:
== Using SIP RTP CoS mark 5
-- Executing [[email protected]:1] Dial("SIP/666-00000000", " SIP/668.40") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/668
-- SIP/668-00000001 is ringing
-- SIP/668-00000001 answered SIP/666-00000000
-- Channel SIP/668-00000001 joined 'simple_bridge' basic-bridge
-- Channel SIP/666-00000000 joined 'simple_bridge' basic-bridge
> Bridge ca0ed79d-bb65-4aed-bf3e-20174de3b92f: switching from simple_bridge technology to native_rtp
> Locally RTP bridged 'SIP/666-00000000' and 'SIP/668-00000001' in stack
> Locally RTP bridged 'SIP/666-00000000' and 'SIP/668-00000001' in stack
> 0x7fbebca63400 -- Probation passed - setting RTP source address to 192.168.99.107:4016
> 0x7fbebca664b0 -- Probation passed - setting RTP source address to 192.168.99.107:40024
> Locally RTP bridged 'SIP/666-00000000' and 'SIP/668-00000001' in stack
> 0x7fbebca63400 -- Probation passed - setting RTP source address to 192.168.99.107:4016
-- Channel SIP/668-00000001 left 'native_rtp' basic-bridge
-- Channel SIP/666-00000000 left 'native_rtp' basic-bridge
== Spawn extension (office, 668, 1) exited non-zero on 'SIP/666-00000000'
> Saved useragent "3CXPhone 6.0.26523.0" for peer 668
> Saved useragent "3CXPhone 6.0.26523.0" for peer 666
-- Registered SIP '666 ' at 192.168.99.107:58070
> Saved useragent "MicroSIP/3.10.11" for peer 666
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- Registered SIP '666' at 192.168.99.107:57505
> Saved useragent "3CXPhone 6.0.26523.0" for peer 666
== Using SIP RTP CoS mark 5
-- Executing [[email protected]:1] Dial("SIP/666-00000002", "SIP/668,40") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/668
-- SIP/668-00000003 is ringing
-- SIP/668-00000003 answered SIP/666-00000002
-- Channel SIP/668-00000003 joined 'simple_bridge' basic -bridge <23a1ed05-f3aa-4eb6-b41e-8b74f42f3fec> --
Channel SIP/666-00000002 joined 'simple_bridge'
: switching from simple_bridge technology to native_rtp
> Locally RTP bridged 'SIP/666-00000002' and 'SIP/668-00000003' in stack
> Locally RTP bridged 'SIP/666-00000002' and 'SIP/668-00000003' in stack
> 0x7fbebca63400 -- Probation passed - setting RTP source address to 192.168.99.107:4018
> 0x7fbec800de00 -- Probation passed - setting RTP source address to 192.168.99.107:40030
> Locally RTP bridged 'SIP/666-00000002' and 'SIP/668-00000003' in stack
> 0x7fbebca63400 -- Probation passed - setting RTP source address to 192.168.99.107:4018
-- Registered SIP '666' at 192.168.99.107:58070
> Saved useragent "MicroSIP/3.10.11" for peer 666
-- Channel SIP/668-00000003 left 'native_rtp' basic-bridge <23a1ed05-f3aa-4eb6-b41e-8b74f42f3fec>
-- Channel SIP/666-00000002 left 'native_rtp' basic-bridge <23a1ed05-f3aa-4eb6-b41e-8b74f42f3fec>
== Spawn extension (office, 668, 1) exited non-zero on 'SIP/666-00000002'
- - Registered SIP '666' at 192.168.99.107:57505
> Saved useragent "3CXPhone 6.0.26523.0" for peer 666

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
karibskii_koks, 2016-12-24
@karibskii_koks

Works for outgoing calls.
exten => _XXX.,1,Set(fname=${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-${CALLERID(number)}-${EXTEN})
exten = > _XXX.,2,MixMonitor(/etc/voice/${fname}.wav)
exten => _XXX.,3,Dial(SIP/${EXTEN}@468174)
Got my mistake. Hope it helps you too

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question