Koozali.org: home of the SME Server

SAIL - a couple of thoughts

WillKemp

SAIL - a couple of thoughts
« on: May 15, 2006, 11:58:00 PM »
HI!

Well, i got incoming calls working, but it wasn't the firewall that was blocking them, as i thought previously, it was my type=user config in sip.conf. I've never used the two-part sip account config before - only configured everything as type=friend. When i configured my voise.com.au (DID) account using my old type=friend config, it worked.

Now http://voip-info.org/wiki/view/Asterisk+SIP+user+vs+peer says

Quote
As of Asterisk 1.2, there is no reason to actually use 'user' entries
any more at all; you can use 'type=peer' for everything and the behavior
will be much more consistent.

and i'd like to be able to configure new carriers with just the type=user stanza. However, when i do that, SAIL still sticks stuff in the right-hand (user) box on the "Change Trunkline" page.

How can i stop it doing that? I know it can be done, because the Sipgate carrier config does it.

Also, i want to be able to direct incoming calls to one extension and, if that's not available, to a second (and maybe third) one - In the same way as the primary, secondary, tertiary and quaternary paths are done in the "Add or Modify a Route" page. There doesn't appear to be a way to do this.

However, i just (since i wrote the above paragraph) noticed that now i've installed 2.1.11-193 i can do it by definining that bit of extensions.conf in the Custom Apps and directing the inbound route to that. If i can work out how to get a call into that bit of script, that is. Maybe the 's' extension will do it. No time to try it now, i'll have a go this evening.

Anyway, overall i'm really impressed - both by how functional SAIL is, and by how far it's come since i last checked it out (a year ago?).

Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #1 on: May 16, 2006, 11:02:13 AM »
Hi Will,
Quote
As of Asterisk 1.2, there is no reason to actually use 'user' entries
any more at all; you can use 'type=peer' for everything and the behavior
will be much more consistent.

Absolutely right and has been since around 1.0.9 CVS.  The reason we have peer/user and haven't removed it is twofold; backward compatibility and that fact that many carriers specify long, often unnecessary, user strings and our users would feel uncomfortable if they couldn't use them.  In any event, it's doing no harm so we'll keep it for now.   However, there should be the ability to specify "peer only" or "friend" at trunk define time so we'll look at that.  In the meantime, you can fiddle it by placing a single comment line (;) in the definition and using a dummy SIP/DID entry.
Quote
Also, i want to be able to direct incoming calls to one extension and, if that's not available, to a second (and maybe third) one


Depends what you mean by "not available".   The call-forward processing in SAIL is among the best around.  In fact it's the ONLY Asterisk implementation we know of with true loop and spiral detection (and for that reason alone, being old telephony kiddies, we wouldn't deploy any other offering professionally), but enough of the advertising :-)...

