Your 1st example will work, but it's not necessary to check for CallerID.
This will route all calls to POTS: li('')
When you bridge a call, the userid of the inbound service provider will be used as the outbound number, so your 2nd example will not work correctly. You need to use the double quotes to override the userid with nulls.
Edit:
Inbound route processing moves left to right, so the suggestion in my 1st post will route the callerid to Line and all other numbers to the phone port.
I was wrong about your 1st example and it won't work. You are checking the callerid for a single character. It should be "@.". You also have to enclose the "@." in parentheses, so the argument is a digitmap. Without the parentheses the "@." is a literal.
The dot means 0 or more characters.
{(@.):li('')},{ph}
The 1st rule will match all inbound numbers, so the {ph} will never be used. When there is only 1 rule the { } is optional.