Added the ability for transferring directly to voicemail on digium phones.
Added a new module that checks for the presence of a custom header and/or
diversion header within a sip REFER. If either is found and they specify
a sending to voicemail action then variables are added to the channel
allowing the user access to them in the dialplan. Dialplan can then be
written that branches based upon these values allowing, for instace, for
a single number to be used for dialing and/or accessing voicemail directly.
Also fixed a problem where the PJSIP_HEADER function was allowing non pjsip
channels through (checked to make sure it has the correct channel type before
proceeding).
Review: https://reviewboard.asterisk.org/r/3245/
........
Merged revisions 408880 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This adds Path support to chan_pjsip in res_pjsip_path.c with minimal
additions in res_pjsip_registrar.c to store the path and additions in
res_pjsip_outbound_registration.c to enable advertisement of path
support to registrars and intervening proxies.
Path information is stored on contacts and is enabled via Address of
Record (AoRs) and Registration configuration sections.
While adding path support, it became necessary to be able to add SIP
supplements that handled messages outside of sessions, so a framework
for handling these types of hooks was added in parallel to the
already-existing session supplements and several senders of
out-of-dialog requests were refactored as a result.
(closes issue ASTERISK-21084)
Review: https://reviewboard.asterisk.org/r/3050/
........
Merged revisions 405565 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When sending a re-INVITE to an endpoint it was possible for received
headers to be added as well (since they are stored for retrieval using
the PJSIP_HEADER dialplan function). This caused a broken (and
potentially large) SIP INVITE to be produced and sent.
This changes the module so it will no longer add headers to
re-INVITEs.
(closes issue ASTERISK-22882)
Reported by: David M. Lee
........
Merged revisions 403221 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Both res_pjsip_messaging and res_pjsip_header_funcs were causing asterisk to
crash because they were trying to dereference a NULL pointer.
In the case of res_pjsip_messaging it was attempting to "print" a contact
header that did not exist. In fact contact headers should not be part of
a SIP MESSAGE, so the offending code was simply removed.
In the case of res_pjsip_header_funcs a null private channel tech was being
passed to the function and then later dereferenced. Added null checks (and
error logging) to the read/write function handlers to guard against crashing.
(closes issue ASTERISK-22821)
Reported by: Anthony Messina
........
Merged revisions 402757 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch adds support to the PJSIP stack in Asterisk for SIP header
manipulation. Note that this is analagous to SIPAddHeader/SIPRemoveHeader.
For PJSIP_HEADER, an incoming supplemental session callback is registered that
takes the pjsip_hdrs from the incoming session and stores them in a linked
list in the session datastore. Calls to PJSIP_HEADER traverse over the list
and return the nth matching header where 'n' is the 'number' argument to the
function.
When adding a header, the first call creates a datastore and linked list and
adds the datastore to the session. The header is then created as a pjsip_hdr
and added to the list. An outgoing supplemental session callback then
traverses the list and adds the headers to the outgoing pjsip_msg.
When removing a header, the list created with PJSIP_HEADER(add,...) is
traversed and all matching entries are removed.
(closes issue ASTERISK-22498)
Reported by: George Joseph
patch:
res_pjsip_header_funcs_v1.patch uploaded by george.joseph (License 6322)
........
Merged revisions 400771 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400772 65c4cc65-6c06-0410-ace0-fbb531ad65f3