GS GXW410x SIP FXO Gateway - prepend to some outgoing lines not to others

Asterisk 1.8.15
Grandstream GXW4108 SIP FXO Gateway

Our GXW4108 gateway is set up for 1-stage outbound dialing. It has only three FXO ports used so far. Two of the three channels are connected to phone lines that require a 9 before the number when dialing an outbound call (they go to another PBX over which we have no control). The third line does not require the 9; it goes straight to the PSTN. The gateway box connects to Asterisk PBX via a SIP trunk and inbound/outbound routes.

People placing calls to the outside have no control over which outside phone line they get… they get the next one available. Thus they can’t know whether they need to prepend a 9.

How can I set it up so that calls that happen to go to lines 1 or 2 get the 9 prepended automatically, and calls that happen to go to line 3 do not?

In the Grandstream Device Configuration->Dial plan I tried setting PSTN Outgoing Call Dial Plan to:

ch1-2:{<=9>x+}; ch3:{x+};

Didn’t work… upon reboot the gateway reverted to the default {x+} because it saw what I put in there as illegal.

Apparently it’s not possible to have different dial plans for different channels within the Grandstream configuration, or if it is, it’s not clear how.

Any ideas?