[SOLVED] FreePBX Conferences Module generating non-functional ConfBridge Rooms - FreePBX 2.10+Asterisk 1.8.9.2

Howdy all,

First time posting, but a bit of a big issue I’ve taken notice to today. When trying to create a ConfBridge conference room through the “Conferences” section on FreePBX, it generates a few additional artifacts that negatively affect Asterisk’s function. After digging in the extensions_additional.conf file, I noticed the following:

exten => STARTMEETME,n,ConfBridge(${MEETME_ROOMNUM},${MM_OS}<${PIN}) where “${MM_OS}” should actually be “${MEETME_OPTS}”.

Additionally, running Asterisk CLI while joining a ConfBridge room, it issues a few Warnings and Errors.

[Feb 18 08:24:46] ERROR[25495]: pbx.c:3652 ast_func_read: Function MEETME_INFO not registered
[Feb 18 08:24:46] WARNING[25495]: func_logic.c:192 acf_if: Syntax IF(<expr>?[<true>][:<false>])  (expr must be non-null, and either <true> or <false> must be non-null)
[Feb 18 08:24:46] WARNING[25495]: func_logic.c:193 acf_if:       In this case, <expr>='', <true>='', and <false>='conf-101-101-20120218-082446-1329582286.71'
    -- Executing [recconf@sub-record-check:1] Set("SIP/501-00000029", "__CALLFILENAME=") in new stack
[Feb 18 08:24:46] ERROR[25495]: pbx.c:3652 ast_func_read: Function MEETME_INFO not registered
[Feb 18 08:24:46] WARNING[25495]: ast_expr2.fl:468 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected $end, expecting '-' or '!' or '(' or '<token>'; Input:
!
 ^
[Feb 18 08:24:46] WARNING[25495]: ast_expr2.fl:472 ast_yyerror: If you have questions, please refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
    -- Executing [recconf@sub-record-check:2] ExecIf("SIP/501-00000029", "0?Set(DB(RECCONF/101)=)") in new stack
    -- Executing [recconf@sub-record-check:3] Set("SIP/501-00000029", "MEETME_RECORDINGFILE=/var/spool/asterisk/monitor/2012/02/18/") in new stack
    -- Executing [recconf@sub-record-check:4] Set("SIP/501-00000029", "MEETME_RECORDINGFORMAT=wav") in new stack
[Feb 18 08:24:46] WARNING[25495]: pbx.c:4099 pbx_substitute_variables_helper_full: Error in extension logic (missing ']')
[Feb 18 08:24:46] WARNING[25495]: ast_expr2.fl:468 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected $end, expecting '-' or '!' or '(' or '<token>'; Input:
"never"!="always?Return(
                        ^
[Feb 18 08:24:46] WARNING[25495]: ast_expr2.fl:472 ast_yyerror: If you have questions, please refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
    -- Executing [recconf@sub-record-check:5] ExecIf("SIP/501-00000029", "0") in new stack
[Feb 18 08:24:46] WARNING[25495]: app_exec.c:231 execif_exec: Deprecated syntax found.  Please upgrade to using ExecIf(<expr>?(null)((null)))

The generated ext-meetme from PBX is the following:

