Magicjack grandstream handytone 503 ata and asterisk

grandstream handytone 503

how do i use a magicjack as an outbound trunk with the above?
I can redirect the indound calls and make it work but is there a better solution for that?
I want to be able to redirect, use extensions etc with the mj
thank you