Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: SARK devs on February 10, 2007, 07:01:22 PM

Title: SAIL -414
Post by: SARK devs on February 10, 2007, 07:01:22 PM
HI

We've put SAIL -414 up onto the download site.  

ftp://81.149.154.14/Pre-Releases/

There are two new features/fixes in this release...

It has an onboard facility to echo tune Digium analogue FXO circuits using fxotune.  Not only will it tune the circuits, it will also auto-load the coefficients at asterisk startup so there's nothing for you to do other than hit the button.   Go into PCI cards and stop the PBX.  If, and only if, SAIL detects any TDM cards on your system, then a new button marked "Echo Tune" will appear.  Er...  press it.  SAIL will run fxotune for you.  It takes four or five minutes to run so be patient.  When it finishes you will be shown a report of what occurred and the coefficients will be listed for you.

Exit the screen and restart the PBX.  Er... that's it.

414 also contains a fix involving a bug in custom apps.  You can now decide which cluster your Capp will be owned by/run for.

414 will ONLY install with smeserver-asterisk-1.2.10-2 so you will have to upgrade to that release.  You can get it at contribs here...

http://mirror.contribs.org/smeserver/contribs/selintra/RPMS/AsteriskForSail-2.1.13/None-ISDN/

Finally, if you are running ISDN then we've done a new set of rpms for you - watch for a post on this.

Regards

Selintra
Title: SAIL -414
Post by: sonoracomm on February 11, 2007, 06:40:41 AM
Hi Selintra,

Thanks again for a new version to test.  I appreciate it very much.

I just installed -414 on two Internet connected machines and did some testing.  One of the machines has a TDM04B (4 FXO) board.

Two questions/issues,

1) this must be a newbie question...what do I have to do to allow key-presses that are not actual IVR menu choices?  For example, I announce "if you know your party's extension, please dial it at any time".  I would like the caller to just be able to enter any valid extension.  Custom app?

2) the new Echo Tune button doesn't seem to work on my server - I get this:

Code: [Select]
Beginning echo tune - loading drivers...

Waiting for udev...
waited 0 seconds for udev
starting zaptel...
Waiting for udev (second phase)...
waited 0 seconds for udev(second phase)

starting tuner task...
Tuning module /dev/zap/1
Failure!
Tuning module /dev/zap/2
Failure!
Tuning module /dev/zap/3
Failure!
Tuning module /dev/zap/4
Done!


In this case, there are only three analog lines in the first three ports - port 4 is empty (disconnected).  Those three ports fail every time, even after a reboot.

Any ideas?

Thanks again,

G
Title: Re: SAIL -414
Post by: hervep on February 11, 2007, 08:33:20 AM
Quote from: "selintra"


...
414 will ONLY install with smeserver-asterisk-1.2.10-2 so you will have to upgrade to that release.  You can get it at contribs here...

http://mirror.contribs.org/smeserver/contribs/selintra/RPMS/AsteriskForSail-2.1.13/None-ISDN/
...



Hi Selintra,

Just wanted to mention that after upgrade from asterisk 1.2.10-1 to 1.2.10-2, the asterisk was not starting automatically after reboot ... .
After quick check, I saw the service symlink to be missing (S93asterisk ...).
I don't know why ... maybe something previously wrong at my side... ?
If somebody has the same issue : #/bin/ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S93asterisk

Kind regards,

Hervé
Title: SAIL -414
Post by: SARK devs on February 11, 2007, 10:09:48 AM
Hi Herve

Hope you are well.

I don't like the 0 second delays waiting for udev.  It should take a few seconds so I don't think the drivers are loading properly.  

You may want to try running fxotune manually to see what is happening on your machine.  Stop asterisk at the console with 'stop now' and do...

/home/selintra/fxotune -i 4

Let me know what you see.

I'm not sure why the symlink would go missing but I'll have it checked on a test server.

For the IVR - I need to check something on this and I'm not at the office at the moment.  I'll get back to you shortly.

Best

Jeff
Title: SAIL -414
Post by: SARK devs on February 11, 2007, 10:59:18 AM
Hi Herve,

I'm at the ofice now.  I just checked the IVR question.  For a default greeting which just asks for an extension number you can simply reference the greeting directly from the inbound route in the trunk.  You don't need to  create an IVR.    If you want to "mix" key presses and extension numbers you create a greeting that says something like ....  "press 1  for sales, press 2 for enquiries or, if you know the extension of the person you require, press *".

In the * entry on the IVR, reference another greeting which says something like "enter the extension you require".  SAIL will then allow a multi-digit extension to be entered.

Hope I've answered what you asked.

Best

Jeff
Title: SAIL -414
Post by: SARK devs on February 11, 2007, 11:40:15 AM
Hmmmmm

I just a fresh install of 414 on a test server here and this is my output...  (the card fitted to this particular machine is a 22B)

Code: [Select]
Beginning echo tune - loading drivers...


Waiting for udev...
waited 6 seconds for udev
starting zaptel...
Waiting for udev (second phase)...
waited 12 seconds for udev(second phase)

