2006-02-10 21:50:56 +00:00
|
|
|
/*
|
2012-10-18 14:17:40 +00:00
|
|
|
* Asterisk -- An open source telephony toolkit.
|
2006-02-10 21:50:56 +00:00
|
|
|
*
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
* Copyright (C) 2005-2008, Digium, Inc.
|
2006-02-10 21:50:56 +00:00
|
|
|
*
|
|
|
|
* Matthew A. Nicholson <mnicholson@digium.com>
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
* Russell Bryant <russell@digium.com>
|
2006-02-10 21:50:56 +00:00
|
|
|
*
|
2006-02-10 23:55:47 +00:00
|
|
|
* See http://www.asterisk.org for more information about
|
|
|
|
* the Asterisk project. Please do not directly contact
|
|
|
|
* any of the maintainers of this project for assistance;
|
|
|
|
* the project provides a web site, mailing lists and IRC
|
|
|
|
* channels for your use.
|
|
|
|
*
|
2006-02-10 21:50:56 +00:00
|
|
|
* This program is free software, distributed under the terms of
|
2006-02-10 23:55:47 +00:00
|
|
|
* the GNU General Public License Version 2. See the LICENSE file
|
|
|
|
* at the top of the source tree.
|
2006-02-10 21:50:56 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \file
|
|
|
|
* \brief SMDI support for Asterisk.
|
|
|
|
* \author Matthew A. Nicholson <mnicholson@digium.com>
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
* \author Russell Bryant <russell@digium.com>
|
2006-02-10 21:50:56 +00:00
|
|
|
*/
|
|
|
|
|
2006-02-10 23:55:47 +00:00
|
|
|
#ifndef ASTERISK_SMDI_H
|
|
|
|
#define ASTERISK_SMDI_H
|
|
|
|
|
|
|
|
#include <termios.h>
|
|
|
|
#include <time.h>
|
2006-02-10 21:50:56 +00:00
|
|
|
|
|
|
|
#include "asterisk/config.h"
|
|
|
|
#include "asterisk/module.h"
|
2009-05-18 20:52:33 +00:00
|
|
|
#include "asterisk/optional_api.h"
|
2006-02-10 21:50:56 +00:00
|
|
|
|
2014-07-21 08:41:29 +00:00
|
|
|
#define SMDI_MESG_NAME_LEN 80
|
2006-02-10 21:50:56 +00:00
|
|
|
#define SMDI_MESG_DESK_NUM_LEN 3
|
|
|
|
#define SMDI_MESG_DESK_TERM_LEN 4
|
|
|
|
#define SMDI_MWI_FAIL_CAUSE_LEN 3
|
|
|
|
#define SMDI_MAX_STATION_NUM_LEN 10
|
|
|
|
#define SMDI_MAX_FILENAME_LEN 256
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief An SMDI message waiting indicator message.
|
|
|
|
*
|
|
|
|
* The ast_smdi_mwi_message structure contains the parsed out parts of an smdi
|
|
|
|
* message. Each ast_smdi_interface structure has a message queue consisting
|
|
|
|
* ast_smdi_mwi_message structures.
|
|
|
|
*/
|
|
|
|
struct ast_smdi_mwi_message {
|
2014-07-21 08:41:29 +00:00
|
|
|
char name[SMDI_MESG_NAME_LEN];
|
2006-02-10 21:50:56 +00:00
|
|
|
char fwd_st[SMDI_MAX_STATION_NUM_LEN + 1]; /* forwarding station number */
|
|
|
|
char cause[SMDI_MWI_FAIL_CAUSE_LEN + 1]; /* the type of failure */
|
|
|
|
struct timeval timestamp; /* a timestamp for the message */
|
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief An SMDI message desk message.
|
|
|
|
*
|
|
|
|
* The ast_smdi_md_message structure contains the parsed out parts of an smdi
|
|
|
|
* message. Each ast_smdi_interface structure has a message queue consisting
|
|
|
|
* ast_smdi_md_message structures.
|
|
|
|
*/
|
|
|
|
struct ast_smdi_md_message {
|
2014-07-21 08:41:29 +00:00
|
|
|
char name[SMDI_MESG_NAME_LEN];
|
2006-02-10 21:50:56 +00:00
|
|
|
char mesg_desk_num[SMDI_MESG_DESK_NUM_LEN + 1]; /* message desk number */
|
|
|
|
char mesg_desk_term[SMDI_MESG_DESK_TERM_LEN + 1]; /* message desk terminal */
|
|
|
|
char fwd_st[SMDI_MAX_STATION_NUM_LEN + 1]; /* forwarding station number */
|
|
|
|
char calling_st[SMDI_MAX_STATION_NUM_LEN + 1]; /* calling station number */
|
|
|
|
char type; /* the type of the call */
|
|
|
|
struct timeval timestamp; /* a timestamp for the message */
|
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief SMDI interface structure.
|
|
|
|
*
|
|
|
|
* The ast_smdi_interface structure holds information on a serial port that
|
|
|
|
* should be monitored for SMDI activity. The structure contains a message
|
2006-12-29 06:26:53 +00:00
|
|
|
* queue of messages that have been received on the interface.
|
2006-02-10 21:50:56 +00:00
|
|
|
*/
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
struct ast_smdi_interface;
|
2006-02-10 21:50:56 +00:00
|
|
|
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
/*!
|
|
|
|
* \brief Get the next SMDI message from the queue.
|
|
|
|
* \param iface a pointer to the interface to use.
|
|
|
|
*
|
|
|
|
* This function pulls the first unexpired message from the SMDI message queue
|
|
|
|
* on the specified interface. It will purge all expired SMDI messages before
|
|
|
|
* returning.
|
|
|
|
*
|
|
|
|
* \return the next SMDI message, or NULL if there were no pending messages.
|
|
|
|
*/
|
2009-06-15 16:07:23 +00:00
|
|
|
AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_pop,
|
|
|
|
(struct ast_smdi_interface *iface),
|
|
|
|
{ return NULL; });
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Get the next SMDI message from the queue.
|
|
|
|
* \param iface a pointer to the interface to use.
|
|
|
|
* \param timeout the time to wait before returning in milliseconds.
|
|
|
|
*
|
|
|
|
* This function pulls a message from the SMDI message queue on the specified
|
|
|
|
* interface. If no message is available this function will wait the specified
|
|
|
|
* amount of time before returning.
|
|
|
|
*
|
|
|
|
* \return the next SMDI message, or NULL if there were no pending messages and
|
|
|
|
* the timeout has expired.
|
|
|
|
*/
|
2009-05-18 20:52:33 +00:00
|
|
|
AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_wait,
|
2009-06-15 16:07:23 +00:00
|
|
|
(struct ast_smdi_interface *iface, int timeout),
|
|
|
|
{ return NULL; });
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Get the next SMDI message from the queue.
|
|
|
|
* \param iface a pointer to the interface to use.
|
|
|
|
*
|
|
|
|
* This function pulls the first unexpired message from the SMDI message queue
|
|
|
|
* on the specified interface. It will purge all expired SMDI messages before
|
|
|
|
* returning.
|
|
|
|
*
|
|
|
|
* \return the next SMDI message, or NULL if there were no pending messages.
|
|
|
|
*/
|
2009-05-18 20:52:33 +00:00
|
|
|
AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_pop,
|
2009-06-15 16:07:23 +00:00
|
|
|
(struct ast_smdi_interface *iface),
|
|
|
|
{ return NULL; });
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Get the next SMDI message from the queue.
|
|
|
|
* \param iface a pointer to the interface to use.
|
|
|
|
* \param timeout the time to wait before returning in milliseconds.
|
|
|
|
*
|
|
|
|
* This function pulls a message from the SMDI message queue on the specified
|
|
|
|
* interface. If no message is available this function will wait the specified
|
|
|
|
* amount of time before returning.
|
|
|
|
*
|
|
|
|
* \return the next SMDI message, or NULL if there were no pending messages and
|
|
|
|
* the timeout has expired.
|
|
|
|
*/
|
2009-05-18 20:52:33 +00:00
|
|
|
AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_wait,
|
2009-06-15 16:07:23 +00:00
|
|
|
(struct ast_smdi_interface *iface, int timeout),
|
|
|
|
{ return NULL; });
|
|
|
|
|
|
|
|
AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_wait_station,
|
|
|
|
(struct ast_smdi_interface *iface, int timeout, const char *station),
|
|
|
|
{ return NULL; });
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Find an SMDI interface with the specified name.
|
|
|
|
* \param iface_name the name/port of the interface to search for.
|
|
|
|
*
|
2014-07-21 08:41:29 +00:00
|
|
|
* \return an ao2 reference to the interface located or NULL if none was found.
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
*/
|
2009-05-18 20:52:33 +00:00
|
|
|
AST_OPTIONAL_API(struct ast_smdi_interface *, ast_smdi_interface_find,
|
2009-06-15 16:07:23 +00:00
|
|
|
(const char *iface_name),
|
|
|
|
{ return NULL; });
|
2006-02-10 21:50:56 +00:00
|
|
|
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
/*!
|
|
|
|
* \brief Set the MWI indicator for a mailbox.
|
|
|
|
* \param iface the interface to use.
|
|
|
|
* \param mailbox the mailbox to use.
|
|
|
|
*/
|
2009-06-15 16:07:23 +00:00
|
|
|
AST_OPTIONAL_API(int, ast_smdi_mwi_set,
|
|
|
|
(struct ast_smdi_interface *iface, const char *mailbox),
|
|
|
|
{ return -1; });
|
Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Unset the MWI indicator for a mailbox.
|
|
|
|
* \param iface the interface to use.
|
|
|
|
* \param mailbox the mailbox to use.
|
|
|
|
*/
|
2009-06-15 16:07:23 +00:00
|
|
|
AST_OPTIONAL_API(int, ast_smdi_mwi_unset,
|
|
|
|
(struct ast_smdi_interface *iface, const char *mailbox),
|
|
|
|
{ return -1; });
|
2006-02-10 23:55:47 +00:00
|
|
|
|
|
|
|
#endif /* !ASTERISK_SMDI_H */
|