Sergio Basurto | 1 Mar 2012 01:43
Favicon

Re: Postgresql in Asterisk

I finally solve the problem,

in gentoo the permission of dir /var/run/postgresql/ is:

drwxrwx--- 2 postgres postgres 4096 Feb 29 18:09 postgresql

so if we want to connect asterisk to postgresql, we need to add the user that runs asterisk to the group postgres

and with this finally  I can connect with unixODBC to postgresql database

I hope this help some one.

Regards,
On Mon, 2012-02-27 at 13:49 -0600, Sergio Basurto wrote:
Thank you Jonathan,

I already do the steps you mention, my configuration is:

in res_odbc.conf

enabled => yes
dsn => asterisk-connector
pre-connect => yes

in odbc.ini

[asterisk-connector]
Description             = PostgreSQL connection to 'asterisk' database
Driver                      = PostgreSQL
Database                = db_asterisk
Servername            = localhost
UserName                = asterisk
Password                = secret
Port                        = 5432
Protocol                    = 9.1
ReadOnly                    = No
RowVersioning           = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex            = No
ConnSettings            =


in odbcinst.ini

[PostgreSQL]
Description     = ODBC for PostgreSQL
Driver          = /usr/lib/libodbcpsql.so
Setup           = /usr/lib/libodbcpsql.so
FileUsage       = 1

if I run with root:

#echo "select 1" | isql -v asterisk-connector

returns

+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select 1
+------------+
| ?column?   |
+------------+
| 1          |
+------------+
SQLRowCount returns 1
1 rows fetched

This show me that it can connect, the thing is that in the asterisk logs it returns:

res_odbc.c: Connecting asterisk
res_odbc.c: res_odbc: Error SQLConnect=-1 errno=101 [unixODBC]Could not connect to the server;
Could not connect to remote socket
res_odbc.c: Failed to connect to asterisk
res_odbc.c: Registered ODBC class 'asterisk' dsn->[asterisk-connector]
res_odbc.c: res_odbc loaded.

I notice that if I run the isql command with other user than root, it returns

[S1000][unixODBC]Could not connect to the server;
Could not connect to remote socket.
[ISQL]ERROR: Could not SQLConnect

I guess is an extra configuration for ODBC that I am missing, what you think?

Regards,

On Fri, 2012-02-24 at 13:16 -0600, Jonathan Rose wrote:
You need to make sure ODBC is actually getting a connection made with your database. What you should see under ODBC DSN settings: Name: asterisk DSN: asterisk-connector Last connection attempt: WHATEVER Pooled: No/Yes Connected: Yes Connected: Yes is the important part. Remember, you need to have an account in postgres that can be logged into. I made one on my machine with the following: name = asterisk password = secret And in /etc/odbc.ini, I have the following connector established: [asterisk-connector] Description = PostgreSQL connection to 'asterisk' database Driver = PostgreSQL Database = asterisk Servername = localhost UserName = asterisk Password = secret Port = 5432 Protocol = 8.1 <I'm guessing this will be 9.1 in your case> ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = While my res_odbc.conf looks like this: [asterisk] enabled => yes dsn => asterisk pre-connect => yes In addition to having a connector defined, you need to have an ODBC adapter for postgres. I think this might come with ODBC byd efault though. When I was using mysql, I had to get a separate adapter to make it work and set the path to it in Driver. I don't think that is the case with pgsql though. Go ahead and post your extconfig.conf. I'm guessing that the reason you are able to post CDRs in spite of not having the Connected status show up in your ODBC show is because you are connecting with res_pgsql.conf instead of odbc. ----- Original Message ----- From: "Sergio Basurto" <sbasurto <at> soft-gator.com> To: asterisk-users <at> lists.digium.com Sent: Wednesday, February 22, 2012 6:54:47 AM Subject: Re: [asterisk-users] Postgresql in Asterisk On Wed, 2012-02-22 at 06:48 -0600, Sergio Basurto wrote: Hello, I install asterisk an postgresql 9.1 in gentoo, I already did the configuration in both asterisk and postgresql, in fact If I make a call and asterisk log it to CDR table, my question is: I make a typo mistake I mean If I make a call asterisk already log it into CDR table. how can I make a function like the ones in func_odbc.conf for postgresql, if I am using res_pgsql.conf instead of res_odbc.conf? I also configure odbc and it connects with echo "select 1" | isql -v asterisk-connector with out problems, but when I try an odbc function or restart asterisk it logs: Error SQLConnect=-1 errno=101 [unixODBC]Could not connect to the server; Could not connect to remote socket. and the command CLI> odbc show ODBC DSN Settings ----------------- Name: asterisk DSN: asterisk-connector Last connection attempt: 2012-02-22 06:45:36 I will appreciate any help. Regards, -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Sergio Basurto < sbasurto <at> soft-gator.com > Soft Gator S.A de C.V. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users

