+
+ protected function handleParams($msg, $call, $callId)
+ {
+ foreach ($msg->parameters as $param) {
+ switch ($param->type) {
+ case EDSS1_Parameter::CALLING_PARTY_NUMBER:
+ $call->from = $this->getFullNumber(
+ $param->number, $param->numberType
+ );
+ break;
+ case EDSS1_Parameter::CALLED_PARTY_NUMBER:
+ $call->to = $this->getFullNumber(
+ $param->number, $param->numberType
+ );
+ if ($call->type == CallMonitor_Call::INCOMING
+ && $param->numberType != EDSS1_Parameter_Names::NUMBER_SUBSCRIBER
+ ) {
+ //only keep incoming calls that arrive at the switchboard,
+ // not the ones from the switchboard to the telephones
+ unset($this->currentCalls[$callId]);
+ }
+ break;
+ case EDSS1_Parameter::KEYPAD:
+ if ($call->to === null) {
+ $call->to = $param->data;
+ }
+ }
+ }
+ }
+
+
+ protected function getFullNumber($number, $type)
+ {
+ if ($type == EDSS1_Parameter_Names::NUMBER_NATIONAL) {
+ return '0' . $number;
+ } else if ($type == EDSS1_Parameter_Names::NUMBER_INTERNATIONAL) {
+ return '+' . $number;
+ }
+ return $number;
+ }
+
+ /**
+ * Load details for a call, e.g. the name of the calling person
+ * or the area
+ *
+ * @return void
+ */
+ protected function loadCallDetails($call)
+ {
+ foreach ($this->detaillers as $detailler) {
+ $detailler->loadCallDetails($call);
+ }
+ }