starting tuner task...
Tuning module /dev/zap/1
Failure!
Tuning module /dev/zap/2
Failure!
Tuning module /dev/zap/3
Done!
Tuning module /dev/zap/4
Done!
/dev/zap/5 absent: No such file or directory
/dev/zap/6 absent: No such file or directory
/dev/zap/7 absent: No such file or directory
/dev/zap/8 absent: No such file or directory
....


So it's working fine here.  The two failures are because of the two FXS channels - which is to be expected.

I have found a minor error in the subsequent load and I'll fix that today but I am intrigued as to why your tune isn't working.

Best

Jeff
Title: Re: SAIL -414
Post by: ldkeen on February 11, 2007, 11:47:54 AM
Hey Jeff,
This'll have to be quick - I have to go outside and finish my rain dance. Aussies are in deep trouble at the moment in the cricket.
Quote from: "selintra"
It has an onboard facility to echo tune Digium analogue FXO circuits using fxotune.

Seems to work OK although I don't know how to read the output:
Code: [Select]
Beginning echo tune - loading drivers...


Waiting for udev...
waited 0 seconds for udev
starting zaptel...
Waiting for udev (second phase)...
waited 0 seconds for udev(second phase)

starting tuner task...
/dev/zap/1 absent: No such device or address
/dev/zap/2 absent: No such device or address
Tuning module /dev/zap/3
Done!
Tuning module /dev/zap/4
Done!
/dev/zap/5 absent: No such file or directory
......
......
/dev/zap/252 absent: No such file or directory
fxotune: successfully set echo coeffecients on FXO modules
Stopping zaptel...
 
Unloading drivers
 
Output from the Echo tune follows...

3=0,0,0,0,0,0,0,0,0
4=0,0,0,0,0,0,0,0,0

Echo tune is complete


Quote from: "selintra"
also contains a fix involving a bug in custom apps. You can now decide which cluster your Capp will be owned by/run for

I can't see that? I've gone into Custom Apps - then create a new app and all I can see is Context Name, Description and Span (Internal, external, both or neither). Am I looking in the right place?

Quote from: "hervep"
Just wanted to mention that after upgrade from asterisk 1.2.10-1 to 1.2.10-2, the asterisk was not starting automatically after reboot ... .

I can also confirm that asterisk failed to start after upgrading smeserver-asterisk.
Thanks for the great work.
Lloyd
Title: SAIL -414
Post by: sonoracomm on February 11, 2007, 12:06:21 PM
Well, I think you are right about the udev issue...the devices are not listed in /dev/zap:
Code: [Select]
# ll /dev/zap/
total 0
crw-rw----  1 root root 196, 254 Feb 11 03:55 channel
crw-rw----  1 root root 196,   0 Feb 11 03:55 ctl
crw-rw----  1 root root 196, 255 Feb 11 03:55 pseudo
crw-rw----  1 root root 196, 253 Feb 11 03:55 timer

If I enter this command, it replies instantly:
Code: [Select]
# /home/selintra/fxotune -i -e 4
/dev/zap/1 absent: No such file or directory
/dev/zap/2 absent: No such file or directory
/dev/zap/3 absent: No such file or directory
/dev/zap/4 absent: No such file or directory
fxotune: successfully set echo coeffecients on FXO modules


If I start fxotune with the button in SAIL, I can see that the /dev/zap/1-4 are created properly.  And I see this in /var/log/messages:
Code: [Select]
Feb 11 04:07:04 linus kernel: ACPI: PCI interrupt 0000:04:08.0[A] -> GSI 17 (level, low) -> IRQ 225
Feb 11 04:07:06 linus kernel: Freshmaker version: 71
Feb 11 04:07:06 linus kernel: Freshmaker passed register test
Feb 11 04:07:06 linus kernel: Module 0: Installed -- AUTO FXO (FCC mode)
Feb 11 04:07:06 linus kernel: Module 1: Installed -- AUTO FXO (FCC mode)
Feb 11 04:07:06 linus kernel: Module 2: Installed -- AUTO FXO (FCC mode)
Feb 11 04:07:06 linus kernel: Module 3: Installed -- AUTO FXO (FCC mode)
Feb 11 04:07:06 linus kernel: Found a Wildcard TDM: Wildcard TDM400P REV E/F (4 modules)
Feb 11 04:07:06 linus kernel: Registered tone zone 0 (United States / North America)
Feb 11 04:07:06 linus kernel: Registered tone zone 0 (United States / North America)
Feb 11 04:07:12 linus kernel: -- Setting echo registers:
Feb 11 04:07:12 linus kernel: -- Set echo registers successfully
Feb 11 04:07:17 linus kernel: -- Setting echo registers:
Feb 11 04:07:17 linus kernel: -- Set echo registers successfully
Feb 11 04:07:17 linus kernel: -- Setting echo registers:
Feb 11 04:07:17 linus kernel: -- Set echo registers successfully
Feb 11 04:07:18 linus kernel: -- Setting echo registers:
Feb 11 04:07:18 linus kernel: -- Set echo registers successfully


The server has been working for about a week.  This server was fresh last weekend and has had little more than the previous versions of Asterisk/SAIL installed.

I'll play with the IVR/inbound tomorrow...4AM here...

Thanks much,

G
Title: SAIL -414
Post by: SARK devs on February 11, 2007, 12:36:12 PM
Hi guys,

I found two glitches - thanks a lot for the quick input from you all.

