You wait till it's day and walk out. Duh!
So while you are waiting, I'm going to say "וַיֹּאמֶר בָּלָק אֶל־בִּלְעָם הֲלֹא שָׁלֹחַ שָׁלַחְתִּי אֵלֶיךָ לִקְרֹא־לָךְ לָמָּה לֹא־הָלַכְתָּ אֵלָי הַאֻמְנָם לֹא אוּכַל כַּבְּדֶךָ" and get out. Then you'll overhear it and repeat it to the guard.
Good luck to anyone who can't say the L sound.