Dear all
I have installed SER with multidomain support and it is working fine i have host 2 domain abc.com and example.com now i dont have any NAT between server and client
But now i have few more client. they are behind NAT so i have find nathelper help and configure with mediaproxy now what happend when i test this configuration in my demo setup
[192.168.1.2_SIP_Client]------------[SER + Mediaproxy + nathaper]------[192.168.1.3_SIP_Client]
MY server IP address is 192.168.1.1
everyone in same subnet no NAT between them
ser configuration with NAT + Mediaproxy and mediaproxy running on same machine..
When i trying to register Xlite on server i got error 483 Too many Hops why is there any domain related problem or something else when i remove name server in /etc/resolve.conf i got Timeout error
My --------- ser.cfg
# $Id: nat-mediaproxy.cfg 51 2006-01-31 13:28:04Z /CN=Paul Hazlett/emailAddress=paul(a)onsip.org $
debug=7
fork=yes
log_stderror=yes
listen=192.168.104.20 # INSERT YOUR IP ADDRESS HERE
port=5060
children=4
dns=yes
rev_dns=no
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://root:tulip@localhost/ser"
loadmodule "/usr/local/lib/ser/modules/mysql.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/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
modparam("auth_db|domain|uri_db|usrloc", "db_url", "mysql://root:tulip@localhost/ser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy","natping_interval", 30)
modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-clients")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-clients")
modparam("usrloc", "db_mode", 2)
modparam("domain", "domain_table", "domain")
modparam("domain", "domain_col", "domain")
modparam("usrloc|registrar|auth_db|avpops|group", "use_domain", 1)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
route {
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
break;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
break;
};
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("192.168.104.20:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
# -----------------------------------------------------------------
# Call Tear Down Section
# -----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
if ((method=="INVITE" || method=="REFER") && !has_totag()) {
sl_send_reply("403", "Forbidden");
break;
};
if (method=="INVITE") {
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
if (client_nat_test("3") || search("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (uri!=myself) {
route(4);
route(1);
break;
};
if (method=="ACK") {
route(1);
break;
} else if (method=="CANCEL") {
route(1);
break;
} else if (method=="INVITE") {
route(3);
break;
} else if (is_from_local()) {
if (method=="REGISTER") {
route(2);
break;
};
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(1);
}
route[1] {
# -----------------------------------------------------------------
# Default Message Handler
# -----------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
# REGISTER Message Handling
# -------------------------
route[2] {
sl_send_reply("100", "Trying");
if (!search("^Contact:[ ] *\*") && client_nat_test("7")) {
setflag(6);
fix_nated_register();
force_rport();
};
if (!www_authorize("","subscriber")) {
www_challenge("","0");
break;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
break;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(4);
route(1);
}
route[4] {
# -----------------------------------------------------------------
# NAT Traversal Section
# -----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
if (!isflagset(8)) {
setflag(8);
use_media_proxy();
};
};
}
onreply_route[1] {
if ((isflagset(6) || isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]")) {
if (!search("^Content-Length:[ ]*0")) {
use_media_proxy();
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
----PGP Signature--
Satish Patel
mobile:- +91-9818875535
http://www.linuxbug.org
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Dear all
I have install ser with nathelper but when i try to register xlite i got this error messge
3(31047) WARNING:vqm_resize: resize(0) called
3(31047) DEBUG: add_to_tail_of_timer[2]: 0x40586698
3(31047) DEBUG: reply relayed. buf=0x81220c0: SIP/2.0 4..., shmem=0x405a01d0: SIP/2.0 4
3(31047) DEBUG: cleanup_uac_timers: RETR/FR timers reset
3(31047) DEBUG:destroy_avp_list: destroying list (nil)
3(31047) receive_msg: cleaning up
3(31047) SIP Reply (status):
3(31047) version: <SIP/2.0>
3(31047) status: <483>
3(31047) reason: <Too Many Hops>
3(31047) parse_headers: flags=1
3(31047) Found param type 232, <branch> = <z9hG4bK79cd.4f2da674.0>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=1
3(31047) parse_headers: this is the first via
3(31047) After parse_msg...
3(31047) forward_reply: found module tm, passing reply to it
3(31047) DEBUG: t_check: msg id=258 global id=257 T start=0xffffffff
3(31047) parse_headers: flags=17
3(31047) Found param type 232, <branch> = <z9hG4bK79cd.3f2da674.0>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=17
3(31047) parse_headers: this is the second via
3(31047) Found param type 232, <branch> = <z9hG4bK79cd.2f2da674.0>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=17
3(31047) Found param type 232, <branch> = <z9hG4bK79cd.1f2da674.0>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=17
3(31047) Found param type 232, <branch> = <z9hG4bK79cd.0f2da674.0>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=17
3(31047) Found param type 232, <branch> = <z9hG4bK79cd.fe2da674.0>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=17
3(31047) Found param type 235, <rport> = <5061>; state=6
3(31047) Found param type 232, <branch> = <z9hG4bK00C839C4E76F483741C969446436A708>; state=16
3(31047) end of header reached, state=5
3(31047) parse_headers: Via found, flags=17
3(31047) DEBUG: add_param: tag=2ec2004a41f4343ae885c4e522e0f260.52d6
3(31047) end of header reached, state=29
3(31047) DEBUG: get_hdr_field: <To> [65]; uri=[sip:444@abc.com]
3(31047) DEBUG: to body [ser <sip:444@abc.com>]
3(31047) get_hdr_field: cseq <CSeq>: <41216> <REGISTER>
3(31047) DEBUG: t_reply_matching: hash 56471 label 1198183156 branch 0
3(31047) DEBUG: t_reply_matching: reply matched (T=0x40584cb8)!
3(31047) DEBUG: t_check: msg id=258 global id=258 T end=0x40584cb8
3(31047) DEBUG: reply_received: org. status uas=0, uac[0]=0 local=0 is_invite=0)
3(31047) parse_headers: flags=64
3(31047) DEBUG: get_hdr_body : content_length=0
3(31047) found end of header
3(31047) ->>>>>>>>> T_code=0, new_code=483
3(31047) DEBUG: relay_reply: branch=0, save=0, relay=0
3(31047) old size: 920, new size: 857
3(31047) build_res_from_sip_res: copied size: orig:90, new: 27, rest: 830 msg=
SIP/2.0 483 Too Many Hops
Via: SIP/2.0/UDP 192.168.104.20;branch=z9hG4bK79cd.3f2da674.0
Via: SIP/2.0/UDP 192.168.104.20;branch=z9hG4bK79cd.2f2da674.0
Via: SIP/2.0/UDP 192.168.104.20;branch=z9hG4bK79cd.1f2da674.0
Via: SIP/2.0/UDP 192.168.104.20;branch=z9hG4bK79cd.0f2da674.0
Via: SIP/2.0/UDP 192.168.104.20;branch=z9hG4bK79cd.fe2da674.0
Via: SIP/2.0/UDP 192.168.104.20:5061;rport=5061;branch=z9hG4bK00C839C4E76F483741C969446436A708
From: ser <sip:444@abc.com>;tag=889909258
To: ser <sip:444@abc.com>;tag=2ec2004a41f4343ae885c4e522e0f260.52d6
Call-ID: 7F06D3E766CAF64EAA23E6D089B86795(a)abc.com
CSeq: 41216 REGISTER
Server: Sip EXpress router (0.9.6 (i386/linux))
Content-Length: 0
Warning: 392 192.168.104.20:5060 "Noisy feedback tells: pid=31047 req_src_ip=192.168.104.20 req_src_port=5060 in_uri=sip:abc.comout_uri=sip:abc.com via_cnt==18"
$ cat ~/satish/url.txt
http://www.linuxbug.org
_____________________________________________________________________________________________________
---------------------------------
Meet people who discuss and share your passions. Join them now.
Hi. The following script doesn't proxy to "sip:voicemail@domain" if no
"Subject" header exits:
<cpl>
<incoming>
<string-switch field="subject">
<string contains="hello">
<reject status="reject" reason="Subjet = hello" />
</string>
<otherwise>
<location url="sip:voicemail@domain" />
<proxy />
</location>
</otherwise>
</string-switch>
</incoming>
</cpl>
For that I need to add <not-present> and clone <otherwise> content:
<cpl>
<incoming>
<string-switch field="subject">
<string contains="hello">
<reject status="reject" reason="Subjet = hello" />
</string>
<not-present>
<location url="sip:voicemail@domain" />
<proxy />
</location>
</not-present>
<otherwise>
<location url="sip:voicemail@domain" />
<proxy />
</location>
</otherwise>
</string-switch>
</incoming>
</cpl>
Is there any way to group <not-present> and <otherwise>?
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
With this occasion I would like to wish you all "Merry Christmas and Prosperous New Year" and express my hopes in a continuous grow of OpenSER project during the year to come .
Best regards,
DanB
Hi, in order to match a callee URI as a telephone number (discarding
punctuation and separator characters) I should user "tel" as
"subfield" value, but this is only valid if "user=phone" parameters
exists in the matching URI.
RFC 3880 says:
The "tel" subfield
is defined to be the "user" part of the URI, with visual separators
stripped, if the "user=phone" parameter is given to the URI, or if
the server is otherwise configured to recognize the user part as a
telephone number.
Is there any way OpenSer CPL module to recognize "From" user part as
telephone number even if no "user=phone" parameter exists?
Thanks a lot.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
2007/12/24, Iñaki Baz Castillo <ibc(a)aliax.net>:
> But in fact, the 302 arrives to the callee as if not "recurse"
> parameter exists. Maybe I haven't understood the meaning of this
> "recurse" parameter? or could it be a bug?
Yes, a bug of mine XD
For this feature working I must set a CPL parameter ("0 = dissable" by default):
modparam("cpl-c","proxy_recurse",2)
Now it works :)
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hi, I try to set "recurse" parameter in order to automatically proxy
the call to "Contact" URI present in a 302 response from called UAS:
<lookup source="registration">
<success>
<proxy timeout="8" recurse="yes">
</proxy>
</success>
</lookup>
Now I set a redirection in the called UAS so it replies a 302. Reading
RFC 3880 I assume that the proxy should create a branch to the 302
"Contact" URI instead of passing the 302 to the callee:
6.1. Proxy
[...]
The second optional parameter is "recurse", which can take two
values, "yes" or "no". This specifies whether the server should
automatically attempt to place further call attempts to telephony
addresses in redirection responses that were returned from the
initial server.
[...]
But in fact, the 302 arrives to the callee as if not "recurse"
parameter exists. Maybe I haven't understood the meaning of this
"recurse" parameter? or could it be a bug?
Thanks for any explanation. Best regards.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>
Hello,
I have setup openser (1.1.1-tls) to talk to our UA's
on port 5060 and some UA's on port 4800 (as provider
blocks 5060). I am using Mediaproxy (1.9.0). Currently
the following works:
1. UA using 5060 makes call to UA using 4800: Phone
bell rings and audio two way no issues.
2. UA using 4800 makes call to UA using 5060. Phone
bell rings but no audio in either direction
All UA's use RTP port 5004.
What can I add to the following loose route section so
that I can make "2" work above. My loose route section
in openser is:
#####################################################
listen= udp:XXX.XXX.XXX.XXX:5060
listen= udp:XXX.XXX.XXX.XXX:4800
# Loose route section
if (loose_route()) {
if ((method=="INVITE" || method=="REFER") &&
!has_totag()) {(20)
sl_send_reply("403", "Forbidden");
break;
};
if (method=="INVITE") {
(21)if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
if (client_nat_test("3") || search
("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
#####################################################
Please do provide if there is a solution to this
issue.
Your inputs appreciated.
regards,
Roger