Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: DocRob on December 22, 2007, 09:06:45 PM

Title: mysqld problem
Post by: DocRob on December 22, 2007, 09:06:45 PM
I have a new install of SME and Sail. Whilst I can call extension to extension, I have a problem with settting up roues etc. Looking through the asterisk/messages I noticed this:

Dec 22 19:43:05 NOTICE[27797] cdr.c: CDR simple logging enabled.
Dec 22 19:43:05 NOTICE[27797] indications.c: Removed default indication country 'uk'
Dec 22 19:43:05 ERROR[27797] res_config_mysql.c: MySQL RealTime: Failed to connect database server  on  (err 2002). Check debug for more info.
Dec 22 19:43:05 WARNING[27797] res_config_mysql.c: MySQL RealTime: Couldn't establish connection. Check debug.
Dec 22 19:43:05 WARNING[4402] config.c: No '=' (equal sign) in line 72 of /etc/asterisk/sip.conf

and in the messages log:

Dec 22 19:46:56 phone CDR simple logging enabled. 
Dec 22 19:46:56 phone esmith::event[27869]:
Dec 22 19:46:56 phone NOTICE[27874]: indications.c:505 ast_unregister_indication_country:
Dec 22 19:46:56 phone Removed default indication country 'uk' 
Dec 22 19:46:56 phone ERROR[27874]: res_config_mysql.c:650 mysql_reconnect:
Dec 22 19:46:56 phone MySQL RealTime: Failed to connect database server  on  (err 2002). Check debug for more info. 
Dec 22 19:46:56 phone WARNING[27874]: res_config_mysql.c:521 reload:
Dec 22 19:46:56 phone MySQL RealTime: Couldn't establish connection. Check debug. 
Dec 22 19:46:56 phone   == MySQL RealTime reloaded. 
Dec 22 19:46:56 phone last message repeated 3 times


Any ideas?

Rob


Title: Re: mysqld problem
Post by: SARK devs on December 23, 2007, 10:08:42 AM
Hello Rob,

The error messages you are seeing are, for the most part, benign.  There is a feature in asterisk called "realtime" which allows you to specify some of your .conf files in MySQL.  Asterisk checks for this at start up.  The messages you are seeing are to do with that and can be ignored.

However there is one message....

Code: [Select]
Dec 22 19:43:05 WARNING[4402] config.c: No '=' (equal sign) in line 72 of /etc/asterisk/sip.conf

This indicates an error in the sip.conf file.  Can you post the file here please?

You also mention a problem with routes but don't elaborate.  If you tell us more than maybe we can help.

Kind Regards

S
Title: Re: mysqld problem
Post by: DocRob on December 23, 2007, 11:10:01 AM
Hi selintra,

Thanks for the offer of help. I have fixed the error re the = sign which lead me to the error log in the 1st place.

I am still having problems with truncks and possibly routes.

I am in the UK with plus net using the VOIP Beta trial. I was able to get it working just using X-Lite - I had to use V2 of the SW as V3 has a problem with not receiving incoming voice.

The stttings I should be using are:

  Your account details
--------------------

Your Trial account type:    Broadband Phone 480
Your phone number:          020 71831749
Your SIP ID:                6271749
Your user name:             6271749
Your SIP password:          XXXXXXXX
Your voicemail pin code:    XXXXX

Your server settings
--------------------

Your SIP domain:            sip2.plus.net
Your SIP proxy:             nat.plus.net:5082

(Although it is plus.net they are using Gradwell.)

I have been trying various settings in trunk/gateway based on various sources but tings are not working.

I have one simple route set up with a dial plan of  _0. 123. The 123 being the speaking clock. The daft thing is dialing 123 on any extension works, but and UK STD no does something (X-Lite shows connected) but I get no sound and and after a short while it hangs up. I guess that is due to the missing "I'm sorry we ......" file.

The other thing of note is that plus.net shows that asterisk pbx  is registered from my IP address so it is working in part.

My main problem at present is what settings I should be using as the gateway.


Regards

Rob





Title: Re: mysqld problem
Post by: SARK devs on December 23, 2007, 12:14:30 PM
OK, Gradwell we know.

What we need to see is the console output.

At the linux console do...

