When I was trying to add gateway for one of configured accounts it failed with database error "duplicate key".
It turns out that "name" field is unique in database and different accounts are not allowed to use the same gateway name.
I'm looking on this system from multi-tenant point of view.
In this case one account should be able to name his gateways as he wants. And should not depend from the names that already in use by other accounts.
E.g. When some provider provides hosted PBX service it's expectable that he'll be a gateway for them too.
They'll be using the same "Gateway Name:" "providername" and different "Username:".
May be I miss something and it was done intentionally?