Menu

Intercom, Paging, & Call Waiting Solved...

Help
2005-12-04
2013-06-18
1 2 > >> (Page 1 of 2)
  • Tracy Carlton

    Tracy Carlton - 2005-12-04

    Greetings All,

    Thought I'd post these under one thread for ease of posting and use.

    First, Intercomming....
    There are a couple of approaches to this and I've used both.
    1.  Create a second seperate ext for the "intercom", for example: ext 200 Tracy, ext 2200 Tracy Intercom, or ext 300 Tracy Intercom, etc, etc.  Then add the second ext to each phone and set it to auto-answer.  Works great on Snoms and GXP-2000s BUT has some down sides.
    First, double the exts to manage.
    Second, if you're monitoring other exts via Hints you'll have to have 2 "hint" buttons one for the "Real" ext and one for the "Intercom" ext.
    Also there was a serious bug in the way that Asterisk pre 1.2 processed hints and registrations resulting in hints not working on phones with more than one ext on them.  I figured out a workaround for Snoms but that has been rendered superfluous now with Asterisk 1.2 for two reasons: 1. Hints are processed differently solving that problem and 2. There's a better way to do intercomming than with 2 exts per phone.

    2.  With the release of Asterisk 1.2 it's now possible to "inform" via a SIP message Snoms and GXPs that they should answer the call after x (usually 0) number of rings.  No need for 2 exts per phone and one "hint" will work for both regular and intercom calls.  How do you do it you ask?

    Step 1: Add the following to extensions_custom.conf:

    ; The context 'from-internal-custom' is included in 'from-internal' by default

    #include extensions_custom_special.conf

    [from-internal-custom]   
    include => from-internal-custom-special   
                   
    exten => Unknown,1,VoiceMailMain(${CALLERIDNUM})        ; Enable SNOM VM button to function correctly when flashing
    exten => asterisk,1,VoiceMailMain(${CALLERIDNUM})
    exten => default,1,VoiceMailMain(${CALLERIDNUM})

    Step 2: Create a exentsions_custom_special.conf containing the following:

    ; This file contains example extensions_custom_special.conf entries.
    ; extensions_custom_special.conf should be used to include customizations
    ; to AMP's Asterisk dialplan that the web based "Config Edit" would break do to "backslash striping".

    [from-internal-custom-special]   

    ;exten => _#XXXX,1,SIPAddHeader("Call-Info: sip:xxx.xxx.xxx.xxx{backslash}; answer-after=0") ; Snoms and GXP-200s
    ;exten => _#XXXX,2,SetVar(ALERT_INFO=Ring Answer) ; Polycoms using the Ring Answer config from voip-info.org
    ;exten => _#XXXX,3,Dial(SIP/${EXTEN:1},,v)
    ;exten => _#XXXX,4,Hangup

    exten => _**XXXX,1,SIPAddHeader("Call-Info: sip:xxx.xxx.xxx.xxx{backslash}; answer-after=0") ; Snoms and GXP-200s
    exten => _**XXXX,2,SetVar(ALERT_INFO=Ring Answer) ; Polycoms using the Ring Answer config from voip-info.org
    exten => _**XXXX,3,Dial(SIP/${EXTEN:2},,v)
    exten => _**XXXX,4,Hangup

    ;For extensions starting with a 2
    ;exten => _3XXX,1,SIPAddHeader("Call-Info: sip:xxx.xxx.xxx.xxx{backslash}; answer-after=0") ; Snoms and GXP-200s
    ;exten => _3XXX,2,SetVar(ALERT_INFO=Ring Answer) ; Polycoms using the Ring Answer config from voip-info.org
    ;exten => _3XXX,3,Dial(SIP/2${EXTEN:1},,v)
    ;exten => _3XXX,4,Hangup

    The reason for a seperate file is that the SipAddHeader line contains a backslash which the web based config editor we all use strips it and without it this it no workee.
    Substitute your AAH server's IP address for the sip:xxx.xxx.xxx.xxx "sip:10.20.30.224" and add the backslash after - with no space.
    I use the **ext number for my intercomming - 2000 Tracy - **2000 to intercom Tracy.
    I don't have any Polycoms but using the "Ring Answer" configuration from the www.voip-info.org wiki should work as well.  Also I believe that Sayson and some others can use the ALERT_INFO variable to do auto-answer as well. I leave that as an exercise to the reader.

    Step 3.  On Snom phone make sure that you have 'enable intercom' on and 'filter packets from registrar' off. GXP-2000s need firmware 1.0.12 (beta) or newer.

    Hope this helps, I'll continue in following posts,
    Tracy

     
    • Tracy Carlton

      Tracy Carlton - 2005-12-04

      Also on Intercomming,  If you want your Snom buttons to be intercoms not normal dials you would set them as Destination with **ext number: destination **2000 but you'll have no status lights because the default hint is created for 2000 NOT **2000 so to fix that add the followingto exentsions_custom.conf:

      [from-internal-custom]   
      include => from-internal-custom-special   
                     
      exten => Unknown,1,VoiceMailMain(${CALLERIDNUM})        ; Enable SNOM VM button to function correctly when flashing
      exten => asterisk,1,VoiceMailMain(${CALLERIDNUM})
      exten => default,1,VoiceMailMain(${CALLERIDNUM})

      exten => **2000,hint,SIP/2000    ;Intercom Tracy
      exten => **2001,hint,SIP/2001    ;Intercom Alice
      exten => **2002,hint,SIP/2002    ;Intercom Kimberly
      exten => **2003,hint,SIP/2003    ;Intercom Samantha

      Etc,etc....
      Now you can have lights either way you program your buttons.

      Tracy

       
    • p2pvoice

      p2pvoice - 2005-12-04

      Tracy:

      Excuse me for this question - What is "hint" command.

      I saw this first time in AAH2.1 in [ext-local] in extensions-additional.conf. This used to have 2 lines per extension (in AAH.15) and now it has three - the third one being the "hint" line.

      Thanks.

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-04

      Now on to Paging:

      There are two types of paging: Overhead and Phoneset. 

      For Overhead paging there are basically 3 ways to go about this:
      1. Use a soundcard in the AAH server and setup the console/dsp port and hook it up to the paging amplifier's input. This should be the cheapest way to interface to an exisiting paging system. - I've covered that before but I'll repost with all the new info I have gathered soon.

      2.a. Use a spare FXS or FXO port on your AAH server and a standard "Paging Adapter" designed for this purpose.  Paging adapters come in various makes and models and provide any number of features including multiple independently accessable paging zones, allcall, backgound music injection, etc, etc. - If you need more than one big paging zone solution this is the route to go. 

      2.b. Do the same as above but use an IAXy or almost any SIP ATA instead.  - Should be about the same cost.

      3.a. Use some type of phone (analog or SIP) that can be set to auto-answer and wire the speaker leads to the paging amplifier. - Crude but effective.  Using the console port will be cheaper (using a TDM400 port and an analog phone or a cheap SIP phone costs more that a SoundBlaster Live 24 card ($29.63 at WallyWorld) does.

      3.b. Same as above using an IAXy and/or SIP ATA. Again about the same cost as above.

      NOTE: 3.a. or 3.b. is quite useful for paging in buildings with nothing but data links between them (Page in the Dallas Plant from the Chicago office's PBX).

      Overhead Paging is pretty straightforward however you go about it.  Phoneset paging with SIP phones was a near impossiblity as recently as a few months ago, but have no fear! Underdog is Here!! Ohh sorry, channeling the wrong thing there.... :().

      On my first commercial deployment of Asterisk my customer hits me, for the first time, with (3/4s of the way through the install mind you) "How do we page through the phones?" Excuse me...WHAT?!?!?
      It took the better part of a month to come up with something. It was ugly, kludgy, and dirty but it worked.  It's now MUCH, MUCH cleaner and better and here's how it works.

      I have a perl agi script that does the work and some additions to extensions_custom.conf to git'r done.  I can't claim original credit for it, but, I have made several enhancements for better call control and console/dsp paging support.
      It works like this:  You dial the paging code from an extension (the originating extension does not have to be SIP phone BTW) and
      Step 1: Execute the the AGI. The AGI dynamically builds a list of registered extensions and also a list of those extensions that are active (on a call).  It then removes from it's list all the extensions on both lists. This leaves us with a list of functional extensions that are idle.  Now using the Asterisk Manager interface the script originates calls to all of the phones on the list.
      NOTE: This is a sequential process so doing this with a LARGE number of phones could introduce some delay.  That being said I've got 2 dozen phone systems using it with no noticeable lag between the first and last phone called. As soon as they answer (The agi script provides for activating auto-answer on Snoms, GXP-2000s and Polycoms. Other types of phones are possible.)
      Step 2: A sound file is played to each extension (as an alert/warning tone).
      Step 3: Each extension is then dumped into a common, dynamically created Meet-Me conference as a listen only (muted) member. The originating caller also hears the sound file played back to him as well. This serves two purposes. One to introduce a slight delay to allow time for the Meet-Me conference to complete it's setup and establish all the speech paths (which does take up to a second) and second to let the paging party know when he can begin speaking.  The original script used an absolute timeout - You can talk for 10 - 15 - 30 - whatever seconds then then you're done.  The problem with that is a 15 second timeout and a 22 second message or worse a 10 second message and 1 minute timeout since all the phones will NOT hangup until that timeout is reached. The revised script uses a relatively new (pre 1.2 but post 1.0) feature of Meet-Me called the 'Marked User'. Using the 'Marked User' mode allows us to have no time limit, when the 'Marked User' (the person paging) hangs up all the other confrencees are immediately and auomatically disconnected. So each page lasts exactly as long as it needs to.
      Step 4: We hangup on the caller.

      That's the logic here is the AGI script.  It needs to go in /var/lib/asterisk/agi-bin and it needs to be owned by asterisk and executable.
      chmod 755 allpage.agi
      chown asterisk:asterisk allpage.agi

      #!/usr/bin/perl -w
      #
      # allpage.agi - Copyright Rob Thomas (xrobau@gmail.com) 2005.
      # Revision 1.1 - 14th October 2005 - Added Polycom Support
      #
      # allpage.agi Mark II - Copyright Tracy Carlton (tracy@ycic.net) 2005.
      # allpage.agi Mark II Version 2 - Copyright Tracy Carlton (tracy@ycic.net) 12/01/2005.

      #
      # This program is free software; you can redistribute it and/or
      # modify it under the terms of Version 2 of the GNU General
      # Public License as published by the Free Software Foundation
      #
      # This program is distributed in the hope that it will be useful,
      # but WITHOUT ANY WARRANTY; without even the implied warranty of
      # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      # GNU General Public License for more details.
      #
      # Simple AGI to page all SIP extensions (no IAX device, because at the time
      # of writing this, no device supported IAX_ANSWER_IMMED) that aren't on
      # the phone. Tested with Asterisk 1.2. Should work out-of-the-box with
      # Grandstream GXP phones with firmware greater than 1.0.12, and Snoms with
      # 'enable intercom' on and 'filter packets from registrar' off.
      #
      # All idle SIP phones that support one of the auto-answer methodologies used
      # and optionally the console port (used for overhead paging) will be called and
      # upon answering be added as listen only members of a Meet-Me conference. 
      # The originating extension is added as the 'Marked User' and all conference members
      # are kicked (disconnected) automatically when the 'Marked User' hangs up. A user
      # selectable audio file such as a beep or whisle sound is played to all parties.
      # This serves as a alert/warning tone and allows time for the conference to complete
      # it's setup. After the tone completes playing the paging party is free to make their announcement.
      #
      #
      # Documentation:
      # Your dialplan consists of two things. Firstly, in the context that your
      # normal phones are in, you need to have something like this: (add to extensions_custom.conf under [from-internal-custom])
      # exten => *51,1,AGI,allpage.agi
      # exten => *51,2,Playback(custom/bosun)
      # exten => *51,3,MeetMe(999,dtqpA)
      # exten => *51,4,Hangup
      #
      # The paged phones then jump to this context: (add to the bottom of extensions_custom.conf)
      # [all-page]
      # exten => s,1,Playback(custom/bosun)
      # exten => s,2,MeetMe(999,dmqpwx)
      # exten => s,3,Hangup
      # exten => t,1,Hangup
      # exten => T,1,Hangup
      #
      # Any questions? Join #openpbx on irc.freenode.net
      # --Rob Thomas 28th Sep, 2005.
      # --Tracy Carlton 1st Dec, 2005.

      if (eval "require Net::Telnet;") {
          use Net::Telnet;
      } else {
          print "VERBOSE \"Net::Telnet NOT INSTALLED - this is required\" 0\n";
          exit 0;
      }

      # You need to configure this: Your manager API username and password. This
      # is the information from /etc/asterisk/manager.conf. You need something like
      # this in it:
      # [admin]
      # secret = amp111
      # deny=0.0.0.0/0.0.0.0
      # permit=127.0.0.0/255.0.0.0
      # read = system,call,log,verbose,command,agent,user
      # write = system,call,log,verbose,command,agent,user
      # IF that's what you have in your conf file, this is what you should have here:

      my $mgruser = "admin";
      my $mgrpass = "amp111";
      my $mgrport = 5038;

      # If you're using a SNOM they need a 'sip:ip.add.re.ss' added to the Call-Info field,
      # with the IP address of the registrar.  Most other phones will silently ignore this,
      # but if you have trouble, you may need to fiddle with this line. Change the IP Address
      # to be that of your Asterisk Server.
      my $callinfo = 'Call-Info: sip:xxx.xxx.xxx.xxx{backslash}; answer-after=0';
      #
      # This is for Polycom phones - see
      # http://www.voip-info.org/tiki-index.php?page=Polycom+auto-answer+config
      my $alertinfo = 'Ring Answer';

      # That's it.  Nothing else should need to be changed

      # Some variables we use later...
      my @tocall;
      my %useref;

      # Get all SIP channels:
      my @allsip = `asterisk -rx "sip show peers"`;

      # Get all that are in use:
      my @inuse = `asterisk -rx "sip show channels"`;

      # Strip off carrige returns and take off the top line
      chomp @allsip;
      chomp @inuse;
      shift @allsip;
      shift @inuse;

      # First, we want to get the phones that are in use. We need the second field
      # of every line.
      while (my $line = shift @inuse) {
        my @tmparr = split(/\s+/,$line);
        # The second last, or possibly last, line says 'n active SIP channel(s)'
        goto endinuse if ($tmparr[1] eq "active");
        print "VERBOSE \"Found extension $tmparr[1] in use.\" 1\n";
        $useref{$tmparr[1]} = "In Use";
      }
      endinuse:
       
      # We only want the first column, and, we only want the first part before the
      # slash
      while (my $line = shift @allsip) {
        # This may break if there's more than one / in a line. There shouldn't.
        $line =~ /(.+)\/.+/;
        # Sanity check. This may be a peer for outgoing calls, rather than an
        # extension. Basically, if it's 5 numbers or less, it's an extension.
        my $result = $1;
        # If your dialplan is different, sucks to be you. Change this regexp to
        # match your dialplans and EXCLUDE your SIP trunks.
        if ($result =~ /^\d{1,5}$/) {
          if (defined $useref{$result}) {
              print "VERBOSE \"NOT Adding extension $result to call list\" 2\n";
          } else {
              print "VERBOSE \"Adding extension $result to call list\" 1\n";
              push @tocall, $result;
          }
        }
      }

      # If you don't want any intelligence, you can just delete all the logic above
      # here, and specify the SIP extensions to call here. Also useful for debugging.
      #@tocall = (303, 301);

      # If you want to include the Console Port for use with an overhead paging system
      # uncomment out the following lines between "Console Paging Begins" and "Console Paging Ends".
      # Console Paging Begins
      #  my $tn = new Net::Telnet ( Port => $mgrport, 
      #            Prompt => '/.*[\$%#>] $/',
      #            Output_record_separator => '',
      #            Input_Log=> "/tmp/input.log",
      #            Output_Log=> "/tmp/output.log",
      #            Errmode    => 'return', );
      #
      #  $tn->open("127.0.0.1");
      #  $tn->waitfor('/0\n$/');
      #  $tn->print("Action: Login\n");
      #  $tn->print("Username: $mgruser\n");
      #  $tn->print("Secret: $mgrpass\n");
      #  $tn->print("Events: off\n\n");
      #  my ($pm, $m) = $tn->waitfor('/Authentication (.+)\n\n/');
      #  if ($m =~ /Authentication failed/) {
      #    print "VERBOSE \"Incorrect MGRUSER or MGRPASS - unable to connect to manager interface\" 0\n";
      #    exit;
      #  }
      #  $tn->print("Action: Originate\nChannel: console/dsp\nContext: all-page\nPriority: 1\n");
      #  $tn->print("Extension: s\nCallerID: System Page\n\n");
      #  $tn->print("Action: Logoff\n\n");
      #  $tn->close;
      # Console Paging Ends
       
      # Now, we have an array (@tocall) with all valid SIP extensions.
      while (my $sipxtn = shift @tocall) {
        print "VERBOSE \"Doing $sipxtn\" 0\n";
      # Open connection to AGI
        my $tn = new Net::Telnet ( Port => $mgrport, 
                  Prompt => '/.*[\$%#>] $/',
                  Output_record_separator => '',
                  Input_Log=> "/tmp/input.log",
                  Output_Log=> "/tmp/output.log",
                  Errmode    => 'return', );

        $tn->open("127.0.0.1");
        $tn->waitfor('/0\n$/');
        $tn->print("Action: Login\n");
        $tn->print("Username: $mgruser\n");
        $tn->print("Secret: $mgrpass\n");
        $tn->print("Events: off\n\n");
        my ($pm, $m) = $tn->waitfor('/Authentication (.+)\n\n/');
        if ($m =~ /Authentication failed/) {
          print "VERBOSE \"Incorrect MGRUSER or MGRPASS - unable to connect to manager interface\" 0\n";
          exit;
        }
        $tn->print("Action: Originate\nChannel: SIP/$sipxtn\nContext: all-page\nPriority: 1\n");
        $tn->print("Variable: SIPADDHEADER=\"$callinfo\"\n");
        $tn->print("Variable: ALERT_INFO=\"$alertinfo\"\n");
        $tn->print("Extension: s\nCallerID: System Page\n\n");
        $tn->print("Action: Logoff\n\n");
        $tn->close;
      }

      NOTE THIS LINE (Near the top):
      my $callinfo = 'Call-Info: sip:xxx.xxx.xxx.xxx{backslash}; answer-after=0';

      Substitute your AAH server's IP address for the sip:xxx.xxx.xxx.xxx "sip:10.20.30.224" and add the backslash after - with no space.  This shoudl seem REALLY familiar if you have read my earlier post on intercomming.  Both use the same mechanism for setting auto-answer on Snom and GXP-2000s. 

      Also note that in the script the required additions to extensions_custom.conf are listed.  Unless *51 conflicts with something in your config you can paste those blocks in verbatim. The first under [from-internal-custom] the other at the bottom of extensions_custom.conf - DO NOT forget to include the [all-page] as this is a new context marker and is required.
      The Playback(custom/bosun)lines play the Bosun's Whistle sound from Classic Star Trek - {Bosun's Whisle} Bridge to Captain Kirk....  I LIKE IT!!! You can substitute this:
      Playback(beep)
      for a standard Beep.
      Uncomment the section Console Paging if you want simultaneous Phone Set paging combined with consle/dsp based Overhead Paging.

      Here is an excerpt from my actual extensions_custom.conf:

      ; This file contains example extensions_custom.conf entries.
      ; extensions_custom.conf should be used to include customizations
      ; to AMP's Asterisk dialplan.

      ; All custom context should contain the string 'custom' in it's name

      ; Extensions in AMP have access to the 'from-internal' context.
      ; The context 'from-internal-custom' is included in 'from-internal' by default

      #include extensions_custom_special.conf

      [from-internal-custom]   
      include => from-internal-custom-special   
                     
      exten => Unknown,1,VoiceMailMain(${CALLERIDNUM})        ; Enable SNOM VM button to function correctly when flashing
      exten => asterisk,1,VoiceMailMain(${CALLERIDNUM})
      exten => default,1,VoiceMailMain(${CALLERIDNUM})

      ;1234,1,Playback(demo-congrats)        ; extensions can dial 1234
      ;1234,2,Hangup()
      ;h,1,Hangup()
      ;include => custom-recordme            ; extensions can also dial 5678

      exten => *51,1,AGI,allpage.agi
      exten => *51,2,Playback(custom/bosun)
      exten => *51,3,MeetMe(999,dtqpA)
      exten => *51,4,Hangup

      exten => *52,1,Dial(console/dsp)
      exten => *52,2,Playback(custom/bosun)
      exten => *52,3,Hangup
      .
      .
      .
      .
      ; custom-recordme,5678,1 can be used as a custom target for
      ; a Digital Receptionist menu or a Call Group
      ;[custom-recordme]
      ;exten => 5678,1,Wait(2)
      ;exten => 5678,2,Record(/tmp/asterisk-recording:gsm)
      ;exten => 5678,3,Wait(2)
      ;exten => 5678,4,Playback(/tmp/asterisk-recording)
      ;exten => 5678,5,Wait(2)
      ;exten => 5678,6,Hangup

      [all-page]
      exten => s,1,Playback(custom/bosun)
      exten => s,2,MeetMe(999,dmqpwx)
      exten => s,3,Hangup
      exten => t,1,Hangup
      exten => T,1,Hangup

      Well it is very late and it seems like I've been typing for about a week now. If I stopped making sense let know and I'll try again.

      Tracy

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-04

      P2PVoice,

      Hints are a feature of Asterisk that allows a SIP phone such as a Snom 320 or Grandstream GXP-2000 (with new enough firmware) to monitor another extension's state - On hook (idle), Off hook (on a call), or Ringing. 
      I program a button on my Snom as a "Destination" key with a value equal to you extension number. ie. 2010 This turns that programmable button into a one touch speed dial.  If there is a "hint" built for you extension: exten => 2010,hin,SIP/2010 then my phone will "subscribe" to you phone's status (which you can see in the log files BTW) so that the LED next to "your" button will be off, on, or blinking to indicate that you are not on the phone, on the phone, or that your phone is ringing.
      There is even a patch now available that will allow me to call pickup your phone if it is ringing by simply pressing "your" button on my phone while it is blinking (ringing).  I'll be talking about that later as well.

      Very, very late...must go to bed.... Snore... :)

      Hope this helps,
      Tracy

       
      • Kerry Garrison

        Kerry Garrison - 2005-12-04

        What firmware version on the GXP-2000's is a minimum?

         
    • p2pvoice

      p2pvoice - 2005-12-04

      Tracy:
      Thanks.
      It's 4:00 am here as well.
      -p2pvoice

       
    • AlexanderBell

      AlexanderBell - 2005-12-04

      Incredible stuff. I'll have new columns to write for weeks. As usual: thanks, Tracy.

       
    • Dewey Straughn

      Dewey Straughn - 2005-12-04

      Wow... The paging script is terrific!!! I'll be implementing it soon. Thank you!

       
    • danyboy00

      danyboy00 - 2005-12-04

      Out of curiosity, has anyone tried using the new Page feature in asterisk 1.2?  More info available here: http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+page

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-04

      I've started to but have not had time to evaluate it yet.  Also SineApps recently posted a script to do all phonesets paging but I haven't had a change to play with it either.  From what I've been able to gather the Page feature works remarkably like the AGI script.

      More Later,
      Tracy

       
    • Kerry Garrison

      Kerry Garrison - 2005-12-04

      missed it, needs to be 1.0.12. Updating phones now.

       
    • KSDevGuy

      KSDevGuy - 2005-12-04

      Anyone tried implementing Cisco 7960G's with this yet?

       
      • Kerry Garrison

        Kerry Garrison - 2005-12-04

        No, but I can tell you it worked fine with a Linksys SPA-941.

         
    • Kerry Garrison

      Kerry Garrison - 2005-12-05

      Strange behavoir....

      2 GXP-2000's, 1 SPA-941

      One of the GCP-2000's does not pick up, it just keeps ringing line 1. The other GXP works fine as does the SPA-941.

       
    • agabr

      agabr - 2005-12-05

      I've been trying to make the overhead paging to work for almost a week and i'm not going anywhere with it. i followed the instructions posted by Tracy Carlton but i'm still stuck with it.I got only oneway sound from (Mic)to phones but not the other way. I tried it also with alsa but it gave me lots of erroe messages when recompile. I used 3 different kinds of sound blaster SB0060, CT4780 AND CT4870. I already checked these 2 pages http://sourceforge.net/forum/forum.php?thread_id=1370691&forum_id=420324 and http://sourceforge.net/forum/message.php?msg_id=3446074 

      Tracy please help.

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-05

      agabr,

      Yes I know. I saw your other post.  It's not just you.  I've go a bug report open through Digium about this and this weekend another report to the bug tracker at Digium was linked to my as being the same problem.  You are not alone.  I spent several hours last night in the wee early morning testing. 

      Here's what I know:

      1. AAH 2.1, AAH 2.0 - one way speach path (the wrong way) no matter which chan_oss you compile.
      2. AAH 2.0 Beta 6 - same as above.
      3. AAH 2.0 Beta 4 (because I kept a copy of the ISO) - wrong one way speach path with the default chan_oss - WORKING with the chan_oss_old version.
      4. Copying the chan_oss_old.c to AAH 2.1 and renaming and recompiling DOES NOT fix it.
      5. I MAY have had a flash of insight today and need to test it this evening to see it if works.

      So for now "It's worse than that, he's dead Jim!"

      I hope to post a positive result tonight but we'll have to see.  If what I am going to try doesn't solve the problem. We're going to have to look at it as being NOT a chan_oss problem per se but a chan_oss interaction with something else problem.

      Here's Hoping,
      Tracy

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-06

      Greetings All!!!!

      Well after nearly seven, yes I said SEVEN straight hours....

      I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!! I FOUND IT!!!!!!!!

      I'm very excited! Can you tell?!?!?  I've figured out why the console/dsp port doesn't work in 2.0!!!!!  Once again it turns out to be a insignificant but critical piece...

      Ummm here's the gist.... The output volume of the sound card is being set to zero (0) and muted as well.... DUUUHHHHH!!!!

      The howto fix it CORRECTLY I'm still working on.  I had to install alsa and jack with several things but that's probably way more complex and painful than it needs to be.  I'm going to try some other things now that I know who, what, when and where to look for them....

      More soon (very, very soon I hope),
      Tracy

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-06

      Ok All,

      Here we go.... First Draft:

      THE DEFINITIVE GUIDE TO SOUNDCARD INSTALLATION, CONFIGURATION, & USAGE WITH ASTERISK AT HOME  2.X.

      Step 1:  Edit the channels makefile to allow the compiling of chan_oss.so
      Open/Edit  /usr/src/asterisk/channels/makefile
      On or about line 16 find:
      CHANNEL_LIBS=chan_sip.so chan_agent.so chan_mgcp.so chan_iax2.so chan_local.so chan_skinny.so chan_features.so
      Following chan_features.so add {space} chan_oss.so
      Save and exit the file.

      Step 2: Recompile Asterisk to build chan_oss.so
      From the linux command line (via Putty or direct) change to the Asterisk source code directory: cd /usr/src/asterisk
      Execute the rebuild by typing the following:
      make clean {enter}
      make {enter}
      make install {ener}

      Step 3: After the recompile completes verify that a chan_oss.so file exists in the correct directory: /usr/lib/asterisk/modules

      Step 4: Edit the Asterisk/AMP startup script to allow Asterisk access to the soundcard device.
      Open/Edit /usr/sbin/amportal
      On or about line 34 find:
      chown -R asterisk:asterisk /dev/zap
      chown asterisk /dev/tty9   
      Insert the following line between these two lines:
      chown -R asterisk:asterisk /dev/dsp
      After which the lines should exactly match this:
      chown -R asterisk:asterisk /dev/zap
      chown -R asterisk:asterisk /dev/dsp
      chown asterisk /dev/tty9
      Save and exit the file.

      Step 5: Create the Asterisk configuration file for chan_oss.so: oss.conf
      Copy and paste exactly the text below:
      ;
      ; Open Sound System Console Driver Configuration File
      ;
      [general]
      ;
      ; Automatically answer incoming calls on the console?  Choose yes if
      ; for example you want to use this as an intercom.
      ;
      autoanswer=yes
      ;
      ; Default context (is overridden with @context syntax)
      ;
      context=from-internal
      ;
      ; Set overridecontext to yes if you want the context specified above
      ; to override what someone places on the command line.
      ;
      overridecontext=yes
      ;
      ; Default extension to call
      ;
      extension=s
      ;
      ; Default language
      ;
      language=en
      ;
      ; Silence supression can be enabled when sound is over a certain threshold.
      ; The value for the threshold should probably be between 500 and 2000 or so,
      ; but your mileage may vary.  Use the echo test to evaluate the best setting.
      ;silencesuppression = yes
      ;silencethreshold = 1000
      ;
      ; On half-duplex cards, the driver attempts to switch back and forth between
      ; read and write modes.  Unfortunately, this fails sometimes on older hardware.
      ; To prevent the driver from switching (ie. only play files on your speakers),
      ; then set the playbackonly option to yes.  Default is no.  Note this option has
      ; no effect on full-duplex cards.
      playbackonly=yes
      ;
      Save this file to the Asterisk configuration directory via WinSCP or a Samba file share as: oss.conf in /etc/asterisk
      After saving the file change its permissions to allow Asterisk to access it. From the linux command line (via Putty or direct) type the following:
      cd /etc/asterisk {enter}
      chmod 0777 oss.conf  {enter}
      chown asterisk:asterisk oss.conf {enter}

      Step 6:Enable Asterisk to automatically load chan_oss.so upon startup.
      From a web browser enter the following URL to directly access the “Config Edit” web editing utility:
      http://xxx.xxx.xxx.xxx/maint/phpconfig/phpconfig.php
      Substituting your Asterisk server’s IP Address for xxx.xxx.xxx.xxx. 
      Login as maint as you would normally.
      Find the file modules.conf and click to open it.
      On or about line 30 find:
      ; Load either OSS or ALSA, not both
      ; By default, load OSS only (automatically) and do not load ALSA
      ;
      noload => chan_alsa.so
      noload => chan_oss.so
      ;
      Change the line containing the reference to chan_oss.so from noload to load.
      load => chan_oss.so
      Verifiy that the line containing the reference to chan_alsa.so is set to noload as shown below:
      ; Load either OSS or ALSA, not both
      ; By default, load OSS only (automatically) and do not load ALSA
      ;
      noload => chan_alsa.so
      load => chan_oss.so
      ;
      Click the “Update” button but DO NOT click on the “Re-Read Configs” link yet.

      Step 7: Add a custom dial plan script to access the soundcard as a paging port .
      While still in the “Config Edit” web interface find and click to open: extensions_custom.conf
      On or about line 16 find:
      exten => *60,1,Answer
      exten => *60,2,Playback(at-tone-time-exactly)
      exten => *60,3,SayUnixTime(,,IMp)
      exten => *60,4,Playback(beep)
      exten => *60,5,Hangup
      Insert the following lines directly ABOVE this block:
      exten => *51,1,Dial(console/dsp)
      exten => *51,2,Playback(custom/bosun)
      exten => *51,2,Hangup()
      Allow one blank line between each bock.
      The custom/bosun.gsm file is the bosun’s whistle sound effect used as an interom/paging alert tone aboard the USS Enterprise from Classic Star Trek.  Any short “alert” type sound such as the default beep.gsm can be used.
      Click on the “Update” button and then click on the “Re-Read Configs” link.

      Step 8:  Hookup and Test the paging function.
      If not already connected, connect the soundcard’s primary speaker output (if it has more than one) to the inputs of the paging amplifier or for testing use common computer speakers or headphones.
      IMPORTANT NOTE: The soundcard may not produce sound output unless some sort of  resistance (load) is put on the output jack. For this reason always attach speaker or an amplifier to the sound card and reboot before testing.
      Reboot the Asterisk server.
      After the reboot test the paging by dialing the “Paging Code” *51 from any handy telephone.  If after adjusting volume levels on the speakers/headphones/amplifier you still have no sound at all skip to Step 10. Otherwise continue on to Step 9.

      Step 9:Finish the installation.
      If not already connected to the final device do so now and adjust volume levels to suit.
      YOU ARE DONE! Congratulations!!!

      Step 10: Correcting Centos’ volume level issues.
      Centos 4.x appears to set the soundcard’s outputs to muted and also a zero volume level requiring a mixing/tuning utility to correct these issues.
      From the linux command line (via Putty or direct) excute the following command:
      yum list | grep alsa {enter}
      NOTE: This REQUIRES access to the internet.
      Do to the fluid nature of linux the list returned may not match exactly the list below:
      alsa-lib.i386
      alsa-lib-devel.i386
      alsa-utils.i386
      Execute the following command:
      yum –y install {item 1} {item 2} {item 3} {item x} {enter}
      For example:
      yum –y install alsa-lib.i386 alsa-lib-devel.i386 alsa-utils.i386 {enter}
      After the download and installation completes reboot the Asterisk server.

      Step 11:  Un-mute and tune the soundcard.
      It is suggested that a pair of headphone be used for this step for best results.
      After the reboot enter the following command from the linux command line (via Putty or direct) - For this step a keyboard and color monitor connected directly to the Asterisk server is highly recommended:
      alsamixer {enter}
      This SHOULD launch the alsamixer utility application.  Alsamixer is a text based soundcard mixer/tuner.  It is functionally identical and visually similar to the MS Windows sound card mixer/tuner.  Each “channel” and/or “feature” is listed with it own control.  Because of the large number of soundcard makes and models the exact number, labeling, and order of these channels will vary.  However, there are only TWO channels that need to be adjusted and they are a constant:  The MASTER channel and the PCM channel.
      NOTE: It is recommended that prior to adjusting the levels that the paging code be dialed and an active paging session be underway.  This will allow for “on-the-fly” realtime volume level setting to be done.
      Each channel consists of a “Label Box” at the base of each “Slider Bar” and a “Mute Status” indicator at the top. The channel that is actively being edited will have its name in the label box be red as opposed to white.
      For switching or scrolling through channels use the left and right arrow keys. 
      To adjust the level of a channel use the up and down arrows.
      To mute or un-mute a channel us the mute toggle key the “M” key.
      To exit and save you level adjustments press the “ESC” key.
      The levels of both the MASTER channel and the PCM channel must be adjusted for satisfactory volume levels and both channels MUST be UN-MUTED for correct functioning.
      Starting with the far left or first channel, this should be the MASTER channel.  Use the “M” key to un-mute the channel if it is muted (It most likely is muted.). Adjust the level to 55.
      Using the left and right arrow keys scroll through the channels until you find the PCM channel. Un-mute the channel if necessary and adjust its level to 55 as well. 
      If headphones are being used test this level as being of  “average” loudness and not to loud and/or distorted.  If the level is to high adjust each channel down slightly until a “comfortable” level is reached.  If the sound level is to quiet then adjust up the level in the same fashion.
      After the levels have been adjusted to a satisfactory level press the “ESC” key to save the level settings and exit.
      Return to Step 9.

       
    • Tracy Carlton

      Tracy Carlton - 2005-12-06

      Ohhh, Almost forgot this works with Full or Half-duplex sound cards now.  No need to rename chan_oss.c to chan_oss_new.c and chan_oss_old.c to chan_oss.c and recompile.  The new version works (and appearently has all along) just fine.

      Tracy (MUST SLEEP NOW!!!!)

       
    • Issac

      Issac - 2005-12-06

      Tracy,

      I have tried the Phoneset Paging code from above on AAH 2.1 and I am getting "Not a valid confrence number" on all phones. My phones are all Polycom's 501 and 601. When I hit *51 the I hear this message on the calling phone and all the other phones.

      Any Idea on what I did wrong?

      Thanks

      Issac

       
    • Issac

      Issac - 2005-12-06

      Here is my log, there is some error with app_meetme.

      Dec 6 16:38:06 VERBOSE[4774] logger.c: -- AGI Script allpage.agi completed, returning 0
      Dec 6 16:38:06 VERBOSE[4774] logger.c: -- Executing Playback("SIP/104-0a01", "custom/bosun") in new stack
      Dec 6 16:38:06 WARNING[4774] file.c: File custom/bosun does not exist in any format
      Dec 6 16:38:06 WARNING[4774] file.c: Unable to open custom/bosun (format ulaw): No such file or directory
      Dec 6 16:38:06 WARNING[4774] app_playback.c: ast_streamfile failed on SIP/104-0a01 for custom/bosun
      Dec 6 16:38:06 VERBOSE[4774] logger.c: -- Executing MeetMe("SIP/104-0a01", "999|dtqpA") in new stack
      Dec 6 16:38:06 DEBUG[4774] app_meetme.c: Building dynamic conference '999'
      Dec 6 16:38:06 WARNING[4774] chan_zap.c: Unable to open '/dev/zap/pseudo': No such file or directory
      Dec 6 16:38:06 ERROR[4774] chan_zap.c: Unable to dup channel: No such file or directory
      Dec 6 16:38:06 WARNING[4774] app_meetme.c: Unable to open pseudo channel - trying device
      Dec 6 16:38:06 WARNING[4774] app_meetme.c: Unable to open pseudo device
      Dec 6 16:38:06 VERBOSE[4774] logger.c: -- Playing 'conf-invalid' (language 'en')
      Dec 6 16:38:06 DEBUG[4783] manager.c: Manager received command 'Originate'
      Dec 6 16:38:06 DEBUG[4783] chan_sip.c: Setting NAT on RTP to 0
      Dec 6 16:38:06 DEBUG[4783] chan_sip.c: Outgoing Call for 204
      Dec 6 16:38:06 DEBUG[2654] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on

       
    • agabr

      agabr - 2005-12-06

      Issac
      do you have any Digium or clone card installed in your system? a zaptel interface must be installed for conferencing to work to provide timing and as you see this agi executed based on dinamic meetme. also i noticed from your log that the zaptel driver is having a problem or it is not install, you can try to reload it from the terminal (if you have one installed)by typing rebuild_zaptel and press Enter then reboot your system and from terminal type genzaptelconf, then you should be all set , try dialing *51 it should work. Good Luck

       
    • agabr

      agabr - 2005-12-07

      sorry i forget, as Tracy mensioned the "bosun" sound file is not there at the custom directory so you can change that to any sound file or simply use asterisk sound file "beep" so it should look like this:
      exten => *51,2,Playback(beep).

       
    • Issac

      Issac - 2005-12-07

      agabr,

      I did change to exten => *51,2,Playback(beep) for the missing sound file.

      As for the zaptel, I don't have any cards installed, Digium or a clone. Do I need one for this to work?

       
1 2 > >> (Page 1 of 2)

Log in to post a comment.