--
Sergio Basurto <sbasurto <at> soft-gator.com>
Soft Gator S.A de C.V.

-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users

--
Sergio Basurto <sbasurto <at> soft-gator.com>
Soft Gator S.A de C.V.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Bai Bin | 1 Mar 2012 08:31
Picon

for help

hello,everyone:

      i'm a freshman on voip. there is a problem about  asterisk .

      there is a 4E1 with signalling(ss7) and three servers(a part has one server and the other has two server).  Two servers on the same part share the same point code as a cluster to get load sharing Then the two different parts can interconnect with each other.

      I try to edit ss7.conf .but it doesn't work . Only one of the servers on the same part works,the  other do nothing.

     Can sharing one point code with two or more servers?

    Waiting for your help.
    ps:  software version  chan_ss7 2.0.0
                                    asterisk 1.4.26 
bai
3.1.2012
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
[Digital^Dude] ® | 1 Mar 2012 09:40
Picon

AMI: Local Channels

Hello,

I'm using Asterisk 1.6.2.10. Whenever I dial Local channels via asterisk manager, the calls never get a hangup signal even with timeout specified. I find channels with  "<ZOMBIE>" text appended.

It ends up occupying all the channels with the result that asterisk thinks every channel is busy, hence drops further calls.

Also, all calls dialed out through the local channel, get the cdr populated before hangup (obviously with incorrect information).

If someone else has gone through this problem please share and let me know how to rectify the issue.

--
Thanks
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
upendra | 1 Mar 2012 10:46
Picon

Re: Asterisk auto-dial out a SIP .

thnks for the reply..


i want to know is there any way to call a SIP to SIP by command line ????



regards
Upendra

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
A J Stiles | 1 Mar 2012 11:05
Picon

Re: Asterisk auto-dial out a SIP .

On Thursday 01 March 2012, upendra wrote:
> thnks for the reply..
> 
> 
> i want to know is there any way to call a SIP to SIP by command line ????

Yes.  Just write a script in your favourite language  (even bash will do if 
there is nothing better)  to set up a callfile, then invoke it from the command 
line.

As this list forbids discussion of paid-for services, you will need to contact 
me separately if you want me to write the script for you.

--

-- 
AJS

Answers come *after* questions.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Sebastian Arcus | 1 Mar 2012 11:05
Picon

Line noise/hiss on Openvox A400P card on FXO

I have a server with an OpenVox A400P card with 2 FXO modules on it. The 
internal extensions are SIP Grandstream phones. When making or receiving 
external calls through PSTN, there is an interrupted hissing like high 
pitch noise - which might go away for few seconds then start again.

1. The noise is not present when calling in between internal extensions 
(SIP only).
2. The noise is the same on both PSTN lines.
3. The noise is NOT present when I tried two different phones directly 
in the PSTN line(s) (a Philips DECT phone and a BT Converse phone)

Is the noise interference actually on the line, which the phones filter 
out because of their better electronic design (then the OpenVox card) - 
or is it generated somewhere in the server or on the OpenVox card?

