create a new dial plan and set it as 'Out Dial Plan' on your sipsorcery user. Example of dial plan that uses gv for us calls (calls starting with 1), nonoh for china (calls start with 01186)(nonoh is defined as a sip provider on sipsorcery). Watch the console to see the flow of execution and correct errors. HTH,
case req.URI.User
when /^1d{10}$/ then
sys.Log("calling USA #{req.URI.User}");
sys.GoogleVoiceCall(....);
when /^01186d{8,12}/ then
sys.Log("calling international #{req.URI.User}");
sys.Dial("nonoh");
else
sys.Log("unrecognized number #{req.URI.User}");
end