asterisk -rvvvv

then run your call and post the output here.

Best

S
Title: Re: mysqld problem
Post by: DocRob on December 23, 2007, 01:49:19 PM
Hi,
Output is:

login as: root
root@192.168.123.25's password:
Last login: Sun Dec 23 12:41:47 2007 from pc-00186.likley.co.uk
[root@phone ~]# asterisk -rvvvv
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Asterisk 1.2.24, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'show license' for details.
=========================================================================
Connected to Asterisk 1.2.24 currently running on phone (pid = 4230)
    -- Remote UNIX connection
Verbosity is at least 4
    -- Executing AGI("SIP/5000-08d64e60", "selintra|OutCluster|01225427726") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing AGI("SIP/5000-08d64e60", "selintra|OutRoute|main") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (SetCallerID) Options: (02071831749)
    -- AGI Script Executing Application: (Dial) Options: (SIP/01225427726@6271749)
    -- Called 01225427726@6271749
    -- Got SIP response 500 "PSTN access unavailable for current account" back from 193.111.200.56
    -- SIP/6271749-08d6abc0 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- AGI Script Executing Application: (Background) Options: (were-sorry)
Dec 23 12:48:25 WARNING[5167]: file.c:517 ast_openstream_full: File were-sorry does not exist in any format
Dec 23 12:48:25 WARNING[5167]: file.c:828 ast_streamfile: Unable to open were-sorry (format alaw): No such file or directory
Dec 23 12:48:25 WARNING[5167]: pbx.c:5826 pbx_builtin_background: ast_streamfile failed on SIP/5000-08d64e60 for were-sorry
    -- AGI Script Executing Application: (Background) Options: (call-cannot-complete)
Dec 23 12:48:25 WARNING[5167]: file.c:517 ast_openstream_full: File call-cannot-complete does not exist in any format
Dec 23 12:48:25 WARNING[5167]: file.c:828 ast_streamfile: Unable to open call-cannot-complete (format alaw): No such file or directory
Dec 23 12:48:25 WARNING[5167]: pbx.c:5826 pbx_builtin_background: ast_streamfile failed on SIP/5000-08d64e60 for call-cannot-complete
    -- AGI Script Executing Application: (Background) Options: (please-hang-up-and-try-again)
Dec 23 12:48:25 WARNING[5167]: file.c:517 ast_openstream_full: File please-hang-up-and-try-again does not exist in any format
Dec 23 12:48:25 WARNING[5167]: file.c:828 ast_streamfile: Unable to open please-hang-up-and-try-again (format alaw): No such file or directory
Dec 23 12:48:25 WARNING[5167]: pbx.c:5826 pbx_builtin_background: ast_streamfile failed on SIP/5000-08d64e60 for please-hang-up-and-try-again
    -- AGI Script selintra completed, returning 0
phone*CLI>


Cheers

Rob
Title: Re: mysqld problem
Post by: SARK devs on December 23, 2007, 02:15:27 PM
Quote
    -- Called 01225427726@6271749
    -- Got SIP response 500 "PSTN access unavailable for current account" back from 193.111.200.56
    -- SIP/6271749-08d6abc0 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)

Your account is not accepting PSTN calls.

As an aside, the reason the message isn't being found....

Code: [Select]
    -- AGI Script Executing Application: (Background) Options: (were-sorry)
Dec 23 12:48:25 WARNING[5167]: file.c:517 ast_openstream_full: File were-sorry does not exist in any format
Dec 23 12:48:25 WARNING[5167]: file.c:828 ast_streamfile: Unable to open were-sorry (format alaw): No such file or directory

...is because you don't have our UK-english voicepack installed.  On later versions of SAIL you can turn the voice reponse to call failure off in globals (see the docs pages).

Kind Regards

S
Title: Re: mysqld problem
Post by: DocRob on December 23, 2007, 06:03:12 PM
Quote
Your account is not accepting PSTN calls.
But it does just using X-Lite, the problem looks like it is my lack of understanding of routes etc. I have this set in Trunk:

Code: [Select]
type=peer
fromdomain=sip2plus.net
host=sip2.plus.net
proxy=nat.plus.net:5082
qualify=3000
canreinvite=no
insecure=very
authuser=6271749
username=6271749
fromuser=6271749
secret=XXXXXXXX
disallow=all
allow=alaw
allow=ulaw