Also - Lloyd - did you have the card connected to the phone lines when you ran the test ?

Normally I wouldn't expect to see an output of zeros.

Also I'm assuming your card is an 02B which is why you got the failures on dev/zap/1 & 2 (which is OK).

Otherwise you guys look to be in good shape - the tune ran fine, which leaves the question of why Herve's didn't.

Lloyd - re your customApp fix,  the packager pulled the wrong version off SVN - he has been taken outside and given a sound beating.    

The cleaned up version for SAIL is 416 and it's already up on the server.  I will look into the missing symlink issue on asterisk and post another release to the mirrors shortly.

Thanks again to you all.

Best

Jeff
Title: SAIL -414
Post by: sonoracomm on February 11, 2007, 06:32:12 PM
To be more precise, I have a TDM04B (4 FXO ports) and I did this test:

I stopped Asterisk then immediately ran the fxotune command manually before any udev entries could fade:
Code: [Select]
linus*CLI> stop now
linus*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
[root@linus ~]# asterisk -vvvvvvvvvvvvvvvr
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
[root@linus ~]# /home/selintra/fxotune -i -e 4
Tuning module /dev/zap/1
Could not fill input buffer - got -1 bytes, expected 4000 bytes
Failure!
Tuning module /dev/zap/2
Could not fill input buffer - got -1 bytes, expected 4000 bytes
Failure!
Tuning module /dev/zap/3
Could not fill input buffer - got -1 bytes, expected 4000 bytes
Failure!
Tuning module /dev/zap/4
Done!
Unable to tune 3 devices, even though those devices are present

There are 3 analog lines connected to the first 3 ports which fail.  The 4th port is disconnected.

BTW, when I run the Echo Tune with the button, it does take a good while to output this:
Code: [Select]
Waiting for udev...
waited 0 seconds for udev
starting zaptel...
Waiting for udev (second phase)...
waited 0 seconds for udev(second phase)

starting tuner task...
Tuning module /dev/zap/1
Failure!
Tuning module /dev/zap/2
Failure!
Tuning module /dev/zap/3
Failure!
Tuning module /dev/zap/4
Done!


I'll be going into the office later where I can be at the console.  I'm gonna see what I can do about shared interrupts...

G
Title: SAIL -414
Post by: SARK devs on February 11, 2007, 07:18:40 PM
hi

I googled this....

Quote

"I finally isolated the problem, hope it works for you too. The default -m
(silencegoodfor) default of 18 seconds is too long for my telco and the test is getting interrupted. I listened in on the line with a splitter and realized what was happening. I had to set -m down to 15 seconds in my case and it works. "


You can find the full thread here...

http://www.mail-archive.com/asterisk-users@lists.digium.com/msg170601.html

Maybe your Telco is like this one??

Sugest you break the dialtone and see how long it takes before the Telco puts something onto the line...

I can always put a switch-list field into the panel to handle different Telco requirements.  

Best

Selintra
Title: SAIL -414
Post by: sonoracomm on February 11, 2007, 07:22:01 PM
I had found this myself Googling...I'll try it when I get into the office.

Thanks very much,

G
Title: SAIL -414
Post by: sonoracomm on February 12, 2007, 01:45:12 AM
I put an analog phone on the line, pressed '5' and counted 14 seconds before the phone company complained.  So I ran this command at the console which limited the tests to 12 seconds:

fxotune -i 5 -m 12 -e 4

and it worked properly.

G
Title: SAIL -414
Post by: SARK devs on February 12, 2007, 08:16:56 AM
perfect....

I'll add parameters to the panel for m and the linebreak code.

Thanks for helping test this.

Kind Regards

J
Title: SAIL -414
Post by: ldkeen on February 12, 2007, 11:45:33 AM
Quote from: "selintra"
Also - Lloyd - did you have the card connected to the phone lines when you ran the test ?

No, I'll retry with the line in and see how it goes.
Quote from: "selintra"
Also I'm assuming your card is an 02B which is why you got the failures on dev/zap/1 & 2 (which is OK).

Yep that's correct.
Quote
Lloyd - re your customApp fix,  the packager pulled the wrong version off SVN - he has been taken outside and given a sound beating.
   
Well the beating seemed to fix the problem, it's working like a dream now.
Thanks heaps
Lloyd
Title: SAIL -414
Post by: Franco on February 12, 2007, 04:44:57 PM
A couple of things:
Quote from: "selintra"

I'm not sure why the symlink would go missing but I'll have it checked on a test server.


I can confirm that as well, Hervé's suggestion fixes it.
----------
Is the fxotune feature  only available to the TDM cards? I have a X100P clone that I would love to eliminate the echo :)
----------
I had once again to do:
Code: [Select]
[root@sme ~]# chmod 755 /home/QoS/qos
[root@sme ~]# /etc/init.d/qosd start
Starting QoS:                                              [  OK  ]

----------
Quote
N.B. You will be prevented from modifying any of the SAIL-"managed" files (the "SAVE" button will not be displayed). They can only be changed by changing various settings within SAIL itself.

