found the answer in the sangoma netborder express manual:
<!– DNIS-based Routing -->
< rule name =“ DNIS_Routing " outbound_interface =“ sip " qvalue =" 0.1 ">
<!-- Look if the incoming PSTN call is on the first Strong_20_Emphasis -->
< condition param =“ pstn.in.channelName " expr =" B1T.* " />
<!–- Retrieve and store the ANI in variable %0 -->
< condition param =“ pstn.in.ani " expr =“ (.*) " />
<!–- Retrieve and store the DNIS in variable %1 -->
< condition param =“ pstn.in.dnis " expr =" ([0-9]*) " />
< out_leg name =“ default " media_type =“ sendrecv “ >
<!-- Set the CallerID in the ‘From’ URI -->
< param name =“ sip.out.from.uri "
expr =“ sip:%0@GW_HOST_IP:GW_SIP_PORT "/>
< param name =“ sip.out.from.displayName " expr =“ Gateway "/>
<!-- Set the outbound URIs to point to URI of the form sip:5551212@acme.com -->
< param name =“ sip.out.requestUri " expr =“ sip:%1@acme.com “ />
< param name =“ sip.out.to.uri " expr =“ sip:%1@acme.com "/>
< param name =“ sip.out.to.displayName " expr =“ App "/>
</ out_leg >