Commit Graph

25375 Commits

Author SHA1 Message Date
Joshua Colp
bab4f757f2 chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
(closes issue ASTERISK-20841)
Reported by: Kelly Goedert
........

Merged revisions 411021 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 411022 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-24 21:38:21 +00:00
Richard Mudgett
82f9ceae5b res_pjsip_registrar.c: Miscellaneous cleanup in rx_task().
* Fix variable shadowing of 'updated' by renaming it to 'contact_update'.

* Checked 'contact_update' for ast_sorcery_copy() failure.

* Removed silly use of RAII_VAR() for 'contact_update'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21 16:01:56 +00:00
Jonathan Rose
8d1073a05d app_confbridge: Fix bug - users with startmuted set don't start muted
(closes issue ASTERISK-23461)
Reported by: Chico Manobela
Review: https://reviewboard.asterisk.org/r/3373/
........

Merged revisions 410965 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20 22:54:59 +00:00
Richard Mudgett
ce6048c07f assigned-uniqueids: Miscellaneous cleanup and fixes.
* Fix memory leak in ast_unreal_new_channels().  Made it generate the ;2
uniqueid on a stack variable instead of mallocing it.

* Made send error response to ARI and AMI requests instead of just logging
excessive uniqueid length and allowing truncation.  action_originate() and
ari_channels_handle_originate_with_id().

* Fixed minor truncating uniqueid hole when generating the ;2 uniqueid
string length.  Created public and internal lengths of uniqueid.  The
internal length can handle a max public uniqueid plus an appended ;2.

* free() and ast_free() are NULL tolerant so they don't need a NULL test
before calling.

* Made use better struct initialization format instead of the position
dependent initialization format.  Also anything not explicitly initialized
in the struct is initialized to zero by the compiler.

* Made ast_channel_internal_set_fake_ids() use the safer
ast_copy_string() instead of strncpy().

Review: https://reviewboard.asterisk.org/r/3371/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20 16:27:49 +00:00
Mark Michelson
c2dd050e1a PJSIP: Allow for identify sections to be specified in sorcery.conf.
"identify" is a special type of configuration object in PJSIP because
unlike the other objects, it is not provided by the base res_pjsip module.
Instead, it is provided by the res_pjsip_endpoint_identifier_ip module. If
using the default sorcery wizard (config,criteria=type=identify) then things
work because the module that applies the default wizard is the correct module.

However, if attempting to use sorcery.conf to apply an alternate wizard, it
was not possible. If you attempted to specify the identify object type in the
res_pjsip section, then the object could not be registered since the object
was undocumented for the res_pjsip module. There was no alternate configuration
section defined for it, so you were out of luck if you wanted to override the
default wizard.

With this change, the identify section will properly have a sorcery.conf-based
wizard applied when the identify definition is within the res_pjsip_endpoint_identifier_ip
section.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 17:26:22 +00:00
Joshua Colp
5517b92d75 res_stasis: Fix a bug where the default bridge type was not set.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 14:24:43 +00:00
Joshua Colp
b5ae8e1fce res_stasis: Extend bridge type to be a comma separated list of bridge attributes.
This change turns the bridge type field into a comma separated list of attributes.
These attributes include: mixing, holding, dtmf_events, and proxy_media. By setting
the various attributes a user can control the type of bridge created with the
behavior they need for their application.

(closes issue ASTERISK-23437)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3359/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 12:52:55 +00:00
Matthew Jordan
e1a05d786e res_ari: Fix documentation schema error
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 02:29:27 +00:00
Rusty Newton
ec389f39aa res_ari: Add notes about Asterisk HTTP server to the "enabled" config option for the res_ari general section
Added note and see-also reminding user to enable the HTTP server.

(closes issue ASTERISK-22499)
Reported by: Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 23:31:05 +00:00
Matthew Jordan
1ce8d38f77 cdr: Add asserts for when we don't know about a CDR for a channel
In the CDR core, every channel should either be filtered out (due to being an
'internal' channel used as an implementation detail, such as playing media
back into a bridge) or it should get a CDR. Even if that CDR ends up being
discarded, we still give the channel a CDR in case we end up needing it. If we
hit a situation where a channel does not have a CDR, we should blow up in
-dev-mode. Asserts are appropriate for that.

This patch adds those asserts, as they would have quickly caught the error
fixed by r410814.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 15:28:13 +00:00
Scott Griepentrog
b1f9c22c98 ARI: allow json content type with zero length body
When a request was received with a Content-type of json,
the body was sent for json parsing - even if it was zero
length.  This resulted in ARI requests failing that were
valid, such as a channel DELETE with no parameters.  The
code has now been changed to skip json parsing with zero
content length.

