[asterisk-users] sip realtime question

Ishfaq Malik ish at pack-net.co.uk
Fri Dec 11 03:18:51 CST 2009


Emre Kurnaz wrote:
> Hi everybody,
>
> First of all i am sorry my English :)
>
> i want to configure my asterisk server as a sip server that stores sip users in the mysql database connecting directly over odbc driver. My odbc configuration works as below
>
> [root at ao042 asterisk]# isql -v asterisk
> +---------------------------------------+
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
>
>
> and i did refer to the site http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip . my res_odbc file as;
>
> [root at ao042 asterisk]# cat res_odbc.conf
> [asterisk]
> enabled => yes
> dsn => asterisk
> username => asterisk
> password => *******
> pre-connect => yes
>
> [root at ao042 asterisk]# grep -Ev '^;|^$' extconfig.conf
> [settings]
> sipusers => odbc,asterisk,sip_buddies
> sippeers => odbc,asterisk,sip_buddies
>
> and i created the asterisk database with sip_buddies table.
>
> Here is my problem:
>
> In asterisk console when i run the following command i get the answer,
>
> ao042*CLI> realtime load sipusers name 100
>                    Column Name  Column Value
>           --------------------  --------------------
>                             id  1
>                           name  100
>                           host  dynamic
>                            nat  no
>                           type  friend
>                 cancallforward  yes
>                    canreinvite  yes
>                         secret  Deneme01
>                       disallow  all
>                          allow  g729
>                          allow  ilbc
>                          allow  gsm
>                          allow  ulaw
>                          allow  alaw
>                           port  5060
>                     regseconds  0
>                         lastms  0
>                       username  100
>
>
> but the following commands returns nothing
>
> ao042*CLI> sip show users
> Username                   Secret           Accountcode      Def.Context      ACL  NAT
> ao042*CLI> sip show peers
> Name/username              Host            Dyn Nat ACL Port     Status     Realtime
> 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
>
> besides it does not query anything. So what am i missing? Is there anything that i should mentioned in the sip.conf file?
>
> by the way i am using RHEL 5.4 with 2.6.18-164.el5 kernel - asterisk16-1.6.0.17-1_centos5 rpm
>
> Any help would be appreciated...
>
>   
in sip.conf you need to change the following

rtcachefriends=yes

Ish

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062



More information about the asterisk-users mailing list