Fw: [Serdev] Lastest CVS mysql authentication problems

Glenn Dalgliesh ser at techhat.com
Fri Jan 23 23:27:38 UTC 2004


Okay, It now allows me to add them to the database but when placing a call
it doesn't follow that aliases.

As you can see below it does appear to be in the table.

Let me know what type of additional debug info you might need.

Thanks for all your help. FYI: have been running a 30 person ser deployment
for about 6 months great results....


[root at serv1 sip_router]# serctl restart
Stopping SER : stopped

Starting SER : started pid(4165)
[root at serv1 sip_router]# serctl alias add 4102959745
sip:1638 at sipdemo.routerboy.com
sip:1638 at sipdemo.routerboy.com
200 Added to table
('4102959745','sip:1638 at sipdemo.routerboy.com') to 'aliases'

[root at serv1 sip_router]# serctl alias show
Dumping all contacts may take long: are you sure you want to proceed? [Y|N]
y
===Domain list===
---Domain---
name : 'aliases'
size : 512
table: 0x422bbf18
d_ll {
    n    : 2
    first: 0x422bdf28
    last : 0x422c18c8
}

...Record(0x422bdf28)...
domain: 'aliases'
aor   : '4102959745'
~~~Contact(0x422bdf88)~~~
domain : 'aliases'
aor    : '4102959745'
Contact: 'sip:1638 at sipdemo.routerboy.com'
Expires: -371
q      :       1.00
Call-ID:
'The-Answer-To-The-Ultimate-Question-Of-Life-Universe-And-Everything'
CSeq   : 42
replic : 0
State  : CS_SYNC
Flags  : 128
next   : (nil)
prev   : (nil)
~~~/Contact~~~~
.../Record...
...Record(0x422c18c8)...
domain: 'aliases'
aor   : '811'
~~~Contact(0x422bfe58)~~~
domain : 'aliases'
aor    : '811'
Contact: 'sip:1638 at sipdemo.routerboy.com'
Expires: -76
q      :       1.00
Call-ID:
'The-Answer-To-The-Ultimate-Question-Of-Life-Universe-And-Everything'
CSeq   : 42
replic : 0
State  : CS_SYNC
Flags  : 128
next   : (nil)
prev   : (nil)
~~~/Contact~~~~
.../Record...

---/Domain---
---Domain---
name : 'location'
size : 512
table: 0x422b9c38
d_ll {
    n    : 2
    first: 0x422bbc48
    last : 0x422bbd78
}

...Record(0x422bbc48)...
domain: 'location'
aor   : '1638 at sipdemo.routerboy.com'
~~~Contact(0x422bbcb8)~~~
domain : 'location'
aor    : '1638 at sipdemo.routerboy.com'
Contact: 'sip:1638 at 162.33.165.198'
Expires: 101
q      :       0.00
Call-ID: '2f9ea715290bacbe4fc3580917d789fe at 162.33.165.198'
CSeq   : 107
replic : 0
State  : CS_SYNC
Flags  : 0
next   : (nil)
prev   : (nil)
~~~/Contact~~~~
.../Record...
...Record(0x422bbd78)...
domain: 'location'
aor   : '1124 at sipdemo.routerboy.com'
~~~Contact(0x422bbde8)~~~
domain : 'location'
aor    : '1124 at sipdemo.routerboy.com'
Contact: 'sip:1124 at 162.33.165.205'
Expires: 29
q      :       0.00
Call-ID: '1c3f5ff4b89285a5 at 162.33.165.205'
CSeq   : 1886
replic : 0
State  : CS_SYNC
Flags  : 0
next   : (nil)
prev   : (nil)
~~~/Contact~~~~
.../Record...

---/Domain---
===/Domain list===
[root at serv1 sip_router]#



----- Original Message ----- 
From: "Jan Janak" <jan at iptel.org>
To: "Glenn Dalgliesh" <ser at techhat.com>
Cc: <serdev at lists.iptel.org>
Sent: Friday, January 23, 2004 5:30 PM
Subject: Re: Fw: [Serdev] Lastest CVS mysql authentication problems