You can set your phones to call forward on Busy or no answer (*22*) and that will do it for you .  However, if you really want a true hunt group, you can wait a couple of releases (it's on the list) or you can do it yourself in a custom app using the "s" extension.  

Kind Regards

jeff@selintra.com

WillKemp

SAIL - a couple of thoughts
« Reply #2 on: May 16, 2006, 11:31:00 AM »
Quote from: "selintra"
In the meantime, you can fiddle it by placing a single comment line (;) in the definition and using a dummy SIP/DID entry.

The carrier entry for Sipgate, which comes with SAIL, doesn't appear to have anything in the right hand side definition and when you configure a trunkline using Sipgate, it comes up with nothing in the right hand side definition. How is that done?

Is there any documentation on the mechanics of the SAIL config system?

Quote
Depends what you mean by "not available".

Phone not online, busy, or unanswered.

Quote
You can set your phones to call forward on Busy or no answer (*22*)

Ah, that sounds reasonable. I never thought of doing it PBX-style. I'm afraid i think in terms of extensions.conf etc... I'll give it a try.

Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #3 on: May 17, 2006, 12:43:19 AM »
Quote
The carrier entry for Sipgate, which comes with SAIL, doesn't appear to have anything in the right hand side definition and when you configure a trunkline using Sipgate, it comes up with nothing in the right hand side definition. How is that done?
Hi Will,

The Trunk definitions are inherited from the carrier definition.  By default (in line with your earlier point about users and peers), when you create a carrier, no user definition is created.  If you want to have user entries you must then go back and physically update the carrier definition.  Sipgate, as an example, was created without any user entries.  When a new Trunk inherits Sipgate characteristics, the user entry is empty.  You can do it yourself by simply creating your own definition for a particular carrier.
Quote
Is there any documentation on the mechanics of the SAIL config system?

Not really.  There is a full admin guide at www.selintra.com/docs however it doesn't contain any detail on the underlying mechanics.  However, we intend to address that soon. Not that there's any rocket science.  SAIL is actually a very simple little system.  There are only three component layers:-

The panels, they just update the selintra database (which itself is a vanilla SME DB) and invoke the generator.

The generator - just  simple SME Server templates to create the Asterisk .conf files from the DB.  

The AGI, - the run-time sequence control.

Overall, there's surprisingly little code in SAIL and most of what there is can be found in the front-end panels.  The rest is just copy, paste and sequence control.  :-)

Best

jeff@selintra.com

WillKemp

SAIL - a couple of thoughts
« Reply #4 on: May 17, 2006, 01:25:38 AM »
Quote from: "selintra"
The Trunk definitions are inherited from the carrier definition.  By default (in line with your earlier point about users and peers), when you create a carrier, no user definition is created.  If you want to have user entries you must then go back and physically update the carrier definition.

I created one or two carrier entries with no user definition, but when i create a trunk definition using that carrier, it puts about 3 lines in the user definition (that weren't in the carrier definition). This is why i asked about it. I'm at work at the moment and i haven't got access to my SME box from here, so i can't check what lines it puts in there.

Another thing, while i'm writing... I don't seem to be able to get routes working properly and Asterisk doesn't log what's going on in any detail - as it seems to be happening at AGI level (verbose=4). Is there any way i can monitor what's actually happening when i dial a number that should be being routed to an ITSP through a configured route? Where does logging of AGI processes happen?

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #5 on: May 17, 2006, 02:43:38 AM »
Quote
it puts about 3 lines in the user definition
hmmm - it shouldn't.  That's how sipgate works.  I've only got -180 here. -  I'll try it on 192 in the office tomorrow.
Quote
I don't seem to be able to get routes working properly
Let me know what it's doing that you don't like.

To see what's happening... Stop Asterisk and restart it like this...
Code: [Select]
/etc/init.d/asterisk stop
asterisk -vvvvvvvvvvvc

when it comes up, at the CLI do
Code: [Select]
agi debug
when you've finished
Code: [Select]
agi no debug
stop now
/etc/init.d/asterisk start


Best

WillKemp

SAIL - a couple of thoughts
« Reply #6 on: May 17, 2006, 04:01:33 AM »
Quote from: "selintra"
To see what's happening... Stop Asterisk and restart it like this...
Code: [Select]
/etc/init.d/asterisk stop
asterisk -vvvvvvvvvvvc

I believe more than 4 x 'v's (i.e., verbosity level of 4) doesn't make any difference.

But stopping and starting is like using a sledgehammer to crack the proverbial nut, anyway! It's much easier to just do:

set verbose 4

The equivalent to the 11 x 'v's you've got there, would be set verbose 11 . But http://www.voip-info.org/wiki/view/verbose says setting verbosity greater than 4 gives a verbosity of 1. That certainly doesn't apply to the number of 'v's on the command line, and i can't check if it's true for the CLI command at the moment - it doesn't seem right though. I think setting verbosity greater than 4 gives a verbosity of 4, but i could be wrong there.

Quote
when it comes up, at the CLI do
Code: [Select]
agi debug

Ah... That's what i want. I should have just had a look at the output of the help command, shouldn't i? ;-)

I'll check it out when i get home.

Thanks
Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #7 on: May 17, 2006, 08:15:53 AM »
Quote
I believe more than 4 x 'v's (i.e., verbosity level of 4) doesn't make any difference.

But stopping and starting is like using a sledgehammer to crack the proverbial nut, anyway! It's much easier to just do:....
You're right, it is easier... you just may not see anything. The AGI debugger writes its output to the master console.  

As to the number of v's?  You can do 4 if you want, but personally, I just press the v key for a bit.   ;-)


Best

Jeff

WillKemp

SAIL - a couple of thoughts
« Reply #8 on: May 17, 2006, 09:05:27 AM »
Quote from: "selintra"
Quote
You're right, it is easier... you just may not see anything. The AGI debugger writes its output to the master console.


Ah. Ok. I thought you were suggesting shutting it down just to start up again with extra verbosity.

Thanks
Will

WillKemp

SAIL - a couple of thoughts
« Reply #9 on: May 17, 2006, 11:07:26 AM »
Quote from: "selintra"
You're right, it is easier... you just may not see anything. The AGI debugger writes its output to the master console.

I'm getting AGI debug output on the remote console with no problems.

I didn't really need it though, because as soon as i started trying to debug the problem i was having, i realised the carrier was Pennytel and remembered i'd read somewhere (in an email Burnat sent me, i think) that there was a problem with the supplied Pennytel config. So i deleted that carrier config and re-did it and now it works...

However, the thing with not being able to get an empty "user" config seems to have got weirder - well, sort of.

When i created the new Pennytel carrier config, the user part came up empty - which it hasn't done before, there's always been something in it. Maybe this is different in this version (-193)? And when i create a new trunkline with it, it comes up empty too. So no problem there.

However, when i try and delete the user config part from a previous carrier definition that i created a few days ago (under an earlier version), i can't. I delete it and save the config, but it comes back again.

Of course this isn't a real problem, as all i have to do is delete that carrier template and re-create it and all should be ok. It's just weird...

Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #10 on: May 17, 2006, 12:28:59 PM »
Quote
It's just weird...


Nah, - it's not weird.  It's a greenie :-o

I'll see if we can't sort it out for you.  Until then, you can go all the way back to my first suggestion and just put a single comment in the user definition.  Now some people may call that a bodge, but I prefer to think of it as a "circumvention", at least that's what I've put in Bugzilla. :-)

