- function handle_msg($msg)
- {
- if (substr($msg, 0, 9) != '[DKANPROT') {
- //unknown message type
- return;
- }
- $regex = '#^\\[DKANPROT-([^ ]+) ([0-9]+)\\] (.*)$#';
- if (!preg_match($regex, $msg, $matches)) {
- //message should always be that way
- return false;
- }
- list(, $type, $someid, $details) = $matches;
-
- if ($type != 'Info') {
- //we only want info messages
- var_dump($type . ': ' . $details);
- return;
- }
- //Vegw/Ets-Cref:[0xffef]/[0x64] - VEGW_SETUP from upper layer to internal destination: CGPN[**22]->CDPN[41],
- var_dump($details);
- $regex = '#CGPN\\[([^\\]]+)\\]->CDPN\\[([^\\]]+)\\]#';
- if (preg_match($regex, $details, $matches)) {
- var_dump('a call!', $matches);
- }
- }
-
-