Koozali.org: home of the SME Server

SAIL - a couple of thoughts

WillKemp

SAIL - a couple of thoughts
« Reply #15 on: May 18, 2006, 11:02:37 PM »
Quote from: "selintra"
I didn't explain my last post very well.  The point I was badly trying to make is that I don't think that Asterisk will actually do any g729 translation if it thinks there are no licenses registered on the system.

Well it works fine for me!

Code: [Select]

gateway*CLI> show g729
No such command 'show g729' (type 'help' for help)
gateway*CLI> show translation
         Translation times between formats (in milliseconds)
          Source Format (Rows) Destination Format(Columns)

         g723   gsm  ulaw  alaw  g726 adpcm  slin lpc10  g729 speex  ilbc
   g723     -     -     -     -     -     -     -     -     -     -     -
    gsm     -     -     4     4     9     4     3    13    46     -    53
   ulaw     -     9     -     1     7     2     1    11    44     -    51
   alaw     -     9     1     -     7     2     1    11    44     -    51
   g726     -    14     7     7     -     7     6    16    49     -    56
  adpcm     -     9     2     2     7     -     1    11    44     -    51
   slin     -     8     1     1     6     1     -    10    43     -    50
  lpc10     -    17    10    10    15    10     9     -    52     -    59
   g729     -    17    10    10    15    10     9    19     -     -    59
  speex     -     -     -     -     -     -     -     -     -     -     -
   ilbc     -    17    10    10    15    10     9    19    52     -     -
    -- Executing Dial("SIP/5000-d1e2", "SIP/11@Astratel") in new stack
    -- Called 11@Astratel
    -- SIP/Astratel-65d2 is making progress passing it to SIP/5000-d1e2
    -- SIP/Astratel-65d2 answered SIP/5000-d1e2
    -- Attempting native bridge of SIP/5000-d1e2 and SIP/Astratel-65d2
gateway*CLI> sip show channels
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Form  Hold     Last Message  
210.8.40.188     11          478e922872c  00103/00000  gsm   No       Tx: ACK        
192.168.0.162    5000        e59aa30e-51  00101/00102  g729  No       Rx: ACK        


Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #16 on: May 18, 2006, 11:25:06 PM »
Well isn't that interesting.  Here's my output.

Code: [Select]
old1*CLI> show translation
         Translation times between formats (in milliseconds)
          Source Format (Rows) Destination Format(Columns)

         g723   gsm  ulaw  alaw  g726 adpcm  slin lpc10  g729 speex  ilbc
   g723     -     -     -     -     -     -     -     -     -     -     -
    gsm     -     -     5     5    12     5     4    19     -     -    71
   ulaw     -    15     -     1     9     2     1    16     -     -    68
   alaw     -    15     1     -     9     2     1    16     -     -    68
   g726     -    22     9     9     -     9     8    23     -     -    75
  adpcm     -    15     2     2     9     -     1    16     -     -    68
   slin     -    14     1     1     8     1     -    15     -     -    67
  lpc10     -    27    14    14    21    14    13     -     -     -    80
   g729     -     -     -     -     -     -     -     -     -     -     -
  speex     -     -     -     -     -     -     -     -     -     -     -
   ilbc     -   115   102   102   109   102   101   116     -     -     -
old1*CLI> exit
[root@old1 ~]# locate g729
/usr/lib/asterisk/modules/format_g729.so
/usr/lib/asterisk/modules/codec_g729a.so


As you can see, the codec is there but no translate times.

:-)

WillKemp

SAIL - a couple of thoughts
« Reply #17 on: May 18, 2006, 11:48:22 PM »
Quote from: "selintra"
As you can see, the codec is there but no translate times.

Is it the Digium codec? If so, it won't work without a licence.

The one i'm using came from http://kvin.lv/pub/Linux/Asterisk - i just dropped it in and it worked.

Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #18 on: May 18, 2006, 11:55:56 PM »
Ah, ok - you don't have the Digium item. That explains it then.  As I said, I'd seen references to another CODEC but never tried it.  Some doubt as to whether we can legally (morally?) distribute the one you have.   Anyhow, as long as folk know it's there and it works, they can go get it themselves.

Good oh.

WillKemp

SAIL - a couple of thoughts
« Reply #19 on: May 19, 2006, 12:29:43 PM »
It appears i was wrong about the law being different here. What the situation is is that the g729 codec doesn't appear to have been patented in Australia - therefore, we don't need to have a licence to use it.

I'm sure there must be plenty of other countries where the same thing is true.

Will

WillKemp

SAIL - a couple of thoughts
« Reply #20 on: May 20, 2006, 04:22:21 AM »
By the way, i've posted a brief review of installing SAIL here: http://forums.whirlpool.net.au/forum-replies.cfm?t=525404

Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #21 on: May 20, 2006, 10:44:11 AM »
Hi Will,

Thanks for this, it's a very nice, well argued piece.  All the better when it comes from someone who clearly "knows" asterisk.  I've just had a look at the thread and, judging by the rate at which replies are arriving, you seem to have got their attention!

By the way, we put the extensions.conf globals header in yesterday. Thanks for your input on that.  It'll be included in the next out - probably the end of next week.  We've also harmonised the drop down destinations in trunks and IVR (they were a little different). Finally we're hoping to get automatic provisioning in for the spa-9000 and definitions for the Aastra range of handsets.  These last two may not make the wednesday cut.

Kind Regards

jeff@selintra.com