Jeff

WillKemp

SAIL - a couple of thoughts
« Reply #11 on: May 17, 2006, 01:10:08 PM »
Quote from: "selintra"
I'll see if we can't sort it out for you.  Until then, you can go all the way back to my first suggestion and just put a single comment in the user definition.  Now some people may call that a bodge, but I prefer to think of it as a "circumvention", at least that's what I've put in Bugzilla. :-)

But there's no need to. Because, as i said above, it works. It's only the old configs that act like that. If i create a new carrier config, -193 seems to do the whole thing perfectly ok.

However, while i'm writing... Another thing that occurs to me is that it might be good to be able to have the g729 codec being optionally configured even without a g729 licence. The g729 codec isn't copyright in Australia, so we don't need a licence.

It's no really big deal having to edit the config by hand, of course, and probably not worth worrying about. Just a passing thought...

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #12 on: May 17, 2006, 01:33:56 PM »
Quote
Another thing that occurs to me is that it might be good to be able to have the g729 codec being optionally configured even without a g729 licence. The g729 codec isn't copyright in Australia, so we don't need a licence.


Whoa!  That's interesting.  I wonder why that is.  We have to pay 10 bucks a pop here.  However, Asterisk has some gubbins in it which recognises registered G729 instances.  If you do
Code: [Select]
show g729
on a box that has no registered instances you get...

Code: [Select]
test7*CLI> show g729
No such command 'show g729' (type 'help' for help)


Contrarywise, if you issue the same command on a box that does have g729 licenses you get...

Code: [Select]
*CLI> show g729
0/0 encoders/decoders of 3 licensed channels are currently in use
*CLI>


So how would we square that?

Best

Jeff[/quote]

WillKemp

SAIL - a couple of thoughts
« Reply #13 on: May 17, 2006, 11:13:44 PM »
Quote from: "selintra"
[Whoa!  That's interesting.  I wonder why that is.  We have to pay 10 bucks a pop here.

To be honest, i can't remember the exact reasons now, but it's something to do with Australian copyright or patent law (whichever applies) - which is different from country to country. No doubt there are plenty of other places in the world where the situation is the same.

There are at least a couple of free g729 codecs available. Whether it's legal to use them in any given country, of course, is another matter.

Quote
Code: [Select]
*CLI> show g729
0/0 encoders/decoders of 3 licensed channels are currently in use
*CLI>


So how would we square that?

The only thing i can suggest off the top of my head is the show translation command - which will have figures in the g729 column (or row) if there's a codec installed, but will have all dashes there if not.

Will

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #14 on: May 18, 2006, 10:12:29 PM »
Hi Will,

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.  There are various vague references on the asterisk BB's to an open-source g729 codec (which apparently isn't GPL), but I have no idea what would happen if you fitted it.  The Digium variant won't tanslate unless licences are present.  If I'm right then it raises some interesting issues as a far as the law in your country is concerned.

Best

Jeff

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.

WillKemp

