Instant messaging

how will i implement instant messaging in my asterisk server???

me and my groups have already implemented asterisk in our school using softphones which has instant messaging capability but whenever we try to send a message to the other end, the message was not received by the other end rather it was received by the asterisk server…

may i know how are we going to solve this problem???,