This is on the lhs under 627179 and the rhs under sip2.plus.net is blank

I have also set outbound caller id to the external phone number and I have registration sting of

Code: [Select]
6271749:XXXXXXX@sip2.plus.net/02071831749

I am now unsure what to do next as I am really only casting about in the dark.

One thing I did notice is that X-Lite reports the called as 01225427726/sip2.plus.net whereas asterisk is Called 01225427726@6271749 ?

Quote
...is because you don't have our UK-english voicepack installed

Is it possible to get such a pack or a 'how to' make my own? I couldn't see that in the Docs.

Many thanks.

Rob

Title: Re: mysqld problem
Post by: SARK devs on December 23, 2007, 09:31:41 PM
Language pack is here....

http://ftp.nluug.nl/os/Linux/distr/smeserver/contribs/selintra/RPMS/languagepacks/sme-ast-en-uk-gpl-sounds-1.0.0-3.noarch.rpm

OK....

Quote
One thing I did notice is that X-Lite reports the called as 01225427726/sip2.plus.net whereas asterisk is Called 01225427726@6271749 ?

These should be the same thing.  Asterisk just uses an indirect reference to the host using an entry in sip.conf (in this case, called 6271749).

Quote
type=peer
fromdomain=sip2plus.net
host=sip2.plus.net
proxy=nat.plus.net:5082
qualify=3000
canreinvite=no
insecure=very
authuser=6271749
username=6271749
fromuser=6271749
secret=XXXXXXXX
disallow=all
allow=alaw
allow=ulaw

AFAIK there is no proxy couplet in sip.conf.   There is an outboundproxy couplet and you have to specify the port in another couplet outboundproxyport.  The fromdomain is incorrect in your copied text (maybe a typo?).  Also, for this exercise, set qualify=yes (rather than 3000).

If you are running server-only the you should also set the correct external IP address in SARK globals.  Finally, you should set the correct localnet in Headers->sip.conf (It should match/mask the actual local subnet asterisk is running in).

Other than that it looks OK.  However, this is a Beta trial system you are attempting to connect to.  We have no idea if they are restricting transmissions to/from their softphones only.

Kind Regards

S

 


Title: Re: mysqld problem
Post by: DocRob on December 24, 2007, 04:26:24 PM
Dear Selintra,

First of all thank you for being so patient we what must be clearly someone who hasn't a clue.

I have installed the Language pack thanks.

Correcting the typo  :oops: and removing all references to proxy etc has fixed the outgoing calls issue. My problem now is that incoming doesn't work.

I get a UK ringing tone which switches to remote voice mail. Running asterisk -rvvvv shows nothing and there is nothing in the logs. If I take the server off line then the incoming call goes to voice mail immediately.

Rob
Title: Re: mysqld problem
Post by: SARK devs on December 24, 2007, 06:47:55 PM
OK....  :-)

This probably has to do with the way in which you've constructed your registration string...

Code: [Select]
6271749:XXXXXXX@sip2.plus.net/02071831749
You've asked Gradwell to deliver the call with a DNID of 02071831749 but I don't think you have defined that number in Asterisk anywhere.

Two choices...

You can create a PTT_DiD trunk with a number of 02071831749 or you can deliver the call to the tag you've already created by changing the registration string...

Code: [Select]
6271749:XXXXXXX@sip2.plus.net/6271749
If you want to learn more, there is a page on registration and sip.conf set-up in the docs here...

http://www.selintra.com/docs/cgi-bin/view/Main/DocChapter259#Registration

Hope this helps

S

 

Title: Re: mysqld problem
Post by: DocRob on December 25, 2007, 09:07:00 AM
Thanks.

Tried a number of variants, but still no incomming. Looking through the plus.net forums there has been a number of reports about no incomming calls which seem to relate to the proxy setting of nat.plus.net:5082. As I can call out without the setting it looks like this is a receive only proxy. I have asked on the forum to see if I could get more info. Prehaps asterisk should be set to listen on 5082? Does this port need to be opened on the firewall?

Have a good holiday and happy new year when it comes.