SAIL - a couple of thoughts
« Reply #30 on: May 23, 2006, 01:07:55 PM »
Oh, and something else i just discovered - since i wrote that last msg...

Transformation Mask:

The doc says:
Quote
Masks are sequentially applied from left to right.

That doesn't appear to be true. I've got two masks: 8888:8888 and 8:028 and if i dial a number starting with 8888, it adds an 02 in front of it, whether the 8888 mask is to the right or to the left of the 8:028 mask.

Also, these masks are a little bit clumsy and limited in their usefulness, i reckon. It would be nice to have masks that work like Sipura dialplans...

And... While i'm writing. Is there a way of changing the codes for keypad operations? Have you seen the web config pages for the SPA841 phone? There's a whole stack of those sorts of codes that you can customise. Something like that would be neat!

By the way, i'm not mentioning all this stuff because i'm requesting it - just observations and thoughts about things that could possibly be useful to consider.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
SAIL - a couple of thoughts
« Reply #31 on: May 23, 2006, 01:17:24 PM »
Quote
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.


This may help:
TRUNK CALLING RING GROUP
It's easy to use, you just create a speed-dial number but instead of pointing it at one extension you can code as many as you like separated by whitespace - like this .... 5003 5002 5004 5006

set speedial #1 = 5001 5002
Insert speedial number in trunk Astratel
Tried with Astratel - OK, but does not go to voicemail.  Rings 21 times for caller. Plenty of time to rush from the dunny.  javascript:emoticon(';-)')
- 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.

WillKemp

SAIL - a couple of thoughts
« Reply #32 on: May 23, 2006, 01:24:47 PM »
Quote from: "burnat"
This may help:
TRUNK CALLING RING GROUP

Yeah, it does. It's not obvious you can do that with it from the name "Speed Dial". Thanks

Not going to voicemail's a problem though - and makes it useless for me really.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
SAIL - a couple of thoughts
« Reply #33 on: May 23, 2006, 01:30:45 PM »
Quote
Not going to voicemail's a problem though - and makes it useless for me really.

Same here, but then again, there may be a way to get it working - I did not spent much time checking it, so do not take my word for it...
- 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.

WillKemp

SAIL - a couple of thoughts
« Reply #34 on: May 23, 2006, 01:32:40 PM »
Quote from: "burnat"
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/

That URL redirects to http://megairc.free.fr/ - which is entirely in French. Et j'entends pas bien le Français! But if that stats stuff is on that page somewhere, it's certainly not obvious to me.

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
SAIL - a couple of thoughts
« Reply #35 on: May 23, 2006, 02:08:33 PM »
Quote
That URL redirects to http://megairc.free.fr/ - which is entirely in French

if your box is 192.168.0.10  ---> http://192.168.0.10/stat/ brings you to the CDR panel if you have enabled mysql.  It does for me...
- 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.

WillKemp

SAIL - a couple of thoughts
« Reply #36 on: May 23, 2006, 09:42:54 PM »
Quote from: "burnat"
if your box is 192.168.0.10  ---> http://192.168.0.10/stat/ brings you to the CDR panel if you have enabled mysql.

So it does! Thanks.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #37 on: May 23, 2006, 11:23:52 PM »
Hi guys,

In no particular order.  

Ring Group time-out - going in as we speak.  Should have been there already really.  We're just figuring out how it should dovetail with IVR timeouts, hunt groups (also going in) and so forth.  At the moment it will ring until the caller loses patience and hangs up!

Anyhoo, you'll have a solution shortly.  Worst interim case;  you will be able to invoke a ring group with timeout from a custom app and then force it to Vmail or into an IVR.  

Speed dial  - yup, guilty as charged;  it's a dumb name.  Watch this space.


Soft feature codes.  Agreed.  They should have been soft coded from the beginning.   We  will do it but it may be a release or two away.

Best

Selintra

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #38 on: May 24, 2006, 12:54:23 AM »
Quote
I've got two masks: 8888:8888 and 8:028 and if i dial a number starting with 8888, it adds an 02 in front of it, whether the 8888 mask is to the right or to the left of the 8:028 mask.


Will,

Have a look at this...

http://selintra.com/docs/cgi-bin/view/Main/DocChapter095#Transformation_mask

In particular, look at example #3.

Now, to your example cases.

I'm not sure what the 8888:8888 is doing.  You're instructing it to replace 8888 with 8888. So... here are your 2 cases;