> Hopefully fixed, could you update from the CVS repository, re-test and
> let me know ?
>
>   Jan.
>
> On 23-01 17:25, Glenn Dalgliesh wrote:
> >
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1211]: INFO: udp_init:
SO_RCVBUF
> > is initially 65535
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1211]: INFO: udp_init:
SO_RCVBUF
> > is finally 131070
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1211]: INFO: udp_init:
SO_RCVBUF
> > is initially 65535
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1211]: INFO: udp_init:
SO_RCVBUF
> > is finally 131070
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1237]: INFO: fifo process
> > starting: 1237
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1237]: SER: open_uac_fifo:
fifo
> > server up at /tmp/ser_fifo...
> >  Jan 23 17:16:34 serv1 /usr/local/sbin/ser[1237]: WARNING: no
fifo_db_url
> > given - fifo DB commands disabled!
> >  Jan 23 17:18:30 serv1 kernel: device eth0 entered promiscuous mode
> >  Jan 23 17:21:10 serv1 /usr/local/sbin/ser[1237]: fifo_add_contact():
> > expires == 0, giving up
> >  Jan 23 17:21:10 serv1 /usr/local/sbin/ser[1237]: ul_add(): Error while
> > adding contact ('4102959745','sip:1638 at sipdemo.routerboy.com') in table
> > 'aliases'
> > > ----- Original Message ----- 
> > > From: "Jan Janak" <jan at iptel.org>
> > > To: "Glenn Dalgliesh" <ser at techhat.com>
> > > Cc: <serdev at lists.iptel.org>
> > > Sent: Friday, January 23, 2004 5:15 PM
> > > Subject: Re: [Serdev] Lastest CVS mysql authentication problems
> > >
> > >
> > > > Again, what is in the log ?
> > > >
> > > >   Jan.
> > > >
> > > > On 23-01 17:11, Glenn Dalgliesh wrote:
> > > > > My apologize I must have done something wrong just recompile and
try
> > > again
> > > > > in order to get you debug info and Auth seems to be work fine. But
I
> > > can't
> > > > > add an aliases to work in this version.
> > > > >
> > > > > [root at serv1 sip_router]# serctl alias add 4102959745
> > > > > sip:1638 at sipdemo.routerboy.com
> > > > > sip:1638 at sipdemo.routerboy.com
> > > > > 500 Error while adding contact
> > > > >  ('4102959745','sip:1638 at sipdemo.routerboy.com') in table
'aliases'
> > > > > [root at serv1 sip_router]#
> > > > >
> > > > > [root at serv1 sip_router]# ser -V
> > > > > version: ser 0.8.13-dev-23-merged (i386/linux)
> > > > > flags: STATS:Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, DNS_IP_HACK,
> > > SHM_MEM,
> > > > > SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> > > > > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN
16,
> > > > > MAX_URI_SIZE 1024, BUF_SIZE 65535
> > > > > @(#) $Id: main.c,v 1.174 2003/11/26 23:43:59 andrei Exp $
> > > > > main.c compiled on 14:47:56 Jan 23 2004 with gcc 3.2
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Jan Janak" <jan at iptel.org>
> > > > > To: "Glenn Dalgliesh" <ser at techhat.com>
> > > > > Cc: <serdev at lists.iptel.org>
> > > > > Sent: Friday, January 23, 2004 4:54 PM
> > > > > Subject: Re: [Serdev] Lastest CVS mysql authentication problems
> > > > >
> > > > >
> > > > > > Is there any error message in the logs ?
> > > > > >
> > > > > >  Jan.
> > > > > >
> > > > > > On 23-01 16:58, Glenn Dalgliesh wrote:
> > > > > > > I had already corrected that issue. Seems to be something
else. I
> > > have
> > > > > > > attached my config
> > > > > > >
> > > > > > > #
> > > > > > > # Stun & rtpproxy working
> > > > > > > #
> > > > > > >
> > > > > > > # ----------- global configuration
> > > parameters ------------------------
> > > > > > >
> > > > > > > debug=7         # debug level (cmd line: -dddddddddd)
> > > > > > > #debug=3         # debug level (cmd line: -dddddddddd)
> > > > > > > fork=yes
> > > > > > > log_stderror=no # (cmd line: -E)
> > > > > > >
> > > > > > > #fork=no
> > > > > > > #log_stderror=yes
> > > > > > >
> > > > > > > check_via=no    # (cmd. line: -v)
> > > > > > > dns=no           # (cmd. line: -r)
> > > > > > > rev_dns=no      # (cmd. line: -R)
> > > > > > > port=5060
> > > > > > > children=4
> > > > > > > fifo="/tmp/ser_fifo"
> > > > > > > # fifo_db_url="/tmp/ser_fifo_db"
> > > > > > > # ------------------ module
> > > loading ----------------------------------
> > > > > > >
> > > > > > > # Uncomment this if you want to use SQL database
> > > > > > > loadmodule "/usr/local/lib/ser/modules/mysql.so"
> > > > > > >
> > > > > > > loadmodule "/usr/local/lib/ser/modules/sl.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/tm.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/acc.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/rr.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/registrar.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/textops.so"
> > > > > > >
> > > > > > > # Uncomment this if you want digest authentication
> > > > > > > # mysql.so must be loaded !
> > > > > > > loadmodule "/usr/local/lib/ser/modules/auth.so"
> > > > > > > loadmodule "/usr/local/lib/ser/modules/auth_db.so"
> > > > > > >
> > > > > > > # loadmodule "/usr/local/lib/ser/modules/nathelper.so"
> > > > > > >
> > > > > > >
> > > > > > > # ----------------- setting module-specific
> > > parameters ---------------
> > > > > > >
> > > > > > > # -- usrloc params --
> > > > > > >
> > > > > > > # modparam("usrloc", "db_mode",   0)
> > > > > > >
> > > > > > > # Uncomment this if you want to use SQL database
> > > > > > > # for persistent storage and comment the previous line
> > > > > > > modparam("usrloc", "db_mode", 2)
> > > > > > >
> > > > > > > # -- auth params --
> > > > > > > # Uncomment if you are using auth module
> > > > > > > #
> > > > > > > modparam("auth_db", "calculate_ha1", yes)
> > > > > > > #
> > > > > > > # If you set "calculate_ha1" parameter to yes (which true in
this
> > > > > config),
> > > > > > > # uncomment also the following parameter)
> > > > > > > #
> > > > > > > modparam("auth_db", "password_column", "password")
> > > > > > >
> > > > > > > modparam("usrloc",
> > "db_url","mysql://ser:heslo@127.0.0.1:3306/ser")
> > > > > > >
> > > > > > >
> > > > > > > # -- acc params --
> > > > > > > # set the reporting log level
> > > > > > > modparam("acc", "log_level", 2)
> > > > > > > # number of flag, which will be used for accounting; if a
message
> > is
> > > > > > > # labeled with this flag, its completion status will be
reported
> > > > > > > modparam("acc", "log_flag", 2 )
> > > > > > >
> > > > > > > # -- rr params --
> > > > > > > # add value to ;lr param to make some broken UAs happy
> > > > > > > modparam("rr", "enable_full_lr", 1)
> > > > > > >
> > > > > > > # We will you flag 6 to mark NATed contacts
> > > > > > > # modparam("registrar", "nat_flag", 6)
> > > > > > >
> > > > > > > # Enable NAT pinging
> > > > > > > # modparam("nathelper", "natping_interval", 30)
> > > > > > >
> > > > > > > # Ping only contacts that are known to be
> > > > > > > # behind NAT
> > > > > > > # modparam("nathelper", "ping_nated_only", 1)
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > # -------------------------  request routing
> > > logic -------------------
> > > > > > >
> > > > > > >
> > > > > > > # main routing logic
> > > > > > >
> > > > > > > alias="sipdemo.routerboy.com"
> > > > > > >
> > > > > > > route{
> > > > > > >          # allows sipdemo and sipdemonat to call each other
> > > > > > >          if (uri=~"sipdemonat.routerboy.com") {
> > > > > > >             rewritehost("sipdemo.routerboy.com");
> > > > > > >          };
> > > > > > >
> > > > > > >         # initial sanity checks -- messages with
> > > > > > >         # max_forwards==0, or excessively long requests
> > > > > > >         if (!mf_process_maxfwd_header("10")) {
> > > > > > >                 sl_send_reply("483","Too Many Hops");
> > > > > > >                 break;
> > > > > > >         };
> > > > > > >         if (msg:len >=  max_len ) {
> > > > > > >                 sl_send_reply("513", "Message too big");
> > > > > > >                 break;
> > > > > > >         };
> > > > > > >
> > > > > > >         # we record-route all messages -- to make sure that
> > > > > > >         # subsequent messages will go through our proxy;
that's
> > > > > > >         # particularly good if upstream and downstream
entities
> > > > > > >         # use different transport protocol
> > > > > > >         if (!method=="REGISTER") record_route();
> > > > > > >
> > > > > > >         # subsequent messages withing a dialog should take the
> > > > > > >         # path determined by record-routing
> > > > > > >         setflag(2);
> > > > > > >         if (loose_route()) {
> > > > > > >                 log(1, "LOG: loose_route\n");
> > > > > > >                 # mark routing logic in request
> > > > > > >                 append_hf("P-hint: rr-enforced\r\n");
> > > > > > >                 route(9);
> > > > > > >                 break;
> > > > > > >         };
> > > > > > >
> > > > > > >         if (!uri==myself) {
> > > > > > >                log(1, "LOG: Not myself\n");
> > > > > > >                 # mark routing logic in request
> > > > > > >                 append_hf("P-hint: outbound\r\n");
> > > > > > >                 route(9);
> > > > > > >                 break;
> > > > > > >         };
> > > > > > >
> > > > > > >         # if the request is for other domain use UsrLoc
> > > > > > >         # (in case, it does not work, use the following
command
> > > > > > >         # with proper names and addresses in it)
> > > > > > >         if (uri==myself) {
> > > > > > >
> > > > > > >                 if (method=="REGISTER") {
> > > > > > >
> > > > > > > # Uncomment this if you want to use digest authentication
> > > > > > >                         if
> > (!www_authorize("sipdemo.routerboy.com",
> > > > > > > "subscriber")) {
> > > > > > >
> > > www_challenge("sipdemo.routerboy.com",
> > > > > "0");
> > > > > > >                                 break;
> > > > > > >                         };
> > > > > > >
> > > > > > >                         save("location");
> > > > > > >                         break;
> > > > > > >                 };
> > > > > > >
> > > > > > >
> > > > > > >                 lookup("aliases");
> > > > > > >                 log(1, "LOG: Loaded aliases\n");
> > > > > > >                 if (lookup("location")) {
> > > > > > >                         log(1, "LOG: Match location\n");
> > > > > > >                         append_hf("P-hint: usrloc
applied\r\n");
> > > > > > >                         route(9);
> > > > > > >                         break;
> > > > > > >                 };
> > > > > > >                 if (uri=~"^sip:25[0-9][0-9]@" ||
uri=~"^sip:8601@"
> > > ||
> > > > > > > uri=~"^sip:41038425[0-9][0-9]@" || uri=~"^sip:4105443521@" ||
> > > > > > > uri=~"^sip:4106474391@") {
> > > > > > >                         # Attempts to call Toad
> > > > > > >                         route(2);
> > > > > > >                         route(9);
> > > > > > >                         break;
> > > > > > >                 };
> > > > > > >                 if (uri=~"^sip:[0-9]{10}@" ||
uri=~"^1[0-9]{10}@")
> > {
> > > > > > >                         # Attempts to call PSTN
> > > > > > >                         route(1);
> > > > > > >                         route(9);
> > > > > > >                         break;
> > > > > > >                 };
> > > > > > >
> > > > > > >                 # native SIP destinations are handled using
our
> > > USRLOC
> > > > > DB
> > > > > > >                 if (!lookup("location")) {
> > > > > > >                         sl_send_reply("404", "Not Found");
> > > > > > >                         break;
> > > > > > >                 };
> > > > > > >         };
> > > > > > > }
> > > > > > >
> > > > > > > route[1]
> > > > > > > {
> > > > > > >         # if 10 digits add a 1
> > > > > > >         if (uri=~"^sip:[0-9]{10}@") {
> > > > > > >             prefix("1");
> > > > > > >         };
> > > > > > >         # send to Core for PSTN
> > > > > > >         rewritehostport("xxx.163.xxx.7:7021");
> > > > > > > }
> > > > > > >
> > > > > > > route[2]
> > > > > > > {
> > > > > > >         # rewrites to send to toad asterisk and make
compatiable
> > for
> > > > > PSTN
> > > > > > > Failover
> > > > > > >         if (uri=~"^sip:25[0-9][0-9]@") {
> > > > > > >         strip(2);
> > > > > > >         prefix("41038425");
> > > > > > >         };
> > > > > > >         if (uri=~"^sip:8601@") {
> > > > > > >         strip(4);
> > > > > > >         prefix("4106474391");
> > > > > > >         };
> > > > > > >
> > > > > > >         # Send to Toad * PBX
> > > > > > >         rewritehost("asterisk.toad.net");
> > > > > > > }
> > > > > > >
> > > > > > >
> > > > > > > route[9]
> > > > > > > {
> > > > > > >         # Specify what we want to do on failure
> > > > > > >         #if (!search("P-hint: usrloc applied")) {
> > > > > > >         #       t_on_failure("1");
> > > > > > >         #};
> > > > > > >         # Send Call
> > > > > > >         log(1, "LOG: route9, t_relay\n");
> > > > > > >         t_relay();
> > > > > > > }
> > > > > > >
> > > > > > > failure_route[1] {
> > > > > > >     log(1, "LOG: Call in failure_route1\n");
> > > > > > >     # for some reason, the original forwarding attempt
> > > > > > >     # failed, try at another UR25I
> > > > > > >     append_branch("sip:162.33.xxx.xxx:5060");
> > > > > > >     # if this new attempt fails too, try another failure_route
> > > > > > >             if (uri=~"^sip:[0-9]{10}@") {
> > > > > > >                 prefix("1");
> > > > > > >             };
> > > > > > >     t_relay();
> > > > > > > }
> > > > > > >
> > > > > > > ----- Original Message ----- 
> > > > > > > From: "Jan Janak" <jan at iptel.org>
> > > > > > > To: "Glenn Dalgliesh" <ser at techhat.com>
> > > > > > > Cc: <serdev at lists.iptel.org>
> > > > > > > Sent: Friday, January 23, 2004 4:46 PM
> > > > > > > Subject: Re: [Serdev] Lastest CVS mysql authentication
problems
> > > > > > >
> > > > > > >
> > > > > > > > In the devel version a differen database URI is used, it
should
> > be
> > > > > > > > mysql://ser:heslo@dbhost/ser instead of
> > sql://ser:heslo@dbhost/ser
> > > > > > > >
> > > > > > > > (sql: -> mysql:).
> > > > > > > >
> > > > > > > >  Jan
> > > > > > > >
> > > > > > > > On 23-01 16:47, Glenn Dalgliesh wrote:
> > > > > > > > > I downloaded and compiled lastest CVS and using my config
from
> > > 8.12
> > > > > > > authentications fails. I recreated the database table using
the
> > > > > ser_mysql
> > > > > > > script but the only way I seem to be able to register a sip
device
> > > is to
> > > > > > > remove the authentication lines. Has their been any change in
this
> > > area?
> > > > > > > > >
> > > > > > > > > The main goal is to get nathelper, authentication, and
aliases
> > > > > working
> > > > > > > in a version.
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > >
> > > > > > > > > _______________________________________________
> > > > > > > > > Serdev mailing list
> > > > > > > > > serdev at lists.iptel.org
> > > > > > > > > http://lists.iptel.org/mailman/listinfo/serdev
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Serdev mailing list
> > > > > > > serdev at lists.iptel.org
> > > > > > > http://lists.iptel.org/mailman/listinfo/serdev
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Serdev mailing list
> > > > > serdev at lists.iptel.org
> > > > > http://lists.iptel.org/mailman/listinfo/serdev
> > > >
> > >
> >
> > _______________________________________________
> > Serdev mailing list
> > serdev at lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serdev
>




More information about the Serdev mailing list