The "Match pattern" field applies a filter to the called number (not the calling).
The "CallerID" field in the "Dial Pattern" section applies a filter to the calling number, but does not modify it.
The question is how to modify the calling number.
This can be done through the menu "Extension / Features / Outbound CID",
but, unfortunately, this setting will have to be performed for each extension in the PBX separately.
OK, how to specify a pattern in the field "Route CID", but not a fixed number (not "567202" but "567<Extension>")?
There is also a "PBX / Tnunks / Advanced / Outbound CallerID" field, it is efficient, but you need to know the formats of these fields in order to specify a value with variables.