How to configure instant messaging on asterisk

Hi all,

I have installed twinkle VoIP client properly on ubuntu.
I have installed and configured asterisk server and made accounts of twinkle clients on asterisk server so that they can contact each other via asterisk.

Both clients call to each other properly.

But, when i try to send message to another client,

after typing message, when i click on Send button,
it shows error on twinkle client : Delivery Failure : 405 : Method Not allowed.

But, message goes to asterisk server, and asterisk drops it.

chan_sip.c:9769 receive_message: Received message to sip:123@ from “789” sip:789@;tag=lqptc, dropped it…
Message: hello blah blah

From this, i came to think that asterisk might need some configuration to redirect these messages to end party registered over asterisk.

Is there special setting need to be done on asterisk server for SMS,
means like we have dialplan on asterisk for calls, so what about message redirection, where i should specify plan for messages.

so do i need to make changes in any asterisk config files for instant messages.

Please guide me how to start instant messaging.
Please help, i’m stuck.
Waiting for response.

Thanking you.