DID not using proper trunk

Good Day,

I’ve been following this post

http://www.freepbx.org/support/documentation/howtos/how-to-get-the-did-of-a-sip-trunk-when-the-provider-doesnt-send-it-and-

as i’m having a problem with Engin sip trunk . We have 3 trunks from Engin and when i set them up and called the DID , the call will be connected and goes to the correct queue or extension assigned but when i check CLI , the DID call used a different Engin Trunk not the trunk that was supposed to be for that DID.
ea :
Trunk-Engin1
Trunk-Engin2
Trunk-Engin3

When I call DID supposed to be for Trunk-Engin2 , CLI will show that the trunk being used is Trunk-Engin1 , same for Trunk-Engin3 , CLI also shows the call uses Trunk-Engin1. I already followed the instructions but it’s still the same.

Do I need to change something in extensions_custom.conf aside from that.
I also change contex=custom-get-did-from-sip
[custom-get-did-from-sip]
exten => s,1,Noop(Fixing DID using information from SIP TO header)
exten => s,n,Set(pseudodid=${SIP_HEADER(To)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Goto(from-trunk,${pseudodid},1)