Hi!
I'm running ser-0.9.6, on FreeBSD 6.1-stable, database backend
is postgresql version 8.1.3.
Today I got errors in logfiles, saying:
messages.2.bz2:May 29 14:35:03 <XXX> /usr/local/sbin/ser[51448]:
ERROR:avpops:dbrow2avp: dbrow contains NULL fields
The similar problem reported in:
http://lists.iptel.org/pipermail/serusers/2005-May/019681.html
with much more detailed description of error, database contents
and config samples.
Patch is trivial, and looks more like a fix to copy'n'paste error:
in mysql/val.c function str2val states:
if (!_s) {
memset(_v, 0, sizeof(db_val_t));
VAL_TYPE(_v) = _t;
VAL_NULL(_v) = 1;
return 0;
}
VAL_NULL(_v) = 0;
and the last line mentions that 'well, that's value is not NULL'.
In postgresql/db_val.c, line 182, function str2valp, the same statement is the:
if (!_s) {
DLOG("str2valp", "got a null value");
VAL_TYPE(_v) = _t;
VAL_NULL(_v) = 1;
return 0;
}
without explicit notification that this is not-NULL value.
More than, nowhere else in this function VAL_NULL(_v) not set to 0.
So, if a value _v.val contained anyting but 0 at the function start,
resulting value will be threated as NULL despite the fact, that _s is NOT NULL.
Patch is obvious, just add VAL_NULL(_v)=0; after cited block (line 188) and
everyting will be ok.
At least for me it's ok for some hours :)
Hello,
We have a few hundred users registered to a openser we are running and
everything works fine, however i get som error messages in the logs I
would like to get rid of...
//sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: ERROR:parse_from_header: bad from header
/sbin/openser[28867]: xl_get_from: ERROR cannot parse FROM header
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: xl_get_to: ERROR cannot parse TO header
/sbin/openser[28867]: [REGISTER] from [<null>] to [<null>]
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: ERROR:maxfwd:is_maxfwd_present : parsing
MAX_FORWARD header failed!
/sbin/openser[28867]: ERROR:parse_from_header: bad from header
/sbin/openser[28867]: insert_RR(): From parsing failed
/sbin/openser[28867]: record_route(): Error while inserting Record-Route
line
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: find_first_route: Error while parsing headers
/sbin/openser[28867]: analyzing REGISTER request
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: find_credentials(): Error while parsing headers
/sbin/openser[28867]: pre_auth(): Error while looking for credentials
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: ERROR: get_hdr_field: bad to header
/sbin/openser[28867]: ERROR: bad header field
/sbin/openser[28867]: ERROR: build_res_buf_from_sip_req: alas,
parse_headers failed
/sbin/openser[28867]: pre_auth(): Error while sending 400 reply
/
Anyone has a clue what I can do to debug this to find out where the
request are coming from or what can be done to stop the invalid(?)
requests from being processed and clutter my logs?
Thanks
Lars Sundqvist
Hi guys,
I'd like to propose another possibility for a highly-available and
scalable system design based on SER:
The problems I've encountered for scalable systems are:
- Distribution of the user location and alias location among the nodes
(user location is based on registrations, alias location comes from
web interfaces and is used for call forwarding).
- Reloading up to date location tables after breakdown and recovery of a
node
So I'm just thinking loud about the following provisioning system:
- Write a client which fulfills the this demands:
- Receive one or more locations from SER via a SER module or from a
web application and distribute them to other
known clients. Take care of retransmissions if a client isn't
reachable or reports a temporary failure.
- Receive one or more locations from other clients and write
them into the SER FIFO. If writing into the FIFO fails, try to
write directly into the database (location-table, alias-table etc.).
Report a temporary failure if this also fails.
Maybe a centralized server should be used which receives the locations
from the clients and distributes them to other clients, so that the
nodes just know about the server and nothing about other nodes. This
would make integration of new nodes easy.
On the other hand, it's another single point of failure, so a
decentralized solution should be considered. But that would mean that
you've to inform every node about the existence of a new node.
The protocol used between the nodes should be simple and fast. So I
think SOAP drops out here. Maybe XMLRPC or ICE
(http://www.zeroc.com/ice.html) could be used.
One might think now why not just use replication on SIP layer, but
t_replicate only supports one peer and you've no possibility to get
locations on a node while it's down. Replication of other location
tables like the alias-table is also not possible.
I'd be willing to release these parts as GPL for creating an open
framework for carrier-grade SER integration, so any feedback,
improvements or flames are highly welcome.
Cheers,
Andy
Hi Gang.
The company I work for is interested in buying DIDs from Europe. Of course
the connection should be SIP.
If any of you is selling them, please contact me off the list.
Regards
Juan Ferrari
VoIP & Telecom Specialist
United World Telecom
Phone: +1561-276 7156 ext. 302
Thanks, I've looked into but it works only with 1.1.x version...!!!
What's the different with avp_db_store command, may I use it to store something in my SQL DB? I'll try to do but I have some problems, he doesn't register...
I have another question: I need to work over sdp messages, is possible to do a parsing, always using the scripts language...?
Any thought?
Thanks
Davide
-----Messaggio originale-----
Da: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
Inviato: mercoledì 5 aprile 2006 19.15
A: D'Addelfio Davide
Cc: Jayesh Nambiar; Bogdan-Andrei Iancu; openser
Oggetto: Re: R: [Users] using AVPs to write into database
Hello,
On 04/05/06 18:01, D'Addelfio Davide wrote:
>
> Hi guys, I have a similar problem, maybe easier. I'm new in openser so
> I'd like to have some help.
>
> I'd like openser create a table in MySQL db when receive an INVITE, a
> row with from uri, method and something else, I've look into modules
> docs but I've not understanding at all...could you help me, please?
>
if you are using openser development version, then take a look at
avp_db_query() in avpops module
http://openser.org/docs/modules/1.1.x/avpops.html#AEN239
Cheers,
Daniel
> Thanks for reply
>
> Davide
>
> ------------------------------------------------------------------------
>
> *Da:* users-bounces(a)openser.org [mailto:users-bounces@openser.org]
> *Per conto di *Jayesh Nambiar
> *Inviato:* mercoledì 5 aprile 2006 15.53
> *A:* Bogdan-Andrei Iancu
> *Cc:* openser
> *Oggetto:* Re: [Users] using AVPs to write into database
>
> Hi Bogdan,
>
> Thanks for the reply and sorry for sending the earlier mail 4 times as
> yahoo was not responding peoperly.
>
> When I do an avp_write(), why does the avp name get stored in the uuid
> column?
>
> I am not using any uuid as of now. I also tried to add the username of
> the person who is calling but it again creates two rows, one with the
> value as
>
> username and other row with the value as forwarded number.
>
> I thought if there is a way to insert the username also, it wud be
> easier to check, if the incoming call for that user is to be forwarded
> or not.
>
> I get the following in my usr_preferences table after I dial 86
> followed by any number.
>
> +-----------+----------+--------+-----------+------+-----------------------------+---------------------+
> | uuid | username | domain | attribute | type | value | modified |
> +-----------+----------+--------+-----------+------+-----------------------------+---------------------+
> | s:callfwd | | | callfwd | 0 | sip:5515551478@202.80.61.10 |
> 2006-04-05 19:10:49 |
> +-----------+----------+--------+-----------+------+-----------------------------+---------------------+
>
> The script snippet is as follows:
>
> if(uri=~"^sip:86[0-9]*@") {
>
>
> strip(2);
> avp_write("$ruri", "s:callfwd");
> #avp_write("$from/username", "i:999");
> #avp_db_store("i:999", "i:/usr_preferences");
> avp_db_store("s:callfwd", "s:callfwd/usr_preferences");
> sl_send_reply("200", "OK");
> exit;
> };
>
>
> */Bogdan-Andrei Iancu <bogdan(a)voice-system.ro>/* wrote:
>
> Hi,
>
> you need two steps:
> 1) write the ruri (after strip) into an AVP - use avp_write()
> 2) write the avp into the db - use avp_db_store()
>
> regards,
> bogdan
>
> Jayesh Nambiar wrote:
>
> > Hi all,
> > I am trying to implement the call forwarding feature in openser. The
> > forwarding part is fine. But I have the follwing scenario:
> > Whenever a user needs to change his forwarding number, he should be
> > able to do so from his end device only.
> > For eg: He first presses 86 and then the 10 digit number to be
> > forwarded. Here the 86 has to be stripped and the 10 digit number
> > should be inserted into the call forward value column of the
> > preferences table.
> > Also if he wants to remove the forwarded number, he can do so by
> > pressing say for eg: 87. on receiving this number openser should
> > delete that value from the
> > table.
> > Is this possible. I tried to do the following, but somehow it
> does not
> > change the
> > value.
> > if(uri=~"^sip:86[0-9]*@") {
> > if(avp_db_load("$from/username", "s:callfwd")) { #check
> > if call-fwd feature is enabled for the user
> > log(1,"AVP condition returned true");
> > strip(2);
> > avp_write("$ruri", "s:callfwd");
> > avp_print();
> > log(1,"AVP written");
> > sl_send_reply("200", "OK");
> > exit;
> > };
> > };
> > Is avp_write the proper method or I guess avp_db_store can also help
> > me. The avp_print() function also does not show me anything in the
> > log. Are there any
> > logical mistakes or I have mis-interpreted the syntax of avpops
> functions.
> > Please help me in thsi regard.
> > Thanks a lot in advance.
> > Jayesh.
> >
> > ------------------------------------------------------------------------
> > Jiyo cricket on Yahoo! India cricket
> >
> > Yahoo! Messenger Mobile
> >
> > Stay in touch with your buddies all the time.
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Users mailing list
> >Users(a)openser.org
> >http://openser.org/cgi-bin/mailman/listinfo/users
> >
> >
>
> ------------------------------------------------------------------------
>
> Jiyo cricket on Yahoo! India cricket
> <http://us.rd.yahoo.com/mail/in/mailcricket/*http:/in.sports.yahoo.com/crick…>
> Yahoo! Messenger Mobile
> <http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http:/in.mobile.yahoo.c…>
> Stay in touch with your buddies all the time.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users(a)openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
Hi,
I was wondering how I can route my SER users to other
SIP servers, without need of authentication to other
server.
I mean this:
My User -> Auth -> My SER
My SER -> Auth -> Other SIP Server
My User --------make call--------> My SER
--------route call-------> Other SIP Server
Thank you.
Kaveh
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Hello,
how could it be done through AVP´s and database lookup, to do a parallel
ringing.
Following setup:
If uri eg example(a)test.dom is called, this call should be forwarded in
parallel to a pstn-gateway.
That means, receive the AVP with the telephonnumber associated to uri
example(a)test.dom, rewrite uri, rewrite host/port and forward in parallel
to gateway.
I tried "append_branch", but was not able to put in the AVP
(phonenumber), rewrite host/port points directly to the gateway.
I have no troubles to load the AVP, only to make is possible, that the
SIP Client and PSTN Phone are ringing in parallel.
Some suggestions ?
regards,
Andreas
Hi Joao,
No I was not able to solve the issue.
It seems (this is my guess tough) that the Portaone RTP proxy assumes that it has one public IP adress, so the valid configuration to use it is Public Nt-Private Nt. I was not able to make it work in other configurations (neiher I got feedback from Portaone to do so).
Nevertheless the code is available, so it could be modified...as long as you have the time and will to do so. I did not ;).
Best regards,
josé
-----Original Message-----
From: Joao Pereira [mailto:joao.pereira@fccn.pt]
Sent: 19. oktober 2005 20:17
To: Jose Soler; serusers(a)lists.iptel.org
Subject: Re: [Serusers] RTP proxy between two subnetworks with private @s
Hello, did you made it to put the clients of networks A and B to call
each other?
I want to do the same, and tried a lot of SER/RTPproxy configurations,
including the one in: /ser-0.9.0/modules/nathelper/examples/alg.cfg
and also tried to run rtpproxy with the "-l 10.0.0.135/193.136.2.2" option. But I just was able to ring the phones (wen calling between networks),
but the RTP doesnt pass...
If you found the solution, please tell me.
Thanks
Joao Pereia
www.fccn.pt
Jose Soler wrote:
> Hi,
>
> I am trying to figure out how to solve the follwoing problem. I have
> two subnetworks, A and B, with different private ip adressing schemes
> (IP@A <mailto:IP@A>) and (IP@B <mailto:IP@B>).
>
> SER is installed in a computer with network interfaces towards both
> subnetworks.
> SER's SIP signalling proxying operation works properly within the
> subnetworks and when trying to set up a communication between users in
> A and B. But in that last case, obviously there is no media at all
> circulating among the subnetworks.
>
> Portaone's RTP proxy has been installed and configured in the computer
> with interfaces towards both subnetworks where SER is installed.
>
> I am trying to configure SER so that, based on the nathelper module,
> when communication between both subnetworks occurs, the RTP proxy is
> involved and the communication (also media and not only signalling) is
> possible. BUT I am making something wrong, becouse it does not work ...
>
> Can anyone give me a hand /hint?
> Thanks a lot in advance / in any case.
>
> My SER config file is the following:
>
>
> #
>
> # ----------- global configuration parameters ------------------------
>
> /* Uncomment these lines to enter debugging mode
>
> debug=7
>
> fork=no
>
> log_stderror=yes
>
> */
>
> check_via=no # (cmd. line: -v)
>
> dns=no # (cmd. line: -r)
>
> rev_dns=no # (cmd. line: -R)
>
> fifo="/tmp/ser_fifo"
>
> fifo_mode=0662
>
> alias=wirelessip.x.x.x
>
> alias=sip..x.x.x
>
> alias=x.x.x
>
> log_stderror=no
>
> debug=3
>
> children=3
>
> mhomed=1
>
> # ------------------ module loading ----------------------------------
>
> # Uncomment this if you want to use SQL database
>
> loadmodule "/lib/ser/modules/mysql.so"
>
> loadmodule "/lib/ser/modules/sl.so"
>
> loadmodule "/lib/ser/modules/tm.so"
>
> loadmodule "/lib/ser/modules/rr.so"
>
> loadmodule "/lib/ser/modules/maxfwd.so"
>
> loadmodule "/lib/ser/modules/usrloc.so"
>
> loadmodule "/lib/ser/modules/textops.so"
>
> loadmodule "/lib/ser/modules/registrar.so"
>
> # Uncomment this if you want digest authentication
>
> # mysql.so must be loaded !
>
> loadmodule "/lib/ser/modules/auth.so"
>
> loadmodule "/lib/ser/modules/auth_db.so"
>
> # For NAT support / media proxying
>
> loadmodule "/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")
>
> # -- rr params --
>
> # add value to ;lr param to make some broken UAs happy
>
> modparam("rr", "enable_full_lr", 1)
>
> # For NAT
>
> # We will use flag 6 to mark NATed contacts
>
> modparam("registrar", "nat_flag", 6)
>
> # Enable NAT pinging
>
> modparam("nathelper", "natping_interval", 60)
>
> # Ping only contacts that are known to be
>
> # behind NAT
>
> modparam("nathelper", "ping_nated_only", 1)
>
> # ------------------------- 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;
>
> };
>
> # special handling for NATed clients; first, nat test is
>
> # executed: it looks for via!=received and RFC1918 addresses
>
> # in Contact (may fail if line-folding used); also,
>
> # the received test should, if complete, should check all
>
> # vias for presence of received
>
> if (nat_uac_test("3")) {
>
> # allow RR-ed requests, as these may indicate that
>
> # a NAT-enabled proxy takes care of it; unless it is
>
> # a REGISTER
>
> if (method == "REGISTER" || ! search("^Record-Route:")) {
>
> log("LOG: Someone trying to register from private IP, rewriting\n");
>
> # This will work only for user agents that support symmetric
>
> # communication. We tested quite many of them and majority is
>
> # smart smart enough to be symmetric. In some phones, like
>
> # it takes a configuration option. With Cisco 7960, it is
>
> # called NAT_Enable=Yes, with kphone it is called
>
> # "symmetric media" and "symmetric signaling". (The latter
>
> # not part of public released yet.)
>
> fix_nated_contact(); # Rewrite contact with source IP of signalling
>
> if (method == "INVITE") {
>
> fix_nated_sdp("1"); # Add direction=active to SDP
>
> };
>
> force_rport(); # Add rport parameter to topmost Via
>
> setflag(6); # Mark as NATed
>
> };
>
> };
>
> # 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
>
> record_route();
>
> # loose-route processing
>
> if (loose_route()) {
>
> t_relay();
>
> break;
>
> };
>
> lookup("aliases");
>
> # 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("com.dtu.dk", "subscriber")) {
>
> www_challenge("com.dtu.dk", "0");
>
> break;
>
> };
>
> save("location");
>
> break;
>
> };
>
> # native SIP destinations are handled using our USRLOC DB
>
> if (!lookup("location")) {
>
> sl_send_reply("404", "Not Found");
>
> break;
>
> };
>
> };
>
> # forward to current uri now; use stateful forwarding; that
>
> # works reliably even if we forward from TCP to UDP
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> };
>
> }
>
> #
>
> # Forcing media relay if necessary
>
> #
>
> route[1] {
>
> #if (uri=~"[@:](192\.168\.|10\.|172\.16)" && !search("^Route:")){
>
> # sl_send_reply("479", "We don't forward to private IP addresses");
>
> # break;
>
> #};
>
> #if (isflagset(6)) {
>
> force_rtp_proxy(); # I force everything through the proxy
>
> t_on_reply("1");
>
> append_hf("P-Behind-NAT: Yes\r\n");
>
> #};
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> break;
>
> };
>
> }
>
> onreply_route[1] {
>
> if (status =~ "(183)|2[0-9][0-9]") {
>
> fix_nated_contact();
>
> force_rtp_proxy();
>
> };
>
> }
>
>
>
>
>
>
>
>
>-----------------------------------------------------------------------
>-
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
>
>
Dear all,
Does anyone know if SER (0.8.14) supports PRACK messages ? I want to know
if it forwards them.I want to add in my configuration if(method==PRACK)
{..} and I want to know if I can do that and if SER allows this
configuration line.
Best regards,
Razvan
> -----Original Message-----
> From: martin(a)campus-merseburg.de [mailto:martin@campus-merseburg.de]
> Sent: Friday, April 28, 2006 5:40 AM
> To: users(a)openser.org
> Subject: Re: [Users] Reload Config-File
>
>
>
> Am 28.4.2006 schrieb "martin" <martin(a)campus-merseburg.de>:
>
> >
> >Is there a way to reload the configfile of openser without
> restarting it?
> >the hup signal doesnt work.
> >
>
> Ok. Nevermind.
> Q: Is it possible to reload OpenSER's configuration file with
> a signal?
>
> A: No. To reload the configuration file, OpenSER must be restarted.
>
> Would be a nice "carrier-grade" feature.
I second that. It would definitely be nice.