Tuesday, April 13, 2010

Conference recordings for inbound and outbound participant in asterisk web-mm

It is the default behaviour of web-mm to start conference recording when moderator joins a conference room.  If your conference consists nothing but outbound participants, you have to modify the two files below to enable recording.


1.    /var/www/web-mm/app_cbmysql.c

static int cb_exec(struct ast_channel *chan, void *data)


        if (info){
                char *tmp = strsep(&info, "|");
                ast_copy_string(confno, tmp, sizeof(confno));

        if (!ast_strlen_zero(confno)){
                strcpy(dtmfinput.inroom, confno);
                skippass=1; // if confno is in parameter, we assume it is from outbound conference
        } else {
        strcpy(dtmfinput.inroom, "");

                if(res==1 && skippass ==0){ //  if skippass is 1, then do not prompt password
                        res = getPass(chan, dtmfinput, &dtmfmatch);
                        ast_log(LOG_NOTICE, "getPass: %i\n", res);
                } else {


2.    /var/www/web-mm/batchcall.php


        $as = new AGI_AsteriskManager();
        $res = $as->connect();
        if (!$res){ echo 'Error connection to the manager!'; exit();}

//      $application = MeetMe;

//      bridge the outbound party with application cbmysql, instead of meetme
        $application = cbmysql;
        $rnc = $data;

        $data = $data . "|d1qr"

        $priority = 1;
        $context = OUT_CONTEXT;


The result is:

1.    you call out from web-mm to a participant

2.    once the participant answers, he is bridged with the application cbmysql

3.    attributed to the use of cbmysql instead of meetme, recording option and voice file path are consistent  in both inbound and outbound conference.


Note that if conference is recording-enabled:

q       Recording starts when the first outbound party is connected and stops when all parties leave the conference (in the meantime, inbound by host would not trigger another recoding)

q       A new recording is created if outbound party is connected again


No comments:

Post a Comment