I have an
application which needs to SUBSCRIBE for Dialog events. I have
manage-presence turned on. I place a call to an extension which is
configured in the FS dialplan and is answered by FS (for the moment, it is just
playing music). If I now SUBSCRIBE for Dialog events for that extension, I
get only the top-level <dialog-info> element, not the details included in
the per-dialog <dialog> element (e.g. call id, remote display, etc) which
are described in RFC4235.
In the code, I see
that the query in actual_sofia_presence_event_handler does a "join" on
sip_registrations to pull out some of the dialog details. This means that
extensions which do not register never get dialog details. In my case,
sip_registrations and sip_presence databases are empty, but most of the info
that should be in the <dialog> element is stored in the sip_dialogs
database.
Why does the query
need sip_registrations or sip_presence? When I simplify this query to
remove the references to these databases, I get much closer to the data I
need. Isn't all the data we need in the sip_dialogs database?.
Dialog info should not require registration.
I've noticed some
other problems, such as:
- to and from tags
are not saved in sip_dialogs
- call-id,
local-tag, remote-tag are not included in the <dialog>
element
- from_user is never
used because from_id is never null (it is set to "" by
switch_str_nil)
- remote identity
display is not included
- remote target does
not come from the dialog Contact
I've made some
changes and verified that a NOTIFY can be crafted which fully meets RFC4235 and
allows my application to pick up this call (by sending an INVITE with
REPLACES). The first step though is to understand the link to
sip_registrations.
Carolyn