case #1 - 8888:8888 8:028
dial 8888xxxx
Code: [Select]
step 1 - the 8888 will be replaced by 8888 - output 8888xxxx

step 2 - the first 8 will be replaced by 028 - output 028888xxxx



case #2 - 8:028 8888:8888
dial 8888xxxx
Code: [Select]
step 1 - the first 8 will be replaced with 028 - output 028888xxxx

step 2 - 8888 will not be found at the left hand side of the string so nothing will happen - output 028888xxxx



The masks are applied from left to right but they only work on a left-hand match on the target string.  

Best

Jeff

WillKemp

SAIL - a couple of thoughts
« Reply #39 on: May 24, 2006, 01:30:22 AM »
Quote from: "selintra"

I'm not sure what the 8888:8888 is doing.  You're instructing it to replace 8888 with 8888.

I was under the misapprehension that it will find a match and then stop looking - like my Sipura phone does and like Asterisk does with extension numbers. So the 8888:8888 was to prevent it from ever getting to the 8:028. There doesn't appear to be any way of achieving that. (Hence my other suggestion, to make these transformation masks work like Sipura's dialplans).

Some NSW local numbers begin with an '8' and i want to be able to dial them without the '02' prefix - like i can on a landline phone. But Astratel's user numbers start with 8888 and i don't want an '02' to be added to the front of that. Currently, i can dial a prefix for Astratel numbers (configured in Custom Apps, because i want that prefix to start with a '*' and have 2 digits after it - which i can't do with the 2 digit Trunk Pre-select in the Trunklines config).

By the way how about allowing more than two digits in the Trunk Preselect? And how about allowing it to start with *any* digit (i.e., '*' or '#') rather than just 0-9 (and summarily stripping '*' or '#')?

Quote
case #1 - 8888:8888 8:028
dial 8888xxxx
Code: [Select]
step 1 - the 8888 will be replaced by 8888 - output 8888xxxx

step 2 - the first 8 will be replaced by 028 - output 028888xxxx



Yeah, that can't achieve what i want to do.

Will

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
SAIL - a couple of thoughts
« Reply #40 on: May 24, 2006, 03:39:48 AM »
Quote
But Astratel's user numbers start with 8888 and i don't want an '02' to be added to the front of that.


For Astratel, as a workaround, Jeff had provided:
For Sydney:
9:029 8:028 028888:8888
It works for me.

In your case, this should do it:
8:028 028888:8888
rgds. chris.
- 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.

WillKemp

SAIL - a couple of thoughts
« Reply #41 on: May 24, 2006, 06:31:26 AM »
Quote from: "burnat"
In your case, this should do it:
8:028 028888:8888

Yeah, it should, shouldn't it. I didn't think of that! It's too bizzarrely illogical to occur to me - put '02' on the front, and take it off again! ;-)

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #42 on: May 24, 2006, 07:28:49 AM »
Quote
It's too bizzarrely illogical


Good, isn't it?  

It's also blindingly fast at execution time because it translates almost directly to machine code.  No bloody silly regex processing in our runtime logic that takes a lifetime to load and forever to run  ;-) .

Best

WillKemp

SAIL - a couple of thoughts
« Reply #43 on: May 24, 2006, 07:49:25 AM »
Quote from: "selintra"
It's also blindingly fast at execution time because it translates almost directly to machine code.  No bloody silly regex processing in our runtime logic that takes a lifetime to load and forever to run  ;-) .

Ah well, i like things that convert easily to machine code  mate - i can understand stuff like that! I worked as an assembler programmer back in the very early 80s, and nothing converts to machine code like assembly language! ;-)

So that's reasonable, i guess. But couldn't parsing stop when a match is found? Or does that reduce its ability to do some things?

WillKemp

SAIL - a couple of thoughts
« Reply #44 on: May 24, 2006, 11:27:14 PM »
Oh, and another thing.... (You must be getting sick of me by now! ;-) )

I think it's a bad thing that Asterisk answers incoming calls before either the extension answers or voicemail kicks in.