There are a lot of things I had modified on the General Edit Menu that did not come with the upgrade, and now I cannot change them anymore? Volume on the zaptel cards, voicemail instructions and the fromto are just a few.
---------
Is it possible NOT to use a Pre Select two digit code when dialing through an analog line?
Title: SAIL -414
Post by: sonoracomm on February 12, 2007, 05:56:41 PM
I began looking into QoS this last weekend and I was having trouble seeing it work.  Now I know why.    ;-)

I too had to run the commands listed above to make it work.  I used
Code: [Select]
/etc/init.d/qosd status
before and after running the commands to see what changed.

Now I need to do some testing...

Comments from a newbie concerning QoS:

The QoS Server-Manager panel seems like voodoo.  There might be more explanatory text to help the uninitiated.

A testing regimen (example) would be nice too.

Again, thanks so much for all your work and help,

G
Title: SAIL -414
Post by: gippsweb on February 13, 2007, 03:37:11 AM
I have been using the SAIL Qos for a couple of months and it seemed to be doing the job quite well until late Dec when we changed from 1500/256 to 8000/384.
I left the settings as they were but call quality has dropped of dramatically.
I've been playing around with the figures, but as mentioned by Sonoracomm, the qos panel is a tad vague. we can't seem to find a happy medium so I have it disabled at the moment and only run any large downloads overnight when noone is here.
Title: SAIL -414
Post by: sonoracomm on February 13, 2007, 04:38:38 AM
It sounds like you went from DSL to cable?

At least around here, DSL offers much better all-around performance than cable.  DSL is often a MUCH more direct connection to the ISP than cable and may offer much better routing and more controlled latency...if not the fastest downloads.  As long as you aren't more than about 15K feet from the CO...

With cable, you are most certainly sharing the connection to the head-end with a few thousand of your closest neighbors.

I have customers with remote IP phones that report problems over cable that I haven't seen with DSL connections (sorry, not SME/SAIL YET! But I'm working on it...)

G
Title: SAIL -414
Post by: Tib on February 13, 2007, 05:15:23 AM
A lot of providers here in Ausi land are going to 8000/384 on the ADSL instead of ADLS2.

I'm switching to 8000/384 in 2 weeks as well ... I'll see what happens.

Although I don't use the QOS that comes with sail ... I use wondershaper.


Regards,

Tib
Title: SAIL -414
Post by: hervep on February 13, 2007, 06:33:43 AM
Quote from: "stuntshell"
Is it possible NOT to use a Pre Select two digit code when dialing through an analog line?


Maybe I do not understand your question as I should, but why don't you use a route instead of ( or in addition with ) your trunk pre-select ... ?
In my case ( Belgium ) the common access code for 'outside' is '0'. As a result, just made a route to my analog provider trunk (X100P) using '_0.'.
Just means 'send everything that begins with 0 to that provider trunk, regardless of what follows'. In this particular case, it works a little bit as a 1 digit 'pre-select'.

Kind regards,

Hervé
Title: SAIL -414
Post by: hervep on February 13, 2007, 07:23:26 AM
Quote from: "sonoracomm"
I began looking into QoS this last weekend and I was having trouble seeing it work.  Now I know why.    ;-)

I too had to run the commands listed above to make it work.  I used
Code: [Select]
/etc/init.d/qosd status
before and after running the commands to see what changed.

Now I need to do some testing...

Comments from a newbie concerning QoS:

The QoS Server-Manager panel seems like voodoo.  There might be more explanatory text to help the uninitiated.

A testing regimen (example) would be nice too.

Again, thanks so much for all your work and help,

G


Don't forget that 'QOS' concept is much more complicated that what we can do onto SME/SAIL. Real QOS concept should be end to end, it means that your provider should be aware of the QOS level you want. This is currently (most of the time) not possible, certainly in combination with 'low-cost' internet access. The only thing you do by setting up 'QOS' onto SME is to avoid somebody on YOUR network to take 'full' bandwith to the internet. Conceptually, it is more efficient on 'DSL' connections, just because you can more or less control your traffic to the first 'router-concentrator' of your provider. after that 'router', the quality you will have is very unsure. In case of cable connection, this is always unsure, just because your neighbour is using the same pipe to the first 'router' without being aware of your QOS concerns.
Based on those facts, the only thing you can do is to tell your 'SME' you would like to be sure that some part of your global internet bandwidth is reserved for 'Voip'. The panel offers you the possibility to tell which part in both directions.

There are other ways to try to improve the voip 'audio' quality (I.E. MTU size, codec choice & payload ... ), but ideal situation remains to fully control the bantwidth, jitter, latency end to end = 'real QOS'.

Hope this can help ...

Kind regards,

Hervé
Title: SAIL -414
Post by: SARK devs on February 13, 2007, 06:09:42 PM
Wow - you guys have been busy!

Let's see....

Stuntshell - General Edit panel.  This panel was thrown together quickly to allow edit of those files which SARK/SAIL doesn't touch.  However, the "headers" panel still exists for those files that we "share" with you.

Sonoracomm - fxotune -m parameter. I have updated the fxotune panel to allow you to input your own parameters - but this is a bit dangerous since we will execute whatever you put so I want to do a little more work on it.  In the meantime, if you want to change your version of SAIL to issue -m 14 then open file /etc/e-smith/web/functions/sarkPCI and search for "fxotune".  Simply change the command string in the Perl script and save it back.

