ConfBridge record_options and record_command not working


#1

Is there any way to email a conference recording on completion from the dialplan? Otherwise does anybody have a bash script to do it?


#2

If using confbridge() use the option record_command and the linux command or script to email the file,

record_command=</path/to/command> ; Command to execute when recording finishes.


#3

I am using confbridge. Can I fire the script from the dialplan when the recording finishes? If so, how?


#4

I havent test it but I think you could also use the option record_option , it Pass additional options to MixMonitor it that parameter you can also execute a command, related to dialplan question you could use CONFBRIDGE() function

CONFBRIDGE(type,option)
type - Refers to which type of profile the option belongs to. Type can be either “bridge” or "user."
option - Refers to the confbridge.conf option that is to be set dynamically on the channel. This can also refer to an existing Bridge or User Profile by using the keyword “template.” In this case, an existing Bridge or User Profile can be appended or modified on-the-fly.

https://wiki.asterisk.org/wiki/display/AST/ConfBridge


#5

Thanks, record_options looks like what I need.

https://reviewboard.asterisk.org/r/4023/

Following the link above , I have developed a dialplan extension like below but it does not send a copy of the recording to my mailbox.

exten => 2244,1,Playback(/srv/asterisk/sounds/tech_conference)
same => n,Progress()
same => n,Wait(0.5)
same => n,Set(CONFBRIDGE(bridge,record_options)=m(55555))
same => n,ConfBridge(1,tech_bridge,tech_admin,admin_menu)
same => n,Hangup()

[Aug 31 08:03:00] ERROR[7747][C-00000002]: config_options.c:725 aco_process_var: Could not find option suitable for category ‘dialplan’ named ‘record_options’ at line 0 of CONFBRIDGE
[Aug 31 08:03:00] WARNING[7747][C-00000002]: confbridge/conf_config_parser.c:1121 func_confbridge_helper: CONFBRIDGE(user,record_options) cannot be set to ‘m(55555)’. Invalid type, option, or value.


#6

The error is pretty clear

m(55555)


#7

My apologies, that error was entered by mistake and only occurred when I set type to user. If type is set to bridge, it doesn’t display any error but still nothing goes to my inbox. The conference is recorded.

-- Executing [8078@RL-IVR:4] Set("PJSIP/mark-00000001", "CONFBRIDGE(bridge,record_options)=m(55555)") in new stack
-- Executing [8078@RL-IVR:5] ConfBridge("PJSIP/mark-00000001", "4,tech_bridge,tech_admin,admin_menu") in new stack
-- <PJSIP/mark-00000001> Playing 'conf-getpin.slin48' (language 'en')

#8

That option belongs to ConfBridge Bridge Profile Options, and you need to set the propercommand or script to be executed after the mixmonitor, and that command it is the one who will email the recording, so first I suggest you find the solution of an script or command to email files from the command line


#9

I thought this line was supposed to send a copy of the recording to my mailbox without further config? If not, what does it actually do?

From the link above:
; Send the recording to voicemail mailbox ${MAILBOX} when finished
same => next,Set(CONFBRIDGE(bridge,record_options)=m(${MAILBOX}))


#10

Based on the information of https://reviewboard.asterisk.org/r/4023/ the status changed from pending to submitted, Description: Committed in revision 429951 , Im not sure if such feature it is already implemented


#11

Ah, it was 2 years old so I assumed it’s probably in production by now. Is there a way to find out the current status?


#12

status changed from pending to submitted
Description:
Committed in revision 429951


#13

I’m not sure how to interpret that, the web page says the target release was 14.0.0 and I am using 14.6.0. It’s also closed.

Since https://reviewboard.asterisk.org/r/4023/ includes record_command, should I assume that record_command is not yet implemented either?

I set my conference extension as follows

same => n,Set(CONFBRIDGE(bridge,record_options)=m(5555))
same => n,Set(CONFBRIDGE(bridge,record_command)=/bin/rm ^{MIXMONITOR_FILENAME})
same => n,ConfBridge(4,tech_bridge,tech_admin,admin_menu)
same => n,Hangup()

and got this from the CLI but the command did not fire either.

-- Executing [8078@RL-IVR:4] Set("PJSIP/mark-00000002", "CONFBRIDGE(bridge,record_options)=m(5555)") in new stack
-- Executing [8078@RL-IVR:5] Set("PJSIP/mark-00000002", "CONFBRIDGE(bridge,record_command)=/bin/rm ^{MIXMONITOR_FILENAME}") in new stack
-- Executing [8078@RL-IVR:6] ConfBridge("PJSIP/mark-00000002", "4,tech_bridge,tech_admin,admin_menu") in new stack

#14

Mixmonitor m options is working

m( mailbox ) - Create a copy of the recording as a voicemail in the indicated mailbox(es) separated by commas eg. m(1111default,…). Folders can be optionally specified using the syntax: mailbox@context/folder
mailbox https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MixMonitor


#15

It’s not for me. Here is my voicemail record which I can access from my dialplan.

voicmail.conf
5555 => 5555,Mark Horrocks,markhorrocks@mydomain.com

extensions.conf
same => n,Set(CONFBRIDGE(bridge,record_options)=m(5555))


#16

I havent used m option on mix monitor, but you could try this syntax


#17

Yes, I just checked and changed it to 5555@default as my pjsip looks like this but it did not work.

mark
mailboxes = 5555@default

CLI
Executing [2244@RL-IVR:4] Set(“PJSIP/mark-00000001”, “CONFBRIDGE(bridge,record_options)=m(5555@default)”) in new stack
Executing [2244@RL-IVR:5] ConfBridge(“PJSIP/mark-00000001”, “4,tech_bridge,tech_admin,admin_menu”) in new stack


#18

I have progress. I moved the record_options to the confbridge.conf file and it did send a copy to my voicemail but sadly did not email me. I’d love to get an email to make this truly useful as I will not be the usual admin user and have several conferences. Normally, I do get an email if a regular call goes to voicemail.

I also got a warning, is it significant? It didn’t seem to make any difference.

== MixMonitor close filestream (mixed)
== End MixMonitor Recording CBRec/4-00000000
– Copying recordings for Mixmonitor CBRec/4-00000000 to voicemail recipients
> MixMonitor attempting to send voicemail copy to 5555@default
[Aug 31 14:11:11] WARNING[23733][C-00000001]: format_wav.c:232 update_header: Unable to set write file size
– Channel CBAnn/4-00000000;2 left ‘softmix’ base-bridge
– Executing [8088@RL-IVR:5] Hangup(“PJSIP/twilio0-00000001”, “”) in new stack
== Spawn extension (RL-IVR, 8088, 5) exited non-zero on ‘PJSIP/twilio0-00000001’


#19

Asterisk wont send you email there is not such feature on Asterisk, I told you in other thread that you need first to set at the OS level the email sending and attachments and then use it on Asterisk side
I did it using mpack package


same=>n,System(/usr/bin/mpack -s "file you wanted" /var/spool/asterisk/monitor/${TOUCH_MIXMONITOR_OUTPUT}.wav email@gmail.com)

#20

Thanks for your help. Just to be clear, how or why does asterisk send regular voicemails to my email address now but will not for confridge?