(closes issue SWP-6748)
Reported by: Samuel Galarneau
Review: https://reviewboard.asterisk.org/r/3360/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 14:51:02 +00:00
Joshua Colp
9e3694609f res_pjsip: Fix memory leak of nameservers in off-nominal resolver creation failure.
Thanks Walter Doekes!


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 12:45:01 +00:00
Sean Bright
693f2064e8 res_fax_spandsp: Use g711_free() when available.
Per Johann Steinwendtner on the asterisk-dev mailing list:

http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html

g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a
noop.  I opted not to remove the call to g711_release() since it is harmless
and to call g711_free() if we have a sufficiently recent version of spandsp.

(issue ASTERISK-20149)
Reported by: Alexandr Gordeev
........

Merged revisions 410829 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 11:51:24 +00:00
Richard Mudgett
d0ede446ff stasis_cache: Use the right variable in the cache entry ao2 cmp function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 02:02:38 +00:00
Joshua Colp
615f31275a res_pjsip: Enable PJSIP DNS client support.
This change enables DNS client support within PJSIP. System
nameservers are automatically discovered using res_init or
res_ninit. If this fails then PJSIP will resort to using
gethostbyname for resolution.

By enabling this support we gain SRV support, failover, and
weight support.

(closes issue ASTERISK-23435)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3343/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 22:53:08 +00:00
Joshua Colp
55801411e1 res_pjsip_multihomed: Make address replacement less aggressive.
This change makes the res_pjsip_multihomed module less aggressive when
changing the address in messages. It will now only occur if the transport
in use is bound to the any address OR if the system determined source
address matches the bound address of the transport in use.

