Asterisk/CME sip and dial-peer configuration


I currently have a SIP trunk configured between Asterisk PBX and CME. Asterisk is connected to the PRI and I want to be able to make calls out of the CME.

I have configured CME to prepend 1110 to any call made from the CME registered phones. I want to configure Asterisk that anytime it gets first four digits 1110 (I will change this to something like A110, so it cant be dialed by users), it will go out of the PRI trunk.

I have tried a few configs but to no avail, any help would be appreciated.

There is one way communication right now, I have a dial-peer on the asterisk that whenever 1111 is dialed, to send it to the Sip-trunk configured, and 1111 is an ephone registered to CME which rings, but im unable to call any asterisk registered phones or place outbound calls. I do have a dial-peer to send all digits to the SIP trunk and Im able to see the logs on asterisk but no avail.