is there a simple way to match something like this:
exten => _+380XXXXXXXXX,1,NoOp(hint that)
exten => _0XXXXXXXXX,1,NoOp(hint that)
this two extensions matches same number with or without +38 prefix. is there any rule
to mutch like _[(+38)]0XXXXXXXX
that?
AFAIK Asterisk does not offer dialplan matching syntax which would accommodate this (FreeSWITCH does).
You have to sanitize the number so that you can match it in the canonical format further down the dialplan. I think something like this might work for you:
This way you can convert international +380XX..XX numbers to the national(?) 0XX..XX format and just use a single match later on. (I did not try the example myself as I switched to FreeSWITCH some time ago, but it should give you a hint what you need to do).
Edited to add:
Obviously you can also do the opposite if you want to use the international format as your canonical number format: