Working example for presence_in
Hallo, I want to make a BLF lamp on the phone turn red/green/flash based on day/night info According to https://freeswitch.org/confluence/display/FREESWITCH/PRESENCE+IN+event+examp... I am sending here a presence info for 200 (ringing) sendevent PRESENCE_IN proto: sip from: 200@my.domain.com login: 200@my.domain.com event_type: presence alt_event_type: dialog Presence-Call-Direction: outbound answer-state: early via ESL an get a reply +OK 74a91ebc-7aaa-4f04-8fd1-5158836f594d Fs_cli shows freeswitch@my.domain.com> /events plain PRESENCE_IN +OK event listener enabled plain RECV EVENT Command: sendevent PRESENCE_IN proto: sip from: 200@my.domain.com login: 200@my.domain.com event_type: presence alt_event_type: dialog Presence-Call-Direction: outbound answer-state: early Event-UUID: 7a320e1e-8455-4804-b878-66c83914976e Event-Name: PRESENCE_IN Core-UUID: 81230f28-a930-4777-bdc5-d3df670c62ff FreeSWITCH-Hostname: my.domain.com FreeSWITCH-Switchname: my.domain.com FreeSWITCH-IPv4: 192.168.1.9 FreeSWITCH-IPv6: ::1 Event-Date-Local: 2017-07-30 23:23:11 Event-Date-GMT: Sun, 30 Jul 2017 21:23:11 GMT Event-Date-Timestamp: 1501449791174168 Event-Calling-File: mod_event_socket.c Event-Calling-Function: parse_command Event-Calling-Line-Number: 2256 Event-Sequence: 88094 I also see a Notify message to 209 (as 209 was subscribing to 200) NOTIFY sip:209@192.168.178.121:5060;user=phone SIP/2.0. Via: SIP/2.0/UDP 192.168.178.9;rport;branch=z9hG4bKXKDD7j4B9SBeD. Max-Forwards: 70. From: <sip:200@my.domain.com;user=phone>;tag=svXxoq1TseLS. To: <sip:209@my.domain.com;user=phone>;tag=1852934565. Call-ID: 470672824-5060-5@192.168.178.121. CSeq: 911343401 NOTIFY. Contact: <sip:200@192.168.178.9:5060>. User-Agent: Freeswitch. Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE. Supported: timer, path, replaces. Event: dialog. Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.win$ Subscription-State: active;expires=3214. Content-Type: application/dialog-info+xml. Content-Length: 156. . <?xml version="1.0"?> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="123" state="full" entity="sip:200@my.domain.com"> </dialog-info> But the message sent is always the same (state=full), and does not reflect the answer state in the message (early, confirmed, terminated). Anybody has a clue, what's wrong here or has a better working example? -- With kind regards Peter Steinbach Telefaks Services GmbH mailto:lists (att) telefaks.de Internet: www.telefaks.de
participants (1)
-
Peter Steinbach