[asterisk-commits] oej: branch oej/pinelonely-meetme-single-user-hangup-trunk r336041 - in /team...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 15 06:27:39 CDT 2011
Author: oej
Date: Thu Sep 15 06:27:35 2011
New Revision: 336041
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=336041
Log:
UPdating branch
Modified:
team/oej/pinelonely-meetme-single-user-hangup-trunk/ (props changed)
team/oej/pinelonely-meetme-single-user-hangup-trunk/CREDITS
team/oej/pinelonely-meetme-single-user-hangup-trunk/UPGRADE.txt
team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_dial.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_directed_pickup.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/cdr/cdr_csv.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_agent.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_dahdi.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_iax2.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_sip.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/sip/include/sip.h
team/oej/pinelonely-meetme-single-user-hangup-trunk/configs/sip.conf.sample
team/oej/pinelonely-meetme-single-user-hangup-trunk/configure
team/oej/pinelonely-meetme-single-user-hangup-trunk/configure.ac
team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/autoconfig.h.in
team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/event.h
team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/indications.h
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/asterisk.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/channel.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/dnsmgr.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/dsp.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/event.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/manager.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/main/pbx.c
team/oej/pinelonely-meetme-single-user-hangup-trunk/res/ais/evt.c
Propchange: team/oej/pinelonely-meetme-single-user-hangup-trunk/
------------------------------------------------------------------------------
automerge = Is-there-life-off-net?
Propchange: team/oej/pinelonely-meetme-single-user-hangup-trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Propchange: team/oej/pinelonely-meetme-single-user-hangup-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Sep 15 06:27:35 2011
@@ -1,1 +1,1 @@
-/trunk:1-335300
+/trunk:1-336040
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/CREDITS
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/CREDITS?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/CREDITS (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/CREDITS Thu Sep 15 06:27:35 2011
@@ -23,7 +23,7 @@
Omnitor AB, Gunnar Hellström, for funding work with videocaps, T.140 RED,
originate with video/text and many more contributions.
-ClearIT AB, Sweden, for additions to meetme, res_mute and many more contributions.
+ClearIT AB for work with meetme, res_mutestream, RTCP, manager and tonezones
=== WISHLIST CONTRIBUTERS ===
Jeremy McNamara - SpeeX support
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/UPGRADE.txt?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/UPGRADE.txt (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/UPGRADE.txt Thu Sep 15 06:27:35 2011
@@ -32,7 +32,14 @@
parses configuration files. This makes configuration files more consistent
with what is expected across modules.
- - cdr.conf: [general] section
+ - cdr.conf: [general] and [csv] sections
+ - dnsmgr.conf
+ - dsp.conf
+
+SIP
+===
+ - A new option "tonezone" for setting default tonezone for the channel driver
+ or individual devices
From 1.8 to 10:
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_dial.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_dial.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_dial.c Thu Sep 15 06:27:35 2011
@@ -1351,7 +1351,7 @@
case AST_FRAME_VOICE:
case AST_FRAME_IMAGE:
case AST_FRAME_TEXT:
- if (ast_write(in, f)) {
+ if (!ast_test_flag64(outgoing, OPT_RINGBACK | OPT_MUSICBACK) && ast_write(in, f)) {
ast_log(LOG_WARNING, "Unable to write frametype: %d\n",
f->frametype);
}
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_directed_pickup.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_directed_pickup.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/apps/app_directed_pickup.c Thu Sep 15 06:27:35 2011
@@ -101,7 +101,6 @@
static const char app[] = "Pickup";
static const char app2[] = "PickupChan";
-/*! \todo This application should return a result code, like PICKUPRESULT */
struct pickup_by_name_args {
const char *name;
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/cdr/cdr_csv.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/cdr/cdr_csv.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/cdr/cdr_csv.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/cdr/cdr_csv.c Thu Sep 15 06:27:35 2011
@@ -50,7 +50,7 @@
#define DATE_FORMAT "%Y-%m-%d %T"
static int usegmtime = 0;
-static int accountlogs;
+static int accountlogs = 1;
static int loguniqueid = 0;
static int loguserfield = 0;
static int loaded = 0;
@@ -95,52 +95,38 @@
static int load_config(int reload)
{
struct ast_config *cfg;
- struct ast_variable *var;
- const char *tmp;
+ struct ast_variable *v;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
if (!(cfg = ast_config_load(config, config_flags)) || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_WARNING, "unable to load config: %s\n", config);
return 0;
- } else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ } else if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
return 1;
+ }
accountlogs = 1;
usegmtime = 0;
loguniqueid = 0;
loguserfield = 0;
- if (!(var = ast_variable_browse(cfg, "csv"))) {
+ if (!(v = ast_variable_browse(cfg, "csv"))) {
ast_config_destroy(cfg);
return 0;
}
- if ((tmp = ast_variable_retrieve(cfg, "csv", "usegmtime"))) {
- usegmtime = ast_true(tmp);
- if (usegmtime)
- ast_debug(1, "logging time in GMT\n");
- }
-
- /* Turn on/off separate files per accountcode. Default is on (as before) */
- if ((tmp = ast_variable_retrieve(cfg, "csv", "accountlogs"))) {
- accountlogs = ast_true(tmp);
- if (accountlogs) {
- ast_debug(1, "logging in separate files per accountcode\n");
- }
- }
-
- if ((tmp = ast_variable_retrieve(cfg, "csv", "loguniqueid"))) {
- loguniqueid = ast_true(tmp);
- if (loguniqueid)
- ast_debug(1, "logging CDR field UNIQUEID\n");
- }
-
- if ((tmp = ast_variable_retrieve(cfg, "csv", "loguserfield"))) {
- loguserfield = ast_true(tmp);
- if (loguserfield)
- ast_debug(1, "logging CDR user-defined field\n");
- }
-
+ for (; v; v = v->next) {
+ if (!strcasecmp(v->name, "usegmtime")) {
+ usegmtime = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "accountlogs")) {
+ /* Turn on/off separate files per accountcode. Default is on (as before) */
+ accountlogs = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "loguniqueid")) {
+ loguniqueid = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "loguserfield")) {
+ loguserfield = ast_true(v->value);
+ }
+ }
ast_config_destroy(cfg);
return 1;
}
@@ -337,8 +323,9 @@
{
int res;
- if(!load_config(0))
+ if (!load_config(0)) {
return AST_MODULE_LOAD_DECLINE;
+ }
if ((res = ast_cdr_register(name, ast_module_info->description, csv_log))) {
ast_log(LOG_ERROR, "Unable to register CSV CDR handling\n");
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_agent.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_agent.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_agent.c Thu Sep 15 06:27:35 2011
@@ -1507,6 +1507,7 @@
char *talkingto = NULL;
char *talkingtoChan = NULL;
char *status = NULL;
+ struct ast_channel *bridge;
if (!ast_strlen_zero(id))
snprintf(idText, sizeof(idText) ,"ActionID: %s\r\n", id);
@@ -1531,10 +1532,13 @@
if (p->owner && p->owner->_bridge) {
talkingto = S_COR(p->chan->caller.id.number.valid,
p->chan->caller.id.number.str, "n/a");
- if (ast_bridged_channel(p->owner))
- talkingtoChan = ast_strdupa(ast_bridged_channel(p->owner)->name);
- else
+ ast_channel_lock(p->owner);
+ if ((bridge = ast_bridged_channel(p->owner))) {
+ talkingtoChan = ast_strdupa(bridge->name);
+ } else {
talkingtoChan = "n/a";
+ }
+ ast_channel_unlock(p->owner);
status = "AGENT_ONCALL";
} else {
talkingto = "n/a";
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_dahdi.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_dahdi.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_dahdi.c Thu Sep 15 06:27:35 2011
@@ -18381,7 +18381,7 @@
continue;
}
- chans = ast_variable_retrieve(ucfg, cat, "dahdichan");
+ chans = ast_variable_retrieve(cfg, cat, "dahdichan");
if (ast_strlen_zero(chans)) {
/* Section is useless without a dahdichan value present. */
continue;
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_iax2.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_iax2.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_iax2.c Thu Sep 15 06:27:35 2011
@@ -8573,6 +8573,7 @@
if (!(reg = ast_calloc(1, sizeof(*reg))))
return -1;
+ reg->addr.ss.ss_family = AF_INET;
if (ast_dnsmgr_lookup(hostname, ®->addr, ®->dnsmgr, srvlookup ? "_iax._udp" : NULL) < 0) {
ast_free(reg);
return -1;
@@ -12415,6 +12416,7 @@
peer->expire = -1;
peer->pokeexpire = -1;
peer->sockfd = defaultsockfd;
+ peer->addr.ss.ss_family = AF_INET;
if (ast_string_field_init(peer, 32))
peer = peer_unref(peer);
}
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_sip.c?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_sip.c (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/chan_sip.c Thu Sep 15 06:27:35 2011
@@ -340,7 +340,7 @@
</application>
<function name="SIP_HEADER" language="en_US">
<synopsis>
- Gets the specified SIP header.
+ Gets the specified SIP header from an incoming INVITE message.
</synopsis>
<syntax>
<parameter name="name" required="true" />
@@ -352,6 +352,8 @@
<para>Since there are several headers (such as Via) which can occur multiple
times, SIP_HEADER takes an optional second argument to specify which header with
that name to retrieve. Headers start at offset <literal>1</literal>.</para>
+ <para>Please observe that contents of the SDP (an attachment to the
+ SIP request) can't be accessed with this function.</para>
</description>
</function>
<function name="SIPPEER" language="en_US">
@@ -363,7 +365,7 @@
<parameter name="item">
<enumlist>
<enum name="ip">
- <para>(default) The ip address.</para>
+ <para>(default) The IP address.</para>
</enum>
<enum name="port">
<para>The port number.</para>
@@ -399,7 +401,7 @@
<para>Status (if qualify=yes).</para>
</enum>
<enum name="regexten">
- <para>Registration extension.</para>
+ <para>Extension activated at registration.</para>
</enum>
<enum name="limit">
<para>Call limit (call-limit).</para>
@@ -417,7 +419,7 @@
<para>Account code for this peer.</para>
</enum>
<enum name="useragent">
- <para>Current user agent id for peer.</para>
+ <para>Current user agent header used by peer.</para>
</enum>
<enum name="maxforwards">
<para>The value used for SIP loop prevention in outbound requests</para>
@@ -447,13 +449,13 @@
<para>The source IP address of the peer.</para>
</enum>
<enum name="from">
- <para>The URI from the <literal>From:</literal> header.</para>
+ <para>The SIP URI from the <literal>From:</literal> header.</para>
</enum>
<enum name="uri">
- <para>The URI from the <literal>Contact:</literal> header.</para>
+ <para>The SIP URI from the <literal>Contact:</literal> header.</para>
</enum>
<enum name="useragent">
- <para>The useragent.</para>
+ <para>The Useragent header used by the peer.</para>
</enum>
<enum name="peername">
<para>The name of the peer.</para>
@@ -490,8 +492,8 @@
</syntax>
<description>
<para>Lists SIP peers in text format with details on current status.
- Peerlist will follow as separate events, followed by a final event called
- PeerlistComplete.</para>
+ <literal>Peerlist</literal> will follow as separate events, followed by a final event called
+ <literal>PeerlistComplete</literal>.</para>
</description>
</manager>
<manager name="SIPshowpeer" language="en_US">
@@ -531,7 +533,7 @@
</syntax>
<description>
<para>Lists all registration requests and status. Registrations will follow as separate
- events. followed by a final event called RegistrationsComplete.</para>
+ events followed by a final event called <literal>RegistrationsComplete</literal>.</para>
</description>
</manager>
<manager name="SIPnotify" language="en_US">
@@ -551,7 +553,7 @@
<description>
<para>Sends a SIP Notify event.</para>
<para>All parameters for this event must be specified in the body of this request
- via multiple Variable: name=value sequences.</para>
+ via multiple <literal>Variable: name=value</literal> sequences.</para>
</description>
</manager>
***/
@@ -692,6 +694,7 @@
static char default_engine[256]; /*!< Default RTP engine */
static int default_maxcallbitrate; /*!< Maximum bitrate for call */
static struct ast_codec_pref default_prefs; /*!< Default codec prefs */
+static char default_zone[MAX_TONEZONE_COUNTRY]; /*!< Default tone zone for channels created from the SIP driver */
static unsigned int default_transports; /*!< Default Transports (enum sip_transport) that are acceptable */
static unsigned int default_primary_transport; /*!< Default primary Transport (enum sip_transport) for outbound connections to devices */
/*@}*/
@@ -5215,6 +5218,7 @@
ref_proxy(dialog, obproxy_get(dialog, peer));
dialog->callgroup = peer->callgroup;
dialog->pickupgroup = peer->pickupgroup;
+ ast_copy_string(dialog->zone, peer->zone, sizeof(dialog->zone));
dialog->allowtransfer = peer->allowtransfer;
dialog->jointnoncodeccapability = dialog->noncodeccapability;
dialog->rtptimeout = peer->rtptimeout;
@@ -6997,6 +7001,11 @@
if (!ast_strlen_zero(i->language)) {
ast_string_field_set(tmp, language, i->language);
}
+ if (!ast_strlen_zero(i->zone)) {
+ if (!(tmp->zone = ast_get_indication_zone(i->zone))) {
+ ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", i->zone);
+ }
+ }
i->owner = tmp;
ast_module_ref(ast_module_info->self);
ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
@@ -7529,6 +7538,7 @@
p->session_modify = TRUE;
p->stimer = NULL;
p->prefs = default_prefs; /* Set default codecs for this call */
+ ast_copy_string(p->zone, default_zone, sizeof(p->zone));
p->maxforwards = sip_cfg.default_max_forwards;
if (intended_method != SIP_OPTIONS) { /* Peerpoke has it's own system */
@@ -14358,9 +14368,7 @@
{
struct sip_peer *peer = userdata;
- ao2_lock(peer);
sip_send_mwi_to_peer(peer, 0);
- ao2_unlock(peer);
}
static void network_change_event_subscribe(void)
@@ -15876,6 +15884,7 @@
ast_format_cap_copy(p->caps, peer->caps);
ast_format_cap_copy(p->jointcaps, peer->caps);
p->prefs = peer->prefs;
+ ast_copy_string(p->zone, peer->zone, sizeof(p->zone));
if (peer->maxforwards > 0) {
p->maxforwards = peer->maxforwards;
}
@@ -17365,6 +17374,7 @@
ast_cli(fd, " Context : %s\n", peer->context);
ast_cli(fd, " Subscr.Cont. : %s\n", S_OR(peer->subscribecontext, "<Not set>") );
ast_cli(fd, " Language : %s\n", peer->language);
+ ast_cli(fd, " Tonezone : %s\n", peer->zone[0] != '\0' ? peer->zone : "<Not set>");
if (!ast_strlen_zero(peer->accountcode))
ast_cli(fd, " Accountcode : %s\n", peer->accountcode);
ast_cli(fd, " AMA flags : %s\n", ast_cdr_flags2str(peer->amaflags));
@@ -17479,6 +17489,7 @@
astman_append(s, "MD5SecretExist: %s\r\n", ast_strlen_zero(peer->md5secret)?"N":"Y");
astman_append(s, "Context: %s\r\n", peer->context);
astman_append(s, "Language: %s\r\n", peer->language);
+ astman_append(s, "ToneZone: %s\r\n", peer->zone[0] != '\0' ? peer->zone : "<Not set>");
if (!ast_strlen_zero(peer->accountcode))
astman_append(s, "Accountcode: %s\r\n", peer->accountcode);
astman_append(s, "AMAflags: %s\r\n", ast_cdr_flags2str(peer->amaflags));
@@ -17646,6 +17657,7 @@
if (!ast_strlen_zero(user->accountcode))
ast_cli(a->fd, " Accountcode : %s\n", user->accountcode);
ast_cli(a->fd, " AMA flags : %s\n", ast_cdr_flags2str(user->amaflags));
+ ast_cli(a->fd, " Tonezone : %s\n", user->zone[0] != '\0' ? user->zone : "<Not set>");
ast_cli(a->fd, " Transfer mode: %s\n", transfermode2str(user->allowtransfer));
ast_cli(a->fd, " MaxCallBR : %d kbps\n", user->maxcallbitrate);
ast_cli(a->fd, " CallingPres : %s\n", ast_describe_caller_presentation(user->callingpres));
@@ -18119,6 +18131,7 @@
ast_cli(a->fd, " Use ClientCode: %s\n", AST_CLI_YESNO(ast_test_flag(&global_flags[0], SIP_USECLIENTCODE)));
ast_cli(a->fd, " Progress inband: %s\n", (ast_test_flag(&global_flags[0], SIP_PROG_INBAND) == SIP_PROG_INBAND_NEVER) ? "Never" : (AST_CLI_YESNO(ast_test_flag(&global_flags[0], SIP_PROG_INBAND) != SIP_PROG_INBAND_NO)));
ast_cli(a->fd, " Language: %s\n", default_language);
+ ast_cli(a->fd, " Tone zone: %s\n", default_zone[0] != '\0' ? default_zone : "<Not set>");
ast_cli(a->fd, " MOH Interpret: %s\n", default_mohinterpret);
ast_cli(a->fd, " MOH Suggest: %s\n", default_mohsuggest);
ast_cli(a->fd, " Voice Mail Extension: %s\n", default_vmexten);
@@ -24926,9 +24939,7 @@
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
transmit_response(p, "200 OK", req);
if (p->relatedpeer) { /* Send first notification */
- ao2_lock(p->relatedpeer); /* was WRLOCK */
sip_send_mwi_to_peer(p->relatedpeer, 0);
- ao2_unlock(p->relatedpeer);
}
} else if (p->subscribed != CALL_COMPLETION) {
@@ -25666,14 +25677,18 @@
}
ast_app_inboxcount(mailbox_str->str, &newmsgs, &oldmsgs);
}
+ ao2_lock(peer);
if (peer->mwipvt) {
/* Base message on subscription */
p = dialog_ref(peer->mwipvt, "sip_send_mwi_to_peer: Setting dialog ptr p from peer->mwipvt-- should this be done?");
} else {
/* Build temporary dialog for this message */
- if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY, NULL)))
+ if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY, NULL))) {
+ ao2_unlock(peer);
return -1;
+ }
+
/* If we don't set the socket type to 0, then create_addr_from_peer will fail immediately if the peer
* uses any transport other than UDP. We set the type to 0 here and then let create_addr_from_peer copy
* the peer's socket information to the sip_pvt we just allocated
@@ -25701,11 +25716,17 @@
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
}
+ /* We have multiple threads (mwi events and monitor retransmits) working with this PVT and as we modify the sip history if that's turned on,
+ we really need to have a lock on it */
+ sip_pvt_lock(p);
+
/* Send MWI */
ast_set_flag(&p->flags[0], SIP_OUTGOING);
/* the following will decrement the refcount on p as it finishes */
transmit_notify_with_mwi(p, newmsgs, oldmsgs, peer->vmexten);
+ sip_pvt_unlock(p);
dialog_unref(p, "unref dialog ptr p just before it goes out of scope at the end of sip_send_mwi_to_peer.");
+ ao2_unlock(peer);
return 0;
}
@@ -27123,6 +27144,7 @@
peer->pickupgroup = 0;
peer->maxms = default_qualify;
peer->prefs = default_prefs;
+ ast_string_field_set(peer, zone, default_zone);
peer->stimer.st_mode_oper = global_st_mode; /* Session-Timers */
peer->stimer.st_ref = global_st_refresher;
peer->stimer.st_min_se = global_min_se;
@@ -27511,6 +27533,14 @@
deprecation_warning = 0;
}
peer->deprecated_username = 1;
+ }
+ } else if (!strcasecmp(v->name, "tonezone")) {
+ struct ast_tone_zone *new_zone;
+ if (!(new_zone = ast_get_indication_zone(v->value))) {
+ ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone in device [%s] at line %d. Check indications.conf for available country codes.\n", v->value, peer->name, v->lineno);
+ } else {
+ ast_tone_zone_unref(new_zone);
+ ast_string_field_set(peer, zone, v->value);
}
} else if (!strcasecmp(v->name, "language")) {
ast_string_field_set(peer, language, v->value);
@@ -28138,6 +28168,7 @@
default_fromdomain[0] = '\0';
default_fromdomainport = 0;
default_qualify = DEFAULT_QUALIFY;
+ default_zone[0] = '\0';
default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE;
ast_copy_string(default_mohinterpret, DEFAULT_MOHINTERPRET, sizeof(default_mohinterpret));
ast_copy_string(default_mohsuggest, DEFAULT_MOHSUGGEST, sizeof(default_mohsuggest));
@@ -28347,6 +28378,14 @@
ast_copy_string(default_mohinterpret, v->value, sizeof(default_mohinterpret));
} else if (!strcasecmp(v->name, "mohsuggest")) {
ast_copy_string(default_mohsuggest, v->value, sizeof(default_mohsuggest));
+ } else if (!strcasecmp(v->name, "tonezone")) {
+ struct ast_tone_zone *new_zone;
+ if (!(new_zone = ast_get_indication_zone(v->value))) {
+ ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone in [general] at line %d. Check indications.conf for available country codes.\n", v->value, v->lineno);
+ } else {
+ ast_tone_zone_unref(new_zone);
+ ast_copy_string(default_zone, v->value, sizeof(default_zone));
+ }
} else if (!strcasecmp(v->name, "language")) {
ast_copy_string(default_language, v->value, sizeof(default_language));
} else if (!strcasecmp(v->name, "regcontext")) {
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/sip/include/sip.h?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/sip/include/sip.h (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/channels/sip/include/sip.h Thu Sep 15 06:27:35 2011
@@ -32,6 +32,7 @@
#include "asterisk/channel.h"
#include "asterisk/app.h"
#include "asterisk/astobj.h"
+#include "asterisk/indications.h"
#ifndef FALSE
#define FALSE 0
@@ -1030,6 +1031,7 @@
struct t38properties t38; /*!< T38 settings */
struct ast_sockaddr udptlredirip; /*!< Where our T.38 UDPTL should be going if not to us */
struct ast_udptl *udptl; /*!< T.38 UDPTL session */
+ char zone[MAX_TONEZONE_COUNTRY]; /*!< Default tone zone for channels created by this dialog */
int callingpres; /*!< Calling presentation */
int expiry; /*!< How long we take to expire */
int sessionversion; /*!< SDP Session Version */
@@ -1199,6 +1201,7 @@
AST_STRING_FIELD(mwi_from); /*!< Name to place in From header for outgoing NOTIFY requests */
AST_STRING_FIELD(engine); /*!< RTP Engine to use */
AST_STRING_FIELD(unsolicited_mailbox); /*!< Mailbox to store received unsolicited MWI NOTIFY messages information in */
+ AST_STRING_FIELD(zone); /*!< Tonezone for this device */
);
struct sip_socket socket; /*!< Socket used for this peer */
enum sip_transport default_outbound_transport; /*!< Peer Registration may change the default outbound transport.
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/configs/sip.conf.sample?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/configs/sip.conf.sample (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/configs/sip.conf.sample Thu Sep 15 06:27:35 2011
@@ -307,6 +307,9 @@
; Parkinglots are configured in features.conf
;language=en ; Default language setting for all users/peers
; This may also be set for individual users/peers
+;tonezone=se ; Default tonezone for all users/peers
+ ; This may also be set for individual users/peers
+
;relaxdtmf=yes ; Relax dtmf handling
;trustrpid = no ; If Remote-Party-ID should be trusted
;sendrpid = yes ; If Remote-Party-ID should be sent (defaults to no)
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/configure.ac?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/configure.ac (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/configure.ac Thu Sep 15 06:27:35 2011
@@ -414,29 +414,6 @@
AST_EXT_LIB_SETUP([POPT], [popt], [popt])
AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_L2_PERSISTENCE], [ISDN Layer 2 persistence option], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_DATETIME_SEND], [ISDN PRI Date/time ie send policy], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI_V2], [ISDN PRI Message Waiting Indication (Fixed)], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_DISPLAY_TEXT], [ISDN PRI user display text IE contents during call], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI], [ISDN PRI Message Waiting Indication], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_MCID], [ISDN PRI Malicious Call ID], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_WAITING], [ISDN PRI call waiting supplementary service], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_AOC_EVENTS], [ISDN PRI advice of charge supplementary service events], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_TRANSFER], [ISDN PRI call transfer supplementary service], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_CCSS], [ISDN PRI call completion supplementary service], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_HANGUP_FIX], [ISDN PRI hangup fix], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_SUBADDR], [ISDN PRI subaddressing], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_HOLD], [ISDN PRI call hold], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_REROUTING], [ISDN PRI call rerouting and call deflection], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_SETUP_KEYPAD], [ISDN PRI keypad facility in SETUP], [PRI], [pri])
-# ------------------------------------v
-# TODO: The code can be changed to always include these features now.
-# These features will always be present if pri_connected_line_update is available.
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_PROG_W_CAUSE], [ISDN progress with cause], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_SERVICE_MESSAGES], [ISDN service messages], [PRI], [pri])
-AST_EXT_LIB_SETUP_DEPENDENT([PRI_REVERSE_CHARGE], [ISDN reverse charge], [PRI], [pri])
-# ------------------------------------^
AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample])
@@ -474,6 +451,49 @@
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
+
+# Any one of these 4 packages support a mandatory requirement, so we want to check on them as early as possible.
+AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
+AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
+AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
+AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
+
+EDITLINE_LIB=""
+if test "x$TERMCAP_LIB" != "x" ; then
+ EDITLINE_LIB="$TERMCAP_LIB"
+elif test "x$TINFO_LIB" != "x" ; then
+ EDITLINE_LIB="$TINFO_LIB"
+elif test "x$CURSES_LIB" != "x" ; then
+ EDITLINE_LIB="$CURSES_LIB"
+elif test "x$NCURSES_LIB" != "x" ; then
+ EDITLINE_LIB="$NCURSES_LIB"
+else
+ AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)])
+fi
+AC_SUBST(EDITLINE_LIB)
+
+# Another mandatory item (unless it's explicitly disabled)
+AC_ARG_ENABLE([xmldoc],
+ [AS_HELP_STRING([--disable-xmldoc],
+ [Explicity disable XML documentation])],
+ [case "${enableval}" in
+ y|ye|yes) disable_xmldoc=no ;;
+ n|no) disable_xmldoc=yes ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc) ;;
+ esac], [disable_xmldoc=no])
+
+if test "${disable_xmldoc}" != "yes"; then
+ AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
+ [#include <libxml/tree.h>
+ #include <libxml/parser.h>],
+ [LIBXML_TEST_VERSION])
+ if test "${PBX_LIBXML2}" != 1; then
+ AC_MSG_NOTICE(*** XML documentation will not be available because the 'libxml2' development package is missing.)
+ AC_MSG_NOTICE(*** Please run the 'configure' script with the '--disable-xmldoc' parameter option)
+ AC_MSG_NOTICE(*** or install the 'libxml2' development package.)
+ exit 1
+ fi
+fi
# some embedded systems omit internationalization (locale) support
AC_CHECK_HEADERS([xlocale.h])
@@ -1056,8 +1076,6 @@
AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h])
-
-AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
if test "x${OSARCH}" = "xlinux-gnu" ; then
AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
@@ -1692,28 +1710,6 @@
AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h])
-AC_ARG_ENABLE([xmldoc],
- [AS_HELP_STRING([--disable-xmldoc],
- [Explicity disable XML documentation])],
- [case "${enableval}" in
- y|ye|yes) disable_xmldoc=no ;;
- n|no) disable_xmldoc=yes ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc) ;;
- esac], [disable_xmldoc=no])
-
-if test "${disable_xmldoc}" != "yes"; then
- AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
- [#include <libxml/tree.h>
- #include <libxml/parser.h>],
- [LIBXML_TEST_VERSION])
- if test "${PBX_LIBXML2}" != 1; then
- AC_MSG_NOTICE(*** XML documentation will not be available because the 'libxml2' development package is missing.)
- AC_MSG_NOTICE(*** Please run the 'configure' script with the '--disable-xmldoc' parameter option)
- AC_MSG_NOTICE(*** or install the 'libxml2' development package.)
- exit 1
- fi
-fi
-
AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
if test "${PBX_MISDN}" = 1; then
@@ -1728,8 +1724,6 @@
AST_EXT_TOOL_CHECK([MYSQLCLIENT], [mysql_config])
AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
-
-AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
AST_EXT_TOOL_CHECK([NEON], [neon-config])
@@ -2048,10 +2042,6 @@
AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h])
-
-AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
-
-AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
AC_CHECK_LIB([tonezone], [tone_zone_find_by_num], tonezone_does_not_need_lm=yes, tonezone_does_not_need_lm=no)
@@ -2117,20 +2107,6 @@
AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
-EDITLINE_LIB=""
-if test "x$TERMCAP_LIB" != "x" ; then
- EDITLINE_LIB="$TERMCAP_LIB"
-elif test "x$TINFO_LIB" != "x" ; then
- EDITLINE_LIB="$TINFO_LIB"
-elif test "x$CURSES_LIB" != "x" ; then
- EDITLINE_LIB="$CURSES_LIB"
-elif test "x$NCURSES_LIB" != "x" ; then
- EDITLINE_LIB="$NCURSES_LIB"
-else
- AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)])
-fi
-AC_SUBST(EDITLINE_LIB)
-
if test "x${PBX_UNIXODBC}" = "x1" -o "x${PBX_IODBC}" = "x1"; then
# Does ODBC support wide characters?
AC_MSG_CHECKING(whether ODBC has support for Unicode types)
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/autoconfig.h.in?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/autoconfig.h.in (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/autoconfig.h.in Thu Sep 15 06:27:35 2011
@@ -557,70 +557,6 @@
/* Define to 1 if you have the ISDN PRI library. */
#undef HAVE_PRI
-/* Define to 1 if you have the ISDN PRI advice of charge supplementary service
- events library. */
-#undef HAVE_PRI_AOC_EVENTS
-
-/* Define to 1 if you have the ISDN PRI call hold library. */
-#undef HAVE_PRI_CALL_HOLD
-
-/* Define to 1 if you have the ISDN PRI call rerouting and call deflection
- library. */
-#undef HAVE_PRI_CALL_REROUTING
-
-/* Define to 1 if you have the ISDN PRI call waiting supplementary service
- library. */
-#undef HAVE_PRI_CALL_WAITING
-
-/* Define to 1 if you have the ISDN PRI call completion supplementary service
- library. */
-#undef HAVE_PRI_CCSS
-
-/* Define to 1 if you have the ISDN PRI Date/time ie send policy library. */
-#undef HAVE_PRI_DATETIME_SEND
-
-/* Define to 1 if you have the ISDN PRI user display text IE contents during
- call library. */
-#undef HAVE_PRI_DISPLAY_TEXT
-
-/* Define to 1 if you have the ISDN PRI hangup fix library. */
-#undef HAVE_PRI_HANGUP_FIX
-
-/* Define to 1 if you have the ISDN PRI set_inbanddisconnect library. */
-#undef HAVE_PRI_INBANDDISCONNECT
-
-/* Define to 1 if you have the ISDN Layer 2 persistence option library. */
-#undef HAVE_PRI_L2_PERSISTENCE
-
-/* Define to 1 if you have the ISDN PRI Malicious Call ID library. */
-#undef HAVE_PRI_MCID
-
-/* Define to 1 if you have the ISDN PRI Message Waiting Indication library. */
-#undef HAVE_PRI_MWI
-
-/* Define to 1 if you have the ISDN PRI Message Waiting Indication (Fixed)
- library. */
-#undef HAVE_PRI_MWI_V2
-
-/* Define to 1 if you have the ISDN progress with cause library. */
-#undef HAVE_PRI_PROG_W_CAUSE
-
-/* Define to 1 if you have the ISDN reverse charge library. */
-#undef HAVE_PRI_REVERSE_CHARGE
-
-/* Define to 1 if you have the ISDN service messages library. */
-#undef HAVE_PRI_SERVICE_MESSAGES
-
-/* Define to 1 if you have the ISDN PRI keypad facility in SETUP library. */
-#undef HAVE_PRI_SETUP_KEYPAD
-
-/* Define to 1 if you have the ISDN PRI subaddressing library. */
-#undef HAVE_PRI_SUBADDR
-
-/* Define to 1 if you have the ISDN PRI call transfer supplementary service
- library. */
-#undef HAVE_PRI_TRANSFER
-
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
@@ -833,16 +769,16 @@
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
-/* Define to 1 if `st_blksize' is a member of `struct stat'. */
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_CR_UID
-/* Define to 1 if `uid' is a member of `struct ucred'. */
+/* Define to 1 if `uid' is member of `struct ucred'. */
#undef HAVE_STRUCT_UCRED_UID
/* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1119,9 +1055,6 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
Modified: team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/event.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/event.h?view=diff&rev=336041&r1=336040&r2=336041
==============================================================================
--- team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/event.h (original)
+++ team/oej/pinelonely-meetme-single-user-hangup-trunk/include/asterisk/event.h Thu Sep 15 06:27:35 2011
@@ -743,6 +743,13 @@
*/
uint16_t ast_event_iterator_get_ie_raw_payload_len(struct ast_event_iterator *iterator);
[... 856 lines stripped ...]
More information about the asterisk-commits
mailing list