Changeset 5981

Show
Ignore:
Timestamp:
07/10/08 17:15:06 (6 months ago)
Author:
p_lindheimer
Message:

validation for new directdids, modify macro-systemrecording to support #2899 and allow files to be recorded in place

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/core/functions.inc.php

    r5968 r5981  
    14921492                        $context = 'macro-systemrecording'; 
    14931493                         
     1494                        //exten => s,1,Set(RECFILE=${IF($["${ARG2}" = ""]?/tmp/${AMPUSER}-ivrrecording:${ARG2})}) 
     1495                        $ext->add($context, 's', '', new ext_setvar('RECFILE','${IF($["${ARG2}" = ""]?/tmp/${AMPUSER}-ivrrecording:${ARG2})}')); 
     1496                        $ext->add($context, 's', '', new ext_execif('$["${ARG3}" != ""]','Authenticate','${ARG3}')); 
    14941497                        $ext->add($context, 's', '', new ext_goto(1, '${ARG1}')); 
    14951498                         
    14961499                        $exten = 'dorecord'; 
    14971500                         
    1498                         $ext->add($context, $exten, '', new ext_record('/tmp/${AMPUSER}-ivrrecording:wav')); 
     1501                        $ext->add($context, $exten, '', new ext_record('${RECFILE}:wav')); 
    14991502                        $ext->add($context, $exten, '', new ext_wait(1)); 
    15001503                        $ext->add($context, $exten, '', new ext_goto(1, 'confmenu')); 
     
    15021505                        $exten = 'docheck'; 
    15031506                         
    1504                         $ext->add($context, $exten, '', new ext_playback('/tmp/${AMPUSER}-ivrrecording')); 
     1507                        $ext->add($context, $exten, '', new ext_playback('beep')); 
     1508                        $ext->add($context, $exten, 'dc_start', new ext_background('${RECFILE},m,${CHANNEL(language)},macro-systemrecording')); 
    15051509                        $ext->add($context, $exten, '', new ext_wait(1)); 
    15061510                        $ext->add($context, $exten, '', new ext_goto(1, 'confmenu')); 
     
    15081512                        $exten = 'confmenu'; 
    15091513                        if (version_compare($version, "1.4", "ge")) {  
    1510                                 $ext->add($context, $exten, '', new ext_background('to-listen-to-it&press-1&to-rerecord-it&press-star,m,${CHANNEL(language)},macro-systemrecording')); 
     1514                                $ext->add($context, $exten, '', new ext_background('to-listen-to-it&press-1&to-rerecord-it&press-star&astcc-followed-by-pound,m,${CHANNEL(language)},macro-systemrecording')); 
    15111515                        } else { 
    1512                                 $ext->add($context, $exten, '', new ext_background('to-listen-to-it&press-1&to-rerecord-it&press-star,m,${LANGUAGE},macro-systemrecording')); 
     1516                                $ext->add($context, $exten, '', new ext_background('to-listen-to-it&press-1&to-rerecord-it&press-star&astcc-followed-by-pound,m,${LANGUAGE},macro-systemrecording')); 
    15131517                        } 
    15141518                        $ext->add($context, $exten, '', new ext_read('RECRESULT', '', 1, '', '', 4)); 
    15151519                        $ext->add($context, $exten, '', new ext_gotoif('$["x${RECRESULT}"="x*"]', 'dorecord,1')); 
    1516                         $ext->add($context, $exten, '', new ext_gotoif('$["x${RECRESULT}"="x1"]', 'docheck,1')); 
     1520                        $ext->add($context, $exten, '', new ext_gotoif('$["x${RECRESULT}"="x1"]', 'docheck,2')); 
    15171521                        $ext->add($context, $exten, '', new ext_goto(1)); 
    15181522                         
    1519                         $ext->add($context, '1', '', new ext_goto(1, 'docheck')); 
     1523                        $ext->add($context, '1', '', new ext_goto('dc_start', 'docheck')); 
    15201524                        $ext->add($context, '*', '', new ext_goto(1, 'dorecord')); 
    15211525                         
     
    39433947                $msgInvalidOutboundCID = _("Please enter a valid Outbound CID"); 
    39443948                $msgInvalidPause = _("Please enter a valid pause time in seconds, using digits only"); 
     3949                $msgInvalidDIDNum = _("You have entered a non-standard dialpattern for your DID. You can only enter standard dialpatterns. You must use the inbound routing form  to enter non-standard patterns"); 
     3950                $msgInvalidCIDNum = _("Please enter a valid Caller ID Number or leave it blank for your Assigned DID/CID pair"); 
    39453951 
    39463952                // This is the actual gui stuff 
     
    40104016                $section = _("Assigned DID/CID"); 
    40114017                $currentcomponent->addguielem($section, new gui_textbox('newdid_name', $newdid_name, 'DID Description', _("A description for this DID, such as \"Fax\"")), 4); 
    4012                 $currentcomponent->addguielem($section, new gui_textbox('newdid', $newdid, 'Add Inbound DID', _("A direct DID that is associated with this extension. The DID should be in the same format as provided by the provider (e.g. full number, 4 digits for 10x4, etc).<br><br>Format should be: <b>XXXXXXXXXX</b><br><br>.An optional CID can also be associated with this DID by setting the next box")), 4); 
    4013                 $currentcomponent->addguielem($section, new gui_textbox('newdidcid', $newdidcid, 'Add Inbound CID', _("Add a CID for more specific DID + CID routing. A DID must be specified in the above Add DID box")), 4); 
     4018                $currentcomponent->addguielem($section, new gui_textbox('newdid', $newdid, 'Add Inbound DID', _("A direct DID that is associated with this extension. The DID should be in the same format as provided by the provider (e.g. full number, 4 digits for 10x4, etc).<br><br>Format should be: <b>XXXXXXXXXX</b><br><br>.An optional CID can also be associated with this DID by setting the next box"),'!isDialpattern()',$msgInvalidDIDNum,true), 4); 
     4019                $currentcomponent->addguielem($section, new gui_textbox('newdidcid', $newdidcid, 'Add Inbound CID', _("Add a CID for more specific DID + CID routing. A CID must be specified in the above Add DID box"),'!isDialpattern()',$msgInvalidCIDNum,true), 4); 
    40144020 
    40154021                $dids = core_did_list('extension');