Two SIP trunks from ONE provider, might a bug?

I have two registrations with different DIDs at one provider. Lets name SIP/XXXXX and SIP/YYYYY
Couple days ago I have discovered that incoming call from SIP/XXXXX trunk fails with error 499 if not g711 codec used. After investigation I have discovered than problem occures because I have allowed only g711 at SECOND trunk SIP/YYYYY. I have allowed others codecs for trank SIP/YYYYY and non g711 incoming calls from SIP/XXXXX starts working.
Looking thru a log I have discovered that all incoming calls from that provider Asterisk supposes as calls from SIP/YYYYY.
Might it checks only IP address and retrives data for the first found trunk?

How does your sip.conf file look? It is possible to register multiple peers from one provider, I have dont it before.

Do you have a register line that looks like this

register => YOURNUMBER:YOURPASS@INSERT PROXY HERE/YOURNUMBER

[quote=“Imericom”]How does your sip.conf file look? It is possible to register multiple peers from one provider, I have dont it before.

Do you have a register line that looks like this

register => YOURNUMBER:YOURPASS@INSERT PROXY HERE/YOURNUMBER[/quote]

Yep. I have TWO such lines
register => XXXXX:pass1@domain.com/XXXXX
register => YYYYY:pass2@domain.com/YYYYY

But during incoming call no matter from what number it comes Asterisk shows in the log “SIP/YYYYY-…”