Raymond Chen writes:
> After removing the _F from HDR, still a error during compilation
>
> gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -Wall
> lcr_mod.c: In function `load_contacts':
...
> lcr_mod.c:830: error: too many arguments to function `next_branch'
> lcr_mod.c:852: error: too many arguments to function `next_branch'
> make[1]: *** [lcr_mod.o] Error 1
ok, since i last time compiled lcr module for 0.9.0 it seems that iptel
folks have added a new argument to next_branch function. just remove
the last zero argument from the two function calls.
i'll make available a 0.9.0 version of lcr module on my web site
shortly.
-- juha
Hi,
I installed SER 8.14 exactly following INSTALL guide. I am running
on the same machine MySQL 4.1.10 and I successfuly initialised
ser database.
Serweb is working fine with mysql, any changes in the mysql database is visible on serweb.
In /var/log/messages I can see :
Mar 4 15:38:05 linux ser: Listening on
Mar 4 15:38:05 linux ser: 127.0.0.1 [127.0.0.1]:5060
Mar 4 15:38:05 linux ser: 82.146.123.252 [82.146.123.252]:5060
Mar 4 15:38:05 linux ser: Aliases: linux.finalcut.be:5060 finalcut.be:5060 localhost:5060 localhost.localdomain:5060
Mar 4 15:38:05 linux ser: ser startup succeeded
Mar 4 15:38:05 linux /usr/sbin/ser[2652]: connect_db(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Mar 4 15:38:05 linux /usr/sbin/ser[2652]: db_init(): Error while trying to connect database
Mar 4 15:38:05 linux /usr/sbin/ser[2652]: mod_init(): Error while connecting database
Mar 4 15:38:05 linux /usr/sbin/ser[2652]: init_mod(): Error while initializing module usrloc
Mar 4 15:38:05 linux crond: crond startup succeeded
If I don'tuse ser-mysql, everythings are ok, of course...
Any idea?
Olivier
Hi All.
How do I get SER to account for failed INVITE messages? For example,
if someone attempts to call a PSTN number and they do not have the
free-pstn ACL, then our server replies with a 503 Service Unavailable.
I'd like to see this appear in the MySQL acc table.
Do I just use the setflag() function in the failure route for INVITEs?
For example:
route {
t_on_failure("1");
if (!t_relay()) {
sl_reply_error();
break;
}
}
faillure_route[1] {
if (method=="INVITE") {
setflag(1);
}
}
Regards,
Paul
Hi,
I tried the lcr module for rel_0_9_0 found at
http://tutpro.com/tmp/lcr-0.9.0.tgz, but it seems that subsequent calls
of next_gw() always return the same gateway as the first call of
next_gw(). Do I miss something?
Here's my setup:
mysql root@ser> select * from lcr;
+--------+----------+--------+----------+
| prefix | from_uri | grp_id | priority |
+--------+----------+--------+----------+
| | % | 1 | 1 |
+--------+----------+--------+----------+
1 row in set (0.00 sec)
mysql root@ser> select * from gw;
+-----------------+------------+------+--------+
| gw_name | ip_addr | port | grp_id |
+-----------------+------------+------+--------+
| sipgw1.inode.at | 833315646 | 5060 | 1 |
| sipgw2.inode.at | 1780932433 | 5060 | 1 |
| sipgw3.inode.at | 850092862 | 5060 | 1 |
| sipgw4.inode.at | 1797709649 | 5060 | 1 |
| sipgw5.inode.at | 866870078 | 5060 | 1 |
| sipgw6.inode.at | 883647294 | 5060 | 1 |
+-----------------+------------+------+--------+
And in my ser-config I do:
route[0]
{
# ...
if(!load_gws())
{
sl_send_reply("500",
"Internal server error, unable to load gateways");
break;
}
if(!next_gw())
{
sl_send_reply("503", "Service not available, no gateways found");
break;
}
t_on_failure("2");
# ...
t_relay();
}
failure_route[2]
{
if(method == "INVITE" && t_check_status("408|500|503"))
{
if (!next_gw())
{
t_reply("503", "Service not available, no more gateways");
break;
}
t_on_failure("2");
# ...
t_relay();
}
}
But the failure route 2 always routes to the same gateway as the route 0
or previous calls of failure route 2.
Thanks,
Andy
So, just to clear this up. You still have to reverse the ip, so:
example:
209.247.17.5
reverses to:
5.17.247.209
which long format comes to:
85063633
Thanks .. ??
-----Original Message-----
From: Iqbal [mailto:iqbal@gigo.co.uk]
Sent: Wednesday, March 02, 2005 2:55 PM
To: jh(a)lohi.tutpro.com
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] lcr module and column type in DB
cheers, just what I needed..one thing though I had to reverse the
format...not sure if I was doing it wrong or something else.
Anyhow for all those with the same problem manually calculating it is
IP=A.B.C.D
IPlong= A*16777216 + B*65536 + C*256 + D
but as mentioned above I for some reason had to do
D*16777216 + C*65536 + B*256 + A
Iqbal
On 3/2/2005, "Juha Heinanen" <jh(a)lohi.tutpro.com> wrote:
>Iqbal writes:
>
> > Any ideas
>
>yes, you have to put in ip_addr field integer representation of ip
>address. use, for example, php's ip2long function.
>
>-- juha
>
>
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Conditions as follows :
* SER runs on a Public IP
* SER works without auth & database modules,
* Nearly all user behind NAT (but routers configured to do port forwarding for TCP/UDP 5060) to help SER in some cases,
* Users numbers in format of 833XXXXXXX 834XXXXXXX and they should call each P2P-SIP-Calls (if not behind NAT),
* If a user need to call PSTN end point (SIP Gateway located at 212.154.32.154) the call traffic should flow over SER to SIP Gateway via T1 connection already located between that systems so SER handles all voice traffic by help of RTP Proxy.
* UA's registers on SER (Zyxel Prestige 2000, Zyxel Prestige 200W, Cisco ATA186 etc.)
Problem is users cannot call each other (if i comment lines for nathelper they can call)
It's clear i think, and below is my ser.cfg, what do i need extra or erase. (It was successful without nathelper module and added dial plan)
I get this error :
root@sipproxy/usr/local/etc/ser> ser 127.0.0.1 -n 1 -ddddddd -D -E
0(4419) read 23490987 from /dev/random
0(4419) seeding PRNG with 1133443665
0(4419) test random number 1528986547
0(4419) shm_mem_init: success
0(4419) DEBUG: register_fifo_cmd: new command (print) registered
0(4419) DEBUG: register_fifo_cmd: new command (uptime) registered
0(4419) DEBUG: register_fifo_cmd: new command (version) registered
0(4419) DEBUG: register_fifo_cmd: new command (pwd) registered
0(4419) DEBUG: register_fifo_cmd: new command (arg) registered
0(4419) DEBUG: register_fifo_cmd: new command (which) registered
0(4419) DEBUG: register_fifo_cmd: new command (ps) registered
0(4419) DEBUG: register_fifo_cmd: new command (kill) registered
0(4419) parse error (60,46-47): parse error
0(4419) parse error (60,46-47): bad command
0(4419) parse error (60,46-47): bad command
0(4419) parse error (60,48-49): bad command
0(4419) parse error (65,6-7): parse error
0(4419) parse error (65,6-7):
ERROR: bad config file (6 errors)
root@sipproxy/usr/local/etc/ser>
<<< ser.cfg. starts here <<<
#
# /usr/local/etc/ser/ser.cfg 2005/04/03 12:00:00 by Ozan Blotter $
#
# simple quick-start config script with nathelper/rtpproxy
# for IPv4/IPv6 gatewaying
#
# ----------- global configuration parameters ------------------------
debug=3 # debug level
#fork=yes
#log_stderror=no #
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=2 # count of ser processes per interface
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.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"
#Nathelper for RTPproxy
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam ("nathelper", "rtpproxy_sock", "/var/run/rtpproxy.sock")
# ------------------------- request routing logic -------------------
# main routing logic
route {
# 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;
};
# route invitation request to other domains
if (!uri == myself) && method == "INVITE") {
record_route();
if (!t_relay())
sl_reply_error();
break;
};
if (method == "REGISTER") {
if (af == inet) {
save ("location_inet4");
} else if (af ==inet6) {
save ("location_inet6");
} else {
sl_send_reply("403", "Call Cannot Be Served Here");
};
break;
};
if (method == "INVITE") {
if (lookup("location_inet4")) {
# Comment Out Three Lines Below If You Want
# RTP for IPv4>IPv4 Calls To Go Directly
# Between UAs
if (af == inet)
if (force_rtp_proxy("FAII"))
t_on_reply("1");
# Proxy Session From An Internal IPv4
# Phone To An External IPv6 Address
if (af == inet6)
if (force_rtp_proxy("FAIE"))
t_on_reply("1");
} else if (lookup("location_inet6")) {
# Proxy Session From An External IPv6
# Phone To An Internal IPv4 Address
if (af == inet)
if (force_rtp_proxy(FAEI"))
t_on_reply("1");
# Comment Out Three Lines Below If You Want
# RTP for IPv6>IPv6 Calls To Go Directly
# Between UAs
if (af == inet6)
if (force_rtp_proxy("FAEE"))
t_on_reply("1");
} else {
sl_send_reply("403", "Call Cannot Be Served Here");
break;
};
};
if (method == "BYE" || method == "CANCEL")
unforce_rtp_proxy();
#Do Strict Routing If Pre-Loaded Route Headers Present
if (loose_route()) {
t_relay();
break;
};
if (method == "INVITE")
record_route();
if (!t_relay())
sl_reply_error();
}
onreply_route[1] {
if (!(status=~"183" || status=~"200"))
break;
force_rtp_proxy("FA");
}
>>> ser.cfg. ends here >>>
(( My ser.cfg is linked to at the end of the email. ))
Basically, right now I have an AudioCodes FXO device (10.66.7.250)
that registers with the proxy just fine, and when I dial out1 from my
softphone (10.66.4.254), it dials to analog port 1 on the FXO, and
out2 dials to analog port 2 on the FXO. I can do outbound dialing just
fine.
However, if I call the phone line plugged into either port, the
requests hit the proxy (10.66.7.253) but don't ring the softphone. For
example, here is the output from tethereal if I try calling in to port
2:
4260.972077 10.66.7.250 -> 10.66.7.253 SIP/SDP Request: INVITE
sip:nbya2@nby-devproxy-01.tlsp.com, with session description
4260.972712 10.66.7.253 -> 10.66.7.250 SIP Status: 404 Not Found
4261.002006 10.66.7.250 -> 10.66.7.253 SIP Request: ACK
sip:nbya2@nby-devproxy-01.tlsp.com
My softphone (SJphone) is currently registered with the proxy with
username nbya2:
mysql> select username,domain,contact from location;
+--------------+--------+------------------------------+
| username | domain | contact |
+--------------+--------+------------------------------+
| nby-mp108-01 | | sip:nby-mp108-01@10.66.7.250 |
| nbya1 | | sip:nbya1@10.66.5.99:5060 |
| nbya2 | | sip:nbya2@10.66.4.254:5060 |
+--------------+--------+------------------------------+
3 rows in set (0.00 sec)
Here is the relevant output from serctrl ul show for that user:
...Record(0x402cd1f8)...
domain: 'location'
aor : 'nbya2'
~~~Contact(0x402cd238)~~~
domain : 'location'
aor : 'nbya2'
Contact : 'sip:nbya2@10.66.4.254:5060'
Expires : 2846
q : 0.00
Call-ID : '0D8E60D2-D1C3-439E-B099-3A327B6EB737(a)10.66.4.254'
CSeq : 2
replic : 0
User-Agent: 'SJLabs-SJphone/1.40.258'
State : CS_SYNC
Flags : 0
next : (nil)
prev : (nil)
~~~/Contact~~~~
.../Record...
I've tried dialing from both softphones that you can see listed there
in the mysql output, but they don't contact each other either.
Here is my ser config: http://aslan.homelinux.com/dana/tmp/ser.cfg
So, I'm unsure where to go from here. This proxy is only on my LAN, if
that makes any difference to you. I'd prefer to not change to
stateful, unless it is mandatory for user lookup, but I didn't find
any documentation yet that said that it was.
Please let me know what I'm doing wrong. I've been using Google, the
admin guide, examples from SIP.edu, voip-info.org, and I've tried the
IRC chatroom, but it's quiet right now.
--
Dana
Hi
this is probably a new feature, but would it be possible to have time
based callfwd options.
eg 1111(a)abc.com ---> 1112(a)abc.com between 9-5, I think this can be done
by setting a time field, and returning that result, which is then
compared to the machine time. If true alias, else look for next alias.
Iqbal
hi list..
i am winda
i make SER and it work well in local network. when i establish SER
server in public network. it cannot run. i have read the milist and the
solution are nethelper and mediaproxy/rtp proxy. i want ask how to start
to make nathelper+rtp proxy? please explain me step by step?...
oh ya.. i also read about rtp proxy, maxim's rtp proxy and media
proxy. can you explain me what is the different?
Thanks for help....:-)
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
Hi,
I'm trying to setup SER to only allow UAs to register their "location"
MySQL entry as specified in the "subscriber" table. Currently an
authorized user can set an arbritrary value in the "location" table.
Whats to prevent 1 authorized user from stealing anothers location
entry? For instance:
user1 - REGISTER sip:user1.blah.internal
user2 - REGISTER sip:user1.blah.internal
Now user2 has hijacked user1's location.
Thanks
JD