Best wishes.

Rob
Title: Re: mysqld problem
Post by: SARK devs on December 27, 2007, 01:01:09 AM
OK, let's get scientific....

To find out what's really going on you are going to need ethereal.  do this...

Code: [Select]
yum install wireshark --enablerepo=base
This will install terminal ethereal for you.

Best for this test to forward everything from your router to the SME Server (put it in the DMZ if your router supports such a thing, otherwise just forward everything manually).

just for the test and ONLY for the test,you can shut down the firewall on your server...

Code: [Select]
/etc/init.d/masq stop
Now you can fire up tethereal and make your inbound call.  This should show you what is arriving and on what port(s).

If you are running server-gateway do

Code: [Select]
tethereal  -i eth1 -f "port not 22"
If you are running server-only do

Code: [Select]
tethereal -i eth0 -f "port not 22"

quit the tethereal session by typing Ctrl-C.

If you want to save the output for later inspection/manipulation then append > some_filename to the command like this...

Code: [Select]
tethereal -i eth0 -f "port not 22" > /home/mytrace
The -f "port not 22" suppresses ssh packets so they don't swamp your output.  Restart your firewall either by restarting your server or with...

Code: [Select]
/etc/init.d/masq start
I think this is the only way to see what's really going on here.  Once we know what's arriving and where, dealing with it becomes trivial.

Best

S
Title: Re: mysqld problem
Post by: DocRob on December 27, 2007, 11:14:54 AM
Thanks for the reply,

The machine is in the DMZ - it is temporary setup as a server/gateway without DHCP as there is a server/gateway already on the network. The intent being to merge the 2 when I get the phone working and the temp machine revert to a backup. BTW both machines are on separate  static IPs I have a block of 8. There is no firewall/nat on the modem/router. 

Hmm something odd. When I tried /etc/init.d/masq stop the machine lost all connectivity, even local host would not ping. Not sure what to do now.

Regards

Rob

Title: Re: mysqld problem
Post by: SARK devs on December 27, 2007, 11:31:53 AM
just reboot it and run the tests with it up.


Best

Title: Re: mysqld problem
Post by: DocRob on December 27, 2007, 11:41:52 AM
Here we go:

