Commit Graph

27527 Commits

Author SHA1 Message Date
Joshua Colp
3bb17c43b0 Release summaries: Add summaries for 13.9.0 2016-05-09 08:04:27 -05:00
Joshua Colp
549465b89a Release summaries: Remove previous versions 2016-05-09 08:01:46 -05:00
Joshua Colp
d805a1c1ab .version: Update for 13.9.0 2016-05-09 08:01:46 -05:00
Joshua Colp
7c2ff2c29f .lastclean: Update for 13.9.0 2016-05-09 08:01:46 -05:00
Joshua Colp
addd49f1a4 realtime: Add database scripts for 13.9.0 2016-05-09 08:01:46 -05:00
Joshua Colp
435c2a12d4 ChangeLog: Updated for 13.9.0-rc2 13.9.0-rc2 2016-05-03 07:22:00 -05:00
Joshua Colp
45b84418ac Release summaries: Add summaries for 13.9.0-rc2 2016-05-03 07:21:48 -05:00
Joshua Colp
0581fa02e5 Release summaries: Remove previous versions 2016-05-03 07:21:34 -05:00
Joshua Colp
31b9b476fc .version: Update for 13.9.0-rc2 2016-05-03 07:21:34 -05:00
Joshua Colp
b64d540059 .lastclean: Update for 13.9.0-rc2 2016-05-03 07:21:34 -05:00
Joshua Colp
a9467ce7d7 realtime: Add database scripts for 13.9.0-rc2 2016-05-03 07:21:33 -05:00
Joshua Colp
fa4e9947be Merge "pjproject_bundled: Disable PJSIP_UNESCAPE_IN_PLACE" into 13.9 2016-05-02 06:07:42 -05:00
Mark Michelson
b470aabb7b func_odbc: Check connection status before executing queries.
A recent change to func_odbc made it so that a single connection was
maintained per DSN. The problem was that the code was optimistic about
the health of the connection after initially opening it and did nothing
to re-connect in case the connection had died.

This change adds a check before executing a query to ensure that the
connection to the database is still up and running.

ASTERISK-25963 #close
Reported by Ross Beer

Change-Id: Id33c86eb04ff48ca088bb2e3086c27b3b683491d
(cherry picked from commit 677d5b5151)
2016-04-29 14:27:46 -05:00
George Joseph
e702b9fc40 pjproject_bundled: Disable PJSIP_UNESCAPE_IN_PLACE
When pjsip_parse_uri is called with PJSIP_UNESCAPE_IN_PLACE enabled,
the input uri string will become corrupted if it contains escape sequences.
It's not possible to automatically strdup or strdupa the input string because
the output uri pj_str_t's will have pointers to chunks of the input string.
Getting around this would require more memory management code and wouldn't
be worth the savings of doing the unescape in place.

ASTERISK-25970 #close
Reported-by: Dmitriy Serov

Change-Id: I28dc0e599b5108f7959b9c46dc8278371b372f88
2016-04-29 14:17:33 -05:00
Joshua Colp
0447d28fbd ChangeLog: Updated for 13.9.0-rc1 13.9.0-rc1 2016-04-25 16:44:00 -05:00
Joshua Colp
5237b7cd47 Release summaries: Add summaries for 13.9.0-rc1 2016-04-25 16:42:24 -05:00
Joshua Colp
5a3850ecba .version: Update for 13.9.0-rc1 2016-04-25 16:40:14 -05:00
Joshua Colp
60b39040e4 .lastclean: Update for 13.9.0-rc1 2016-04-25 16:40:14 -05:00
Joshua Colp
5078454464 realtime: Add database scripts for 13.9.0-rc1 2016-04-25 16:40:14 -05:00
zuul
a8f8e3c340 Merge "res_agi: Prevent run_agi from eating frames it shouldn't" into 13 2016-04-25 11:49:18 -05:00
George Joseph
eb7c581806 res_agi: Prevent run_agi from eating frames it shouldn't
The run_agi function is eating control frames when it shouldn't be. This is
causing issues when an AGI is run from CONNECTED_LINE_SEND_SUB in a blond
transfer.

Alice calls Bob. Bob attended transfers to Charlie but hangs up before Charlie
answers.