Review: https://reviewboard.asterisk.org/r/3369/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 22:46:12 +00:00
Russ Meyerriecks
9f74d2290b !fixup: callerid: Logic error in checksum processing
Fixes syntax error in previous commit :-(
........

Merged revisions 410748 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410749 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 21:56:57 +00:00
Russ Meyerriecks
4cd6c21f1e callerid: Logic error in checksum processing
Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.

This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.  

Review: https://reviewboard.asterisk.org/r/3356/
(closes issue ASTERISK-23488)
........

Merged revisions 410710 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410717 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 21:38:28 +00:00
Mark Michelson
2a48cbd86c Revert changes to sorcery that accidentally got committed.
These changes were still up for review and have not been approved
yet. I must have had the changes in my working copy when making
a different change.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 18:36:05 +00:00
Mark Michelson
e4d161e03c Fix stuck channel in ARI through the introduction of synchronous bridge actions.
Playing back a file to a channel in an ARI bridge would attempt to wait until
the playback concluded before returning. The method used involved signaling the
waiting thread in the ARI custom playback function.

The problem with this is that there were some corner cases that were not accounted for:
* If a bridge channel could not be found, then we never would attempt the playback but
  would still attempt to wait for the playback to complete.
* If the bridge playfile action failed to queue, we would still attempt to wait for the
  playback to complete.
* If the bridge playfile action were queued but some circumstance caused the playback
  not to occur (the bridge dies, the channel is removed from the bridge), then we would
  never be notified.

The solution to this is to move the waiting logic into the bridge code. A new bridge
API function is added to queue a synchronous action on a bridge. The waiting thread
is notified when the queued frame has been freed, either due to an error occurring
or due to successful playback. As a failsafe, the waiting thread has a 10 minute
timeout just in case there is a frame leak somewhere.

Review: https://reviewboard.asterisk.org/r/3338



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 16:52:12 +00:00
Richard Mudgett
952ea1d5c1 app_confbridge: Add missing destructor call to announcer channel destructor.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 16:42:05 +00:00
Matthew Jordan
ec0e0a2abe stasis/app.c: Add some extra debugging for subscription counts
Events are sent to a connected ARI application based on the things that ARI
application cares about. These subscriptions can be set up implicitly - such
as when that ARI application creates a new object - or explicitly, via the
application resource's subscription operations. Debugging *why* something was
being sent to an application - or why something was not being sent to an
application - was a bit tricky, as there was no debug information for the
subscriptions.

This patch adds some debug level 3 statements that show the subscription counts
for applications. (Level 3 was chosen as it matches the verbose level 3
statements elsewhere)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-16 20:20:14 +00:00
Mark Michelson
81f55d47e7 Fix failing realtime sorcery tests.
The store realtime callback needs to return a positive value for
sorcery to treat the store as a success.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 21:55:45 +00:00
Jonathan Rose
30fe39aac6 manager: fix memory leak in manager_add_filter function
(closes issue ASTERISK-23420)
Reported by: Etienne Lessard
Patches:
    manager_eventfilter_leak uploaded by Etienne Lessard (license 6394)
........

Merged revisions 410609 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 21:28:31 +00:00
Mark Michelson
8b20abe24e Remove an extra ast_cond_wait() that slipped through the patch.
........

Merged revisions 410606 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 20:53:35 +00:00
Mark Michelson
0d0c99489c Handle the return values of realtime updates and stores more accurately.
Realtime backends' update and store callbacks return the number of rows affected,
or -1 if there was a failure. There were a couple of issues:

* The config API was treating 0 as a successful return, and positive values as
  a failure. Now the config API treats anything >= 0 as a success.

* res_sorcery_realtime was treating 0 as a successful return from the store
  procedure, and any positive values as a failure. Now sorcery treats anything
  > 0 as a success. It still considers 0 a "failure" since there is no change
  to report to observers.

Review: https://reviewboard.asterisk.org/r/3341



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 18:10:47 +00:00
Mark Michelson
60a527ce73 Prevent conflicts regarding unsolicited and solicited MWI to an endpoint.
If an endpoint is receiving unsolicited MWI for a mailbox and then attempts
to subscribe to an AOR that provides MWI for the same mailbox, then the SUBSCRIBE
is rejected with a 500 response.

Review: https://reviewboard.asterisk.org/r/3345


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 18:00:03 +00:00
Scott Griepentrog
4b8ea0dc29 uniqueid: Update CHANGES to reflect new features
Note the new features provided by uniqueid in the
CHANGES file.

(issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3316/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 17:56:13 +00:00
Jonathan Rose
6f4a3ead75 PJSIP: TOS values should be represented as decimals in sorcery objects
(closes issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3324/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 16:26:07 +00:00
Mark Michelson
10e8ad8604 Prevent delayed astdb syncs.
The syncing thread sleeps for a second before waiting to be
told to attempt to sync again. If a signal were sent during this
sleeping period, we would end up having to wait until the next
sync signal occurred in order to sync up the astdb.

This code rearrangement also ensures that any pending transactions
will be synced prior to Asterisk shutting down.

Patches: db_sync.patch by John Hardin (License #6512)
........

Merged revisions 410556 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 16:11:42 +00:00
Jonathan Rose
14160f9a4d ARI/bridges: Forward Playback/Recording Started/Finished to bridge topic
(closes issue ASTERISK-23444)
Reported by: Ben Merrills
Review: https://reviewboard.asterisk.org/r/3340/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 16:05:45 +00:00
Richard Mudgett
92252df9ac res_mwi_external: Clear the stasis cache entry when the external MWI is deleted.
One of the things missing when external MWI support was added was the
ability to clear the stasis cache entry of deleted external MWI mailboxes.

Review: https://reviewboard.asterisk.org/r/3325/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-14 15:55:51 +00:00
Richard Mudgett
b12e561e42 cdr.c: Add missing aow_unlock(cdr) in off nominal path of handle_dial_message().
* Trivial common code hoisting in handle_bridge_leave_message().

* Some whitespace fixing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-13 21:25:40 +00:00
Kinsey Moore
c677439861 ARI: Ensure managing application receives ChannelEnteredBridge messages
This fixes an issue where a Stasis application running over ARI and
subscribed to ari/events could miss the ChannelEnteredBridge event
because it did not subscribe to the new bridge fast enough.

To accomplish this, it subscribes the application controlling the
channel to the new bridge before adding it to that bridge which
required the stasis_app_control structure to maintain a reference to
the stasis_app.

(closes issue ASTERISK-23295)
Review: https://reviewboard.asterisk.org/r/3336/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-13 19:30:06 +00:00
Joshua Colp
030482f591 res_pjsip_multihomed: Remove change for testing fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-13 13:24:17 +00:00
Joshua Colp
95d37a266f res_pjsip_multihomed: Fix a bug where the 200 OK for a REGISTER would contain the wrong contact.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-13 13:23:14 +00:00
Richard Mudgett
e2ac75e4bd res_musiconhold.c: Generate MOH start/stop events whenever the MOH stream is started/stopped.
* Made res_musiconhold.c always post the MusicOnHoldStart/MusicOnHoldStop
events when it actually starts/stops the music streams.  This allows the
events to always happen when MOH starts/stops.  The event posting code was
moved to the MOH alloc/release routines.

* Made channel_do_masquerade() stop any MOH on the original channel before
masquerading so the original channel will get a stop event with correct
information.

* Cleaned up a couple odd codings in moh_files_alloc() and moh_alloc()
dealing with the music state variable.

(issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

Review: https://reviewboard.asterisk.org/r/3306/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 19:05:27 +00:00
Richard Mudgett
d7f3395e4d app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.
When MOH is playing to a user in a conference and the user is kicked or
hangs up from the conference then the AMI MusicOnHoldStop events didn't
happen.  (Asterisk v11 AMI event: MusicOnHold, state:Stop)

(closes issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

Review: https://reviewboard.asterisk.org/r/3306/
........

Merged revisions 410490 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 18:45:54 +00:00
Joshua Colp
ece1671625 res_pjsip_multihomed: Fix a bug where outgoing messages for TCP would go out using UDP.
This change fixes a bug where the code which changes the transport did not check whether
the message is going out over UDP or not before changing it. For TCP and TLS transports
we don't need to change the transport as the correct one is already chosen.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 12:50:46 +00:00
Joshua Colp
9c82c32f80 res_pjsip_multihomed: Add module which places the correct address within messages.
Due to how messages are handled within PJSIP it is not until a message is actually
sent that the destination is reliably known. This means that the addresses placed
within the message may not be of the interface the message is being sent out on.

This module determines what interface a message is being sent on and updates the
message to contain the correct address if applicable.

This module was tested by myself in a virtualized environment with multiple interfaces
and also by Kinsey Moore in the following configuration:

Networks:
* 10.24.16.0/21
** hard phone
** default gateway
* 10.24.64.0/21
** softphone with pjsip-based stack

Transport details:
bind address: 0.0.0.0
protocol: UDP

All endpoints were tested with explicitly configured transports and unconfigured transports.

This was tested with inbound and outbound calls, both of which were experiencing detrimental
effects from incorrect IP addresses in SIP messages. These effects were only experienced by the
soft phone on the 10.24.64.0 network since the messages to the hard phone on the 10.24.16.0
network had the correct IP address.

(closes issue ASTERISK-23020)
Reported by: xrobau

Review: https://reviewboard.asterisk.org/r/3102/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-11 16:06:42 +00:00
Richard Mudgett
9b94422e59 AST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.

Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.

(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina
........

Merged revisions 410380 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410381 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 17:16:38 +00:00
Scott Griepentrog
972bc14e20 unqiueid: correct max uniqueid length test
This patch adds null string test prior to checking for
a max uniqueid value that was added in r410157.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 16:32:13 +00:00
Kinsey Moore
8e0c31777c AST-2014-002: chan_sip: Exit early on bad session timers request
This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.

(closes issue ASTERISK-23373)
Reported by: Corey Farrell
Patches:
     chan_sip-earlier-st-1.8.patch uploaded by Corey Farrell (license 5909)
     chan_sip-earlier-st-11.patch uploaded by Corey Farrell (license 5909)
........

Merged revisions 410308 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410311 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 13:25:05 +00:00
Joshua Colp
f119ac4460 AST-2014-003: res_pjsip: When handling 401/407 responses don't assume a request will have an endpoint.
This change removes the assumption that an outgoing request will always
have an endpoint and makes the authenticate_qualify option work once again.

(closes issue ASTERISK-23210)
Reported by: Joshua Colp


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-10 12:52:07 +00:00
George Joseph
e59a4de0e4 pjsip_cli: Create pjsip show channel and contact, and general cli code cleanup.
Created the 'pjsip show channel' and 'pjsip show contact' commands.
Refactored out the hated ast_hashtab.  Replaced with ao2_container.
Cleaned up function naming.  Internal only, no public name changes.
Cleaned up whitespace and brace formatting in cli code.
Changed some NULL checking from "if"s to ast_asserts.
Fixed some register/unregister ordering to reduce deadlock potential.
Fixed ast_sip_location_add_contact where the 'name' buffer was too short.
Fixed some self-assignment issues in res_pjsip_outbound_registration.

(closes issue ASTERISK-23276)
Review: http://reviewboard.asterisk.org/r/3283/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08 16:41:04 +00:00
Matthew Jordan
14afa32979 resource_channels: Check if a passed in ID is NULL before checking its length
Calling strlen on a NULL string is explosive. This patch checks whether or not
the passed in string is NULL or zero length before checking to see if the
string is too long.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08 15:43:30 +00:00
Corey Farrell
20330c41db chan_sip: Fix deadlock of monlock between unload_module and do_monitor
Release monlock before calling pthread_join.  This ensures do_monitor
cannot freeze by locking monlock during module unload.

(closes issue ASTERISK-21406)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3284/
........

Merged revisions 410224 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410225 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:53:58 +00:00
Scott Griepentrog
c229ebf8e4 sorcery: correct field register argument list
This fixes mistakes I previously made in merging
gtjoseph's changes with mine.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:07:52 +00:00
Matthew Jordan
10deefeace config_options: Display the see-also information for CLI config option help
The config option help information has always parsed the <see-also> tags in the
XML documentation. Unfortunately, it just never bothered displaying them on
the CLI. With this patch, when you execute 'config show help [module] [obj]
[option]', it will display what other options are useful to you.

(closes issue ASTERISK-22008)
Reported by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:53:17 +00:00
Matthew Jordan
48ec1231f8 res_pjsip: Fix documentation for one touch recording see-also links
The one touch recording options have several see-also links between the
various configuration options. These were 'broken' by the snake casing
of those options. This patch corrects the see-also links such that they
reference the correct option names.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:13:31 +00:00