[asterisk-dev] SIP MESSAGE methode

Johansson Olle E olle at voop.com
Sun Oct 15 23:39:19 MST 2006


15 okt 2006 kl. 20.59 skrev René Oertel:

> Hi,
>
> a task in a project is to implement a softphone with the ability to  
> send out
> instant messages.
> We have chosen the SIP MESSAGE methode beside the SIMPLE stuff.  
> After some
> code review of Asterisk 1.4.0-beta2 I've found in chan_sip.c the  
> functions
> called handle_request_message() and receive_message(). The problem  
> is that I
> don't understand exactly why receive_message() transforms the SIP  
> Request
> with the MESSAGE methode to an ast_frame and why it is then put  
> into the
> channel queue.
>
> However I didn't found out what happen to the frame. How does it  
> leave the
> queue and how is it send to the receiver?
>
> Maybe it is an idea to use the function transmit_message_with_text 
> (), but I
> had some problems to accurately set the proper parameter for  
> sip_pvt of the
> receiver with the available data in receive_message().

I would suggest that you study Asterisk a bit more. To help you, here's
some hints:

We only handle messages within the context of a call. Instant messaging
outside of a call is not handled.

Everything Asterisk does is multiprotocol. That's why we're sending  
messages into
the core and receive instructions to transmit a message from the core.

There are work going on to add IM support to Asterisk. We have a  
general design
for this and some experimental patches in the bug tracker to  
stimulate the
discussion.

Regards
/Olle


More information about the asterisk-dev mailing list