How to rewrite src based on destination?

How do i go about changing the src based on the destination country?

For example, if src 12125556677 calls to Germany (country code 49), the src should be changed to a German caller ID (4955566677).

I want to keep routing the same, not adding all German dialpeers again with a tag and changing the src there.

You can use dst numberlist for this.

That works great, thank you.

I tried setting two numberlist items with the same key, idea is that if SRC is 111 change it to 222 and if SRC is 444 change it to 555, but it does not allow duplicate keys, is there a way to achieve this?

It is not clear what idea of creating numberlist items with same key. If you want different rewrite rules depends on SRC - you have to use source numberlist + different items per src.

What i want is that if a call is placed to Germany (prefix 49):

If the original SRC is 12125554477 change it to 49789557788

And if the original SRC is 12129997766 change it to 4945886644.