Koozali.org: home of the SME Server

Server time, no sound with calls with external ext. and CDR

Offline tias

  • *
  • 11
  • +0/-0
Hi, got three problems with my installation of Asterisk and SAIL.

Probably because something I did wrong when I installed the system. But at current time I'm not aware of what I've done and not done.

The following packets are installed within my system:
smeserver-asterisk-1.4.8-1
smeserver-asterisk-zappri-MPP-1.4.4-2
sail-2.2.1-618

All packets have been installed through YUM localinstall.

The server is up running but got 3 different problems.

1. The time seems to be wrong. The computer time isn't the same time that Asterisk record with the calls. (dialed *903* from an extension to see the days log)

2. When an external extension is connected no sound is transfered during the call. The call can initiated from both sides.
I believe is a port problem. But have forwarded the ports 5060 and 10 000-20 000 to my server, both UDP and TCP. So I'm out of ideas.

3. Activated CDR to mysql from the global page, but no records is logged. The table exists.

Executed module show like cdr, in CLI of asterisk. But no CDR and mysql is listed. Other modules but none which reminds me of mysql. Saw this advice in another thread, but can't just figure out what I shall do to have it working.


Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Server time, no sound with calls with external ext. and CDR
« Reply #1 on: May 01, 2008, 08:42:31 PM »
Quote
The time seems to be wrong.

Does the computer have the correct time?  Look in "date and time" in the server-manager

Quote
When an external extension is connected no sound is transfered

Have you ticked the "remote" box in the extension definition?

Quote
Executed module show like cdr, in CLI of asterisk. But no CDR and mysql is listed

You have not installed the asterisk-addons rpm

As an aside. you would be better to install the ATrpms asterisk with sail-618.   See the installation Quick-notes at ww.selintra.com/docs.  The smeserver-asterisk 1.4 stuff is well out of date now.

Kind Regards

S


