[Asterisk-Users] IAX2 peers via MySQL DB with Asterisk 1.0.2

Bastian Schern ml01 at in-bln.de
Mon Nov 22 13:32:04 MST 2004


This works fine for me, thanks!
But a after the installation the *CLI will not show any longer what's 
going on. How comes this?

Regards
	Bastian

Michael Shuler schrieb:
> Use this http://svn.asteriskdocs.org/res_data/
> 
> It will get you sipfriends, IAX, etc. all live from MySQL/ODBC/etc.
> 
> ----------------------------------------
> 
> Michael Shuler, C.E.O.
> BitWise Communications, Inc. (CLEC) And BitWise Systems, Inc. (ISP)
> 682 High Point Lane
> East Peoria, IL 61611
> Office: (217) 585-0357
> Cell: (309) 657-6365
> Fax: (309) 213-3500
> E-Mail: mike at bwsys.net
> Customer Service: (877) 976-0711 
> 
> 
>>-----Original Message-----
>>From: asterisk-users-bounces at lists.digium.com 
>>[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of 
>>Bastian Schern
>>Sent: Thursday, November 18, 2004 8:15 AM
>>To: Asterisk Users Mailing List - Non-Commercial Discussion
>>Subject: Re: [Asterisk-Users] IAX2 peers via MySQL DB with 
>>Asterisk 1.0.2
>>
>>
>>Does nobody else has got this Problem?
>>Or does nobody know how it should be fixed? ;-)
>>
>>Bastian Schern schrieb:
>>
>>>Hi all,
>>>
>>>I try to get the IAX2 peers from a MySQL DB. But this will 
>>
>>not work. I'm 
>>
>>>working with Asterisk 1.0.2.
>>>First I had enabled MYSQL_FRIENDS in the channels Makefile, 
>>
>>then I had 
>>
>>>created the user "asterisk", the database "asterisk" and the table 
>>>"iaxfriends" inside my MySQL server (modelled on 
>>>http://www.voip-info.org/wiki-Asterisk+sip+mysql+peers).
>>>
>>>I add this to my iax.conf:
>>>--- snip ---
>>>dbname=asterisk     ; Name of database in your MySQL server
>>>dbhost=localhost    ; Hostname of server
>>>dbuser=asterisk     ; Username in MySQL
>>>dbpass=123456       ; Password for user in MySQL
>>>--- snap ---
>>>
>>>
>>>A added the User as following:
>>>
>>>mysql> INSERT INTO `iaxfriends` ( `name` , `secret` , `context` , 
>>>`ipaddr` , `port` , `regseconds` ) VALUES (
>>>    'bastian', '123456', 'default', '', '0', '0'
>>>);
>>>
>>>
>>>After that I start my Asterisk without problems, but the 
>>
>>peers defined 
>>
>>>in the "iaxfriends" table are not working':
>>>
>>>SP2106*CLI> iax2 show peers
>>>Name/Username    Host                 Mask             Port 
>>
>>     Status
>>
>>>
>>>If a IAX-Client tries to connect it will produce this message:
>>>--- snip ---
>>>    -- Unregistered 'bastian' (AUTHENTICATED)
>>>--- snap ---
>>>
>>>
>>>If I try to dial from the client I will get this on the 
>>
>>Asterisk console:
>>
>>>--- snip ---
>>>Nov 16 20:30:00 NOTICE[1092774832]: chan_iax2.c:5402 socket_read: 
>>>Rejected connect attempt from 212.202.169.118
>>>--- snap ---
>>>
>>>
>>>But inside the DB-Table it looks like the client is registered:
>>>mysql> SELECT * FROM iaxfriends;
>>>+---------+--------+---------+-----------------+------+------------+
>>>| name    | secret | context | ipaddr          | port | regseconds |
>>>+---------+--------+---------+-----------------+------+------------+
>>>| bastian | r2dzwo | default | 212.202.169.118 | 4569 | 1100655488 |
>>>+---------+--------+---------+-----------------+------+------------+
>>>1 row in set (0.00 sec)
>>>
>>>
>>>What is wrong?
>>>
>>>Regards
>>>    Bastian
>>>_______________________________________________
>>>Asterisk-Users mailing list
>>>Asterisk-Users at lists.digium.com
>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>To UNSUBSCRIBE or update options visit:
>>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list