You can use $() around the matchtext (which is the same as $eval) to create any dynamic parameter you want.
The problem is that $chan is unfortunately not set during the evaluation of the matchtext nor it is set in the channel evaluation part, you would have to use a filter such as * and then use /if to check your variable.
if ($($+(%,prefix_,$chan),2) == $1-) echo -ag just said $v1
@khaled, is it a bug that $chan is not set there?
on *:TEXT:$($callme(1,$chan)):$($callme(2,$chan)): { msg $chan ok $!matchkey: $matchkey }
alias callme echo -ag !! $1- | return #mircscripting