Update CONTROL STREAM FILE to accept an 'offsetms' parameter

This patch allows starting playback of audio through the CONTROL STREAM FILE
AGI command to start at a particular offset. It will also return the final
position of the file in the 'endpos' attribute.

(closes issue ASTERISK-17803)
Reported by: Murray Melvin
patches:
  res_agi.c.r316293.diff uploaded by murraytm (license 6221)


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@395906 f38db490-d61c-443f-a65b-d21fe96a405b
Raise Registry AMI events on registration failures

This patch makes it so that all registration attempts that fail that
also permanently modify the registration state will raise an appropriate
AMI event.

Note that this patch was forward ported to trunk and the Stasis Core
message bus by mjordan.

(closes issue ASTERISK-21368)
Reported by: Dmitriy Serov
patches:
  chan_sip.c.diff uploaded by Demon (license 6479)



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@395907 f38db490-d61c-443f-a65b-d21fe96a405b