[asterisk-users] Sip configuration using mysql

Arkaitz arkaitzj at gmail.com
Wed Sep 20 06:27:38 MST 2006


Hi,
I'm trying to use mysql for sip users management and i'm a bit stuck
with a problem.
I use asterisk-1.2.12.1 and res_config_mysql from asterisk-addons-1.2.4.
The fact is that i've put a row in the mysql sip table for my linksys
phone and i can make calls and receive calls with it, but it doesn't
appear in "sip show peers", and asterisk is unable to find files when
I use that phone configured from mysql.

Sep 20 15:11:24 WARNING[8347]: channel.c:2380 set_format: Unable to
find a codec translation path from g729 to slin
Sep 20 15:11:24 WARNING[8347]: app_festival.c:187
send_waveform_to_channel: Unable to set write format to signed linear
Sep 20 15:22:27 WARNING[8370]: channel.c:2752
ast_channel_make_compatible: No path to translate from
SIP/saladino-081aa1c8(4) to SIP/linksys-a6f017a0(256)
Sep 20 15:22:48 WARNING[8376]: channel.c:2380 set_format: Unable to
find a codec translation path from g729 to gsm
Sep 20 15:22:48 WARNING[8376]: file.c:824 ast_streamfile: Unable to
open vm-intro (format g729): No such file or directory

When i configure it from sip.conf file it works perfect (i comment the
entry when i want to use the mysql conf).
[linksys]
callerid="linksys"
type=friend
user=linksys
secret=linksys
context=saladino
host=dynamic

The mysql part:
mysql> desc sip;
+----------------+--------------+------+-----+-------------------------+----------------+
| Field          | Type         | Null | Key | Default
| Extra          |
+----------------+--------------+------+-----+-------------------------+----------------+
| id             | int(11)      | NO   | PRI | NULL
| auto_increment |
| name           | varchar(80)  | NO   | UNI |
|                |
| accountcode    | varchar(20)  | YES  |     | NULL
|                |
| amaflags       | varchar(13)  | YES  |     | NULL
|                |
| callgroup      | varchar(10)  | YES  |     | NULL
|                |
| callerid       | varchar(80)  | YES  |     | NULL
|                |
| canreinvite    | char(3)      | YES  |     | yes
|                |
| context        | varchar(80)  | YES  |     | NULL
|                |
| defaultip      | varchar(15)  | YES  |     | NULL
|                |
| dtmfmode       | varchar(7)   | YES  |     | NULL
|                |
| fromuser       | varchar(80)  | YES  |     | NULL
|                |
| fromdomain     | varchar(80)  | YES  |     | NULL
|                |
| fullcontact    | varchar(80)  | YES  |     | NULL
|                |
| host           | varchar(31)  | NO   |     |
|                |
| insecure       | varchar(4)   | YES  |     | NULL
|                |
| language       | char(2)      | YES  |     | NULL
|                |
| mailbox        | varchar(50)  | YES  |     | NULL
|                |
| md5secret      | varchar(80)  | YES  |     | NULL
|                |
| nat            | varchar(5)   | NO   |     | no
|                |
| deny           | varchar(95)  | YES  |     | NULL
|                |
| permit         | varchar(95)  | YES  |     | NULL
|                |
| mask           | varchar(95)  | YES  |     | NULL
|                |
| pickupgroup    | varchar(10)  | YES  |     | NULL
|                |
| port           | varchar(5)   | NO   |     |
|                |
| qualify        | char(3)      | YES  |     | NULL
|                |
| restrictcid    | char(1)      | YES  |     | NULL
|                |
| rtptimeout     | char(3)      | YES  |     | NULL
|                |
| rtpholdtimeout | char(3)      | YES  |     | NULL
|                |
| secret         | varchar(80)  | YES  |     | NULL
|                |
| type           | varchar(6)   | NO   |     | friend
|                |
| username       | varchar(80)  | NO   |     |
|                |
| disallow       | varchar(100) | YES  |     | all
|                |
| allow          | varchar(100) | YES  |     | g729;ilbc;gsm;ulaw;alaw
|                |
| musiconhold    | varchar(100) | YES  |     | NULL
|                |
| regseconds     | int(11)      | NO   |     | 0
|                |
| ipaddr         | varchar(15)  | NO   |     |
|                |
| regexten       | varchar(80)  | NO   |     |
|                |
| cancallforward | char(3)      | YES  |     | yes
|                |
| setvar         | varchar(100) | NO   |     |
|                |
+----------------+--------------+------+-----+-------------------------+----------------+

Phone row:
id=2
name=linksys
canreinvite=yes
context=saladino
dtmfmode=rfc2833
host=dynamic
nat=yes
secret=linksys
type=peer
username=linksys
disallow=all
allow=g729;ilbc;gsm;ulaw;alaw

Other fields are NULL.

Any hint?
Thanks for your time.

-- 
Arkaitz


More information about the asterisk-users mailing list