Asterisk
  1. Asterisk
  2. ASTERISK-762

[patch] The "SystemCID" app -- submitting for Announcements and other uses.

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Core/General
    • Labels:
      None
    • Mantis ID:
      768
    • Regression:
      No

      Description

      This app basically runs the command thru an sprintf, with
      the arg of the channel->callerid:

      sprintf( commandbuf, command, channel->callerid).

      Then it pretty much does as system did, except it always returns 0, because in this case, I'm not interested in
      the result code.

      I use it in my dialplan so:

      exten => 1,1,SystemCID(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/%s.gsm&)

      If the announcement file exists, it gets played. If it doesn't, it doesn't get played. Such is life. I'm using
      it for announcements of the caller and the called person. Around here, this makes life very nice. I hope to able
      to send these announcements over the network to other
      systems, to use their speakers for the PA system.
      Hope it's useful enough to include in the Asterisk release.

        Activity

        Hide
        mlh added a comment -

        Resolved...no comments

        Show
        mlh added a comment - Resolved...no comments
        Hide
        Steve Murphy added a comment -

        Uh, I guess I could interpret the closing of this bug as a
        rejection; but because it was closed without comment, I am "appealing" the closure, and ask for a moment of reconsideration. If you run a system program, and it returns a non-zero result code, it aborts your context when system returns -1.

        Rather than write a wrapper (which in some cases doesn't seem to help),
        this tweak is backwards compatible, works the same as usual if no action is taken by existing users.

        Anyone else out there who might think this a desirable option?

        Show
        Steve Murphy added a comment - Uh, I guess I could interpret the closing of this bug as a rejection; but because it was closed without comment, I am "appealing" the closure, and ask for a moment of reconsideration. If you run a system program, and it returns a non-zero result code, it aborts your context when system returns -1. Rather than write a wrapper (which in some cases doesn't seem to help), this tweak is backwards compatible, works the same as usual if no action is taken by existing users. Anyone else out there who might think this a desirable option?
        Hide
        Steve Murphy added a comment -

        Just added a new version to track a change made a while back to
        app_system.c.

        Show
        Steve Murphy added a comment - Just added a new version to track a change made a while back to app_system.c.
        Hide
        Mark Spencer added a comment -

        See newly added "TrySystem", that, in combination with variable $

        {CALLERIDNUM}

        should handle your example. I decided not to make it a new wrapper and not an option to the existing System app because | is often used in a system string.

        Show
        Mark Spencer added a comment - See newly added "TrySystem", that, in combination with variable $ {CALLERIDNUM} should handle your example. I decided not to make it a new wrapper and not an option to the existing System app because | is often used in a system string.
        Hide
        Digium Subversion added a comment -

        Repository: asterisk
        Revision: 3806

        U trunk/apps/app_system.c

        ------------------------------------------------------------------------
        r3806 | markster | 2008-01-15 15:07:48 -0600 (Tue, 15 Jan 2008) | 2 lines

        Add "TrySystem" variation to System (bug ASTERISK-762)

        ------------------------------------------------------------------------

        http://svn.digium.com/view/asterisk?view=rev&revision=3806

        Show
        Digium Subversion added a comment - Repository: asterisk Revision: 3806 U trunk/apps/app_system.c ------------------------------------------------------------------------ r3806 | markster | 2008-01-15 15:07:48 -0600 (Tue, 15 Jan 2008) | 2 lines Add "TrySystem" variation to System (bug ASTERISK-762 ) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=3806

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development