PHP Class PAGI\CDR\Impl\CDRFacade

If the channel has a cdr, that cdr record has it's own set of variables which can be accessed just like channel variables. The following builtin variables are available and, unless specified, read-only. ${CDR(clid)} Caller ID ${CDR(src)} Source ${CDR(dst)} Destination ${CDR(dcontext)} Destination context ${CDR(channel)} Channel name ${CDR(dstchannel)} Destination channel ${CDR(lastapp)} Last app executed ${CDR(lastdata)} Last app's arguments ${CDR(start)} Time the call started. ${CDR(answer)} Time the call was answered. ${CDR(end)} Time the call ended. ${CDR(duration)} Duration of the call. ${CDR(billsec)} Duration of the call once it was answered. ${CDR(disposition)} ANSWERED, NO ANSWER, BUSY ${CDR(amaflags)} DOCUMENTATION, BILL, IGNORE etc ${CDR(accountcode)} The channel's account code (read-write). ${CDR(uniqueid)} The channel's unique id. ${CDR(userfield)} The channels uses specified field (read-write). In addition, you can set your own extra variables with a traditional Set(CDR(var)=val) to anything you want. NOTE Some CDR values (eg: duration & billsec) can't be accessed until the call has terminated. As of 91617, those values will be calculated on-demand if requested. Until that makes it into a stable release, you can set endbeforehexten=yes in cdr.conf, and then use the "hangup" context to wrap up your call. PHP Version 5
Author: Marcelo Gornstein ([email protected])
Inheritance: implements PAGI\CDR\ICDR
Datei anzeigen Open project: marcelog/pagi

Public Methods

Method Description
__construct ( PAGI\Client\IClient $client ) : void Constructor.
getAMAFlags ( ) (non-PHPdoc)
getAccountCode ( ) (non-PHPdoc)
getAnswerLength ( ) (non-PHPdoc)
getAnswerTime ( ) (non-PHPdoc)
getCallerId ( ) (non-PHPdoc)
getChannel ( ) (non-PHPdoc)
getCustom ( $name ) (non-PHPdoc)
getDestination ( ) (non-PHPdoc)
getDestinationChannel ( ) (non-PHPdoc)
getDestinationContext ( ) (non-PHPdoc)
getEndTime ( ) (non-PHPdoc)
getLastApp ( ) (non-PHPdoc)
getLastAppData ( ) (non-PHPdoc)
getSource ( ) (non-PHPdoc)
getStartTime ( ) (non-PHPdoc)
getStatus ( ) (non-PHPdoc)
getTotalLength ( ) (non-PHPdoc)
getUniqueId ( ) (non-PHPdoc)
getUserfield ( ) (non-PHPdoc)
setAccountCode ( $value ) (non-PHPdoc)
setCustom ( $name, $value ) (non-PHPdoc)
setUserfield ( $value ) (non-PHPdoc)

Protected Methods

Method Description
getCDRVariable ( string $name ) : string Access AGI client to get the variables.
setCDRVariable ( string $name, string $value ) : void Access AGI client to set the variable.

Method Details

__construct() public method

Constructor.
public __construct ( PAGI\Client\IClient $client ) : void
$client PAGI\Client\IClient AGI Client.
return void

getAMAFlags() public method

(non-PHPdoc)
public getAMAFlags ( )

getAccountCode() public method

(non-PHPdoc)
public getAccountCode ( )

getAnswerLength() public method

(non-PHPdoc)
public getAnswerLength ( )

getAnswerTime() public method

(non-PHPdoc)
public getAnswerTime ( )

getCDRVariable() protected method

Access AGI client to get the variables.
protected getCDRVariable ( string $name ) : string
$name string Variable name.
return string

getCallerId() public method

(non-PHPdoc)
public getCallerId ( )

getChannel() public method

(non-PHPdoc)
public getChannel ( )

getCustom() public method

(non-PHPdoc)
public getCustom ( $name )

getDestination() public method

(non-PHPdoc)
public getDestination ( )

getDestinationChannel() public method

(non-PHPdoc)

getDestinationContext() public method

(non-PHPdoc)

getEndTime() public method

(non-PHPdoc)
public getEndTime ( )

getLastApp() public method

(non-PHPdoc)
public getLastApp ( )

getLastAppData() public method

(non-PHPdoc)
public getLastAppData ( )

getSource() public method

(non-PHPdoc)
public getSource ( )

getStartTime() public method

(non-PHPdoc)
public getStartTime ( )

getStatus() public method

(non-PHPdoc)
public getStatus ( )

getTotalLength() public method

(non-PHPdoc)
public getTotalLength ( )

getUniqueId() public method

(non-PHPdoc)
public getUniqueId ( )

getUserfield() public method

(non-PHPdoc)
public getUserfield ( )

setAccountCode() public method

(non-PHPdoc)
public setAccountCode ( $value )

setCDRVariable() protected method

Access AGI client to set the variable.
protected setCDRVariable ( string $name, string $value ) : void
$name string Variable name.
$value string Value.
return void

setCustom() public method

(non-PHPdoc)
public setCustom ( $name, $value )

setUserfield() public method

(non-PHPdoc)
public setUserfield ( $value )