Everyone - asterisk doesn't start automatically.  We have tracked this down to the rpm and the strange way in which rpms work during update and there isn't an easy way to fix it.   Without going into the detail, if you issue an rpm -Uvh to update smeserver-asterisk, you will lose the start-up  link.  To avoid this from happening;  first remove the old rpm with rpm -e and then add the new one with rpm -Uvh.

Everyone - QOS Settings.  Yes QOS is a bit voodoo.  SAIL is using a version of Wondershaper called HBC Wondershaper.  It responds to the TOS (type of service) bits we set in sip.conf and iax.conf to prioritise VoIP traffic outbound and inbound.  However, Herve's description is absolutely correct - we can only control traffic within the scope of the SME box.  Once it leaves us we are in the lap of the Gods.  This is why you should look for a high uplift line with LOW contention and also consider using a terminator rather than a VoIP carrier.  Here for testing we run an 8000/440 ADSL2 circuit at 1:5 and a 2000/256 ADSL circuit at 1:20.  We do not run cable because the uplift here is very poor.

re QOS settings - you can see the docs here

 http://81.149.154.14/docs/cgi-bin/view/Main/DocChapter19

Basically you should throttle your uplift at about 75% and your download at 90-95%.  However, you can play around with these numbers to see what works best for you.  Set a big upload away (or maybe send a massive e-mail)  while using the phone and see what the effect is.  If you are getting jitter then you should throttle back a bit, if not then you can ease the throttle forward until you get jitter and then back off.  Don't run the test with IAX and the iax jitter buffer running (Doh!).
Title: SAIL -414
Post by: SARK devs on February 15, 2007, 08:29:43 PM
Hi Guys,

We've just released -418 up to the ftp site.  It has an improved fxotune algorithm and you can specify the line break character and the -m value at run time.  Also we've added an Early/Late terminate switch to Globals...  Back sometime in the -300 releases, we implemented a late terminate algorithm (some of you were asking to take the call later in order to minimise call costs to the caller).  Well it seems we did a good job...  a little too good.  As a result, for inbound mobile calls on ISDN lines, we terminate the call so late and so fast that the mobile network can't keep up and it can lose the first half second or so of the opening conversation.  So we've now had a request from one of our customers to put a delay in.  :-)


So...  For TDM lines you can elect to have an early or late termination.


Kind Regards

Selintra
Title: SAIL -414
Post by: Franco on February 15, 2007, 09:36:14 PM
How should we upgrade?

Many thanks,
Title: SAIL -414
Post by: SARK devs on February 15, 2007, 10:47:20 PM
Hi Stuntshell,

Quote
How should we upgrade?


Any way you like :-).  

The issue with symlinks (covered above) is an smeserver-asterisk problem, not a SAIL problem.  You can rpm -Uvh or yum localinstall, your SAIL rpms.  We would recommend the following...

yum localinstall selintra-sail-2.1.14-418.noarch --enablerepo=base

This will also load any dependent modules you may be missing; for example, the latest versions of 2.1.14 require nmap to do their network sniffing.


Kind Regards

Selintra
Title: SAIL -414
Post by: hervep on February 16, 2007, 08:13:18 AM
Quote from: "selintra"
Hi Guys,

We've just released -418 up to the ftp site. Selintra


Hi Selintra,

Just updated my miniitx test machine.
Maybe something wrong at my side, but 'custom app' does not seems to work anymore. Previous version I used (-414), was OK.

I see [system] to be included into [default] context.
Should be included into [internal] ... not ?

Code: [Select]

;extensions.conf

....

[internal]

include => parkedcalls
include => internal-presets
include => extensions
include => conferences

exten => _X.,1,agi(selintra,OutCluster,${EXTEN})

[default]

include => parkedcalls
include => internal-presets
include => extensions
include => conferences
include => system
exten => _0.,1,agi(selintra,OutRoute,Belgacom)
exten => _2.,1,agi(selintra,OutRoute,Main server)
exten => _5.,1,agi(selintra,OutRoute,Main server)
exten => _4.,1,agi(selintra,OutRoute,Main server)
exten => _6.,1,agi(selintra,OutRoute,Main server)

exten => t,1,Hangup

exten => h,1,Hangup

exten => i,1,Background(invalid)
exten => i,2,Hangup


....

;
;#####################################################################
;
; Customer Supplied Contexts below this line (if any).
;
;#####################################################################
;

;
; Customer Supplied Context system
;
[system]
; just a test

exten => *999*,1,Wait(1)
exten => *999*,2,System(/usr/sbin/asterisk -rx 'reload')
exten => *999*,3,Hangup;


Kind regards, and many thanks for your work :-)

Hervé
Title: SAIL -414
Post by: SARK devs on February 16, 2007, 12:25:35 PM
Hi Herve,

Thanks for this.  I will look at this later today.

Best

Jeff
Title: SAIL -414
Post by: SARK devs on February 16, 2007, 05:43:37 PM
Hi Herve,

The reason this doesn't run is that it is preceeded with an *; -

*nnnn numbers are reserved for SAIL functions.  If you use a regular 3 or 4 digit number, it will work fine.

Best

Selintra
Title: SAIL -414
Post by: sonoracomm on February 16, 2007, 07:04:44 PM
Maybe I missed something...I usually do...

