Realtime strange char and malformed uri

I’m using two RT servers with mysql database.
Sometime in the registrations table I find the fullcontact like this:

the problem is the trailing ^ that remains in the uri of the outgoing INVITEs

end that causes marlformed uri error in the ATAs and IPPhones

There is a way to fix that?