WillKemp

SAIL - a couple of thoughts
« Reply #22 on: May 20, 2006, 11:30:35 AM »
Quote from: "selintra"
Thanks for this, it's a very nice, well argued piece.  All the better when it comes from someone who clearly "knows" asterisk.

No worries! I've also posted it on Digium's Asterisk forum:

http://forums.digium.com/viewtopic.php?p=21585

Now... Something a little worrying that i noticed today when i rebooted my server. During the bootup process, when all the services are scrolling up the screen with [ok] on the right hand side, it gets to Asterisk and stops. No [ok], no nothing.

Switching to another virtual terminal, i did asterisk -r and found Asterisk was running. It had obviously failed to fork and become a daemon from the rc script. I killed it and restarted it with

nice -20 asterisk >/dev/null 2>&1 &

which puts it in the background whether it wants to or not!

It was just lucky i was booting with a monitor that particular time, as i normally wouldn't be.

I'm wondering if it's something in my configs, because it won't fork and background on my laptop, either - and hasn't been doing so for a while. If it is, i can't begin to imagine what.

Anyway, it could be a good idea not to trust Asterisk to background itself in the rc script and, instead, to use something similar to what i use. Because if it doesn't background, the rc script never exits and the remaining services never get started.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #23 on: May 20, 2006, 12:18:54 PM »
Quote
it gets to Asterisk and stops. No [ok], no nothing


Hi Will,

How long did you wait before you dumped it?  Mechanically, what's happening at this point is that we've issued a modprobe for zaptel and we then go into a looped sleep/wait while udev builds the device trees (/proc/zaptel and /dev/zap).  It can take quite a while for this to happen (20-30 seconds or more on a slow machine).  The loop should abort  after 60 seconds and log a message.  Here is the "start" code fragment.
Code: [Select]
# See how we were called.
case "$1" in
  start)
#
#   selintra mod to modprobe and wait for udev
#
    if [ ! -e /dev/zap ]; then
        /sbin/modprobe zaptel
WAITCNT=0
        echo "Waiting for udev."
        while [ ! -e /dev/zap -a $WAITCNT -le 60 ]; do
            sleep 1
   WAITCNT=expr $WAITCNT + 1
done
if [ $WAITCNT -gt 60 ]; then
   echo "Waited too long for udev, - aborting Asterisk  startup."
   exit 1
fi
        /sbin/modprobe wctdm
        /sbin/modprobe wcfxo
        /sbin/modprobe wcfxs
        /sbin/modprobe ztdummy
     fi
   
#
#   end selintra mod
#

        # Start daemons.
        echo -n "Starting asterisk: "
        daemon asterisk
   RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/asterisk
        ;;
 #  start


If you can recreate the problem, when the startup hangs - go and look to see if /proc/zaptel or /dev/zap have been created.  If they have, then it's a fork issue, if they haven't then its a udev issue.  

Best

Jeff

Offline JonB

  • *
  • 351
  • +0/-0
SAIL - a couple of thoughts
« Reply #24 on: May 20, 2006, 02:22:41 PM »
Jeff,

Could you possibly add DISA to the IVR Menus dropdown list. I  currently call DISA via a custom app as a hidden IVR menu option.

Jon
...

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #25 on: May 20, 2006, 04:54:36 PM »
Quote
We've also harmonised the drop down destinations in trunks and IVR (they were a little different)


Done in the next out Jon.

Cheers

Jeff

Offline JonB

  • *
  • 351
  • +0/-0
SAIL - a couple of thoughts
« Reply #26 on: May 21, 2006, 01:54:09 AM »
oops, missed that bit  :oops:

Jon
...

WillKemp

SAIL - a couple of thoughts
« Reply #27 on: May 21, 2006, 03:32:25 AM »
Quote from: "selintra"
How long did you wait before you dumped it?


Quite long enough! ;-)

I'm well used to stuff taking a while to time out.

Quote
If you can recreate the problem, when the startup hangs - go and look to see if /proc/zaptel or /dev/zap have been created.  If they have, then it's a fork issue, if they haven't then its a udev issue.


It's a fork issue. Both /proc/zaptel and /dev/zap are there by the time i get jack of waiting and kill Asterisk.

I suppose i should try and work out why it's doing it. It must be my config, surely - although that shouldn't really be possible. When i get a chance, i'll play around with it. But, whatever the cause is, it shows that Asterisk can't (currently) be trusted to fork.

Will

WillKemp

SAIL - a couple of thoughts
« Reply #28 on: May 23, 2006, 12:38:45 PM »
A couple more things that occurred to me...

There doesn't seem to be a way (apart from Custom Apps) to configure two or more phones to ring at the same time. Such an option would be useful in lots of situations, i'm sure. Most of them, probably, would be for incoming calls from Trunklines.

I can think of two possible ways to do it - one is to have multiple extensions configurable in Trunklines - that would be limited and a bit messy, though. Secondly, and more flexible, would be to have a separate menu item where you define groups of phones in something like a ring group - which could appear in the Inbound Route dropdown menu in the Trunklines config.

Log CDR to MySQL: - the manual says
Quote
For the stats package to work this value must be set to YES.
But i can't find any other references to the stats package. What is it and where can i get it?

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
SAIL - a couple of thoughts
« Reply #29 on: May 23, 2006, 01:06:44 PM »
Quote
But i can't find any other references to the stats package. What is it and where can i get it?

http://mybox/stat/
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.