Alice gets the COLP UPDATE indicating Charlie but Charlie never gets an UPDATE
and is left thinking he's connected to Bob.

In this case, when CONNECTED_LINE_SEND_SUB runs on Alice's channel and it calls
an AGI, the extra eaten frames prevent CONNECTED_LINE_SEND_SUB from running on
Charlie's channel.

The fix was to accumulate deferrable frames in the "forever" loop instead of
dropping them, and re-queue them just before running the actual agi command
or exiting.

ASTERISK-25951 #close

Change-Id: I0f4bbfd72fc1126c2aaba41da3233a33d0433645
2016-04-25 08:55:11 -06:00
zuul
13ee3402ed Merge "func_odbc: Use one connection per DSN." into 13 2016-04-24 20:14:32 -05:00
zuul
84d2e4fb42 Merge "Remove reference to non-existent sip.conf option" into 13 2016-04-22 18:55:42 -05:00
zuul
77ae5cd7fd Merge "res_stasis: Handle re-enter stasis bridge with swap channel." into 13 2016-04-22 18:55:41 -05:00
zuul
09f8f8daa1 Merge "bridge: Hold off more than one imparting channel at a time." into 13 2016-04-22 18:29:19 -05:00
Mark Michelson
068ae54c76 func_odbc: Use one connection per DSN.
res_odbc was changed in Asterisk 13.8.0 to remove connection management,
opting instead to let unixodbc maintain open connections and return
those to Asterisk as requested.

This was a boon for realtime, since it meant that multiple threads could
potentially run parallel queries since they could each be using their
own database connections.

However, on the user-facing side, func_odbc, there were some inherent
behaviors being relied on that no longer hold true after the change.
One such reported behavior was that MySQL's LAST_INSERTED_ID() works
per-connection. This means that if Asterisk uses separate connections
for every database operation, whereas before it used one connection for
everything, we have broken expectations and functionality.

The fix provided in this patch is to make func_odbc use a single
database connection per DSN. This way, user-facing database usage will
have the same behavior as it did pre-13.8.0. However, realtime, which is
the real workhorse of database interaction, will continue to let
unixodbc manage connections.

ASTERISK-25938 #close
Reported by Edwin Vandamme

Change-Id: Iac961fe79154c6211569afcdfec843c0c24c46dc
2016-04-22 14:30:18 -05:00
Leif Madsen
6aeefa89bc Remove reference to non-existent sip.conf option
Option was removed in commit 7f883ef495

ASTERISK-25927 #close

Change-Id: I92f9b0196d9fc41d1d58354c07340c465ef1fcf8
2016-04-22 13:14:19 -05:00
Joshua Colp
6112a94d03 Merge "res_pjsip_callerid: Clear out display name if id->name is not valid" into 13 2016-04-21 16:25:00 -05:00
Diederik de Groot
e750ea9b5b lock.c: Check *lt before dereferencing it
*lt is NULL if t->tracking == 0

ASTERISK-25948 #close

Change-Id: I4a81af28f9c82a74aa82413d772a7dc8fa6f45ba
2016-04-21 11:35:37 -05:00
Richard Mudgett
a036c35903 res_stasis: Handle re-enter stasis bridge with swap channel.
We lose the fact that there is a swap channel if there is one.  We
currently wind up rejoining the stasis bridge as a normal join after the
swap channel has already been kicked from the bridge.

This patch preserves the swap channel so the AMI/ARI events can note that
the channel joining the bridge is swapping with another channel.  Another
benefit to swaqpping in one operation is if there are any channels that
get lonely (MOH, bridge playback, and bridge record channels).  The lonely
channels won't leave before the joining channel has a chance to come back
in under stasis if the swap channel is the only reason the lonely channels
are staying in the bridge.

ASTERISK-25947 #close
Reported by: Richard Mudgett

ASTERISK-24649
Reported by: John Bigelow

ASTERISK-24782
Reported by: John Bigelow