There are two reasons for this - 1) incoming calls from automated calling systems (e.g., an ITSP's system for verifying your DID number for use in CLID) don't work properly, as they register the call as having been answered and the announcement starts before your phone's even started ringing. And 2) it costs the caller money, without them being connected to anything.

I've tried setting VoIP Ring Delay to '0', but it won't have it, so i have to use '1', to minimise the delay. I don't understand why the default is 5 seconds, as it seems crazy to make all callers wait 5 seconds, listening to an imaginary phone ringing, for no reason.

Anyway, couldn't a value of '0' in this field in Globals disable this behaviour?

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #45 on: May 25, 2006, 12:27:17 AM »
Quote
Oh, and another thing.... (You must be getting sick of me by now!  )
Not a bit of it.  Your input is very much appreciated - as is everyone's.  We aren't at all precious about the product; it's still very young, and we're fortunate that the architecture allows us to change it very rapidly. Keep posting.

Quote
I think it's a bad thing that Asterisk answers incoming calls before either the extension answers or voicemail kicks in.
Agreed.  The answer code is the oldest in SAIL.  It was the first stuff we did and it isn't as smart as it could be.  In any event, it's due a rework and it will get looked at when we finish testing the "outcomes" code for extensions and aliasing, which should just be in time to dovetail nicely with the BRI integration and zapata rework.  (plan?  there's a plan?).   :-)

Best

WillKemp

SAIL - a couple of thoughts
« Reply #46 on: May 27, 2006, 12:06:52 PM »
Hi!

I think forcing 4-digit extension numbers is a bad thing. In a small business with, say, 10 phones, it's ridiculous to have to dial a 4-digit number to call one of those 10 extensions, when a 2-digit number would be adequate.

I think extension numbers also should be able to start with any digit - i.e., including '*' and '#'. I know the "standard" thing for PABXs is to have to dial '0' or something for an outside line, but i think it would be much more sensible to have to dial '*' followed by the (2-digit?) extension number for an inside line. That way, you could dial exactly as you would a home phone - plus internal extensions. It would significantly reduce the number of keypresses many workers would have to make in a day (and put an end to the irritation of automatically going to dial the '0' when you're at home! ;-) )

We're no longer constrained by the limitations of the old PABXs, so we should improve on them where we can, i reckon.

Will

WillKemp

SAIL - a couple of thoughts
« Reply #47 on: May 28, 2006, 09:18:24 AM »
Scheduling...

I've never come across any discussion of this anywhere, but i made a passing reference to starting Asterisk in the stuff about it not forking.

I always use nice -n -20 asterisk when i start up Asterisk. It seems sensible to set the scheduling priority as high as possible, in an attempt to give it the best possible chance to do any signal processing smoothly. I don't know if it really makes any difference though.

Does anyone else think there's any point to this?

hoopla

SAIL - a couple of thoughts
« Reply #48 on: May 29, 2006, 08:31:14 PM »
Quote from: "selintra"
We aren't at all precious about the product; it's still very young, and we're fortunate that the architecture allows us to change it very rapidly. Keep posting.

I'm not sure if I've messed up trying to install, or if one of these rapid changes has broken something.

I try "rpm -Uvh smeserver-asterisk-1.2.3-1.i686.rpm" which gets me "error: Failed dependencies:
        smeserver-asterisk-zappri is needed by smeserver-asterisk-1.2.3-1.i686" but I already installed that. Just to be sure, I try again:
"rpm -Uvh smeserver-asterisk-zappri-MPP-1.2.2-1.i686.rpm"

"Preparing...                ########################################### [100%]
        package smeserver-asterisk-zappri-MPP-1.2.2-1 is already installed"

So what is missing?

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #49 on: May 29, 2006, 09:13:52 PM »
Hello Hoopla,

The dependency it's asking for is smeserver-asterisk-zappri NOT smeserver-asterisk-zappri-MPP, which is what you have installed.  smeserver-asterisk-1.2.3-1  had a prereq for zappri (no MPP).  smeserver-1.2.3-2 will run with either.  So...

Install smeserver-asterisk-1.2.3-2.i686.

Kind Regards

Selintra

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #50 on: May 30, 2006, 06:19:03 AM »
Quote
I think forcing 4-digit extension numbers is a bad thing. In a small business with, say, 10 phones, it's ridiculous to have to dial a 4-digit number to call one of those 10 extensions, when a 2-digit number would be adequate.


Hi Will,

You can have short numbers and asterisks and hashes if you wish, simply by declaring them as aliases.  

Best

WillKemp

SAIL - a couple of thoughts
« Reply #51 on: May 30, 2006, 10:21:59 AM »
Quote from: "selintra"
You can have short numbers and asterisks and hashes if you wish, simply by declaring them as aliases.

That's very clumsy, complicated and confusing way of doing something that ought to be simple!

Doing stuff like that makes maintenance more difficult too. And it also ties up a series of extension numbers unnecesarily (thinking in terms of pattern matching on 1st or 1st and 2nd digit, etc).

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #52 on: May 30, 2006, 11:31:26 AM »
Quote
That's very clumsy, complicated and confusing way of doing something that ought to be simple!


Hello Will,

Heres the long answer  ;-)

Keys are allocated as meaningless unique digit strings in keeping with Boyce-Codd entity integrity.  Semantics, even convenient ones, should not be allocated to primary keys.  Furthermore, we do not want to complicate the mainline with decision making code based upon any semantic constructs mapped onto number series, particularly any of range or form.  

SAIL is about speed and economy of execution.  Nothing else (and we've benchmarked 'em all) comes even close to us on path length and economy of resource at run time.  However we DO have to handle the need for short "feature key" sequences such as CFIM, CFBS etc etc.  In an earlier post you referred to us being free to challenge traditional ways of doing telephony.  Well that's true but not at the risk of steepening the end-client's learning curve.   PBX users are accustomed to the switches working in a certain way (probably with Definity being the World Wide dejour standard) and we would only challenge that if we felt there were very large gains to be made.

Aliasing allows us to give the SOHO user a simple semantic mapping which is indistinguishable to them from a real extension. It also runs blindingy quickly because it involves a single in-memory  foreign-key/primary match.  

The key structure gives us unlimited headroom without compromise so we can handle a system from 2 phones to 20000 and beyond (given enough resource) without system change.   The 4-digit limit is purely front-end.  The back-end recognises no such limit.  It also recognises that traditional PBX's use *nn and shortcodes for system commands and users are used to that and comfortable with it.

With SAIL, we are absolutely obsessed with two things; speed of execution at run-time and regressable, manageable code.  None of the other asterisk generators can demonstrate either of these things today and that's why we believe SME/SAIL is the ONLY (strike that - Bicom is also very close although it doesn't install/de-install as competently as we do) credible production-capable asterisk workbench out there right now.    

On the issue of manageable code (which you didn't raise but is part of the overall answer), the acid test has to be this. -  Can you regress a new release easily and quickly if it fails?  Because if you can't then you better have shit hot lawyers or a very fast car.  Customers will tolerate an on-line system being down for hours or even a day or two in some circumstances.  Try taking away their phones for even a few minutes and you'll very quickly grasp the legal concept of liquidated damages.

We've sweated blood on SAIL and Asterisk itself, bringing the packaging,  distribution and performance to a level where it can  safely be distributed to none-technical end-customers.  We won't compromise that with number series management or anything else which dilutes the underlying simplicity and purity of the mainline.

I'll get off me soap box now.

:-)

Best

WillKemp

SAIL - a couple of thoughts
« Reply #53 on: May 30, 2006, 11:59:37 AM »
Quote from: "selintra"
Heres the long answer  ;-)