The Admin Guide, Chapter 16 page 1 suggests we use *nnn* (three digits) for custom presets.

G

Respectfully,

G
Title: SAIL -414
Post by: SARK devs on February 16, 2007, 07:26:17 PM
Oops - thanks for spotting this!

Yes - you are quite correct - it does.  Sam made an edict sometime around -360 that we wouldn't allow *number* in user code in case we introduce a new preset that conflicts with something you guys have done on your own sites.  It should have been changed in the Wiki and never was.

We could still allow it if it is going to cause you guys problems - it's not a huge change.  We would prefer not to but this is a democratic product and the input from you all has been invaluable so let me know what you think and we'll decide over the weekend.  What we would like to recommend is that you use a regular 1,2, or 3 digit number for your custom presets.

Apologies to everyone - we don't always get it right; SAIL is a big old beast now and even we sometijmes forget how it's supposed to work!

 :oops:
Title: SAIL -414
Post by: hervep on February 17, 2007, 08:07:48 AM
Quote from: "selintra"
Oops - thanks for spotting this!

Yes - you are quite correct - it does.  Sam made an edict sometime around -360 that we wouldn't allow *number* in user code in case we introduce a new preset that conflicts with something you guys have done on your own sites.  It should have been changed in the Wiki and never was.

We could still allow it if it is going to cause you guys problems - it's not a huge change.  We would prefer not to but this is a democratic product and the input from you all has been invaluable so let me know what you think and we'll decide over the weekend.  What we would like to recommend is that you use a regular 1,2, or 3 digit number for your custom presets.

Apologies to everyone - we don't always get it right; SAIL is a big old beast now and even we sometijmes forget how it's supposed to work!

 :oops:


... No problem at all :-)

To answer to the question, arround possible choices, I would suggest to
fix some prefix to be used with custom-apps, without limiting the amount of digits that follows.

Why ... just because it is (to my opinion ) a good way to 'hide' some function to the user.

