login | register
Sat 17 of May, 2008 [00:54 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.65s
  • Memory usage: 2.21MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 0.91

Asterisk RealTime IAX

Asterisk RealTime IAX


iax.conf Setup

You can keep any iax users in the flatfile AND use RealTime. How cool is that?

Extconfig.conf Setup

Add the following line, swapping your own personal values if you wish:


iaxusers => mysql,asterisk,iax_buddies
iaxpeers => mysql,asterisk,iax_buddies
(note: If you were using iaxbuddies, add an exact copy of your iaxbuddies line. Change one of them to iaxusers and the other to iaxpeers, that is all ther is to change to the new format.)


You can change mysql to odbc if you want to use odbc.
You can change asterisk to be the name of your database.
You can change iax_buddies to be the name of the voicemail table we will create below. <-- voicemail table?!!

Database Table

Lets create the table we need:

NOTE: You can use any table name you wish, just make sure the table name matches what you have the family name bound to.


#
# Table structure for table `iax_buddies`
#

CREATE TABLE iax_buddies (
       name varchar(30) primary key NOT NULL,
       username varchar(30), 
       type varchar(6) NOT NULL, 
       secret varchar(50), 
       md5secret varchar(32), 
       dbsecret varchar(100), 
       notransfer varchar(10), 
       inkeys varchar(100),
       outkey varchar(100),
       auth varchar(100), 
       accountcode varchar(100), 
       amaflags varchar(100), 
       callerid varchar(100), 
       context varchar(100), 
       defaultip varchar(15), 
       host varchar(31) NOT NULL default 'dynamic', 
       language char(5), 
       mailbox varchar(50), 
       deny varchar(95),
       permit varchar(95),  
       qualify varchar(4), 
       disallow varchar(100), 
       allow varchar(100), 
       ipaddr varchar(15), 
       port integer default 0,
       regseconds integer default 0
);
CREATE UNIQUE INDEX iax_buddies_username_idx ON iax_buddies(username);

Originally written for mysql, the above should be pretty generic SQL except perhaps Oracle users may want to use VARCHAR2 :P

RoyK


NOTE: The index created on the column 'name' is because RealTime does its SELECT query using that column everytime. That column must also be unique.

You do not need every column listed above. If you wish, you can remove those columns you know you will never use. The columns in your tables should line up with the fields you would specify in the given entity declaration. If an entry would appear more than once, in the column it should be separated by a semicolon. For example, an entity that looks like:

foo
host=dynamic
secret=bar
context=default
context=local



could be stored in a table like this:


namehostsecretcontextipaddrportregseconds
foodynamicbardefault;local127.0.0.145691096954152




You do not need to insert the ipaddr, port or regseconds information. These columns will be updated periodicaly by RealTime.

However, if you are setting up an IAX peer, which you would use to dial calls out over, you will need to specify the port. Otherwise, Asterisk uses the default value from the table, which is 0, and calls will fail with auto-congestion.

Testing


Throw some data into the above table and try to register an extension. The /var/log/asterisk/debug should give info on any problems.

Cheers,
Matthew


More on RealTime IAX


This was a setup we did Mar 3, 2005, to place a call from our SIP Phone to our asterisk server, and
have it connect to another Asterisk Server, and then dial my home # (Hah, Vonage #).

Also note, we are 100% MySQL RealTime. We only use sip.conf & extensions.conf for static information.

Please also be aware, a the appdata setup is VERY CRITICAL. Most doc or lack thereof is misleading.

-- Table structure for table 'extensions'

DROP TABLE IF EXISTS extensions;
CREATE TABLE extensions (
 id int(11) NOT NULL auto_increment,
 context varchar(20) NOT NULL default '',
 exten varchar(20) NOT NULL default '',
 priority tinyint(4) NOT NULL default '0',
 app varchar(20) NOT NULL default '',
 appdata varchar(255) NOT NULL default '',
 KEY id (id)
) TYPE=MyISAM;

-- Dumping data for table 'extensions'

INSERT INTO extensions (id, context, exten, priority, app, appdata) VALUES (1,'sip_ps','_1XXXXXXXXXX',1,'Dial','IAX2/user@xxxx/${EXTEN}');
INSERT INTO extensions (id, context, exten, priority, app, appdata) VALUES (3,'sip_ps','4000',2,'Playback','vm-goodbye');
INSERT INTO extensions (id, context, exten, priority, app, appdata) VALUES (3,'sip_ps','4000',3,'Hangup','');

Note:
user = my username setup on the remote Asterisk Server
xxxx = the xxxx below within the iax.conf file

iax.conf file

;DB setup by Cipri
dbname = asterisk
dbhost = localhost
dbuser = asterisk
dbpass = mypassword

xxxx
type=peer
host=ipaddressofhost
auth=md5,cleartext
secret=mypassword

sip.conf file

;DB setup by Cipri
dbname = asterisk
dbhost = localhost
dbuser = asterisk
dbpass = mypassword


extconfig.conf file (necessary lines for DB connectivity)

sipusers => mysql,asterisk,sip
sippeers => mysql,asterisk,sip
extensions => mysql,asterisk,extensions

More soon ... As we plow down this road, we will post more critical setup information.
Just maybe our efforts can also help others.

Cipri Ilies & Dave Van Abel
http://vanabel.com
PS: We're new at adding doc here, so excuse our mess. We will get better over time. And you can count on us to always share (:rolleyes:)


Realtime Caching

RT Caching allows registered IAX friends to show up when you do a 'iax2 show peers', etc
It also generates manager events for those RT friends

iax.conf file


[general]
;Enables RT friend caching
rtcachefriends=yes

See Also

Created by utdrmac, Last modification by mike on Thu 06 of Sep, 2007 [08:18 UTC]

Comments Filter

encription

by davidjd on Friday 15 of December, 2006 [12:42:13 UTC]
<p>
If I add encription as a field to the iax_buddies table and set the value to aes128 <br>
Will this work in same way as having <br>
encryption=aes128 <br>
in conf file ? <br>
<p>
see
<p>
http://www.voip-info.org/wiki/view/IAX+encryption
<p>
for detail of what this is about
<p>

Index on username?

by Mitchell S. Sharp on Tuesday 18 of April, 2006 [20:48:06 UTC]
The current table format for iax_buddies creates an index on the username field. This doesn't work if you have two services that use the same username. One example is if you're a VoicePulse user. They have two servers you can call through using the same username. Just don't create that index on username and it'll work just fine, although "slower" query will result.

outkeys

by Martin Tittmann on Monday 12 of December, 2005 [13:46:39 UTC]
Add "outkeys varchar(100)," to your iax table if you want to use keybased authentification. Only the inkeys are not enough ;)

"deny" needs to be before "permit"

by laureen on Wednesday 13 of July, 2005 [20:05:01 UTC]
you will need to put the "deny" field in front of "permit" to make things work properly

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver