aboutsummaryrefslogtreecommitdiff
path: root/src/callnotifier/EDSS1/Parameter/6C.php
blob: cba45606d08728871e18119804f0482da646f13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
namespace callnotifier;

/**
 * Information element: Calling party number
 */
class EDSS1_Parameter_6C extends EDSS1_Parameter
    implements EDSS1_Parameter_INumber
{
    public $title = 'Calling party number';

    public $numberType;
    public $numberingPlan;
    public $presentationIndicator;
    public $screeningIndicator;
    public $number;

    public function setData($data)
    {
        parent::setData($data);
        $this->numberType    = (ord($data{0}) & 112) >> 4;
        $this->numberingPlan = (ord($data{0}) & 15);
        //data{1} is presentation/screening indicator
        $this->number = substr($data, 2);
    }
}

?>