Practical example : currently, I have a cust app (*998*) that sends a report/backup of the system to a predefined mail address. Goal is to facilitate 'helpdesk' action in case of question/issue of one of my friends using Sail. Imagine the same situation with some 'customer' ... Might be interresting to 'hide' the code, using enough complexity ( i.e. ***123456789# ) for the common user. Only the system manager should be aware of it.

Code: [Select]
#!/bin/sh

# *remobackup*.sh
# Generates a 'backup' of sail configuration.
# Report is sent by mail ( MAY CONTAIN PRIVATE/CONFIDENTIAL DATA )

# You can enable the script by adding some 'SAIL' custom application like :
# ; script that sends config data of Mr Bean ... assuming script *remobackup*.sh into /etc/asterisk-scripts.
# exten => *998*,x,System(/etc/asterisk-scripts/*remobackup*.sh)


# config
mailaddress="tomailadd@somewhere.net"
servername="Mr Bean"
# end config

# let's compress needed stuffs ... you can add what you want/need.
/bin/tar -czf  /tmp/configuration.tgz /etc/asterisk/*
/bin/tar -czf  /tmp/selintra-work.tgz /home/e-smith/db/selintra-work

# Send everything via mail to the address specified in 'mailaddress'
echo "Asterisk configuration files from "$servername" attached" | mutt -s "Asterisk "$servername" backup and config files" -a /tmp/configuration.tgz -a /tmp/selintra-work.tgz $mailaddress

# remove the temporary files
rm /tmp/configuration.tgz
rm /tmp/selintra-work.tgz

# end script


Another possible purpose is to simulate some 'access code/pin code' giving an external line to some users on sets that are not supposed to call to the outside.  I did'n tryied this yet, but quite sure it is possible. Again, this code has to be seen as 'secret' code, with enough complexity, for common users.

Just for your info : *xxx* cust_app access works perfectly using Sail -414.

Kind regards and many thanks !.

Hervé
Title: SAIL -414
Post by: SARK devs on February 17, 2007, 11:18:04 AM
Hi Herve

OK -- we'll go with that (which saves us changing the docs...).  I'll revert to the -414 generator fragments.  These will allow *NNN* or simple numbers for your presets.

I'll run some tests this afternoon and you can probably have it this evening.

btw - I really like your idea of sending e-mail reports as a result of a key press at the phone.  It would be a really nice feature (and not hard to do if anyone would like to volunteer) to send people a formatted list of their day's calls "on demand".   The e-mail address associated with the phone is at...

either (old-style)

 db_get_prop(\%selintra, {phone-extension}, 'vmail')

or (object)

 $DB->get_prop({phone-extension}, 'vmail')

CDR's are in /var/log/astrisk/cdr-csv/Master.csv

Just grep the rows we need and off we go...

too cool for school!

:-)

J
Title: SAIL -414
Post by: SARK devs on February 17, 2007, 12:50:31 PM
There you go....

I've just put -419 up.  It should handle your *999* feature codes correctly.

Best

J
Title: SAIL -414
Post by: hervep on February 17, 2007, 01:20:44 PM
Hi Selintra :-)

... Nothing urgent ! Take your time ... even in the UK it should be weekend ;-)

I had the same idea arround giving 'tools' to the user to modify/see own data. Sending emails 'on-demand' with cdr reporting sounds good to me.

First idea I had was to make some basic PHP portal, giving each user the ability to change/see 'own' settings :

- See own cdr ( based on pre-tests V3 Sail only - Mysql )
- Modify Follow-me conditions, nr's ...
- Modify personal data ( Name , email address, all kind of stuff like that ... ).

A very very first test arround cdr ( MYSQL ONLY ) I made was the following ( V3 ONLY ):

( Just drop cdr.php into primary html, edit $callfrom as needed ...)

Code: [Select]
<html>
<head>
<title>QUICK CDR View</title>
</head>
<body bgcolor="white">
<?php
/*
require_once&#40;"config.php"&#41;;
*/
$callfrom '5000';
$database mysql_connect&#40;"localhost", "asterisk", "aster1sk"&#41;;
mysql_select_db&#40;"asterisk"&#41;;
$query "SELECT calldate,clid,dst,duration,disposition FROM cdr WHERE clid =\"$callfrom\" ORDER BY calldate DESC LIMIT 20";
$result mysql_query&#40;$query&#41;;
echo "<a href=\"cdr.php\">Click here</a> to refresh";
echo 
"<br><br>";
echo 
"<table border=\"0\">";
echo 
"<td bgcolor=\"#FFFFAA\">DATE    TIME<td bgcolor=\"#FFFFAA\">CALLER<td bgcolor=\"#FFFFAA\">CALLED<td bgcolor=\"#FFFFAA\">DURATION<td bgcolor=\"#FFFFAA\">STATUS</td>";
$j true;
while &
#40;$row = mysql_fetch_row&#40;$result&#41;&#41; &#123;
    
if &#40;$j&#41;
        
$j false;
    else
        
$j true;
    echo 
"<tr>";
    for &
#40;$i = 0;$i < mysql_num_fields&#40;$result&#41;;$i++&#41; &#123;
        
if &#40;$j&#41; &#123;
            
echo "<td bgcolor=\"#FFFFBB\">";
        &
#125;
        
if &#40;!$j&#41; &#123;
            
echo "<td bgcolor=\"#FFFFCC\">";
        &
#125;
        
echo $row[$i&#93;;
        
echo "</td>";
    &
#125;
&#125;
echo "</table>";
mysql_close&#40;$database&#41;;

?>

</body>
</html>


Best,

Hervé
Title: SAIL -414
Post by: hervep on February 17, 2007, 01:31:55 PM
Quote from: "selintra"
There you go....

I've just put -419 up.  It should handle your *999* feature codes correctly.

Best

J


It works :-)

Many thanks & good weekend !

Hervé
Title: SAIL -414
Post by: SARK devs on February 17, 2007, 01:32:00 PM
HI Herve

This is really cool.  I also had been thinking that we need a  "user" portal to provide a simple "do stuff for yourself" interface that an end-user could handle without getting into trouble.

I looked at Ruby-on-rails but discounted it;  at the moment I am considering Maypole/Catalyst because it/they are easier to fit, Perl based and follow the MVC model which seems to be enjoying something of a revival at the moment.

The other option would be to go php but I'm not sure how much it gives us over Perl in the real world.

Thoughts?  Ideas?

Best

J
Title: SAIL -414
Post by: hervep on February 18, 2007, 06:36:54 AM
Quote from: "selintra"
HI Herve

This is really cool.  I also had been thinking that we need a  "user" portal to provide a simple "do stuff for yourself" interface that an end-user could handle without getting into trouble.

I looked at Ruby-on-rails but discounted it;  at the moment I am considering Maypole/Catalyst because it/they are easier to fit, Perl based and follow the MVC model which seems to be enjoying something of a revival at the moment.

The other option would be to go php but I'm not sure how much it gives us over Perl in the real world.

Thoughts?  Ideas?

Best

J


The 'user portal' technology involved is -to my opinion- not the major concern. My idea to do some 'user portal' using php is just because of personal skills.

If I take a look onto the system as it is know, putting my mind in 'professional mode on' instead of ' hobby mode on ' I would prioritise things as follow ( just my input, nothing more than that ! ) :

1) Ability to select amount of digits (2,3,4) for internal range.
This is a major concern for peoples who want to replace some existing PBX. They want to re-use the same internal range.

2) Creation of some integration API layer.
It is almost impossible to have a standard product offering all expectations of customers all over the world. This step makes also easier additional features as the 'user portal', or any specific integration wanted.
The way I would go ( considering what you already did ) is 'mysql'.

==> 'Easy' to import existing customer data (extensions, names, mail, voicemail, passwords, type of set ... based on single csv file )
==> 'Easy' to make customised backup & ready stand-by systems.
==> 'Easy' to make monitoring/alarming tools reading asterisk status based on config 'queries'.
==> 'Easy' odbc 'windows' capabilities for peoples still wanting to use Gates machine.
==> etc ...

My personal feeling is that Sail V3 is the first step to go... .

Just my € cent ;-)

Best,

Hervé
Title: SAIL -414
Post by: SARK devs on February 18, 2007, 09:45:21 AM
Hi Herve

Thanks for this.