Code: [Select]
Capturing on eth1
1198751839.792025 Netgear_f6:44:ae -> DellComp_0f:7e:77 ARP Who has 84.92.24.252                  ?  Tell 84.92.24.250
1198751839.857356 DellComp_0f:7e:77 -> Netgear_f6:44:ae ARP 84.92.24.252 is at 0                  0:06:5b:0f:7e:77
1198751849.459581 84.254.21.55 -> 84.92.24.252 TCP 3194 > 135 [SYN] Seq=0 Len=0                   MSS=1418
1198751852.409769 84.254.21.55 -> 84.92.24.252 TCP 3194 > 135 [SYN] Seq=0 Len=0                   MSS=1418
1198751855.139821 84.92.24.252 -> 193.111.200.56 SIP Request: OPTIONS sip:sip2.p                  lus.net
1198751855.168604 193.111.200.56 -> 84.92.24.252 SIP Status: 503 Service Unavail                  able
1198751866.711345 84.92.24.252 -> 87.232.1.41  NTP NTP client
1198751866.734519  87.232.1.41 -> 84.92.24.252 NTP NTP server
1198751867.711632 84.92.24.252 -> 84.2.42.31   NTP NTP client
1198751867.755737   84.2.42.31 -> 84.92.24.252 NTP NTP server
1198751868.711890 84.92.24.252 -> 84.54.128.8  NTP NTP client
1198751868.783665  84.54.128.8 -> 84.92.24.252 NTP NTP server
1198751871.707704 DellComp_0f:7e:77 -> Netgear_f6:44:ae ARP Who has 84.92.24.249?  Tell 84.92.24.252
1198751871.707945 Netgear_f6:44:ae -> DellComp_0f:7e:77 ARP 84.92.24.249 is at 00:18:4d:f6:44:ae
1198751871.712769 84.92.24.252 -> 80.96.120.249 NTP NTP client
1198751871.784559 80.96.120.249 -> 84.92.24.252 NTP NTP server
1198751876.774256 Netgear_f6:44:ae -> DellComp_0f:7e:77 ARP Who has 84.92.24.252?  Tell 84.92.24.250
1198751876.774275 DellComp_0f:7e:77 -> Netgear_f6:44:ae ARP 84.92.24.252 is at 00:06:5b:0f:7e:77
1198751894.285672 CameoCom_38:8e:62 -> Broadcast    ARP Who has 84.92.24.249?  Tell 84.92.24.253
1198751901.252448 193.111.200.56 -> 84.92.24.252 IP Fragmented IP protocol (proto=UDP 0x11, off=0)
1198751901.252474 193.111.200.56 -> 84.92.24.252 SIP/SDP Request: INVITE sip:6271749@84.92.24.252, with session description
1198751901.253965 84.92.24.252 -> 193.111.200.56 SIP Status: 404 Not Found
1198751901.281481 193.111.200.56 -> 84.92.24.252 SIP Request: ACK sip:6271749@84.92.24.252
1198751906.251060 DellComp_0f:7e:77 -> Netgear_f6:44:ae ARP Who has 84.92.24.249?  Tell 84.92.24.252
1198751906.251297 Netgear_f6:44:ae -> DellComp_0f:7e:77 ARP 84.92.24.249 is at 00:18:4d:f6:44:ae
1198751914.943548 84.92.24.252 -> 193.111.200.56 SIP Request: REGISTER sip:sip2.plus.net
1198751914.977025 193.111.200.56 -> 84.92.24.252 SIP Status: 200 OK    (1 bindings)
1198751915.169924 84.92.24.252 -> 193.111.200.56 SIP Request: OPTIONS sip:sip2.plus.net
1198751915.197161 193.111.200.56 -> 84.92.24.252 SIP Status: 503 Service Unavailable
1198751919.973567 Netgear_f6:44:ae -> DellComp_0f:7e:77 ARP Who has 84.92.24.252?  Tell 84.92.24.250
1198751919.973600 DellComp_0f:7e:77 -> Netgear_f6:44:ae ARP 84.92.24.252 is at 00:06:5b:0f:7e:77
31 packets captured
[root@phone ~]#



This was during an incomming call.

Rob
Title: Re: mysqld problem
Post by: SARK devs on December 27, 2007, 01:41:24 PM
HI,

Here is the invite coming in from Gradwell in your trace (193.111.200.56  is a Gradwell server)...

Code: [Select]
1198751901.252474 193.111.200.56 -> 84.92.24.252 SIP/SDP Request: INVITE sip:6271749@84.92.24.252, with session description
1198751901.253965 84.92.24.252 -> 193.111.200.56 SIP Status: 404 Not Found

It's looking for an entry of 6271749 and not finding it.  I think if you create a PTT-DiD entry in trunks with a start and end of 6271749 then your call should terminate correctly.  Make sure to send the call to a registered phone in the inbound open route.

Kind Regards

S

   
Title: Re: mysqld problem
Post by: DocRob on December 27, 2007, 02:37:52 PM
Hooray,

That fixed it.

Once again, many thanks for having the patience to help someone who really didn't know up from down.

Best wishes

Rob
Title: Re: mysqld problem
Post by: SARK devs on December 27, 2007, 02:52:56 PM
Good.

Glad we got there.  It's always interesting to look at new carriers.  What we've learnt is; they are behaving entrirely conventionally, receiving and delivering bog standard SIP over 5060 (good old Gradwell).  The proxy server will be there purely as a nat helper for single users behind firewalls with gear that won't do Symmetrical RTP.   

Back to the left-over turkey then...

Anyone got any good turkey curry recipes?

:-)

Best

S

Title: Re: mysqld problem
Post by: DocRob on December 28, 2007, 09:29:32 AM
This may help:

http://www.bbc.co.uk/food/christmas/essentials_boxingday.shtml

I am now confused about voice mail is there a Nodies guide? I have also been looking for a users guide for my wife - phone that is.

Regards

Rob
Title: Re: mysqld problem
Post by: SARK devs on December 28, 2007, 05:57:51 PM
User guide here.  It's a little out of date but still OK.

http://selintra.co.uk/sail/pdfs/


Kind Regards