>> -----Original Message-----
>> From: Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]
>> Sent: Monday, March 27, 2006 7:37 AM
>> To: Douglas Garstang
>> Cc: users(a)openser.org
>> Subject: Re: [Users] OpenSER MySQL Updates - Weird
>>
>>
>> Hi Doug,
>>
>>
>> Douglas Garstang wrote:
>>
>> >I have a setup where we have three OpenSER 1.0.1 systems all
>> referring to a common MySQL database. There are some very
>> weird things happening...
>> >
>> >I was regularly seeing errors from OpenSER that stated
>> >
>> >Mar 23 10:05:27 artemis openser[11950]: submit_query:
>> Duplicate entry '80014157--sip:80014157@xxx.187.128.104' for
>> key 'PRIMARY'
>> >Mar 23 10:05:27 artemis openser[11950]: db_insert: Error
>> while submitting query
>> >Mar 23 10:05:27 artemis openser[11950]:
>> db_insert_ucontact(): Error while inserting contact
>> >Mar 23 10:05:27 artemis openser[11950]: wb_timer: Error
>> while inserting contact into database
>> >
>> >When I ran an ngrep on port 3306 on MySQL I could clearly
>> see the OpenSER select query where it looked for user
>> 80014157. Here's an example of another one:
>> >
>> >T 172.31.141.234:35385 -> 172.31.142.200:3306 [AP]
>> > ?....select password,rpid from subscriber where username='80014074'
>> >#
>> >T 172.31.142.200:3306 -> 172.31.141.234:35385 [AP]
>> >
>> .....H....def.vox180internal.subscriber.subscriber.password.pa
>> ssword.............@....def.vox180internal.subscriber.subscrib
>> er
>> <mailto:.....H....def.vox180internal.subscriber.subscriber.pas
>sword.password.............@....def.vox180internal.subscriber.subscriber> .
>> rpid.rpid...........................vDEPuURM4eXEw..........
>>##
>>T 172.31.141.234:35385 -> 172.31.142.200:3306 [AP]
>> H....insert into location (username,contact,expires,q,callid,cseq,flags,user_agent,received,socket,domain ) values ('80014074',
>> 'sip:80014074@xxx.187.128.95','2006-03-23 17:39:11',-1.00 ,'757d8e8a-fccff6d4-bca1e1ad(a)216.187.128.95',20,0,'PolycomSoundPo
>> intIP-SPIP_601-UA/1.6.3.0067',NULL,xxx.187.142.234_5060','ipt.oneeighty.com')
>>#
>>T 172.31.142.200:3306 -> 172.31.141.234:35385 [AP]
>> c....&.#23000Duplicate entry '80014074-ipt.oneeighty.com-sip:80014074@216.187.128.95' for key 'PRIMARY'
>>
>>You can quite clearly see that MySQL does NOT return a row, and OpenSER happily goes and does an insert then. I can't understand why MySQL >then complains about a duplicate key error. Why would it do this when the row wasn't found, and presumably the key doesn't exist?
>>
>your trace shows two queries:
>1) a DB authentication
>2) a usrloc updated.
>
>based on the information from cache, openser knows if it should do an
>update or insert.
>the problem is if you use 2 opensers on same DB, each server, based on
>private cache, will know they have to do insert (the contact is not in
>cache and DB). and you will end with 2 duplicated inserts.
Bogdan, thanks for the reply. I'm don't quite understand. I'm using db_mode 1, which the docs say writes all updates immediately to the database. A 'openserctl ul show' still shows cached entries though. Why? Is db_mode 1 supposed to cache at all? Which db_mode should I use so that I can have two or more OpenSER systems safely accessing the same database?
Douglas.
Hi Klaus,
Your question is so legitimate that both sip device manufacturers
including Msoft and Xten (they use _outbound._xxx) and those who
operate live deployments try to find a legitimate solution for it.
IETF is a bit busy now with building IMS :-(
I think this request should land on the IETF sip mailing lists and I
would be happy to back it up.
Adrian
>>>>>>>>>>
Hi!
This is a little bit OT, but maybe you can help me out. Consider the
following setup: I have a SIP service running on mydomain.com.
My sip AoR is sip:klaus at mydomain.commydomain.com resolves to my main SIP proxy (registrar, proxy, used by
all local clients) using NAPTRs, SRV and A records.
Further, I do want to have a separate proxy (edge proxy) which handles
signaling from/to external domains, TLS, white/blacklisting ....
Thus, the domain mydomain.com should resolve to:
- the main proxy for SIP clients
- the edge proxy for SIP proxies
Of course I could use different domains or the clients have to configure
an outbound proxy (which points directly to the main proxy), but this
complicates configuration.
AFAIK, Microsoft solved this problem within the LCS using different
prefixes during the SRV lookup. The Live Communicator (client) uses
_sipinternal._udp.mydomain.com to find the main proxy, whereas the LCS
uses _sip._udp.domain.com to find the edge proxy (access proxy in
Microsoft terms) of mydomain.com.
Thus, I would like to raise discussion: Have you an idea how to solve
this? Are you aware of any RFCs/drafts addressing this problem?
regards
klaus
Hello All,
I am having a problem with the t_on_failure failure route using SER /
OpenSER (I have tried them both)... I have been using SER for 2+ years
now and am servicing 5000+ voip customers but now we are moving to a
PSTN termination partner who does not have redundant gateways. So I
would like to setup SER so that I have call route advance to a 2nd PSTN
carrier if the 1st fails. However, I am running into some snags...
With my configuration the call is processed correctly if the 1st PSTN
carrier takes the call. However, when the failover happens then I get
some odd behavior. The call is initially setup correctly with the
failover carrier, but then it hangs up after about 5-7 seconds and a new
call comes in to the called number, and a loop begins where this same
call keeps coming in one after another until SER is restarted.
I do get the following errors on the SER console.
0(17304) forward_req: ERROR: cannot forward to af 2, proto 2 no
corresponding listening socket
0(17304) Warning: sl_send_reply: I won't send a reply for ACK!!
0(17304) ERROR: sl_reply_error used: I'm terribly sorry, server error
occurred (7/SL)
It almost seems as if the the 1st route PSTN carrier is not accepting my
ACK when I send it in response to the 403 Forbidden that they send to
me. Then they just keep sending the 403 Forbidden over and over again.
Each time that they do that then SER processes it as a failed call and
starts a new call to the secondary PSTN carrier. Does this sound
possible? Or am I way off base here?
I have attached my basic lab test SER cfg that I have been using to test
with. Perhaps someone can tell me what I might be doing incorrectly?
Or - Is there a better way to do this? ie. With AVP-Pops? If so, does
anyone have a sample configuration that I can look at?
Thanks so much for any help provided!!
Darren Nay
Ionosphere, Inc.
dnay(a)ionosphere.net
+1 864-678-3158
# ----------- global configuration parameters ------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
memlog=0
#uncomment for debug mode
debug=3
fork=no
log_stderror=yes
#Bind IP
listen=XX.XX.XX.XX
check_via=no # (cmd. line: -v)
dns=yes # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=5
mhomed=no # multi-homed?
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
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/xlog.so"
# ----------------- setting module-specific parameters ---------------
# -- timers --
modparam("tm", "wt_timer", 10)
modparam("tm", "retr_timer1p1", 2)
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# -- rr params --
modparam("rr", "enable_full_lr", 1)
# -- Nathelper --
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 10)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "rtpproxy_disable", 1)
alias=proxy.ionosphere.net
# ------------------------- 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;
};
# Nathelper
if (method == "REGISTER" || !search("^Record-Route:.*XX.XX.XX.XX")) {
fix_nated_contact(); # Rewrite contact with source IP of signaling
force_rport();
setflag(6);
};
# 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();
# loose-route processing
if (loose_route()) {
route(1);
break;
};
lookup("aliases");
if (!uri==myself) {
route(1);
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") {
fix_nated_register();
save("location");
break;
};
};
### Process URI routing
# Now we determine if called number is on
# or off net and route accordingly
if (!lookup("location")) {
route(2); # Nothing found - Route Off-Net
} else {
route(1); # Direct match - Route On-Net
};
}
#
# No direct route via location or location_novm (Off-Net Route)
#
route[2]
{
t_on_failure("2");
#Send the call to Level3
rewritehostport("XX.XX.XX.XX:5060");
if (!t_relay()) {
sl_reply_error();
};
break;
}
#
# Direct route found via location or location_novm (On-Net Route)
#
route[1]
{
# !! Nathelper
if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !search("^Route:")) {
sl_send_reply("479", "We don't forward to private IP addresses");
break;
};
# if client or server know to be behind a NAT, enable relay
if (isflagset(6)) {
# NAT processing of replies; apply to all transactions (for example,
# re-INVITEs from public to private UA are hard to identify as
# NATed at the moment of request processing); look at replies
t_on_reply("1");
append_hf("P-Behind-NAT: Yes\r\n");
};
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
onreply_route[1] {
if (status =~ "(183)|(180)|2[0-9][0-9]") {
fix_nated_contact();
};
if (nat_uac_test("1")) {
fix_nated_contact();
};
break;
}
failure_route[2] {
# forwarding failed try again at another destination
rewritehostport("XX.XX.XX.XX:5060");
append_branch();
t_relay();
break;
}
Hi all,
I've modified the value of fr_inv_timer and fr_timer to 240s.
When A calls B, and B doesn't answer, ser sends a CANCEL to B after ~60s.
Is there a way to increase this delay?
Thanks in advance.
B.R.
Xavier.
I am a college student. I am still new in VOIP System. I have a plan.
I have a plan to build a VOIP system in my college. I plan to bulid it buy using TLS (Transport Layer Security). So, To realize it, i have tried to study about TLS since 3 months. I have downloaded Openser 1.0.0 packet from www.Openser.org . But, i am still confused, what the first thing to do. After i install the openser packet in my system, what the next task i have done to bulid TLS in my VOIP System.
I hope anybody can help me about it. I hope anybody can guide me to build my TLS system because I am still new in VOIP (especially in TLS).
THANK YOU
---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
I have a setup where we have three OpenSER 1.0.1 systems all referring to a common MySQL database. There are some very weird things happening...
I was regularly seeing errors from OpenSER that stated
Mar 23 10:05:27 artemis openser[11950]: submit_query: Duplicate entry '80014157--sip:80014157@xxx.187.128.104' for key 'PRIMARY'
Mar 23 10:05:27 artemis openser[11950]: db_insert: Error while submitting query
Mar 23 10:05:27 artemis openser[11950]: db_insert_ucontact(): Error while inserting contact
Mar 23 10:05:27 artemis openser[11950]: wb_timer: Error while inserting contact into database
When I ran an ngrep on port 3306 on MySQL I could clearly see the OpenSER select query where it looked for user 80014157. Here's an example of another one:
T 172.31.141.234:35385 -> 172.31.142.200:3306 [AP]
?....select password,rpid from subscriber where username='80014074'
#
T 172.31.142.200:3306 -> 172.31.141.234:35385 [AP]
.....H....def.vox180internal.subscriber.subscriber.password.password.............@....def.vox180internal.subscriber.subscriber <mailto:.....H....def.vox180internal.subscriber.subscriber.password.password.............@....def.vox180internal.subscriber.subscriber> .
rpid.rpid...........................vDEPuURM4eXEw..........
##
T 172.31.141.234:35385 -> 172.31.142.200:3306 [AP]
H....insert into location (username,contact,expires,q,callid,cseq,flags,user_agent,received,socket,domain ) values ('80014074',
'sip:80014074@xxx.187.128.95','2006-03-23 17:39:11',-1.00 ,'757d8e8a-fccff6d4-bca1e1ad(a)216.187.128.95',20,0,'PolycomSoundPo
intIP-SPIP_601-UA/1.6.3.0067',NULL,xxx.187.142.234_5060','ipt.oneeighty.com')
#
T 172.31.142.200:3306 -> 172.31.141.234:35385 [AP]
c....&.#23000Duplicate entry '80014074-ipt.oneeighty.com-sip:80014074@216.187.128.95' for key 'PRIMARY'
You can quite clearly see that MySQL does NOT return a row, and OpenSER happily goes and does an insert then. I can't understand why MySQL then complains about a duplicate key error. Why would it do this when the row wasn't found, and presumably the key doesn't exist?
Anyone got any ideas? Has OpenSER ACTUALLY been tested with multiple systems all accessing a common MySQL database?
Doug.
I know the destination uri (dst_uri) is accessible through the functions
setdsturi(), resetdsturi(), isdsturiset(), but is there a way to check
the IP address of the destination Uri?
I need to know what is the IP address of the destination Uri to take a
decision inside the script, how can I do it?
I'll appreciate any help. Thanks
Hello,
when a softphone try to register to my openser, the user and password are checked into mysql db, before to allow it.
I would like to know how it is done, because, as I know, the REGISTER method doesn't have the user/password data embedded.
So how openser knows about these data?
I am asking it, because I am writing a SIP softphone, and I dont know how to pass these informations....
Thanks
Alessandro