Change-Id: If37ea508831d1fed6dbfac2f191c638fc0a850ee
2016-04-20 15:45:46 -05:00
Richard Mudgett
9942d50aa5 bridge: Hold off more than one imparting channel at a time.
An earlier patch blocked the ast_bridge_impart() call until the channel
either entered the target bridge or it failed.  Unfortuantely, if the
target bridge is stasis and the imprted channel is not a stasis channel,
stasis bounces the channel out of the bridge to come back into the bridge
as a proper stasis channel.  When the channel is bounced out, that
released the block on ast_bridge_impart() to continue.  If the impart was
a result of a transfer, then it became a race to see if the swap channel
would get hung up before the imparted channel could come back into the
stasis bridge.  If the imparted channel won then everything is fine.  If
the swap channel gets hung up first then the transfer will fail because
the swap channel is leaving the bridge.

* Allow a chain of ast_bridge_impart()'s to happen before any are
unblocked to prevent the race condition described above.  When the channel
finally joins the bridge or completely fails to join the bridge then the
ast_bridge_impart() instances are unblocked.

ASTERISK-25947
Reported by: Richard Mudgett

ASTERISK-24649
Reported by: John Bigelow

ASTERISK-24782
Reported by: John Bigelow

Change-Id: I8fef369171f295f580024ab4971e95c799d0dde1
2016-04-20 15:45:38 -05:00
Joshua Colp
b1b3460783 Merge "pjproject: Add patch for removing strip of '[]' from header params" into 13 2016-04-20 08:17:21 -05:00
George Joseph
516c626a7d res_pjsip_callerid: Clear out display name if id->name is not valid
When create_new_id_hdr creates a new RPID or PAI header, it starts by cloning
the From header, then it overwrites the display name and uri from the channel's
connected.id.  If the connected.id.name wasn't valid, create_new_id_hdr was
leaving the display name from the From header in the new RPID or PAI header.
On an attended transfer where the originator had a caller id number set but not
a display name, the re-INVITE to the final transferee had the number of the
originator but the display name of the transferer.

Added a check to clear out the display name in the new header if
connected.id.name was invalid.

ASTERISK-25942 #close

Change-Id: I60b4bf7a7ece9b7425eba74151c0b4969cd2738b
2016-04-19 17:06:15 -06:00
Joshua Colp
08f6408dc6 Merge "PJSIP: Remove PJSIP parsing functions from uri length validation." into 13 2016-04-19 15:19:35 -05:00
Joshua Colp
ded3794fc6 app_talkdetect: Make the module core supported.
This module is used as part of testsuite tests to confirm
stuff works. I'm accordingly marking it as core as it is
required by those tests.

Change-Id: I558e7af7679b22b8ed641d7dd37ee4ca35b11e88
2016-04-19 15:02:18 -03:00
Mark Michelson
efae187217 PJSIP: Remove PJSIP parsing functions from uri length validation.
The PJSIP parsing functions provide a nice concise way to check the
length of a hostname in a SIP URI. The problem is that in order to use
those parsing functions, it's required to use them from a thread that
has registered with PJLib.

On startup, when parsing AOR configuration, the permanent URI handler
may not be run from a PJLib-registered thread. Specifically, this could
happen when Asterisk was started in daemon mode rather than
console-mode. If PJProject were compiled with assertions enabled, then
this would cause Asterisk to crash on startup.

The solution presented here is to do our own parsing of the contact URI
in order to ensure that the hostname in the URI is not too long. The
parsing does not attempt to perform a full SIP URI parse/validation,
since the hostname in the URI is what is important.

ASTERISK-25928 #close
Reported by Joshua Colp

Change-Id: Ic3d6c20ff3502507c17244a8b7e2ca761dc7fb60
2016-04-19 09:45:15 -06:00
Joshua Colp
9a22ef81af Merge "app_queue: Frequent segfaults in function can_ring_entry()" into 13 2016-04-19 09:49:11 -05:00
Joshua Colp
47adff8977 Merge "stasis_bridge.c: Update stasis bridge push diagnostic messages." into 13 2016-04-19 09:42:50 -05:00
Joshua Colp
a048a0ffbd Merge "res_pjsip_transport_management: Allow unload to occur." into 13 2016-04-19 09:40:42 -05:00
Joshua Colp
c922846c6d Merge "bridge_channel.c: Ignore role setup failure in channel push." into 13 2016-04-19 09:37:30 -05:00
Mark Michelson
f436b9ab11 res_pjsip_registrar: Fix bad memory-ness with user_agent.
Recent changes to the PJSIP registrar resulted in tests failing due to
missing AOR_CONTACT_ADDED test events. The reason for this was that the
user_agent string had junk values in it, resulting in being unable to
generate the event.