include => ext-meetme-custom
exten => STARTMEETME,1,ExecIf($["${MEETME_MUSIC}" != ""]?Set(CHANNEL(musicclass)=${MEETME_MUSI$
exten => STARTMEETME,n,Set(GROUP(meetme)=${MEETME_ROOMNUM})
exten => STARTMEETME,n,GotoIf($[${MAX_PARTICIPANTS} > 0 && ${GROUP_COUNT(${MEETME_ROOMNUM}@mee$
exten => STARTMEETME,n,ConfBridge(${MEETME_ROOMNUM},${MM_OS},${PIN})
exten => STARTMEETME,n,Hangup

exten => MEETMEFULL,1,Playback(im-sorry&conf-full&goodbye)
exten => MEETMEFULL,n,Hangup

exten => h,1,Hangup

exten => 101,1,Macro(user-callerid,)
exten => 101,n,Set(MEETME_ROOMNUM=101)
exten => 101,n,Set(MAX_PARTICIPANTS=0)
exten => 101,n,Set(MEETME_MUSIC=Beats)
exten => 101,n,Gosub(sub-record-check,s,1(conf,101,never))
exten => 101,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?READPIN)
exten => 101,n,Answer
exten => 101,n,Wait(1)
exten => 101,n,Set(PINCOUNT=0)
exten => 101,n(READPIN),Read(PIN,enter-conf-pin-number,,,,)
exten => 101,n,GotoIf($[x${PIN} = x101]?USER)
exten => 101,n,Set(PINCOUNT=$[${PINCOUNT}+1])
exten => 101,n,GotoIf($[${PINCOUNT}>3]?h)
exten => 101,n,Playback(conf-invalidpin)
exten => 101,n,Goto(READPIN)
exten => 101,n(USER),Set(MEETME_OPTS=cMm)
exten => 101,n,Goto(STARTMEETME,1)

Whereas I had perfect success building my own in extensions_override_freepbx.conf:

include => ext-meetme-custom
exten => STARTMEETME,1,ExecIf($["${MEETME_MUSIC}" != ""]?Set(CHANNEL(musicclass)=${MEETME_MUSIC}))
exten => STARTMEETME,n,Set(GROUP(meetme)=${MEETME_ROOMNUM})
exten => STARTMEETME,n,GotoIf($[${MAX_PARTICIPANTS} > 0 && ${GROUP_COUNT(${MEETME_ROOMNUM}@meetme)}>${MAX_PARTICIPANTS}]?MEETMEFULL,1)
exten => STARTMEETME,n,ConfBridge(${MEETME_ROOMNUM},${MEETME_OPTS},${PIN})
exten => STARTMEETME,n,Hangup
exten => MEETMEFULL,1,Playback(im-sorry&conf-full&goodbye)
exten => MEETMEFULL,n,Hangup
exten => h,1,Hangup
exten => 101,1,Macro(user-callerid,)
exten => 101,n,Set(MEETME_ROOMNUM=101)
exten => 101,n,Set(MAX_PARTICIPANTS=0)
exten => 101,n,Set(MEETME_MUSIC=Beats)
exten => 101,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?READPIN)
exten => 101,n,Set(CONFBRIDGE_JOIN_SOUND=confbridge-join)
exten => 101,n,Set(CONFBRIDGE_LEAVE_SOUND=confbridge-leave)
exten => 101,n,Answer
exten => 101,n,Wait(1)
exten => 101,n(USER),Set(MEETME_OPTS=cMm)
exten => 101,n,Goto(STARTMEETME,1)

Any and all help is appreciated. I’m no PHP professional, but I get the feeling there may be some foul play in the conferences module PHP.

Thank you!

You have not provided the most important information here. What version of FreePBX and Asterisk are you using?

My apologies! Asterisk 1.8.9.2 and FreePBX 2.10 (both updated today, prior to running into these issues, but performed after failed attempts with 2.9+1.8.8.0, then 2.10+1.8.8.0)

A friend of mine proposed that I amend the functions.inc.php file at lines 155 and 156 with

155                                         $ext->add($contextname, $roomnum, '', new ext_setvar('CONFBRIDGE_JOIN_SOUND', "confbridge-join"));
156                                         $ext->add($contextname, $roomnum, '', new ext_setvar('CONFBRIDGE_LEAVE_SOUND', "confbridge-leave"));

Where I define the sound statically, which is perfectly fine for my application of the PBX system.

I’ve resolved the issue, to those of you who may face this in the future.

You need to modify the file at /var/www/html/admin/libraries/ titled extensions.class.php

Navigate to class ext_meetme and comment or remove the following lines:

//remove invalid options /* $this->options = str_replace(array('b', 'C', 'd', 'D', 'e', 'E', 'F', 'i', 'I', 'l', 'o', 'P', 'r', 's', 't', 'T', 'x', 'X'), '', $this->options); $this->options = preg_replace('/[GpSL]\(.*\)/', '', $this->options); $this->options = preg_replace('/w\(.*\)/', 'w', $this->options); */

This will correct the line in /etc/asterisk/extensions_additional.conf that states

where “${MM_OS}” should read “${MEETME_OPTS}”. Additionally, I removed the lines intended for setting recording on the conference, as they were causing errors and warnings. These lines must be commented or removed from the /var/www/html/admin/modules/conferences/functions.inc.php file at line 153, which states:

$ext->add($contextname, $roomnum, '', new ext_gosub('1','s','sub-record-check',"conf,$roomnum," . (strstr($room['options'],'r') !== false ? 'always' : 'never')));

Have fun!

The changes you noted fix the conf room ‘user count’ announcement on my installation. Prior to these changes users would join but the user count was not played for the new caller.

ChewableFritter

Thanks for all the work on this. The class ext_meetme() was changed in an attempt to make it possible to abstract whether meetme or confbridge was being called so an attempt could be made to put the Advanced Setting in allowing you to choose which of the two you wanted to use.

Unfortunately it didn’t work and was not followed up on resulting in the issues you ran into. In particular, the intention had been that the call could be made and when the dialplan is generated, the proper options could be substituted. Unfortunately at the time it was done, it was overlooked that options can be passed in a channel variable which means any such substitutions would have to be done in the dialplan or otherwise the generation of the options when being set to the channel variables would have to be modified at that point.

So bottom line, it doesn’t work and for other reasons attempts to make meetme and confbridge interchangeable was abandoned because of other limitations in confbridge.

In either case, the changes did render this problematic. I’ll file a bug against those changes and reference this post. All of the details are very helpful though, thanks.

see #5628

Glad to have been of some service. I look forward to contributing to this project further as my programming knowledge increases.

[s]Unfortunately, I haven’t had the opportunity to check out the conferences module update, as I’ve run into an interesting fault where selecting “Check Online” in the Module Admin has been causing my entire web server to crash.

After I address this issue to my company’s network engineering team, I will see if the problem persists (at present, they’ve restricted server access to only the internal company network, and I believe that this is causing FreePBX and my Web Server to hang and crash). If the issue continues after I have been granted external network access on the server, I will begin digging for bugs and make a new forum for it.[/s]

Tweaking httpd.conf for HostnameLookup fixed the issue here. Changed from ‘off’ to ‘on’.

Philippe-

I really appreciate the 15-seconds of fame on this! Made my day when I saw it and still does when I use my conference bridges with the updated module.

One issue that still exists is the Join/Leave sounds. While option “Quiet” is set to “No”, there should be a join and leave sound for whenever a user joins or leaves the bridge, as you well know. Regardless of setting this option in the GUI, no sound plays. Unlike last time where adding the required lines corrected the issue, now if I modify the functions.inc.php file, the entire GUI fails to load.

Any advice is greatly appreciated. I may start digging through code again, but it seems there’s a new dependency across these functions.inc.php files that will affect how quickly I can identify the issue.