Misc. Dialplan Tools presence

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

Sends an event of either type PRESENCE_IN or PRESENCE_OUT. Currently, this function is not very useful in conjunction with sofia. This does not affect the presence of hook state for use with BLF either, but sending an event that expresses the user's hook state does.

Usage

presence <user> <rpid> <message>

This application may be run inline from the XML dialplan.

Examples

presence in|1000@xxx.xxx.xxx.xxx|dnd|'Do not disturb.'
presence out|1000@xxx.xxx.xxx.xxx|unavailable|'Currently out for a pot of hot coffee.'

API

It can also be used as an API command

 presence,[in|out] <user> <rpid> <message>
 presence in 1000@192.168.0.48 unknown dnd

You can get the following event

   Event-Name: PRESENCE_IN
   Core-UUID: 3a66caec-e488-4aed-8bc6-634bcc7cc4fe
   FreeSWITCH-Hostname: seven.local
   FreeSWITCH-Switchname: seven.local
   FreeSWITCH-IPv4: 192.168.0.48
   FreeSWITCH-IPv6: ::1
   Event-Date-Local: 2011-11-17 13:18:35
   Event-Date-GMT: Thu, 17 Nov 2011 05:18:35 GMT
   Event-Date-Timestamp: 1321507115845012
   Event-Calling-File: mod_dptools.c
   Event-Calling-Function: presence_api_function
   Event-Calling-Line-Number: 1550
   proto: dp
   login: /Users/seven/workspace/freeswitch/fs-0905/src/mod/applications/mod_dptools/mod_dptools.c
   from: 1000@192.168.0.48
   rpid: unknown
   status: dnd
   event_type: presence
   alt_event_type: dialog
   event_count: 0

See Also