* You are viewing the archive for December 18th, 2011

asterisk and heartbeat

Hello everybody

I’m setting, heartbeat and asterisk, with rsync, anyone, work them fine?

I’ve been find any information and saw heatbeat + cysnc2 and heartbeat +
rdbd, any one has worked any these aplications fine?

Best regards

Called peer IP

Hi List,

Which will be the appropriate variable to get called peer IP address?

I tried following channel variables
peerip, recvip, URI, from

and following SIP channel variables:

They all return calling peer IP but not the destination/called peer IP.

unfortunately set(CDR(calledip)=${CHANNEL(to)}) doesn’t work

Zohair Raza

ODBC problem – static realtime file not loading SOLVED (properly this time)

Hi Warren

According to the book I’m using as well as the documentation on Asterisk 1.8 you should remove the musiconhold.conf file from /etc/asterisk if you want to read it from a database. From what you say it looks as if you can have both. Maybe not with the same classes?

You are right about the bug ticket. From what I can gather, the database is defined once for the ODBC driver for each connector (in /etc/odbc.ini). To connect Asterisk to ODBC you need to define a class in res_odbc.conf which points to the ODBC connector. After thinking about this I suppose that what is actually going on is this:

1) In odbc.ini you define one or more ODBC connectors. Each connector has one database.

2) In /etc/asterisk/res_odbc.conf you specify one or more ODBC Asterisk connectors, each pointing to an ODBC connector.

3) In /etc/asterisk/extconfig.conf you put in a line that calls the ODBC driver, the Asterisk connector and optional database. So the syntax of a line should be:

=> ,[,


In my case, the database user and Asterisk connector were both named “asterisk”, which confused me into thinking that the extconfig.conf file needed the username. That’s not very logical, so I tried changing my Asterisk connector name to [asterisk-odbc] and the line in extconfig.conf to:
Musiconhold.conf = odbc,asterisk-odbc,asterisk_files

This works fine. In the book, all things are named “asterisk” – the database user, the database and the Asterisk connector. If I had done the same, everything would have worked fine for me. But since I am working on an RoR-based management interface (just for fun …) I needed a database with the _development extension, and from there everything went wrong.

Anyway i’ve sent in a bug ticket as you suggested, this may of course be something that has changed since version 1.14 , and anyway, the “bug” is really in the documentation in the Asterisk Wiki and not in Asterisk as such.



Fra: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] På vegne af Warren Selby
Sendt: 17. december 2011 21:42
Til: Asterisk Users Mailing List – Non-Commercial Discussion
Emne: Re: [asterisk-users] ODBC problem – static realtime file not loading

On Fri, Dec 16, 2011 at 6:06 AM, Brynjolfur Thorvardsson > wrote:

After connecting, the asterisk user never sends another SQL statement, at least nothing that shows up in the General log. Asterisk is running as root. I’ve deleted the musiconhold.conf file from /etc/asterisk

I had always thought you still needed the musiconhold.conf file with at least one MOH class defined so that asterisk will load the MOH module. Once it loads the module, then it should read from the database as well. I don’t know why this works, but it’s the way I’ve always done it. If this behavior resolves your issue, perhaps a bug ticket is in order on https://issues.asterisk.org/jira/ .

Asterisk now sends rport always


I have been testing with Cisco phones and have been able to register them
with new firmware 9.2.1 (7911/7945/7970). All worked until I realized that
from version, the VIA header contains the rport parameter, which
breaks the phone registration process. Basically, the device can´t parse
the VIA header this way, and when it gets the 200 OK to the REGISTER
message containing the rport parameter, it refuses to process the
registration internally, although it doesn´t complaint about it and
Asterisk shows it as registered.

Asterisk doesn´t behave this way and all works fine. The
documentation about the use of the nat= parameter in sip.conf states:

; nat = no ; Default. Use rport* if* the remote side
says to use it.

I understand that the other side must send an empty rport parameter to
report the far end it needs the rport field to be filled in as per the RFC.
The IP Phone is not sending the field at all, generating incongruity
between the documentation and the real behavior. The only reason I think
Asterisk would find the condition to be true, is due to a mismatch between
the source port and VIA header ip:port inside the REGISTER message.

Could this be the trigger of the 200 OK with rport (and, other SIP messages
as well)?
Can it be implemented a nat = never option in future releases?

I believe this is of utmost importance as many deployments are based on
Cisco phones nowdays.


*José Pablo Méndez

How to monitor SIP Trunk on production server

Hi List,

I have asterisk installed at production server, I have 2 SIP voip
trunk for making outgoing and DID for incoming to server.

My question is how I can ensure that trunk is not down at production
server, So how I can monitor it’s automatically by making any scripts?

Any hint will be appreciated