teleporting objects when collide

i want to teleport ( change the location ) of an object when they collide with another object .

lets say we have an object and 2 doors and i want when the object hit ( touch ) the first door then have to vanish and come out of the second door .

i already tried to set X and Y for the object when collide with the first door . but apparently you when the world is locked in a collide you cant change any thing for those objects .

so any ideas .

PS : please note that i have to use physics to move object and detect collision .

Thanks

try 

function teleport(event)

if(event.phase==“began”)then

a=transition.to(objectname,{time=0,x=100,y=100})

end

end

obj:addEventListener(“colission”,teleport)

Thanks Sharma it works !

try 

function teleport(event)

if(event.phase==“began”)then

a=transition.to(objectname,{time=0,x=100,y=100})

end

end

obj:addEventListener(“colission”,teleport)

Thanks Sharma it works !