call manager_event only if there is not null channel structure

(Closes issue ASTERISK-19298)
Reported by: robinfood
Patches:
        issue19298.patch uploaded by may213 (License #5415)
........

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

Merged revisions 355137 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355138 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Clear the high order bit from the destination call number before sending.

send_apathetic_reply takes the incoming frame's source call number as the
destination call number for the outgoing frame.  If the incoming frame was a
full frame, then the high order bit of the source call number is set and will be
interpreted as a retransmit when sent back out as the destination call number.
........

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

Merged revisions 355183 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355184 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Don't enable sqlite3 CDRs by default in sample configs.
........

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

Merged revisions 355229 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355230 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Properly invert the return of a strncmp call.

This was causing identification that should have been
made private to be public.

(closes issue AST-814)
reported by Patrick Anderson

Patches:
	chan_sip.c.diff uploaded by Patrick Anderson (license 5430)
........

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

Merged revisions 355271 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355274 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Fix lock typo that should be unlock in cel_sqlite_custom reload.

(closes issue ASTERISK-19356)
Reported by: Alex Villacis Lasso
Patches:
      asterisk-1.8.9.2-cel_sqlite3_custom-fix-reload-locking-typo.patch (license #5617) patch uploaded by Alex Villacis Lasso

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

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

Merged revisions 355320 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355321 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Fix voicemail problems when using ogg/vorbis.

Ogg/vorbis was fairly useless as a voicemail file format because it did
not implement the seek and tell format callbacks among other problems.

Since we were already using the libvorbis and libvorbisenc libraries we
can use libvorbisfile as it is also part of the vorbis library package.

* Made use the libvorbisfile to handle the ogg/vorbis file stream.  The
format_ogg_vorbis.c is now mostly a wrapper around libvorbisfile.

(closes issue ASTERISK-16926)
Reported by: sque
Patches:
      ogg_vorbis_use_libvorbisfile.patch (license #6108) patch uploaded by sque
........

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

Merged revisions 355375 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355376 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Re-commit the verbose branch.

This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

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


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355413 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Use TRUNK_CALL_START as originally intended.

Back in r646, TRUNK_CALL_START was added and defined as 0x4000.  That same value
was also hard-coded in one part of the IAX2 code instead of using the #define.

TRUNK_CALL_START has changed over the years (for dealing with LOW_MEMORY), but
the hard-coded usage was never updated to match.  This patch fixes that.
........

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

Merged revisions 355449 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355450 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Remove IAX_OLD_FIND from chan_iax2.


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355495 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
When IAX2 debugging is enabled, make sure to log 'apathetic' messages too.
........

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

Merged revisions 355530 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355531 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Fix AMI Monitor action without File header converting channel name into filename.

* Fix potential Solaris crash if Monitor application has a urlbase and no
fname_base option.
........

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

Merged revisions 355575 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355576 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Fix compile problem when old version of libvorbisfile v1.1.2 is used.

The principle difference between libvorbisfile v1.1.2 and newer (at least
v1.2.0) is the addition of the predefined callbacks OV_CALLBACKS_xxx in
vorbis/vorbisfile.h used for ov_open_callbacks().

* Updated the configure script to detect if libvorbisfile.h declares
OV_CALLBACKS_NOCLOSE.

* Copied the declaration of OV_CALLBACKS_NOCLOSE from v1.2.0 to allow
v1.1.2 to compile.

(closes issue ASTERISK-19370)
Reported by: Jonn Taylor
........

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

Merged revisions 355620 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355621 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Revert a change to audio_audiohook_write_list that had no affect.

When I made this change initially, I was under the false impression that the
audiohooks structure remained on the channel after all of the hooks had been
detached.  This is not the case, ast ast_read takes care of removing the
audiohooks structure if the lists are empty.
........

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

Merged revisions 355623 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355624 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Fix channel opaquification for app_rpt


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355667 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Fix regressions with regards to route-set creation on early dialogs.

This fixes two main issues:

1. Asterisk would send a CANCEL to the route created by the provisional response
   instead of using the same destination it did in the initial INVITE.
2. If a new route set arrives in a 200 OK than was in the 1XX response (perfectly
   possible if our outbound INVITE gets forked), then the route set in the 200 OK
   needs to overwrite the route set in the 1XX response.

(closes issue ASTERISK-19358)
Reported by: Karsten Wemheuer
Tested by: Karsten Wemheuer
patches:
   ASTERISK-19358.patch uploaded by Mark Michelson (license 5049)
   ASTERISK-19358.patch uploaded by Stefan Schmidt (license 6034)

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

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

Merged revisions 355733 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355745 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Pass the correct value to ast_timer_set_rate() for IAX2 trunking.

IAX2 uses the trunkfreq variable to determine how often to send trunk packets, but
this value is in milliseconds while ast_timer_set_rate() expects the rate argument
to be ticks per second.  So we divide 1000 by trunkfreq and pass that in instead.

With a default of 20ms, this change makes IAX2 send trunk packets every 20ms
instead of every 50ms.

Tracked down by myself and Bob Wienholt.
........

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

Merged revisions 355747 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355748 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Non-verbose output should always go to the remote console, regardless of the previous level.


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355749 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Don't allow trunkfreq to be greater than 1000ms.
........

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

Merged revisions 355794 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355795 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
push 'outgoing' flag from sig_XXX up to chan_dahdi

'p->outgoing' in chan_dahdi and sig_analog wern't kept in sync, particulary FXS ast_hangup didn't clear the 'outgoing' flag.
sig_pri and sig_ss7 were keeping 'outgoing' flag insync.

Now provides a callback for all the low level sig_XXX modules.

(issue ASTERISK-19316)

alecdavis (license 585)
Reported by: Jeremy Pepper
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1747/
........

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

Merged revisions 355851 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355852 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7
Set the length of the ast_sockaddr, so that we can set it's port later.

Without this, the call to ast_sockaddr_set_port a few lines later is a noop.
........

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

Merged revisions 355902 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: file:///home/FVOFFICE/jgowdy/mirror/asterisk/trunk@355903 eedb1c7a-6a47-11e1-93ee-a9c596eb3dd7