I'm going to be honest here, I have no idea why this was happening. Here
are the steps needed for the user_agent variable to get messed up:
* REGISTER is received
* First contact in the REGISTER results in a contact being removed
* Second contact in the REGISTER results in a contact being added
* The contact, AOR, expiration, and user agent all have to be passed as
  format parameters to the creation of a string. Any subset of those
  parameters would not be enough to cause the problem.

Looking into what was happening, the thing that struck me as odd was
that the user_agent variable was meant to be set to the value of the
User-Agent SIP header in the incoming REGISTER. However, when removing a
contact, the user_agent variable would be set (via ast_strdupa inside a
loop) to the stored contact's user_agent. This means that the
user_agent's value would be incorrect when attempting to process further
contacts in the incoming REGISTER.

The fix here is to use a different variable for the stored user agent
when removing a contact. Correcting the behavior to be correct also
means the memory usage is less weird, and the issue no longer occurs.

ASTERISK-25929 #close
Reported by Joshua Colp

Change-Id: I7cd24c86a38dec69ebcc94150614bc25f46b8c08
2016-04-19 08:23:54 -05:00
Joshua Colp
49bfdc9ac0 res_pjsip_transport_management: Allow unload to occur.
At shutdown it is possible for modules to be unloaded that wouldn't
normally be unloaded. This allows the environment to be cleaned up.

The res_pjsip_transport_management module did not have the unload
logic in it to clean itself up causing the res_pjsip module to not
get unloaded. As a result the res_pjsip monitor thread kept going
processing traffic and timers when it shouldn't.

Change-Id: Ic8cadee131e3b2c436a81d3ae8bb5775999ae00a
2016-04-18 15:49:07 -03:00
Richard Mudgett
f4693d1897 bridge_channel.c: Ignore role setup failure in channel push.
We have to setup the channel roles after the bridge class push is called
because the bridge class push callback may have set roles on the incoming
channel.  Since we have already partially pushed the channel into the
bridge and reversing what we have already done could be problematic, the
only thing we can do is press on to complete pushing the channel into the
bridge.

* Ignore any channel role setup errors after pushing the channel into a
bridge.  The channel may behave incorrectly in the bridge but we can no
longer abort the push at this time.

Change-Id: I08a97082b729052ee65cdca6bb730cf1289ede00
2016-04-18 10:51:56 -05:00
Jaco Kroon
22335fe18a chan_sip: Don't verify table if rtupdate=no
If rtupdate=no do not verify sipregs/peers table has updatable fields.

ASTERISK-25934 #close

Change-Id: Iaa2c53037b93daccc7e7333c40d61861847b856d
2016-04-18 05:34:51 -05:00
Joshua Colp
c7732a2600 Merge "Codecs: strip codec name while parsing allow/disallow options" into 13 2016-04-18 05:31:09 -05:00
ibercom
3b9d8b60b2 app_queue: Frequent segfaults in function can_ring_entry()
ASTERISK-25888 #close

Change-Id: I007a2f2dd99823e04fb5be3ff01f02b0a2956117
2016-04-18 05:06:27 -05:00
Richard Mudgett
724acb6ce7 stasis_bridge.c: Update stasis bridge push diagnostic messages.
Change-Id: I195b14994c9dcccb9452491ca20a885d2a54605a
2016-04-15 20:24:46 -05:00
Joshua Colp
56c8182913 Merge "app_voicemail/IMAP: function 'save_to_folder' creates wrong folder" into 13 2016-04-15 13:21:21 -05:00
Mark Michelson
5f78801859 transport management: Register thread with PJProject.
The scheduler thread that kills idle TCP connections was not registering
with PJProject properly and causing assertions if PJProject was built in
debug mode.

This change registers the thread with PJProject the first time that the
scheduler callback executes.

AST-2016-005

Change-Id: I5f7a37e2c80726a99afe9dc2a4a69bdedf661283
2016-04-14 14:25:13 -05:00
Joshua Colp
13cb5ea73f Merge "res_pjsip_transport_management: Kill idle TCP connections." into 13 2016-04-14 13:02:47 -05:00