Strip and Append Number for Individual trunk

Our VOIP provider has allocated specific Emergency numbers for particular states.

Canberra ACT ACT 981
Sydney NSW NSW 982
Melbourne VIC VIC 983
Hobart TAS TAS 984
Darwin NT NT 985
Brisbane QLD QLD 987
Adelaide SA SA 988
Perth WA WA 989
(Note: 000 is the national PSTN emercency number for Australia)
This means,

If 000 is dialed from a NSW extension the number passed to the trunk needs to be 982
If 000 is dialled from a VIC extension the number passed to the trunk needs to be 983
What is the best way to acheive this for this providers SIP trunk only?
FYI: Schmooze: PBX Version 1.812.210.57-1