Funnily enough, number length has not been a problem in the field.  This is because we can replicate whatever they want using aliases.  So if, for example, a customer previously had three digit numbers starting at say extn 201 (very common for some reason), we allocate numbers 5201, 5202 etc, each with an alias;  201, 202 and so on.  This seems to work very well.  What is more of a problem is SAIL's lack of "soft" feature codes allowing us to mimic whatever they had before for call forwards/dnds etc. This is something we will do in the fairly near future.

For your other observations, we agree totally and they (and SER integration) are what drove the V3 initiative.

By the way, I know you've been testing V3 for some time Herve, but for anyone else who's interested - V3 Alpha is now available on our download site.  We'll put some installation instructions up onto the Wiki but it's pretty much standard rpm stuff and you can install it directly over the top of V2.x.
Title: SAIL -414
Post by: hervep on February 18, 2007, 01:41:32 PM
Quote from: "selintra"
Funnily enough, number length has not been a problem in the field.  This is because we can replicate whatever they want using aliases.  So if, for example, a customer previously had three digit numbers starting at say extn 201 (very common for some reason), we allocate numbers 5201, 5202 etc, each with an alias;  201, 202 and so on.  This seems to work very well.


It is also the way I did it in my 'customer simulation' at home. It is certainly a good way to cover 2 & 3 digits ranges in a single unit.
It becomes a little bit more complicated in case of trunked multi-unit systems ( possible closed Nr sheme conflict with ddi ranges ... )

To make this bypass user friendly, maybe some additional process that creates aliases automatically would be nice.

IE : General settings : Auto alias button giving 2,3,4 digits as choice, 4 digits meaning in fact 'no alias'.
When creating an extension, extension & alias created.

Quote
 What is more of a problem is SAIL's lack of "soft" feature codes allowing us to mimic whatever they had before for call forwards/dnds etc. This is something we will do in the fairly near future.


I agree with that, but does it always make sense to copy (all) features of outdated pbx's ? . Some features are important, other may be solved by new thinkings. User panel is a way to improve things, IVR automation also.

- User is at the office or has access to his network ==> User panel.
- User is 'outside' ==> IVR programming.

  IVR example : > give your personal ID code ...
                        (123456789)
                        > Morning Mister Selintra,
                        - 1 Extension relation modification
                        - 2 Personal announcement
                        - 3 Voice mail
                        - 4 Presence status
                        - 5 ...
                        (1) Was chosen
                        > Which extension do you want to update
                        (5000) Was given
                        - 1 for CFNR
                        - 2 for CFDA
                        - 3 for CFBE
                        - 4 for DND

                         ... and so on.

- Sets offering 'browser' or 'xml' stuffs may also be use as recommended terminal for some paticular needs ...

 Internal/external name directory 'browsing' is a good example.

Quote
V3 Alpha is now available on our download site.  We'll put some installation instructions up onto the Wiki but it's pretty much standard rpm stuff and you can install it directly over the top of V2.x.


... hmmm where exactly ? not in 'pre-releases' ...

Thanks for all the things you are doing !

Best,

Hervé
Title: SAIL -414
Post by: SARK devs on February 18, 2007, 04:30:15 PM
Thanks Herve,

These are really cool ideas (which we will unashamedly steal for SAIL - :-) ) - thank you very much for sharing them with us.

Look in Rev3 for latest V3.0 release.

Best

J
Title: SAIL -414
Post by: SARK devs on February 21, 2007, 11:19:09 PM
Hi all

We've put some of Herve's ideas into selintra-sail-2.1.14-425.noarch.rpm which you can get from the usual place.

ftp://81.149.154.14/Pre-Releases

There is one new entry in globals...  an administrator email address (you need to fill it out for some of this stuff to work).  There are three new feature codes you can run from your phone...

*901* will create a backup of the SAIL data and e-mail it to the administrator address (see above)
*902* will reload asterisk
*903* will email a report of the day's CDR's for the extension at which you enter the feature code.  It will be mailed to the email address defined in the extension or, if there isn't one, to the administrator address.  It could do with cleaning up a bit but it's OK for a first attempt.

We might do a few more depending upon how the mood takes us.  


Kind Regards

Selintra
Title: SAIL -414
Post by: sonoracomm on February 22, 2007, 06:00:24 AM
Looking good.  I upgraded one server without issue.

The new tools are interesting and worked as advertised.  I could see this little collection of utilities growing...

I may try to tweak the CDR report when I get some free time... ;-)

Thanks much,

G
Title: SAIL -414
Post by: SARK devs on February 22, 2007, 07:19:32 AM
Quote
I may try to tweak the CDR report when I get some free time...


Please do...

It could have weekly & monthy views, a password protected version so that a supervisor can decide which extension to view, a global view which sends  "all calls" reports to the supervisor.  

The perl code isn't complex and the CDR's are easy enough to grep.

Have fun

Best

selintra
Title: SAIL -414
Post by: psoren on February 22, 2007, 11:12:35 AM
Quote from: "selintra"


*901* will create a backup of the SAIL data and e-mail it to the administrator address (see above)
*902* will reload asterisk
*903* will email a report of the day's CDR's for the extension at which you enter the feature code.


This works well. Maybe it's worth to mention that one might have to add to dial plans to make it work.
In my Sipura i now have: (*x.|*xx*x.|x.|*90[123]*) (Other suggestions?)

Quote from: "selintra"
We might do a few more depending upon how the mood takes us.


YES!! Give us more......


Per