I have tried:
1. Checking the interrupts and making sure the OpenVox card has its own IRQ.
2. Moving the card around on different PCI slots.
3. Changing the second network card with a different model (the first 
one is integrated in the motherboard).
4. Changing the motherboard, CPU and RAM (one motherboard AMD with Sis 
chipset, the other one Intel).
5. Placing ferrite cores on the phone cables.
6. Checking to see if the OpenVox card gets 1000 interrupts per second 
and it does.
7. Upgrading the kernel from 2.6.29 to 2.6.37
8. Ran FXO tune and made sure it starts with DAHDI
9. Disabled and enable software echo cancellation - it makes no difference.

The server is virtually under no load during the tests. It does have IDE 
hard-drives (which apparently can cause problems) - but there is not 
much I can do about that.

I also have a Sangoma USB FXO adapter - which I'm about to install and 
configure to see if it makes a difference.

I would really like to figure out where is the noise coming from - as 
I'm going a bit in circles. If I can find out for sure that the OpenVox 
card is either broken or low quality - I'll just have to replace it. But 
I can't even figure that out for sure.

The specs are:

CPU: Celeron 2.4GHz
Asterisk 10.1.2
Dahdi 2.6.0
Hard-drives: IDE
OpenVox A400P analog card

Many thanks for any advice.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[Digital^Dude] ® | 1 Mar 2012 11:32
Picon

SS7 Disposition

In almost all major releases of asterisk 1.6.x, SS7 Disposition never sets to "ANSWERED", even when someone answers the call, it logs "NO ANSWER" in the cdrs.

Please help me resolve the issue.

--
Thanks
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Vinod Dharashive | 1 Mar 2012 11:50
Picon

Re: SS7 Disposition

Hi team,

I am experience the same issue.

Thanks
Vinod dharashive
Sent from BlackBerry® on Airtel

-----Original Message-----
From: [Digital^Dude] ® <millennium.bug <at> gmail.com>
Sender: asterisk-users-bounces <at> lists.digium.com
Date: Thu, 1 Mar 2012 15:32:41 
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users <at> lists.digium.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
	<asterisk-users <at> lists.digium.com>
Subject: [asterisk-users] SS7 Disposition

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[Digital^Dude] ® | 1 Mar 2012 14:15
Picon

Re: SS7 Disposition

What versions on Asterisk and chan_ss7 are you using?

On Thu, Mar 1, 2012 at 3:50 PM, Vinod Dharashive <vdharashive <at> gmail.com> wrote:
Hi team,

I am experience the same issue.

Thanks
Vinod dharashive
Sent from BlackBerry® on Airtel

-----Original Message-----
From: [Digital^Dude] ® <millennium.bug <at> gmail.com>
Sender: asterisk-users-bounces <at> lists.digium.com
Date: Thu, 1 Mar 2012 15:32:41
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users <at> lists.digium.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
       <asterisk-users <at> lists.digium.com>
Subject: [asterisk-users] SS7 Disposition

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
[Digital^Dude] ® | 1 Mar 2012 14:23
Picon

Re: SS7 Disposition

Are you using AMI originate for these SS7 outbound calls?

On Thu, Mar 1, 2012 at 6:15 PM, [Digital^Dude] ® <millennium.bug <at> gmail.com> wrote:
What versions on Asterisk and chan_ss7 are you using?

On Thu, Mar 1, 2012 at 3:50 PM, Vinod Dharashive <vdharashive <at> gmail.com> wrote:
Hi team,

I am experience the same issue.

Thanks
Vinod dharashive
Sent from BlackBerry® on Airtel

-----Original Message-----
From: [Digital^Dude] ® <millennium.bug <at> gmail.com>
Sender: asterisk-users-bounces <at> lists.digium.com
Date: Thu, 1 Mar 2012 15:32:41
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users <at> lists.digium.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
       <asterisk-users <at> lists.digium.com>
Subject: [asterisk-users] SS7 Disposition

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Gmane