[Freeswitch-users] is there an event for SIP MESSAGE?

Michael Jerris mike at jerris.com
Wed Jan 28 11:10:14 PST 2009


On Jan 28, 2009, at 5:24 AM, Cavalera Claudio Luigi wrote:

> freeswitch-users-bounces at lists.freeswitch.org wrote:
>> Out of curiosity which SIP messages have you been watching for on the
>> event socket? Also, how are you connected to the event socket? Are  
>> you
>> subscribing to all events and sifting through them to confirm that no
>> events are being fired when SIP messages are being sent? -MC
>
>
> Thanks for your interest Michael,
> I'll try to explain better since I think this could become a useful
> feature; fs already provides a lot of features for Unified
> Communication. Moreover SIP messages are supported almost for free  
> from
> the sofia sip stack.
>
> When experimenting I usually connect to the event socket with netcat:
> nc localhost 8021
> auth ClueCon
> event plain all
>
> If i register two clients to the event socket they can SIP message  
> each
> other.
> I'm meaning SIP MESSAGES like this one sent from user 1000 to 1001:
> http://pastebin.freeswitch.org/6940
>
> I really would like an event to be fired by this SIP MESSAGING in fact
> I'm almost adding it at mod_sofia.h
> as #define MY_EVENT_SIP_MESSAGE "sofia::message"
> :-)
>
> Firing an event for every SIP MESSAGE sent through fs would be a great
> thing, but sadly not sufficient for building a full IM solution.
> In fact we would also need an API to send SIP MESSAGES from within fs
> and this is already partially achieved from what I've seen with  
> command
> like this one sent to the event socket:
>
> sendevent SEND_MESSAGE
> profile: internal
> content-length: 2
> content-type: application/simple-message-summary
> user: 1001
> host: 192.168.1.1
>
> Hi
> Content-Type: command/reply
> Reply-Text: +OK
>
> This command works and fires an event like this:
>
> Command: sendevent%20SEND_MESSAGE
> profile: internal
> content-length: 2
> content-type: application/simple-message-summary
> user: 1001
> host: 192.168.1.1
> Event-Name: SEND_MESSAGE
> Core-UUID: a7f40fea-8340-4d77-aded-f322f9bee016
> FreeSWITCH-Hostname: lallobox
> FreeSWITCH-IPv4: 192.168.1.1
> FreeSWITCH-IPv6: %3A%3A1
> Event-Date-Local: 2009-01-28%2010%3A44%3A07
> Event-Date-GMT: Wed,%2028%20Jan%202009%2009%3A44%3A07%20GMT
> Event-Date-Timestamp: 1233135847314907
> Event-Calling-File: mod_event_socket.c
> Event-Calling-Function: parse_command
> Event-Calling-Line-Number: 1511
> Content-Length: 2
>
> Hi
>
>
> However it would be wonderful to enhance this API with the possibility
> to select the sending user thus being able to forge sip messages from
> within fs on behalf of a registered or not user.
>
>
> Best Regards,
> 2C
>
> PS: Michael feel free to contact me off list as you see fit.
>
>
> Internet Email Confidentiality Footer
> -----------------------------------------------------------------------------------------------------
> La presente comunicazione, con le informazioni in essa contenute e  
> ogni documento o file allegato, e' rivolta unicamente alla/e persona/ 
> e cui e' indirizzata ed alle altre da questa autorizzata/e a  
> riceverla. Se non siete i destinatari/autorizzati siete avvisati che  
> qualsiasi azione, copia, comunicazione, divulgazione o simili basate  
> sul contenuto di tali informazioni e' vietata e potrebbe essere  
> contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia  
> di protezione dei dati personali). Se avete ricevuto questa  
> comunicazione per errore, vi preghiamo di darne immediata notizia al  
> mittente e di distruggere il messaggio originale e ogni file  
> allegato senza farne copia alcuna o riprodurne in alcun modo il  
> contenuto.
>
> This e-mail and its attachments are intended for the addressee(s)  
> only and are confidential and/or may contain legally privileged  
> information. If you have received this message by mistake or are not  
> one of the addressees above, you may take no action based on it, and  
> you may not copy or show it to anyone; please reply to this e-mail  
> and point out the error which has occurred.
> -----------------------------------------------------------------------------------------------------

I am sorry to see that your e-mail is confidential.  If it were not, I  
would have responded to tell you that there is already an api command  
to send chat messages in a protocol agnostic way (see http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_chat) 
.  In the future if you can send non-confidential emails to the list  
it will greatly assist us in being able to respond to your questions.

Mike





More information about the FreeSWITCH-users mailing list