Thanks for that.

I'm convinced! ;-)

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #54 on: May 30, 2006, 12:23:20 PM »
Sorry mate - I've stopped smoking and it's making me a bit aggressive.  There's blood up the walls here in the office, the wife's gone back to her mother's and the dog's gone missing.  I wouldn't mind, but I really miss the dog.

Best

WillKemp

SAIL - a couple of thoughts
« Reply #55 on: June 04, 2006, 03:47:03 AM »
Quote from: "WillKemp"

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.

Well, i finally got round to working out what it was in the configs that causes that problem. If you add the following lines to asterisk.conf in an otherwise unmodified sample /etc/asterisk , it happens:

Code: [Select]
[options]
verbose = 4       ; Verbosity level for logging (- v)


I've posted a bug report to bugs.digium.com .

WillKemp

SAIL - a couple of thoughts
« Reply #56 on: June 04, 2006, 11:58:04 PM »
The response to the Asterisk bug report:

Quote
This is known behavior.  I have brought it up to Mark before and he likes
it this way (using the verbose option implies not to fork).

To work around this issue, you can use alwaysfork=yes in the [options]
section of asterisk.conf, or start asterisk with the -F option.


It might be a good idea to include alwaysfork=yes in asterisk.conf in SAIL.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
SAIL - a couple of thoughts
« Reply #57 on: June 06, 2006, 07:24:22 AM »
Thanks Will

We have to rework the startups as part of "Cologne" so I'll look at it there.

Best

Jeff