Offline tias

  • *
  • 11
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #2 on: May 05, 2008, 01:09:20 AM »
Removed my installation with yum erase and then installed the new rpm from the ATrpms. Haven't got time testing external extensions but tried a little with the CDR. With no success. When I dial *903* no phone calls are listed. And the mysql table doesn't get any info recorded :-( CDR and mysql is activated in the global config.

Any suggestions?

Another question, which isn't connected to the earlier questions is this one.

Tried to make a custom apps but haven't got it working :-(. I've downloaded a bash script that makes a number lookup with an internet service. The script could be run from terminal with: ./hitta.sh NUMBER

the script then outputs: SET CALLERID "NAME <NUMBER>"

The customapps should launch the above and then set a new callid and forward the call to an alias 7000.

Offline bbialy

  • ****
  • 105
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #3 on: May 05, 2008, 08:52:35 AM »
Hi tias,
I can't see if you have instaled zaptel-kmdl-`uname -r`

It can help.

on the other hand are you sure that you have made PCI probe for timing propose.
if you don't have any pci card then you should use ztdummy
remeber that you have to do modprobe

few times ago i had simmiliar problem with cdrs.

please also set any ntp server in time and date panel.
Maciej
Reading with understanding is the hardest thing IN THE WORLD

Offline bbialy

  • ****
  • 105
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #4 on: May 05, 2008, 08:58:24 AM »
script
show me the script please
it is possible that your script is good but selintra.agi doesn't execute becouse of some conditions.
for example default route.

look into my post according to call record i had the sameproblem that my customm app is good but not executed by selintra.agi

for example could you give some asterisk console log.
in bash
asterisk -r
core set verbose 4
                   (make one call)
copy it into forum.
i try to help
Reading with understanding is the hardest thing IN THE WORLD

Offline tias

  • *
  • 11
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #5 on: May 05, 2008, 04:28:11 PM »
I can't see if you have instaled zaptel-kmdl-`uname -r`
Yes I got that package installed:
zaptel-kmdl-2.6.9-67.0.7.EL-1.4.10-50.el4

Made a probe and nothing changed other that *903* works, but the time is 2 hours wrong. 14.30 instead of 16.30.

---

According to the script, the main question is how to execute the script from a custom app and then return the result to the alias 7000. The help I need is how to write the custom app :P Yet to little knowledge about asterisk scripting.


Offline bbialy

  • ****
  • 105
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #6 on: May 06, 2008, 10:36:03 AM »
Hmmm...
tell me what device is used for timing? PCI Card or ztdummy
what is your time zone?

about script there are some commands to to "navigate" over extension.conf or maybe you need to write agi script and the return to main extension.
please email bialy@suento.pl me the script, exetensions.conf, alias configuration, trunkline and routes i is very important what is your dial plan
[i will cut&paste what is realy needed and post it into forum for others; after testing of course   :-P]

if you are sure tha your script is correct you can try copy&paste into extensions.conf and then in asterisk console make extensions reload.
it is very hard to say without any details.
Reading with understanding is the hardest thing IN THE WORLD

Offline tias

  • *
  • 11
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #7 on: May 06, 2008, 03:28:49 PM »
Hmmm...
tell me what device is used for timing? PCI Card or ztdummy
what is your time zone?

I'm using ztdummy and my time zone is GMT+2 (Europe/Stockholm) The record time within the Mysql database CDR is correct but not the result I get when I dial *903*. Probably because Mysql uses the time from the system it self, and *903* uses another time. Got my CDR working with Mysql, so some problem is solved :-)

About the scripting, I believe that I have to write a script in asterisk to handle the external script, so the server knows how to do. (though it could be entered in custom_apps menu from server-manager/SAIL). Then changing the trunk to forward new calls to the custom_apps that does the job for extracting the number, setting the SENDER and then forward all to the alias 7000. Or am I wrong?

Not used to handle the conf files, rather use the GUI for that. The only script I got so far is the bash script that I have to make Asterisk run and also feed it with the string of the incoming phone number.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Server time, no sound with calls with external ext. and CDR
« Reply #8 on: May 06, 2008, 07:48:28 PM »
There is an example of how to call a bash script in the included SAIL utilities in custom apps.

Code: [Select]
;
; send ALL daily CDRs to site administrator
;
exten => *904*,1,PlayBack(silence/1)
exten => *904*,2,Authenticate(3333)
exten => *904*,3,system(/etc/selintra/daycall)
exten => *904*,4,GoTo(utilend,1)

The bash call is done at *904* priority 3.

Kind Regards

S



Offline tias

  • *
  • 11
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #9 on: May 06, 2008, 11:28:50 PM »
Read from another forum that the script could be launched with the following:

exten => 100,1,AGI(hitta.sh|${CALLERID(number)})
exten => 100,2,Dial(${GATEWAY})
exten => 100,3,Hangup

There 100 is the internal number called for external calls. The part with 100 I never understood, if it will by my trunknumber or an alias or a working extension.

Any thoughts?

Also found that Sail doesn't allow | in custom apps field, everything after | is wiped out when I save. A bug in sail?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Server time, no sound with calls with external ext. and CDR
« Reply #10 on: May 07, 2008, 05:50:13 AM »
Quote
Read from another forum that the script could be launched with the following:

You really need to contact the authors of this script you wish to run in order to understand what it requires.  There is a fair bit of potential difference between an ordinary bash script and an AGI routine, particularly in the way that parameters are passed.  They should also be able to advise you how it should be run.

Quote
Also found that Sail doesn't allow | in custom apps field, everything after | is wiped out when I save. A bug in sail?

Kind of.  SAIL won't process strings with the pipe character (|) in them.  This is due to a limitation in the way in which the SME Database manager handles tuples.  It's been on the list to fix for a good while but since, in the vast majority of cases you can simply use a comma (,) instead, we've never gotten round to building a fix.

Kind Regards




Offline tias

  • *
  • 11
  • +0/-0
Re: Server time, no sound with calls with external ext. and CDR
« Reply #11 on: May 07, 2008, 07:38:21 AM »
Okey, thanks for u'r replys. Why I turned here was because I was confused how to solve things with the SME, but I'll guess maybee it best to turn to the source anyway.

Just another question, where can I change the time *903* uses for stats?
What I can see it's 2 hours wrong, probably UK time zone and not Europe/Stockholm. But can't find anywhere to change this. The computer time is correct if I run date in terminal I get:
Wed May  7 07:37:39 CEST 2008

And this time is correct.

Thanks for the help.