| @@ 26-93 (lines=68) @@ | ||
| 23 | * |
|
| 24 | * @author Eric Smith <[email protected]> |
|
| 25 | */ |
|
| 26 | class ContactInfo extends Response |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * @var string The Address of Record this contact belongs to. |
|
| 30 | */ |
|
| 31 | private $aor; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var string The current status of the contact. |
|
| 35 | */ |
|
| 36 | private $contactStatus; |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @var string (optional) - Current round trip time, in microseconds, for the contact. |
|
| 40 | */ |
|
| 41 | private $roundtripUsec; |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @var string The location of the contact. |
|
| 45 | */ |
|
| 46 | private $uri; |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @return string The Address of Record this contact belongs to. |
|
| 50 | */ |
|
| 51 | public function getAor() |
|
| 52 | { |
|
| 53 | return $this->aor; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return string The current status of the contact. |
|
| 58 | */ |
|
| 59 | public function getContactStatus() |
|
| 60 | { |
|
| 61 | return $this->contactStatus; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @return string (optional) - Current round trip time, in microseconds, for the contact. |
|
| 66 | */ |
|
| 67 | public function getRoundtripUsec() |
|
| 68 | { |
|
| 69 | return $this->roundtripUsec; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @return string The location of the contact. |
|
| 74 | */ |
|
| 75 | public function getUri() |
|
| 76 | { |
|
| 77 | return $this->uri; |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * @param string $response |
|
| 82 | */ |
|
| 83 | public function __construct($response) |
|
| 84 | { |
|
| 85 | parent::__construct($response); |
|
| 86 | ||
| 87 | $this->aor = $this->getResponseValue('aor'); |
|
| 88 | $this->contactStatus = $this->getResponseValue('contact_status'); |
|
| 89 | $this->roundtripUsec = $this->getResponseValue('roundtrip_usec'); |
|
| 90 | $this->uri = $this->getResponseValue('uri'); |
|
| 91 | } |
|
| 92 | ||
| 93 | } |
|
| 94 | ||
| @@ 26-93 (lines=68) @@ | ||
| 23 | * |
|
| 24 | * @author Eric Smith <[email protected]> |
|
| 25 | */ |
|
| 26 | class LogChannel extends Response |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * @var string The log channel path |
|
| 30 | */ |
|
| 31 | private $channel; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var string The various log levels |
|
| 35 | */ |
|
| 36 | private $configuration; |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @var string Whether or not a log type is enabled |
|
| 40 | */ |
|
| 41 | private $status; |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @var string Types of logs for the log channel |
|
| 45 | */ |
|
| 46 | private $type; |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @return string The log channel path |
|
| 50 | */ |
|
| 51 | public function getChannel() |
|
| 52 | { |
|
| 53 | return $this->channel; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return string The various log levels |
|
| 58 | */ |
|
| 59 | public function getConfiguration() |
|
| 60 | { |
|
| 61 | return $this->configuration; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @return string Whether or not a log type is enabled |
|
| 66 | */ |
|
| 67 | public function getStatus() |
|
| 68 | { |
|
| 69 | return $this->status; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @return string Types of logs for the log channel |
|
| 74 | */ |
|
| 75 | public function getType() |
|
| 76 | { |
|
| 77 | return $this->type; |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * @param string $response |
|
| 82 | */ |
|
| 83 | public function __construct($response) |
|
| 84 | { |
|
| 85 | parent::__construct($response); |
|
| 86 | ||
| 87 | $this->channel = $this->getResponseValue('channel'); |
|
| 88 | $this->configuration = $this->getResponseValue('configuration'); |
|
| 89 | $this->status = $this->getResponseValue('status'); |
|
| 90 | $this->type = $this->getResponseValue('type'); |
|
| 91 | } |
|
| 92 | ||
| 93 | } |
|
| 94 | ||
| @@ 26-93 (lines=68) @@ | ||
| 23 | * |
|
| 24 | * @author Brian Smith <[email protected]> |
|
| 25 | */ |
|
| 26 | class TextMessage extends Response |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * @var string The text of the message. |
|
| 30 | */ |
|
| 31 | private $body; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var string A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. |
|
| 35 | */ |
|
| 36 | private $from; |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @var string A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. |
|
| 40 | */ |
|
| 41 | private $to; |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @var array (optional) - Technology specific key/value pairs associated with the message. |
|
| 45 | */ |
|
| 46 | private $variables; |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @return string The text of the message. |
|
| 50 | */ |
|
| 51 | public function getBody() |
|
| 52 | { |
|
| 53 | return $this->body; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return string A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. |
|
| 58 | */ |
|
| 59 | public function getFrom() |
|
| 60 | { |
|
| 61 | return $this->from; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @return string A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. |
|
| 66 | */ |
|
| 67 | public function getTo() |
|
| 68 | { |
|
| 69 | return $this->to; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @return TextMessageVariable[] (optional) - Technology specific key/value pairs associated with the message. |
|
| 74 | */ |
|
| 75 | public function getVariables() |
|
| 76 | { |
|
| 77 | return $this->variables; |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * @param string $response |
|
| 82 | */ |
|
| 83 | public function __construct($response) |
|
| 84 | { |
|
| 85 | parent::__construct($response); |
|
| 86 | ||
| 87 | $this->body = $this->getResponseValue('body'); |
|
| 88 | $this->from = $this->getResponseValue('from'); |
|
| 89 | $this->to = $this->getResponseValue('to'); |
|
| 90 | $this->variables = $this->getResponseValue('variables'); |
|
| 91 | } |
|
| 92 | ||
| 93 | } |
|
| 94 | ||