Hi!
Every once in a while I came across certain messages that apparently
could not be parsed properly. To track down these I've written a small
helper program.
Put this into the tests/ subdirectory and follow the compilation
instructions!
Until now I only found STUN messages that used port 5060 so I might
need to increase debugging inside the SER code.
Here's the README:
This program feeds SIP messages into the SER SIP parser to analyze its
behaviour. Valid data sources are live traffic obtained via pcap,
previously recorded traffic contained in pcap capture files or a plain
containing a single SIP message.
Usage:
Depending on the command line parameters parser_test switches between
the aforementioned modes.
- monitoring live traffic:
# parser_test -i <interface> -s <pcap dest>
- analyzing pcap file:
$ parser_test -r <pcap source> -s <pcap dest>
- file mode
$ parser_test -f <buffer>
-s <pcap dest> needs to be set in pcap based modes. This newly generated
pcap file contains all messages that could not be parsed properly by
parse_msg().
Don't forget to set LD_LIBRARY_PATH to include ../lib/cds when running
parser_test, i.e.
$ LD_LIBRARY_PATH=../lib/cds ./parser_test -f testfile
Compilation:
$ gcc -c parser_test.c -o parser_test.o -Wall -g
$ gcc -o parser_test parser_test.o -lcds -L../lib/cds -lpcap ../dprint.o \
../mem/mem.o ../mem/shm_mem.o ../mem/q_malloc.o ../error.o \
../data_lump*o ../parser/contact/parse_contact.o \
../parser/contact/contact.o ../parser/digest/*.o ../parser/*.o -g
Caveats:
- Fragements are not de-fragmented. This could be done using libnids
- verbose debug messages
The sources as well as the README are available from:
http://dump.wormulon.net/parser_test/
--
Hendrik Scholz - <hscholz(a)raisdorf.net> - http://www.wormulon.net/
Hi Friend,
I am from India. Just following the Dan Austin SER HowTo and trying to install and configure ser server for the past one week no result. Feel helpless, can any one help me to make it successful.
Am using
ser-0.8.12-0.rpm
ser-mysql-0.8.12-0.rpm
RedHat Enterprise Linux 3
bind 9
MySQL 4.0.20-0
Machine: Intel x86
Can you provide me any sample files - ser.cnf, serctl, ser_mysql.sh from a successful installation.
Awaiting your valuable suggestions and guidance.
Sethu.
---------------------------------
Yahoo! Photos NEW, now offering a quality print service from just 8p a photo.
Dear All,
I want to make use of avpops module to achieve forward on-no-reply. When ua1 calls ua2 and ua2 is off-line, or busy, or doesn't answer the phone, the invite should be forwarded to ua3 and ua3 begins ringing.
In my tests, first, ua1 sends "cancel" when ua2 is ringing. Ua1 receives "487 Request Terminated" from SER. Second, ua1 sends "cancel" when ua3 is ringing. So, theoretically, ua1 should receive "487 Request Terminated" after "200 canceling" from SER, right? But, ua1 received "408 Request Timeout" instead. So strange. How come?
I think something is wrong with my ser.cfg. Could anyone help me about this? Thanks in advance.
Here is my ser.cfg:
# ------------------ 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"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/avp.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/dbtext.so"
loadmodule "/usr/local/lib/ser/modules/avpops.so"
#loadmodule "/usr/local/lib/ser/modules/postgres.so"
#loadmodule "/usr/local/lib/ser/modules/flatstore.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/auth_radius.so"
loadmodule "/usr/local/lib/ser/modules/group_radius.so"
loadmodule "/usr/local/lib/ser/modules/uri_radius.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", 1)
# -- 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")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam("tm", "fr_timer", 10 )
modparam("tm", "fr_inv_timer", 20)
modparam("tm", "noisy_ctimer", 1)
modparam("auth_radius|uri_radius|group_radius", "radius_config", "/usr/local/etc/radiusclient-ng/radiusclient.conf")
modparam("avpops","avp_url","mysql://ser:heslo@localhost/ser")
modparam("avpops","avp_table","usr_preferences")
# ------------------------- 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 >= 2048 ) {
sl_send_reply("513", "Message too big");
break;
};
if (!method=="REGISTER") record_route();
if (loose_route()) {
t_relay();
break;
};
if (method=="INVITE") {
lookup("location");
#if (!lookup("location")) {
# sl_send_reply("404", "Not Found");
# break;
#};
}
if (method=="REGISTER") {
log("REGISTER\n");
if (!radius_www_authorize("localhost.localdomain")) {
www_challenge("localhost.localdomain", "0");
break;
};
save("location");
break;
};
if (method=="INVITE") {
if (!radius_proxy_authorize("localhost.localdomain")) {
proxy_challenge("localhost.localdomain", "1");
break;
};
}
# if we do not get a positive reply, continue at failure_route[1]
t_on_failure("1");
# forward the request to all destinations in destination set now
t_relay();
#if (!t_relay()) {
# sl_reply_error();
#};
}
failure_route[1] {
#when caller cancel, terminate the call
if (t_check_status("487")) {
t_reply("487", "Request Terminated");
break;
};
if ( ( avp_db_load("$ruri","s:redirect_on_failure") && avp_check("redirect_on_failure","eq/i:1"))) {
# User need to forward
log(1, "User wants redirection.\n");
if ( ( avp_db_load("$ruri","s:redirectnumber") && !avp_check("redirectnumber","re/^$"))) {
log(1,"first redirect\n");
#avp_print();
attr2uri("redirect number");
lookup("location");
append_branch();
#t_on_failure("2");
t_relay();
}
else {
t_reply("408", "TimeOut");
break;
};
}
else {
t_reply("404", "Not Found");
break;
};
}
Hi All,
I was able to install SER and call out successfully. I configured ser.cfg after
seeing some examples in voip-info.org, almost all worked except accounting. I
am using stable ser 0.9.4 version and followed instructions in
http://www.voip-info.org/tiki-index.php?page=SER+example+accounting. When I
check the database for records related tables are empty. I did not install
radius, is this required to enable accounting? I am attaching my ser.cfg,
please check it and guide me.
Any help will be sincerely appreciated.
Thanks,
Manoj.
hello,
we had configured the mysql database and html site on hard disk.everything was
working fine with domain alise sip.abcd.com for abcd.com . ip address was .
later we wated to change it from sip.abcd.com to simply abcd.com .
so we just removed child name sip from the domain now everything is working fine
on web end but when we try to connect or log via x10 like software it prompts a
error login failure contact network admin message while login in via X10.
we have completely changed mysql data acordng to domain name also we made domain
anme change in ser.cfg & cofin.php file but the problem is remain same if theres
any ohter settings do let me know.
thanks
vinod bisen
NOTE: Once the Domain name has been chosen it is not easy to change,
since all users are recorded with the domain name, so if you change it
you will have to update the config of each user's phone
Hi All,
I purchased some minutes from a minute provider and looking to configure that
with SER. But I did not find any documentation or info on how to do that?
Please tell me how can I do this or lead me to related documentaion or links.
Thanks,
Manoj.
Just a couple of quick questions relating to aliases :)
If the environment variable SIP_DOMAIN is not set, why does adding an alias
with serctl fail?:
nick@customer-dev3:~> sudo serctl alias add 123456 sip:nick@altcall.com
domain unknown: use usernames with domain or set default domain in
SIP_DOMAIN
Once I set SIP_DOMAIN like so:
export SIP_DOMAIN=altcall.com
Adding an alias as described above works, but why is the alias not listed
in the MySQL database?:
mysql> select * from aliases;
Empty set (0.00 sec)
Thanks and enjoy the weekend!
-- Nick
e: nick.hoffman(a)altcall.com
p: +61 7 5591 3588
f: +61 7 5591 6588
If you receive this email by mistake, please notify us and do not make any
use of the email. We do not waive any privilege, confidentiality or
copyright associated with it.
Hi,
This is more an Asterisk question, I know, but I am sure a good many of
you have similar setups....
We are using Asterisk 1.2.3 with RealTime for PSTN and Voicemail where
users register with an OpenSER cluster (2 nodes currently).
When they request PSTN they are forwarded to * where they have entries
in SIP realtime database. This ensures that they get their correct
CallerID and context, etc.
This is working fine at present, where I have the SIP users set up with
the following relevant SIP entries:
name username
callerid "User" <XXXXXXX>
canreinvite no
context context
dtmfmode RFC2833
host 123.123.123.123
insecure port
type friend
username username
Note that I have set the host to the IP of the OpenSER server, and there
is no secret.
I have the OpenSER servers set up as peers also.
My questions are:
1. Is this the best way to to set this up?
2. I have many users, and I need to be certain that a) the username
exists and b) that the request came from one of our OpenSER servers.
Will the above ensure that both the username AND the host are correct? I
have seen instances where if I have a static SIP entry with the same
host= line, a non-existent user will be accepted as this static user.
3. How can have more than one possible host= setting for a user (i.e.
they could come in from either of our OpenSER servers.
Thanks!
--
-Barry Flanagan
Hi,
this is reminder for the TM API clean-up. Friday 10th, the old TM
functions like t_relay_to_xxx(), t_replicate_xxx(),
t_forward_nonack_udp(), etc will be definitely removed.
Here is the original email describing the changes:
http://www.openser.org/pipermail/devel/2006-January/001659.html
this changes will affect *only* the devel branch. For its users, please
migrate your scripts to new function prototypes.
thanks and regards,
Bogdan