I'm not deep into routing, but I think that you can't have the master track as receiving track. You need to manipulate main-sends instead, while reaper.SetTrackSendInfo_Value(master_track,0,1,"I_ DSTCHAN",1) might only work for regular sends on tracks that are not master.