AGI stopped to work after upgading to 1.6

I have below script (PHP) that worked with 1.4 ver of asterisk. Now it does not send caller to the specified context and extension. Look below for the console output. FYI: the ext 3124663135 exist. And agi tries to set the context and tries to exec go to. Did anything changed so it could screw that script?

checkcid.agi: Call from -3124663135-
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=1
<SIP/7083519199-09388ff8>AGI Rx << SET CONTEXT planusers
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=0
<SIP/7083519199-09388ff8>AGI Rx << EXEC GoTO 3124663135|1
– AGI Script Executing Application: (GoTO) Options: (3124663135|1)
– Goto (planusers,s,2147483647)
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=0
– <SIP/7083519199-09388ff8>AGI Script checkcid.agi completed, returning 0

#!/usr/bin/php -q

<?php ob_implicit_flush(true); set_time_limit(6); $in = fopen("php://stdin","r"); $stdlog = fopen("/var/log/asterisk/my_agi.log", "w"); // toggle debugging output (more verbose) $debug = false; // Do function definitions before we start the main loop function read() { global $in, $debug, $stdlog; $input = str_replace("\n", "", fgets($in, 4096)); if ($debug) fputs($stdlog, "read: $input\n"); return $input; } function errlog($line) { global $err; echo "VERBOSE \"$line\"\n"; } function write($line) { global $debug, $stdlog; if ($debug) fputs($stdlog, "write: $line\n"); echo $line."\n"; } // parse agi headers into array while ($env=read()) { $s = split(": ",$env); $agi[str_replace("agi_","",$s[0])] = trim($s[1]); if (($env == "") || ($env == "\n")) { break; } } // main program // main program $cli = $agi[callerid]; $exten= $agi[extension]; //$pattern = "*\<[0-9]+\>*"; $pattern = "*[0-9]+*"; preg_match($pattern,$cli,$matches); $out = trim($matches[0], "<>"); errlog("Call from -$out-"); errlog("Call from -$cli-"); errlog("Call from -$matches[0]-"); If (!$out) { write ("SET CONTEXT from-sbc"); write ("EXEC GoTO from-sbc|s|1"); } Else { write ("SET CONTEXT planusers"); write ("EXEC GoTO $out|1"); } // clean up file handlers etc. fclose($in); fclose($stdlog); exit; ?>

Console output:

-- Executing [s@pppp:2] AGI("SIP/7083519199-09388ff8", "checkcid.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/checkcid.agi

<SIP/7083519199-09388ff8>AGI Tx >> agi_request: checkcid.agi
<SIP/7083519199-09388ff8>AGI Tx >> agi_channel: SIP/7083519199-09388ff8
<SIP/7083519199-09388ff8>AGI Tx >> agi_language: en
<SIP/7083519199-09388ff8>AGI Tx >> agi_type: SIP
<SIP/7083519199-09388ff8>AGI Tx >> agi_uniqueid: 1224789251.78
<SIP/7083519199-09388ff8>AGI Tx >> agi_version: 1.6.0.1
<SIP/7083519199-09388ff8>AGI Tx >> agi_callerid: 3124663135
<SIP/7083519199-09388ff8>AGI Tx >> agi_calleridname: Equity Ofc Pro
<SIP/7083519199-09388ff8>AGI Tx >> agi_callingpres: 0
<SIP/7083519199-09388ff8>AGI Tx >> agi_callingani2: 0
<SIP/7083519199-09388ff8>AGI Tx >> agi_callington: 0
<SIP/7083519199-09388ff8>AGI Tx >> agi_callingtns: 0
<SIP/7083519199-09388ff8>AGI Tx >> agi_dnid: 7083519199
<SIP/7083519199-09388ff8>AGI Tx >> agi_rdnis: unknown
<SIP/7083519199-09388ff8>AGI Tx >> agi_context: pppp
<SIP/7083519199-09388ff8>AGI Tx >> agi_extension: s
<SIP/7083519199-09388ff8>AGI Tx >> agi_priority: 2
<SIP/7083519199-09388ff8>AGI Tx >> agi_enhanced: 0.0
<SIP/7083519199-09388ff8>AGI Tx >> agi_accountcode:
<SIP/7083519199-09388ff8>AGI Tx >> agi_threadid: -1217807472
<SIP/7083519199-09388ff8>AGI Tx >>
<SIP/7083519199-09388ff8>AGI Rx << VERBOSE "Call from -3124663135-"
checkcid.agi: Call from -3124663135-
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=1
<SIP/7083519199-09388ff8>AGI Rx << VERBOSE "Call from -3124663135-"
checkcid.agi: Call from -3124663135-
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=1
<SIP/7083519199-09388ff8>AGI Rx << VERBOSE "Call from -3124663135-"
checkcid.agi: Call from -3124663135-
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=1
<SIP/7083519199-09388ff8>AGI Rx << SET CONTEXT planusers
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=0
<SIP/7083519199-09388ff8>AGI Rx << EXEC GoTO 3124663135|1
– AGI Script Executing Application: (GoTO) Options: (3124663135|1)
– Goto (planusers,s,2147483647)
<SIP/7083519199-09388ff8>AGI Tx >> 200 result=0
– <SIP/7083519199-09388ff8>AGI Script checkcid.agi completed, returning 0
– Auto fallthrough, channel ‘SIP/7083519199-09388ff8’ status is ‘UNKNOWN’
– Executing [h@planusers:1] Hangup(“SIP/7083519199-09388ff8”, “”) in new stack
== Spawn extension (planusers, h, 1) exited non-zero on ‘SIP/7083519199-09388ff8’

thx

Try changing the parameter delimiter from | to , in your commands.

it did the trick
thx