Hi all,
I've this problem when I start my soft phone client with ser:
Warning: 392 192.168.87.252:5060 "Noisy feedback tells: pid=424
req_src_ip=192.168.87.71 req_src_port=6756 in_uri=sip:ser.mydomain.pri
out_uri=sip:ser.mydomain.pri via_cnt==1"
I look that when my client try to register to ser, it received an 200 ok
response, but my client resend a register request again and again, this
loop cause a latence in my traffic.
Any idea?
In attach is my config file
Tnx
--
+----------------------------------------------------------------------+
| Ing. Piergiorgio Venuti, CCSP Email: piergiorgio(a)mediaservice.net |
| System Manager Tel: +39-011-32.72.100 |
| Fax: +39-011-32.46.497 |
| @ Mediaservice.net S.R.L. http://mediaservice.net |
| Via S.Bernardino 17 Torino |
| Disclaimer: http://@Mediaservice.net/disclaimer |
+----------------------------------------------------------------------+
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=7 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)
listen=192.168.87.252
# hostname matching an alias will satisfy the condition uri==myself".
alias=ser.mydomain.pri
alias=ser.mydomain.net
/* Uncomment these lines to enter debugging mode
log_stderror=yes */
check_via=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=7
# fifo - FIFO special file pathname
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@127.0.0.1/ser"
# syn_branch - Shall the server use stateful synonym branches? It is
# faster but not reboot-safe. Default is yes.
syn_branch=yes
# memlog - Debugging level for final memory statistics report. Default
# is L_DBG -- memory statistics are dumped only if debug is set high.
memlog=3
# sip_warning - Should replies include extensive warnings? By default
# yes, it is good for trouble-shooting.
sip_warning=yes
# reply_to_via - A hint to reply modules whether they should send reply
# to IP advertised in Via. Turned off by default, which means that
# replies are sent to IP address from which requests came.
reply_to_via=no
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/opt/ser/lib/ser/modules/sl.so"
loadmodule "/opt/ser/lib/ser/modules/tm.so"
loadmodule "/opt/ser/lib/ser/modules/mysql.so"
loadmodule "/opt/ser/lib/ser/modules/domain.so"
loadmodule "/opt/ser/lib/ser/modules/uri_db.so"
loadmodule "/opt/ser/lib/ser/modules/rr.so"
loadmodule "/opt/ser/lib/ser/modules/maxfwd.so"
loadmodule "/opt/ser/lib/ser/modules/usrloc.so"
loadmodule "/opt/ser/lib/ser/modules/registrar.so"
loadmodule "/opt/ser/lib/ser/modules/textops.so"
loadmodule "/opt/ser/lib/ser/modules/mediaproxy.so"
loadmodule "/opt/ser/lib/ser/modules/nathelper.so"
loadmodule "/opt/ser/lib/ser/modules/pa.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/opt/ser/lib/ser/modules/auth.so"
loadmodule "/opt/ser/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# param settings
modparam("pa", "use_db",1)
modparam("pa","db_url", "mysql://ser:heslo@127.0.0.1/ser")
modparam("pa", "default_expires", 3)
modparam("pa","pa_domain", "ser.mydomain.pri")
#modparam("domain", "db_mode", 1)
modparam("domain", "db_url", "mysql://ser:heslo@127.0.0.1/ser")
#modparam("domain", "domain_table", "new_name")
#modparam("domain", "domain_col", "domain_col")
modparam("uri_db", "uri_table", "uri")
modparam("uri_db", "uri_user_column", "username")
modparam("uri_db", "uri_domain_column", "domain")
modparam("uri_db", "uri_uriuser_column", "uri_user")
modparam("uri_db", "subscriber_table", "subscriber")
modparam("uri_db", "subscriber_user_column", "username")
modparam("uri_db", "subscriber_domain_column", "domain")
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy", "natping_interval", 40)
modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy.sock")
modparam("mediaproxy", "sip_asymmetrics", "/etc/ser/sip-clients")
modparam("mediaproxy", "rtp_asymmetrics", "/etc/ser/rtp-clients")
modparam("registrar", "nat_flag", 6)
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# 2 enables write-back to persistent mysql storage for speed
# disable=0, write-through=1
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# database location
modparam("usrloc", "db_url", "mysql://ser:heslo@127.0.0.1/ser")
# minimize write back window - default is 60 seconds
modparam("usrloc", "timer_interval", 10)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth", "secret", "johndoessecretphrase")
modparam("auth", "nonce_expire", 600)
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", "db_url", "mysql://ser:heslo@127.0.0.1/ser")
modparam("auth_db", "user_column", "user")
modparam("auth_db", "domain_column", "domain")
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)
# ------------------------- 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;
};
# 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
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
setflag(6);
use_media_proxy();
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
if (method=="BYE" || method=="CANCEL" ) {
end_media_session();
};
# 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("ser.mydomain.net", "subscriber")) {
# www_challenge("ser.mydomain.net", "0");
# break;
# };
save("location");
# pa_handle_registration("ser.mydomain.pri");
break;
};
if (uri==myself) {
if (method=="SUBSCRIBE") {
if (!t_newtran()) {
sl_reply_error();
break;
};
handle_subscription("registrar");
break;
}
}
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
break;
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (isflagset(6) || isflagset(7)) {
use_media_proxy();
};
if (!t_relay()) {
sl_reply_error();
};
}
Hi,
I've uploaded a new module "path" to the tracker on sourceforge, which
allows a intermediate proxy (an openser instance working as
loadbalancer) to add it's URI into a Path-HF in various ways:
- add_path(): Adds URI including the address of the outgoing interface
as Path-HF in the form of "Path: <sip:1.2.3.4:5060>"
- add_path_received(): like the above, but adds a parameter
"received=sip:2.3.4.5:1234" to the URI to pass the received-address of
an UAC to a registrar
- both of the above functions also allow to pass a userpart for the
Path-URI, so add_path("loadbalancer") results in a Path-HF "Path:
<sip:loadbalancer@1.2.3.4:5060>"
- If the module parameter "use_received" is set to 1, the module hooks
into rr-processsing and sets the "received"-parameter of a Route-URI as
destination-uri if available. This is used in combination with
add_path_received(), where subsequent requests are sent to the
received-address of the initial registration (aka the URI given in the
received-parameter of the Path-HF).
Also included is a patch to the registrar module, which allows to store
the URI in the received-parameter of the first Path-HF as received-value
of usrloc and set the NAT flag for this contact. This feature can be
enabled by setting the parameter "path_use_received" of the registrar
module to 1.
One should be aware that nat-pinging of such a contact isn't supported
by nathelper/mediaproxy yet, but the values are in place (since I use an
external application for nat-pinging).
Some feedback is very much appreciated.
Cheers,
Andy
Hi,
i have a little problem i am using
modparam("usrloc|registrar|avpops", "use_domain", 1)
i have few domains ..for example
xxx.comyyy.comzzz.com
i also done some numbering plan and:
for
xxx.com have 10XX
yyy.com have 20XX
zzz.com have 30XX
i want to users from xxx.com can "ring" to yyy.com using
sip:20XX@yyy.com or just 20XX(a)xxx.com
the problem is how to setup route any connection going to numbers like
20XX from any domain will go to domain yyy.com
now i have done it with aliases so
i put 2001(a)xxx.com --> sip:2001@yyy.com
but this suck
any one can tell me how to rewritedomain in uri ?
using rewritehost is good for forwarding call to other sip server ..
but those domains are all in one
additionally there are things like
sameusername(a)xxx.com
sameusername(a)yyy.com
and all subscribers are in one mysql table so this must be done using
some route trick.
Can anyone have any idea?
Heya,
I'm trying to diagnose a problem that seems to occur in ser and OpenSER
regarding the mediaproxy module. In some instances, the rewrite of the c=
header can create duplicates, like:
o=- 3350242704 3350242704 IN IP4 y.y.y.y.
...
c=IN IP4 x.x.x.xx.x.x.x.
...
m=audio 3505035050 RTP/AVP 3 97 98 8 0 101.
Etc.
I have looked at the code and I do not believe this is a mediaproxy specific
problem, however I have to say I'm confused by the 'lumps'. Am I right in
thinking that these are just chunks of strings in a linked list that are
reconstructed later to form the message? Any ideas on this bug?
Cheers,
Chris.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/271 - Release Date: 28/02/2006
Hi,
I'm trying to run SER and SERWEB on a local server. ser runs fine, but serweb always gives an error: "Bad username or password" on logging in with admin and password heslo. I am pretty sure I've set the doman and other details properly, and uncommented the lines in ser.cfg as mentioned in INSTALL.
How do I check what the problem is?
Thanks.
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
Bogdan,
Version 1.0.0 of OpenSER... Actually, I found that by setting 'advertised_address', OpenSER would put that value in the Via header, and that's seems to be what Asterisk is using when it sends messages back to OpenSER.
I wish I knew the exact difference between the meaning of the Record-Route and Via headers..... :O
I've also found that OpenSER doesn't put the 'advertised_address' in the Via of BYE messages from phones that it passes to Asterisk. It puts the first interface in there instead. Any idea why this would be? It puts the Via from 'advertised_address' in everything else....
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]
Sent: Wed 3/1/2006 11:43 AM
To: Douglas Garstang
Cc: users(a)openser.org
Subject: Re: [Users] record_route_preset()
Hi Doug,
I just tested and I'm not able to reproduce your problem. The correct
usage is:
record_route_preset("172.31.140.205");
What version of openser are you using? if devel, be sure you have the
latest CVS version.
anyhow, for your purposes, the correct approach will be :
force_send_socket(udp:172.31.140.205);
record_route();
by this you will select the desired outgoing interface.
regards,
bogdan
Douglas Garstang wrote:
>I have OpenSER installed on a system with 4 network interfaces. When OpenSER sends out an INVITE to an Asterisk system, it puts the Record-Route header in the SIP message:
>
>U 216.186.140.205:5060 -> 172.31.140.203:5060
>INVITE sip:9220402@pbx1-mgt0.ipt.oneeighty.com:5060;user=phone SIP/2.0.
>Record-Route: <sip:216.186.140.205;ftag=C0A1B748-F1234161;lr=on>.
>
>However, I would like it to put a different IP address in the Record-Route header, to force the Asterisk system at the other end to send replies back on a certain interface. I tried using record_route_preset instead of record_route, like this:
>
>record_route_preset("172.31.140.205");
>
>Now, when SIP messages go out, they look like this:
>
>U 216.187.140.205:5060 -> 172.31.140.203:5060
>INVITE sip:9220402@pbx1-mgt0.ipt.oneeighty.com:5060;user=phone SIP/2.0.
>Record-Route: <sip:9220402@sip:172.31.140.205:5060;ftag=D26AD271-F90F8EC6;lr=on>.
>
>Huh? Why has OpenSER put the to URI in the record route? That doesn't look right to me.
>
>I also tried using record_route_preset like this:
>record_route_preset("172.31.140.205:5060");
>record_route_preset("sip:172.31.140.205");
>record_route_preset("sip:172.31.140.205:5060");
>
>and it always puts the to uri in there. Why???? Would GREATLY appreciate some advice on this.
>Doug.
>
>-----Original Message-----
>From: Helge Waastad [mailto:helge@smartnet.no]
>Sent: Wednesday, March 01, 2006 8:53 AM
>To: Andreas.granig(a)inode.info
>Cc: devel(a)openser.org
>Subject: [Devel] Re: Loadbalancing using Path-HF with NAT-Support
>
>
>Hi,
>Looking forward to try it out.
>
>Until now, the path-header (including nat-ping script) works as a charm
>for me, but this will probably make my loadbalancer much cleaner :-)
>
>br hw
>
>
>
>
>
Hi All,
I am trying to set up SER with Dispatcher to loadbalancing the traffic
to 2 * boxes. SER was able to select the * IPs from the dispatcher.list, but
* SIP response back authentication required. It work perfectly if I i use
rewritehostport instead of using the dispatch module. I am pulling my hair
now and still don't know where the problem at.
openser.cfg
if (uri=~"sip:\+?[1-9][0-9]*@.*") {
ds_select_dst("2", "0");
route(4);
route(5);
return;
};
route[4] {
if (isflagset(6)) {
force_rport();
fix_nated_contact();
force_rtp_proxy();
};
}
route[5] {
setflag(1);
t_on_reply("1");
forward(uri:host, uri:port);
append_hf("P-hint: main PSTN route\r\n");
t_on_failure("1");
if (!t_relay()) {
sl_reply_error();
return;
};
}
onreply_route[1] {
if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") {
if (!search("^Content-Length:[ ]*0")) {
force_rtp_proxy();
};
};
if (nat_uac_test("1")) {
fix_nated_contact();
};
}
failure_route[1] {
append_hf("P-hint: backup PSTN route\r\n");
rewritehost("x.x.x.x");
rewriteport( "5060");
append_branch();
t_relay();
}
SIP.conf form *
[general]
host=dynamic
bindaddr=0.0.0.0
port=5060
useragent=x
context=default
disallow=all
allow=g729
allow=ulaw
autocreatepeer=yes
dtmfmode=rfc2833
qualify=no
nat=yes
canreinvite=no
Retransmitting #5 (no NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP x.x.x.x;branch=0
Via: SIP/2.0/UDP 192.168.1.107:5060;received=x.x.x.x;branch=z9hG4bK263724
From: "testing" <sip:testing@64.127.123.100>;tag=5318
To: <sip:exten@x.x.x.x>;tag=as1cf1692c
Call-ID: 1141227578-724-TF-GIXXER(a)192.168.1.107
CSeq: 813 INVITE
User-Agent: x
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:exten@x.x.x.x>
Proxy-Authenticate: Digest realm="asterisk", nonce="40a9764f"
Content-Length: 0
Hi All,
I have problem getting classkit module to set serweb correctly using php5.
it looks like this issue had been raise before.
please let me know where I can get it.
thanks,
O.
enclose is the email that discuss this issue:
----------------------------------------------------------------------------------------------
That't the package that I created, it is the same as the one in the
repository. Thanks.
Jan.
On 11-07-2005 21:45, Gareth C. Fowler wrote:
>* I did install from an RPM file, but I didn't get it from your repository.
*>* For the life of me, I can't remember where I downloaded it from, but I
have
*>* included it on as an attachment.
*>*
*>* G.
*>*
*>* -----Original Message-----
*>* From: Jan Janak [mailto:jan at
iptel.org<http://lists.iptel.org/mailman/listinfo/serusers>
]
*>* Sent: 11 July 2005 21:38
*>* To: Gareth C. Fowler
*>* Cc: serusers at iptel.org<http://lists.iptel.org/mailman/listinfo/serusers>
*>* Subject: Re: RE: [Serusers] Try install Classkit extension
*>*
*>*
*>* Out of curiosity, could you let me know which package does provide the
*>* extension ? (run rpm -qf /usr/lib/php/modules/classkit.so). Is it the
*>* one that is available from our yum repository or did you install it some
*>* other way ?
*>*
*>* I am asking because I could not find classkit extension packaged for FC4
*>* so I had to create the package, but if it exists somewhere else then I
*>* would drop the package.
*>*
*>* Jan.
*>*
*>* On 11-07-2005 21:03, Gareth C. Fowler wrote:
*
My SER distributes calls to a bunch of Asterisk servers. Here's my route:
route{
setflag(1);
if (!mf_process_maxfwd_header("10")) {
log("LOG: Too many hops\n");
sl_send_reply("483","Too Many Hops");
return;
};
if (loose_route()) {
t_relay();
return;
};
if(uri==myself) {
if(method=="REGISTER") {
save("location");
return;
};
};
if(method=="INVITE") {
record_route();
if (uri=~"^sip:1[0-9]*{10}@192.168.1.10") {
ds_select_dst("2", "0");
forward(uri:host, uri:port);
return;
};
};
}
I am trying to log all calls including failed, busy, congestion, incomplete
using acc. Strangely, in my acc table I only see records affiliated with BYE
and not with INVITE. Thru, all I see are successful calls. Is there a way I
can make acc log incomplete calls?
I have OpenSER installed on a system with 4 network interfaces. When OpenSER sends out an INVITE to an Asterisk system, it puts the Record-Route header in the SIP message:
U 216.186.140.205:5060 -> 172.31.140.203:5060
INVITE sip:9220402@pbx1-mgt0.ipt.oneeighty.com:5060;user=phone SIP/2.0.
Record-Route: <sip:216.186.140.205;ftag=C0A1B748-F1234161;lr=on>.
However, I would like it to put a different IP address in the Record-Route header, to force the Asterisk system at the other end to send replies back on a certain interface. I tried using record_route_preset instead of record_route, like this:
record_route_preset("172.31.140.205");
Now, when SIP messages go out, they look like this:
U 216.187.140.205:5060 -> 172.31.140.203:5060
INVITE sip:9220402@pbx1-mgt0.ipt.oneeighty.com:5060;user=phone SIP/2.0.
Record-Route: <sip:9220402@sip:172.31.140.205:5060;ftag=D26AD271-F90F8EC6;lr=on>.
Huh? Why has OpenSER put the to URI in the record route? That doesn't look right to me.
I also tried using record_route_preset like this:
record_route_preset("172.31.140.205:5060");
record_route_preset("sip:172.31.140.205");
record_route_preset("sip:172.31.140.205:5060");
and it always puts the to uri in there. Why???? Would GREATLY appreciate some advice on this.
Doug.
-----Original Message-----
From: Helge Waastad [mailto:helge@smartnet.no]
Sent: Wednesday, March 01, 2006 8:53 AM
To: Andreas.granig(a)inode.info
Cc: devel(a)openser.org
Subject: [Devel] Re: Loadbalancing using Path-HF with NAT-Support
Hi,
Looking forward to try it out.
Until now, the path-header (including nat-ping script) works as a charm
for me, but this will probably make my loadbalancer much cleaner :-)
br hw
--
Helge Waastad
Senior Konsulent
Systemavdelingen
Smartnet
_______________________________________________
Devel mailing list
Devel(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel