Skip to content
Snippets Groups Projects
  1. Nov 28, 2022
    • Naveen Albert's avatar
      sla: Prevent deadlock and crash due to autoservicing. · 2efa290d
      Naveen Albert authored
      SLAStation currently autoservices the station channel before
      creating a thread to actually dial the trunk. This leads
      to duplicate servicing of the channel which causes assertions,
      deadlocks, crashes, and moreover not the correct behavior.
      
      Removing the autoservice prevents the crash, but if the station
      hangs up before the trunk answers, the call hangs since the hangup
      was never serviced on the channel.
      
      This is fixed by not autoservicing the channel, but instead
      servicing it in the thread dialing the trunk, since it is doing
      so synchronously to begin with. Instead of sleeping for 100ms
      in a loop, we simply use the channel for timing, and abort
      if it disappears.
      
      The same issue also occurs with SLATrunk when a call is answered,
      because ast_answer invokes ast_waitfor_nandfds. Thus, we use
      ast_raw_answer instead which does not cause any conflict and allows
      the call to be answered normally without thread blocking issues.
      
      ASTERISK-29998 #close
      
      Change-Id: Icc237d50354b5910000d2305901e86d2c87bb9d8
      2efa290d
  2. Nov 08, 2022
    • Naveen Albert's avatar
      app_mixmonitor: Add option to delete files on exit. · 6e59b01e
      Naveen Albert authored
      Adds an option that allows MixMonitor to delete
      its copy of any recording files before exiting.
      
      This can be handy in conjunction with options
      like m, which copy the file elsewhere, and the
      original files may no longer be needed.
      
      ASTERISK-30284 #close
      
      Change-Id: Ida093679c67e300efc154a97b6d8ec0f104e581e
      6e59b01e
  3. Nov 02, 2022
    • Naveen Albert's avatar
      app_stack: Print proper exit location for PBXless channels. · dfe2f386
      Naveen Albert authored
      When gosub is executed on channels without a PBX, the context,
      extension, and priority are initialized to the channel driver's
      default location for that endpoint. As a result, the last Return
      will restore this location and the Gosub logs will print out bogus
      information about our exit point.
      
      To fix this, on channels that don't have a PBX, the execution
      location is left intact on the last return if there are no
      further stack frames left. This allows the correct location
      to be printed out to the user, rather than the bogus default
      context.
      
      ASTERISK-30076 #close
      
      Change-Id: I1d42a99c9aa9e3708d32718863175158a894e414
      dfe2f386
  4. Sep 26, 2022
    • Naveen Albert's avatar
      app_bridgewait: Add option to not answer channel. · 1e29607b
      Naveen Albert authored
      Adds the n option to not answer the channel when calling
      BridgeWait, so the application can be used without
      forcing answer supervision.
      
      ASTERISK-30216 #close
      
      Change-Id: I6b85ef300b1f7b5170f8537e2b10889cc2e6605a
      1e29607b
    • Naveen Albert's avatar
      app_amd: Add option to play audio during AMD. · 8c791f9a
      Naveen Albert authored
      Adds an option that will play an audio file
      to the party while AMD is running on the
      channel, so the called party does not just
      hear silence.
      
      ASTERISK-30179 #close
      
      Change-Id: I4af306274552b61b3d9f0883c33f698abd4699b6
      8c791f9a
  5. Sep 11, 2022
    • Naveen Albert's avatar
      app_confbridge: Add end_marked_any option. · 205c7c8d
      Naveen Albert authored
      Adds the end_marked_any option, which can be used
      to kick a user from a conference if any marked user
      leaves.
      
      ASTERISK-30211 #close
      
      Change-Id: I9e8da7ccb892e522546c0f2b5476d172e022c2f5
      205c7c8d
  6. Aug 17, 2022
    • Naveen Albert's avatar
      general: Very minor coding guideline fixes. · e2e049e4
      Naveen Albert authored
      Fixes a few coding guideline violations:
      * Use of C99 comments
      * Opening brace on same line as function prototype
      
      ASTERISK-30163 #close
      
      Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
      e2e049e4
  7. Aug 08, 2022
    • Naveen Albert's avatar
      app_confbridge: Fix memory leak on updated menu options. · dc7ec11c
      Naveen Albert authored
      If the CONFBRIDGE function is used to dynamically set
      menu options, a memory leak occurs when a menu option
      that has been set is overridden, since the menu entry
      is not destroyed before being freed. This ensures that
      it is.
      
      Additionally, logic that duplicates the destroy function
      is removed in lieu of the destroy function itself.
      
      ASTERISK-28422 #close
      
      Change-Id: I71cfb5c24e636984d41086d1333a416dc12ff995
      dc7ec11c
  8. Aug 01, 2022
    • Naveen Albert's avatar
      general: Improve logging levels of some log messages. · c6544865
      Naveen Albert authored
      Adjusts some logging levels to be more or less important,
      that is more prominent when actual problems occur and less
      prominent for less noteworthy things.
      
      ASTERISK-30153 #close
      
      Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
      c6544865
    • Naveen Albert's avatar
      general: Remove obsolete SVN references. · 165368bf
      Naveen Albert authored
      There are a handful of files in the tree that
      reference an SVN link for the coding guidelines.
      
      This removes these because the links are dead
      and the vast majority of source files do not
      contain these links, so this is more consistent.
      
      app_skel still maintains an (up to date) link
      to the coding guidelines.
      
      ASTERISK-30159 #close
      
      Change-Id: I35bbb20f66982e98099cff3029ede20091ffdac7
      165368bf
    • Naveen Albert's avatar
      app_confbridge: Add missing AMI documentation. · 2d8f2696
      Naveen Albert authored
      Documents the ConfbridgeListRooms AMI response,
      which is currently not documented.
      
      ASTERISK-30020 #close
      
      Change-Id: Id6fff7a936244bae7b52686301eb740c1169cdea
      2d8f2696
    • Naveen Albert's avatar
      app_meetme: Add missing AMI documentation. · 4af88150
      Naveen Albert authored
      The MeetmeList and MeetmeListRooms AMI
      responses are currently completely undocumented.
      This adds documentation for these responses.
      
      ASTERISK-30018 #close
      
      Change-Id: Id93135b7edf01de6f8fba266e2122989dc8996b8
      4af88150
  9. Jul 13, 2022
    • Naveen Albert's avatar
      app_confbridge: Always set minimum video update interval. · 2843e567
      Naveen Albert authored
      Currently, if multiple video-enabled ConfBridges are
      conferenced together, we immediately get into a scenario
      where an infinite sequence of video updates fills up
      the taskprocessor queue and causes memory consumption
      to climb unabated until Asterisk is killed. This is due
      to the core bridging mechanism that provides video updates
      (softmix_bridge_write_control in bridge_softmix.c)
      continously updating all the channels in the bridge with
      video updates.
      
      The logic to do so in the core is that the video updates
      should be provided if the video_update_discard property
      for the bridge is 0, or if enough time has elapsed since
      the last video update. Thus, we already have a safeguard
      built in to ensure the scenario described above does not
      happen. Currently, however, this safeguard is not being
      adequately ensured.
      
      In app_confbridge, the video_update_discard property
      defaults to 2000, which is a healthy value that should
      completely prevent this issue. However, this value is
      only set onto the bridge in the SFU video mode. This
      leaves video modes such as follow_talker completely
      vulnerable, since video_update_discard will actually
      be 0, since the default or set value was never applied.
      As a result, the core bridging mechanism will always
      try to provide video updates regardless of when the last
      one was sent.
      
      To prevent this issue from happening, we now always
      set the video_update_discard property on the bridge
      with the value from the bridge profile. The app_confbridge
      defaults will thus ensure that infinite video updates
      no longer happen in any video mode.
      
      ASTERISK-29907 #close
      
      Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2
      2843e567
  10. Jul 12, 2022
  11. Jul 01, 2022
    • Naveen Albert's avatar
      app_dial: Fix dial status regression. · 626fefdf
      Naveen Albert authored
      ASTERISK_28638 caused a regression by incorrectly aborting
      early and overwriting the status on certain calls.
      This was exhibited by certain technologies such as DAHDI,
      where DAHDI returns NULL for the request if a line is busy.
      This caused the BUSY condition to be incorrectly treated
      as CHANUNAVAIL because the DIALSTATUS was getting incorrectly
      overwritten and call handling was aborted early.
      
      This is fixed by instead checking if any valid peers have been
      specified, as opposed to checking the list size of successful
      requests. This is because the latter could be empty but this
      does not indicate any kind of problem. This restores the
      previous working behavior.
      
      ASTERISK-29989 #close
      
      Change-Id: I4d4b209b967816b1bc791534593ababa2b99bb88
      626fefdf
    • Naveen Albert's avatar
      app_dial: Propagate outbound hook flashes. · ae8a36a7
      Naveen Albert authored
      The Dial application currently stops hook flashes
      dead in their tracks from propagating through on
      outbound calls. This fixes that so they can go
      down the wire.
      
      ASTERISK-30115 #close
      
      Change-Id: Id4e78b29a049f35c5b1e7520eaa10d0eb5b7f97c
      ae8a36a7
  12. Jun 30, 2022
    • Naveen Albert's avatar
      pbx: Add helper function to execute applications. · 4a11ae7e
      Naveen Albert authored
      Finding an application and executing it if found is
      a common task throughout Asterisk. This adds a helper
      function around pbx_exec to do this, to eliminate
      redundant code and make it easier for modules to
      substitute variables and execute applications by name.
      
      ASTERISK-30061 #close
      
      Change-Id: Ifee4d2825df7545fb515d763d393065675140c84
      4a11ae7e
  13. Jun 15, 2022
    • Naveen Albert's avatar
      app_voicemail: Add option to prevent message deletion. · cc8e098e
      Naveen Albert authored
      Adds an option to VoiceMailMain that prevents the user
      from deleting messages during that application invocation.
      This can be useful for public or shared mailboxes, where
      some users should be able to listen to messages but not
      delete them.
      
      ASTERISK-30063 #close
      
      Change-Id: Icdfb8423ae8d1fce65a056b603eb84a672e80a26
      cc8e098e
  14. Jun 09, 2022
    • Naveen Albert's avatar
      xmldocs: Improve examples. · 51d262af
      Naveen Albert authored
      Use example tags instead of regular para tags
      where possible.
      
      ASTERISK-30090
      
      Change-Id: Iada8bbfda08f30b118cedf2d040bbb21e4966ec5
      51d262af
  15. May 13, 2022
    • Naveen Albert's avatar
      app_confbridge: Add function to retrieve channels. · 432a1d2d
      Naveen Albert authored
      Adds the CONFBRIDGE_CHANNELS function which can be used
      to retrieve a comma-separated list of channels, filtered
      by a particular type of participant category. This output
      can then be used with functions like UNSHIFT, SHIFT, POP,
      etc.
      
      ASTERISK-30036 #close
      
      Change-Id: I1950aff932437476dc1abab6f47fb4ac90520b83
      432a1d2d
  16. May 09, 2022
    • George Joseph's avatar
      GCC12: Fixes for 16+ · 4aa54168
      George Joseph authored
      Most issues were in stringfields and had to do with comparing
      a pointer to an constant/interned string with NULL.  Since the
      string was a constant, a pointer to it could never be NULL so
      the comparison was always "true".  gcc now complains about that.
      
      There were also a few issues where determining if there was
      enough space for a memcpy or s(n)printf which were fixed
      by defining some of the involved variables as "volatile".
      
      There were also a few other miscellaneous fixes.
      
      ASTERISK-30044
      
      Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
      4aa54168
  17. May 02, 2022
    • Naveen Albert's avatar
      chan_dahdi: Document dial resource options. · 892c0656
      Naveen Albert authored
      Documents the Dial syntax for DAHDI, namely the channel group,
      distinctive ring, answer confirmation, and digital call options
      that are specified in the resource itself.
      
      ASTERISK-24827 #close
      
      Change-Id: Ib95e78497fb00dc5cbfde1c93a69f034bfd08c30
      892c0656
    • Michael Cargile's avatar
      apps/confbridge: Added hear_own_join_sound option to control who hears sound_join · a2679b0e
      Michael Cargile authored
      Added the hear_own_join_sound option to the confbridge user profile to
      control who hears the sound_join audio file. When set to 'yes' the user
      entering the conference and the participants already in the conference
      will hear the sound_join audio file. When set to 'no' the user entering
      the conference will not hear the sound_join audio file, but the
      participants already in the conference will hear the sound_join audio
      file.
      
      ASTERISK-29931
      Added by Michael Cargile
      
      Change-Id: I856bd66dc0dfa057323860a6418c1371d249abd2
      a2679b0e
  18. Apr 27, 2022
    • Naveen Albert's avatar
      app_meetme: Don't erroneously set global variables. · b90650d8
      Naveen Albert authored
      The admin_exec function in app_meetme is used by the SLA
      applications for internal bridging. However, in these cases,
      chan is NULL. Currently, this function will set some status
      variables that are intended for a channel, but since channel
      is NULL, this is erroneously creating meaningless global
      variables, which shouldn't be happening. This sets these
      variables only if chan is not NULL.
      
      ASTERISK-30002 #close
      
      Change-Id: I817df6c26f5bda131678e56791b0b61ba64fc6f7
      b90650d8
  19. Apr 26, 2022
    • Naveen Albert's avatar
      documentation: Adds versioning information. · 0c70d497
      Naveen Albert authored
      Adds version information for applications, functions,
      and manager events/actions.
      
      This is not completely exhaustive by any means but
      covers most new things added that have release
      versioning information in the issue tracker.
      
      ASTERISK-29940 #close
      
      Change-Id: I506401e93c799715dbbe97c0a8ba18af2bf5e131
      0c70d497
    • Maximilian Fridrich's avatar
      app_dial: Flip stream direction of outgoing channel. · 53a3af63
      Maximilian Fridrich authored
      When executing dial, the topology of the incoming channel is cloned and
      used for the outgoing channel. This creates issues when an incoming
      stream is sendonly or recvonly as the stream state of the outgoing
      channel will be the same as the stream state of the incoming channel.
      
      Now the stream state is flipped for the outgoing stream in
      dial_exec_full if the incoming stream topology is recvonly or sendonly.
      
      ASTERISK-29655
      Reported by: Michael Auracher
      
      ASTERISK-29638
      Reported by: Michael Auracher
      
      Change-Id: I294dc834ac9a5f048b101b691669959e9df630e1
      53a3af63
  20. Apr 08, 2022
    • Naveen Albert's avatar
      app_mf, app_sf: Return -1 if channel hangs up. · b87c5f51
      Naveen Albert authored
      The ReceiveMF and ReceiveSF applications currently always
      return 0, even if a channel has hung up. The call will still
      end but generally applications are expected to return -1 if
      the channel has hung up.
      
      We now return -1 if a hangup occured to bring this behavior
      in line with this norm. This has no functional impact, but
      merely increases conformity with how these modules interact
      with the PBX core.
      
      ASTERISK-29951 #close
      
      Change-Id: I234d755050ab8ed58f197c6925b968ba26b14033
      b87c5f51
    • Naveen Albert's avatar
      app_queue: Add music on hold option to Queue. · ede4e209
      Naveen Albert authored
      Adds the m option to the Queue application, which allows a
      music on hold class to be specified at runtime which will
      override the class configured in queues.conf.
      
      This option functions like the m option to Dial.
      
      ASTERISK-29876 #close
      
      Change-Id: Ie25a48569cf8755c305c9438b1ed292c3adcf8d7
      ede4e209
    • Naveen Albert's avatar
      app_meetme: Emit warning if conference not found. · da44b848
      Naveen Albert authored
      Currently, if a user tries to access a non-dynamic
      MeetMe conference and the conference is not found,
      the call simply silent hangs up. There is no indication
      to the user that anything went wrong at all.
      
      This changes the relevant debug message to a warning
      so that the user is notified of this invalidity.
      
      ASTERISK-29954 #close
      
      Change-Id: Iebcfae3755d00f2150d676ee211c57bc59530048
      da44b848
  21. Mar 23, 2022
  22. Mar 11, 2022
    • Kfir Itzhak's avatar
      app_queue: Add QueueWithdrawCaller AMI action · 2be01ba4
      Kfir Itzhak authored
      This adds a new AMI action called QueueWithdrawCaller.
      This AMI action makes it possible to withdraw a caller from a queue,
      in a safe and a generic manner.
      This can be useful for retrieving a specific call and
      dispatching it to a specific extension.
      It works by signaling the caller to exit the queue application
      whenever it can. Therefore, it is not guaranteed
      that the call will leave the queue.
      
      ASTERISK-29909 #close
      
      Change-Id: Ic15aa238e23b2884abdcaadff2fda7679e29b7ec
      2be01ba4
  23. Feb 25, 2022
    • Naveen Albert's avatar
      documentation: Add since tag to xmldocs DTD · c35e205b
      Naveen Albert authored
      Adds the since tag to the documentation DTD so
      that individual applications, functions, etc.
      can now specify when they were added to Asterisk.
      
      This tag is added at the individual application,
      function, etc. level as opposed to at the module
      level because modules can expand over time as new
      functionality is added, and granularity only
      to the module level would generally not be useful.
      
      This enables the ability to more easily determine
      when new functionality was added to Asterisk, down
      to minor version as opposed to just by major version.
      This makes it easier for users to write more portable
      dialplan if desired to not use functionality that may
      not be widely available yet.
      
      ASTERISK-29896 #close
      
      Change-Id: Ibbb35c702d8038bdc3fd0a944fbfa69384cc15d5
      c35e205b
  24. Feb 23, 2022
    • Naveen Albert's avatar
      app_voicemail: Emit warning if asking for nonexistent mailbox. · 39820e35
      Naveen Albert authored
      Currently, if VoiceMailMain is called with a mailbox, if that
      mailbox doesn't exist, then the application silently falls back
      to prompting the user for the mailbox, as if no arguments were
      provided.
      
      However, if a specific mailbox is requested and it doesn't exist,
      then no warning at all is emitted.
      
      This fixes this behavior to now warn if a specifically
      requested mailbox could not be accessed, before falling back to
      prompting the user for the correct mailbox.
      
      ASTERISK-29920 #close
      
      Change-Id: Ib4093b88cd661a2cabc5d685777d4e2f0ebd20a4
      39820e35
    • Naveen Albert's avatar
      app_mp3: Document and warn about HTTPS incompatibility. · c9ef2b3b
      Naveen Albert authored
      mpg123 doesn't support HTTPS, but the MP3Player application
      doesn't document this or warn the user about this. HTTPS
      streams have become more common nowadays and users could
      reasonably try to play them without being aware they should
      use the HTTP stream instead.
      
      This adds documentation to note this limitation. It also
      throws a warning if users try to use the HTTPS stream to
      tell them to use the HTTP stream instead.
      
      ASTERISK-29900 #close
      
      Change-Id: Ie3b029be5258c5a701f71ed3b1a7a80d1e03b827
      c9ef2b3b
    • Naveen Albert's avatar
      app_mf: Add max digits option to ReceiveMF. · 0da71316
      Naveen Albert authored
      Adds an option to the ReceiveMF application to allow specifying a
      maximum number of digits.
      
      Originally, this capability was not added to ReceiveMF as it was
      with ReceiveSF because typically a ST digit is used to denote that
      sending of digits is complete. However, there are certain signaling
      protocols which simply transmit a digit (such as Expanded In-Band
      Signaling) and for these, it's necessary to be able to read a
      certain number of digits, as opposed to until receiving a ST digit.
      
      This capability is added as an option, as opposed to as a parameter,
      to remain compatible with existing usage (and not shift the
      parameters).
      
      ASTERISK-29877 #close
      
      Change-Id: I4229167c9aa69b87402c3c2a9065bd8dfa973a0b
      0da71316
  25. Feb 11, 2022
    • Alexei Gradinari's avatar
      app_queue: load queues and members from Realtime when needed · b41440a1
      Alexei Gradinari authored
      There are a lot of Queue AMI actions and Queue applications
      which do not load queue and queue members from Realtime.
      
      AMI actions
      QueuePause - if queue not in memory - response "Interface not found".
      QueueStatus/QueueSummary - if queue not in memory - empty response.
      
      Applications:
      PauseQueueMember - if queue not in memory
      	Attempt to pause interface %s, not found
      UnpauseQueueMember - if queue not in memory
      	Attempt to unpause interface xxxxx, not found
      
      This patch adds a new function load_realtime_queues
      which loads queue and queue members for desired queue
      or all queues and all members if param 'queuename' is NULL or empty.
      Calls the function load_realtime_queues when needed.
      
      Also this patch fixes leak of ast_config in function set_member_value.
      
      Also this patch fixes incorrect LOG_WARNING when pausing/unpausing
      already paused/unpaused member.
      The function ast_update_realtime returns 0 when no record modified.
      So 0 is not an error to warn about.
      
      ASTERISK-29873 #close
      ASTERISK-18416 #close
      ASTERISK-27597 #close
      
      Change-Id: I554ee0eebde93bd8f49df7f84b74acb21edcb99c
      b41440a1
  26. Jan 20, 2022
  27. Jan 06, 2022
    • Sean Bright's avatar
      utils.c: Remove all usages of ast_gethostbyname() · 0d62735f
      Sean Bright authored
      gethostbyname() and gethostbyname_r() are deprecated in favor of
      getaddrinfo() which we use in the ast_sockaddr family of functions.
      
      ASTERISK-29819 #close
      
      Change-Id: Ie277c0ef768d753b169c121ef570a71665692ab7
      0d62735f
  28. Jan 05, 2022
    • Mark Petersen's avatar
      app_queue.c: Support for Nordic syntax in announcements · dc7bcd68
      Mark Petersen authored
      adding support for playing the correct en/et for nordic languages
      by adding 'n' for neuter gender in the relevant ast_say_number
      
      ASTERISK-29827
      
      Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
      dc7bcd68
    • Naveen Albert's avatar
      app_mp3: Throw warning on nonexistent stream · 80766059
      Naveen Albert authored
      Currently, the MP3Player application doesn't
      emit a warning if attempting to play a stream
      which no longer exists. This can be a common
      scenario as many mp3 streams are valid at some
      point but can disappear at any time.
      
      Now a warning is thrown if attempting to play
      a nonexistent MP3 stream, instead of silently
      exiting.
      
      ASTERISK-29829 #close
      
      Change-Id: I53a0bf1ed1740166655eb66fe7675f6f808bf535
      80766059
Loading