Skip to content

Commit

Permalink
Added LocalDialDescriptor class
Browse files Browse the repository at this point in the history
  • Loading branch information
xware42 committed Mar 19, 2014
1 parent 2cf203d commit 949d621
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/mg/PAGI/DialDescriptor/LocalDialDescriptor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace PAGI\DialDescriptor;

/**
* SIP Dial Descriptor class.
*
* @category PAGI
* @package DialDescriptor
* @author Thomas Stähle <[email protected]>
* @license http://marcelog.github.com/PAGI/ Apache License 2.0
* @link http://marcelog.github.com/PAGI/
*/
class LocalDialDescriptor extends DialDescriptor
{
const TECHNOLOGY = 'LOCAL';

/**
* (non-PHPdoc)
* @see DialDescriptor::getTechnology()
*/
public function getTechnology()
{
return self::TECHNOLOGY;
}

/**
* (non-PHPdoc)
* @see DialDescriptor::getChannelDescriptor()
*/
public function getChannelDescriptor()
{
return self::TECHNOLOGY .'/' .$this->target;
}

/**
* constructor.
*
* @param string $context The asterisk context
* @param string $extension The asterisk extension
*/
public function __construct($context, $extension)
{
$this->target = $extension . '@' . $context;
}
}

0 comments on commit 949d621

Please sign in to comment.