Hi,
Can SER be configured to allow two or more UAs to be
NATed behind the same IP address? Also, is it
possible to enable SER to see that the UAs are located
behind the same address and, after call setup, let the
UAs speak directly to each other?
Could the ser.cfg alone support these features or
would other changes need to be made?
Regards,
Allan
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
serusers,您好!
how to improve KPhone poor vedio effect?
kphone-vic can not get good vedio effect.how to do?
致
礼!
dev2003
dev2003(a)mail.ustc.edu.cn
2004-10-26
Hi All:
I'm trying to make an outgoing call from Kphone to an ISDN line.
Although the called phone rings, when I pickup the call drops and I get
the following errors on the logfiles:
Has anyone come across this?
Any suggestions welcome.
Regards,
--
Socrates.
------------------- SER.log ---------------------------
...
sip_request.isdngw
INVITE
76793696
.
128.16.64.71
128.16.64.71
.
sip:576793696@128.16.64.71
sip:root@128.16.64.71:5062;transport=udp
"Socrates Varakliotis" <sip:6222@shaggy.cs.ucl.ac.uk>
<sip:576793696@128.16.64.71>
183464563
64247849
.
5593
55871:1543819790
.
.
P-MsgFlags: 0
.
v=0
o=username 0 0 IN IP4 128.16.64.71
s=The Funky Flow
c=IN IP4 128.16.64.71
t=0 0
m=audio 32802 RTP/AVP 0 97 3
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
>
5(4251) DEBUG: write_to_vm_fifo: write completed
5(4251) DEBUG: add_to_tail_of_timer[0]: 0x402e35a4
5(4251) DEBUG:destroy_avp_list: destroing list (nil)
5(4251) receive_msg: cleaning up
9(4255) ERROR: fifo_server: command t_reply is not available
9(4255) ERROR: fifo_server: command must begin with :: isgndw: ringing
9(4255) ERROR: fifo_server: command must begin with :: 000010A77D8E0A09
9(4255) ERROR: fifo_server: command must have at least 3 chars
9(4255) INFO: fifo_server: command empty
9(4255) ERROR: fifo_server: command t_reply is not available
9(4255) ERROR: fifo_server: command must have at least 3 chars
9(4255) ERROR: fifo_server: command must begin with :: 000010A77D8E0A09
9(4255) ERROR: fifo_server: command must begin with :: Content-Type:
application/sdp
9(4255) ERROR: fifo_server: command must begin with :: v=0
9(4255) ERROR: fifo_server: command must begin with :: s=session
9(4255) ERROR: fifo_server: command must begin with :: t=0 0
9(4255) ERROR: fifo_server: command must begin with :: a=rtpmap:0
PCMU/8000
9(4255) INFO: fifo_server: command empty
9(4255) ERROR: fifo_server: command t_reply is not available
9(4255) ERROR: fifo_server: command must begin with :: could not send
response.
9(4255) ERROR: fifo_server: command must begin with :: 000010A77D8E0A09
9(4255) ERROR: fifo_server: command must have at least 3 chars
9(4255) INFO: fifo_server: command empty
10(4257) DEBUG: timer routine:0,tl=0x402e35a4 next=(nil)
------------------- SEMS.log ---------------------------
....
180
isgndw: ringing
55871:1543819790
000010A77D8E0A09
Contact: <sip:76793696@128.16.64.71>
.
.
>
(4263) DEBUG: write_to_fifo (SerClient.cpp:244): Write to fifo: completed
(4263) DEBUG: getReturnCode (AmRequest.cpp:357): response from Ser: 500
command 't_reply' not available
(4263) ERROR: reply (AmRequest.cpp:335): AmRequestUAS::reply: 500
command 't_reply' not available
(4263) DEBUG: cb_connect_active_ind (IsdnCapiConnection.cpp:282):
callback funtion called: cb_connect_active_ind!
(4263) DEBUG: cb_connect_active_ind (IsdnCapiConnection.cpp:290):
physical connection established, now creating logical connection
(4263) DEBUG: cb_connect_b3_conf (IsdnCapiConnection.cpp:308):
connected, now unlocking mutex
(4263) DEBUG: changePSTNState (IsdnCall.cpp:348): CALL: PSTN state
(outbound): from (CONNECTING|CONNECTING) to (CONNECTING|CONNECTED)
(4263) DEBUG: changePSTNState (IsdnCall.cpp:550): DONE: PSTN state
(outbound): from (CONNECTING|IDLE) to (CONNECTING|CONNECTING)
Hello list.
I have a problem-question regarding to the BYE message reaching SER.
For the normail example i have a endpoint registered in SER and a
PSTN-Gateway receiving the outgoing traffic. For this enviroment when i
made a call from my endpoint to the PSTN gateway and the Gateway send the
BYE (at the end of the call) this is what i see in the debug in SER.
U gw1.mydomain.com:52154 -> sersip.mydomain.com:5060
BYE sip:005622408196@sersip.mydomain.com:5060 SIP/2.0
Via: SIP/2.0/UDP gw1.mydomain.com:5060
From: <sip:005622408196@sersip.mydomain.com>;tag=A0272B49-B2D
To: <sip:5555832351@sersip.mydomain.com>;tag=ae4208f2a4
Date: Mon, 25 Oct 2004 21:34:02 GMT
Call-ID: ae229c42-f2c3-08f3-81f2-0002a400f1e9(a)xx.xx.xx.42
User-Agent: Cisco-SIPGateway/IOS-12.x
Max-Forwards: 6
Route: <sip:5555832351@xx.xx.xx.42:5060>
Timestamp: 1098740047
CSeq: 101 BYE
Content-Length: 0
#
U sersip.mydomain.com:5060 -> xx.xx.xx.42:5060
BYE sip:5555832351@xx.xx.xx.42:5060 SIP/2.0
Record-Route: <sip:005622408196@sersip.mydomain.com;ftag=A0272B49-B2D;lr=on>
Via: SIP/2.0/UDP sersip.mydomain.com;branch=z9hG4bK4c65.37369754.0
Via: SIP/2.0/UDP gw1.mydomain.com:5060
From: <sip:005622408196@64.76.148.231>;tag=A0272B49-B2D
To: <sip:5555832351@sersip.mydomain.com>;tag=ae4208f2a4
Date: Mon, 25 Oct 2004 21:34:02 GMT
Call-ID: ae229c42-f2c3-08f3-81f2-0002a400f1e9(a)xx.xx.xx.42
User-Agent: Cisco-SIPGateway/IOS-12.x
Max-Forwards: 5
Timestamp: 1098740047
CSeq:101 BYE
Content-Length: 0
#
U xx.xx.xx.42:5060 -> sersip.mydomain.com:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP sersip.mydomain.com;branch=z9hG4bK4c65.37369754.0
Via: SIP/2.0/UDP gw1.mydomain.com:5060
From: <sip:005622408196@sersip.mydomain.com>;tag=A0272B49-B2D
To: <sip:5555832351@sersip.mydomain.com>;tag=ae4208f2a4
Call-ID: ae229c42-f2c3-08f3-81f2-0002a400f1e9(a)xx.xx.xx.42
CSeq: 101 BYE
User-Agent: AddPac SIP Gateway
Content-Length: 0
Record-Route: <sip:005622408196@sersip.mydomain.com;ftag=A0272B49-B2D;lr=on>
#
U sersip.mydomain.com:5060 -> gw1.mydomain.com:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP gw1.mydomain.com:5060
From: <sip:005622408196@sersip.mydomain.com>;tag=A0272B49-B2D
To: <sip:5555832351@sersip.mydomain.com>;tag=ae4208f2a4
Call-ID: ae229c42-f2c3-08f3-81f2-0002a400f1e9(a)xx.xx.xx.42
CSeq: 101 BYE
User-Agent: AddPac SIP Gateway
Content-Length: 0
Record-Route: <sip:005622408196@sersip.mydomain.com;ftag=A0272B49-B2D;lr=on>
As you can see the call is ended succesfully and there is no problem.
Now, instead of having a PSTN-Gateway i use a SIP-H323 translator and all
the calls are going out through this device. When i made a call from my
endpoint and the SIP-H323 send the BYE message (at the end of the call) the
debug shows this :
U sipquest.mydomain.com:5060 -> sersip.mydomain.com:5060
BYE sip:1112001003@sersip.mydomain.com;ftag=25421eefa4;lr=on SIP/2.0
Via: SIP/2.0/UDP sipquest.mydomain.com:5060;
branch=z9hG4bKsKpiQfXRAwAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB_
From: <sip:1112001003@sersip.mydomain.com>;tag=3896741524
To: <sip:5555832351@sersip.mydomain.com>;tag=25421eefa4
CSeq: 1 BYE
Call-ID: 25229c42-16c9-1e95-81ef-0002a400f1e9(a)xx.xx.xx.42
Contact: <sip:1112001003@sipquest.mydomain.com>
Route: <sip:5555832351@sersip.mydomain.com>
Max-Forwards: 69
Content-Length: 0
#
U sersip.mydomain.com:5060 -> sipquest.mydomain.com:5060
SIP/2.0 404 Not Found IT!
Via: SIP/2.0/UDP sipquest.mydomain.com:5060;
branch=z9hG4bKsKpiQfXRAwAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB_;received=sipquest
.mydomain.com
From: <sip:1112001003@sersip.mydomain.com>;tag=3896741524
To: <sip:5555832351@sersip.mydomain.com>;tag=25421eefa4
CSeq: 1 BYE
Call-ID: 25229c42-16c9-1e95-81ef-0002a400f1e9(a)xx.xx.xx.42
Server: Sip EXpress router (0.8.14 (i386/linux))
Content-Length: 0
Warning: 392 sersip.mydomain.com:5060 "Noisy feedback tells: pid=15285
req_src_ip=sipquest.mydomain.com
req_src_port=5060in_uri=sip:1112001003@sersip.mydomain.com;ftag=25421eefa4;l
r=on out_uri=sip:1112001003@sersip.mydomain.com;ftag=25421eefa4;lr=on
via_cnt==1"
My question is : Why the call is ended succesfully in the first case and in
the second case SER answer with a "NOT FOUND"? I only have registered in my
location table the endpoints. Here is my ser.cfg file.
#
# $Id: ser.cfg,v 1.21.2.2 2003/10/13 22:53:06 jiri Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=0 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)
#Uncomment these lines to enter debugging mode
#fork=no
#log_stderror=yes
listen=xx.xx.148.231
alias=sersip.mydomain.com
check_via=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
#children=4
fifo="/tmp/ser_fifo"
fifo_mode=0666
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#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/textops.so"
loadmodule "/usr/local//lib/ser/modules/exec.so"
# Para trabajar con NAT
loadmodule "/usr/local//lib/ser/modules/mediaproxy.so"
loadmodule "/usr/local//lib/ser/modules/domain.so"
loadmodule "/usr/local//lib/ser/modules/dbtext.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/acc.so"
# ----------------- setting module-specific parameters ---------------
# ----------------- setting module-specific parameters ---------------
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# module authorization
modparam("auth_radius","radius_config","/usr/local/etc/radiusclient/radiuscl
ient.conf")
modparam("auth_radius","service_type",15)
#module accounting
modparam("acc","radius_config","/usr/local/etc/radiusclient/radiusclient.con
f")
modparam("acc","log_level",1)
modparam("acc", "service_type", 15)
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 3)
modparam("acc", "failed_transactions", 1)
modparam("acc", "report_ack", 0)
#group radius
modparam("group_radius","radius_config","/usr/local/etc/radiusclient/radiusc
lient.conf")
modparam("group_radius", "use_domain", 1)
#module mediaproxy
modparam("mediaproxy", "natping_interval", 60)
modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy.sock")
#modparam("mediaproxy", "sip_asymmetrics",
"/usr/local/etc/ser/sip-asymmetrics-clients")
#modparam("mediaproxy", "rtp_asymmetrics",
"/usr/local/etc/ser/rtp-asymmetrics-clients")
modparam("registrar", "nat_flag", 5)
#module domain
modparam("domain", "db_url", "/usr/local/etc/ser/domaintables")
modparam("domain", "domain_table", "domain")
modparam("domain", "domain_col", "domain")
# ------------------------- request routing logic -------------------
# main routing logic
route {
# Llamada a Rutina Externa para cambio de numero
# if (method=="INVITE") {
# exec_dset("/usr/local/etc/ser/redirect.sh");
# };
# 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;
};
# subsequent messages withing a dialog should take the
# path determined by record-routing
record_route();
if (loose_route()) {
if (method=="BYE" || method=="CANCEL") {
log(1, "NAT: BYE o CANCEL recibido --> terminando la
sesion de media\n");
end_media_session();
setflag(1);
};
t_relay();
break;
};
# Maracamos las llamadas para accounting
setflag(1);
if (client_nat_test("1")) {
log(1, "NAT: Requerimiento de IP privada --> fixed contact
(en rutina principal)\n");
setflag(5);
force_rport();
fix_contact();
append_hf("P-hint: fixed NAT contact for request\r\n");
};
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Challenge/Response
if ( !radius_www_authorize("")) {
www_challenge("", "1");
break;
};
# Mandamos un mensaje de Log si es que un cliente NATEADO se
registro.
if (isflagset(5)) {
log(1, "NAT: Cliente NAT'eado registrado (dentro del
chequeo de REGISTER)\n");
};
save("location");
break;
}; # FIN DE CHEQUEO DE REGISTRO
# lookup("aliases");
# CHEQUEO EL INVITE DE LA LLAMADA
if (method=="INVITE" && search("^From: <sip:.*@xx.xx.148.231>")) {
if ( !radius_proxy_authorize("")) {
proxy_challenge("", "1");
log (1, "LOG: Llamada no AUTORIZADA\n");
break;
};
};
if ( (uri=~"^sip:0.*@.*") ){
if (method=="INVITE") {
log(1,"FORWARDING : Llamada hacia plataforma
H.323\n");
route(3);
break;
};
};
# Llamadas hacia dominio H.323
if ( (uri=~"^sip:111.*@.*") | (uri=~"^sip:777.*@.*") |
(uri=~"^sip:333.*@.*") ){
if (method=="INVITE") {
log(1,"FORWARDING : Llamada hacia plataforma
H.323\n");
route(1);
break;
};
};
# Llamadas SIP locales
if (!lookup("location")) { #Usuarios que no estan en "location"
database.
route(4);
break;
};
setflag(3);
# Manejo para llamadas NAT'das
if (method=="INVITE") {
log(1, "ROUTING: Reply processing (online user) enabled to
handle NAT'd resonses\n");
t_on_reply("1");
if ( (isflagset(5)) && (method=="INVITE" ||
method=="ACK") ) {
log(1, "NAT: Invite received --> enabling
media proxy (else del lookup 2do if)\n");
use_media_proxy();
append_hf("P-hint: request forced to media
proxy\r\n");
};
};
# Do it ? (Ricardo Martinez)
};
append_hf("P-hint: USRLOC\r\n");
if (!t_relay()) {
sl_reply_error();
break;
};
} /* end of initial routing logic */
#--------- Route 1 hacia SIPQUEST -------------------------------
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
# Esta NATEADO?
if (isflagset(5)) {
log(1, "NAT: At least one participant NAT'd --> enable reply
processing (hacia GW)\n");
t_on_reply("1");
if (method=="INVITE") {
log(1, "NAT: Invite received --> enabling proxied
media session (hacia GW)\n");
setflag(1);
use_media_proxy();
};
};
rewritehostport("sipquest.mydomain.com:5060");
append_hf("P-hint: GATEWAY\r\n");
if (!t_relay()) {
sl_reply_error();
break;
};
}
#------- Route 3 : Trafico de Internet hacia la PSTN -------------------
route[3] {
setflag(1);
#Esta NETEADO?
if (isflagset(5)) {
log(1, "NAT: At least one participant NAT'd --> enable reply
processing (hacia GW)\n");
t_on_reply("1");
if (method=="INVITE") {
log(1, "NAT: Invite received --> enabling proxied
media session (hacia GW)\n");
#setflag(1);
use_media_proxy();
};
};
rewritehostport("gw1.mydomain.com:5060");
append_hf("P-hint: GATEWAY\r\n");
t_relay();
break;
}
#------ Route 4 : Llamadas a usuarios Off-line ------------------------
route[4] {
if (!t_newtran()) {
sl_reply_error();
};
if (!t_reply("404", "Not Found IT!")) {
sl_reply_error();
};
break;
}
# ---------------------------- Begin On-Reply Routes
--------------------------
onreply_route[1] {
# If we've got here, it's because we've previously passed through a
block
# which handles NAT requests and has set a t_on_reply condition. DB
03-08-2004
if (status =~ "(183)|(2[0-9][0-9])") {
if (client_nat_test("1") || isflagset(5)) {
log(1, "NAT: Reply from NAT'd client --> fixing contact
(onreply_route)\n");
fix_contact();
use_media_proxy();
setflag(5);
};
log(1, "NAT: NAT'd transaction answered --> enabling media proxy
(onreply_route)\n");
# use_media_proxy();
};
}
# ------------------------------ End On-Reply Routes
--------------------------
Can someone please help me?.
Ricardo Martinez
Hi Serusers,
I have been playing around this logic for some
time now and it's giving me a bit of headache. Any
help will be very appreciated.
Here's what I got. I use the default setting for
rtpproxy and tested all the nat scenarios from PC-PC
work great. Now I want to have the PC to call out to
PSTN and only allow registered client to be able to
make call to pstn gateway and at the same time to go
thru rtpproxy. My gateway ip address is 64.200.219.134
port 5060, it's a cisco as5350. Below is my
configuration, where should I put the setting and any
hint or example will be very appreciated.
----------------------
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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)
/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
listen=64.200.219.135
listen=127.0.0.1
alias=unlimitedtalk.net
alias=64.200.219.135
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading
----------------------------------
# Uncomment this if you want to use SQL database
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/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/acc.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"
# ----------------- setting module-specific parameters
---------------
# ------------- tm parameters
modparam("tm", "fr_timer", 12)
modparam("tm", "fr_inv_timer", 24)
# ------------- rr parameters
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------- accounting parameters
modparam("acc", "log_missed_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
# ------------- usrloc parameters
# 2 enables write-back to persistent mysql storage for
speed
# disable=0, write-through=1
modparam("usrloc", "db_mode", 2)
# minimize write back window - default is 60 seconds
modparam("usrloc", "timer_interval", 10)
# database location
modparam("usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
# ------------- auth parameters
# database location
modparam("auth_db", "db_url",
"mysql://ser:heslo@localhost/ser")
# allows clear text passwords in the mysql database
modparam("auth_db", "calculate_ha1", yes)
# name of password column in mysql database
modparam("auth_db", "password_column", "password")
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping
interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping
only clients behind NAT
# ----------------- setting module-specific parameters
---------------
# ------------------------- 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;
};
# 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;
};
# !! Nathelper
# 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 is
used); also,
# the received test should, if completed,
should check all
# vias for rpesence 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 enough to be symmetric. In
some phones it takes a configuration
# option. With Cisco 7960, it is
called NAT_Enable=Yes, with kphone it is
# called "symmetric media" and
"symmetric signalling".
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
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");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
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") {
# Uncomment this if you want to use digest
authentication
if
(!www_authorize("unlimitedtalk.net", "subscriber")) {
www_challenge("unlimitedtalk.net", "0");
break;
};
save("location");
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);
}
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)) {
force_rtp_proxy();
};
# 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");
# send it out now; use stateful forwarding as
it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
# !! Nathelper
onreply_route[1] {
# NATed transaction ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]")
{
fix_nated_contact();
force_rtp_proxy();
# otherwise, is it a transaction behind a NAT and
we did not
# know at time of request processing ? (RFC1918
contacts)
} else if (nat_uac_test("1")) {
fix_nated_contact();
};
}
----------------------------
Thanks in advance,
Ted
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
hii,
i have problems in my serweb. when my clients tried to subscribe,they are successfull in serweb but there is no message that my client received in their e-mail. besides that,i checked, my clients are in pending tables in mysql database so they can't login.
anybody can help me????please your advices.i'm newbie in making SER.
regards,
sita
--
Sita Rosita
___________________________________________________
Take your business online with Officemaster. Sign up for a free trial today!
http://www.officemaster.net
After I made my accounting up and working I've changed something and it's not working now would you help me please.
The problem is that when I forward the call to pstn gateway when user closes the line the "BYE" request is not written
in the database - it exists but it's not written - here it is
3(17265) SIP Request:
3(17265) method: <BYE>
3(17265) uri: <sip:pavel@192.168.2.111:19454>
3(17265) version: <SIP/2.0>
3(17265) parse_headers: flags=1
3(17265) get_hdr_field: cseq <CSeq>: <1> <BYE>
Here is part of my ser.cfg
modparam("acc", "log_flag", 1)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "db_url", "mysql://user:pass@192.168.2.113:3306/ser")
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 1)
modparam("acc", "log_missed_flag", 1)
#modparam("acc", "report_cancels", 1)
modparam("acc", "report_ack", 1)
.......
if (uri=~"^sip:[0-9]*@sip.mydomain.com") {
if (is_user_in("From", "pstn")){
rewritehost("pstn_gw_ip");
append_branch("pstn_gw_ip");
setflag(1);
record_route();
force_rtp_proxy();
t_relay();
t_on_reply("1");
if (loose_route()) {
t_relay();
break;
};
break;
}
else {
sl_send_reply("399", "Your account balance is low!");
};
break;
};
What's is the problem please help me.
Thanks in advance!
Pavel Siderov
Hi!
I have the following setup:
* Client A is behind a VPN, which make a NAT as follows:
- IP Address on the interface: 80.32.110.203
- IP address for VPN: 80.32.23.17 (as seen outside the VPN-NAT)
- The client beliefs that it has IP 80.32.110.203, and uses this for its
SIP and SDP messages.
* Client B uses IP 80.32.6.184 (no VPN)
* The SER-Mediaproxy runs on 80.32.10.95
If Client A (VPN) calls client B, there is no problem:
SER and SERMediaproxy handle it correctly. So far so good.
But, if Client B wants to call Client A (the one with VPN), no audio is
transmitted. While tracing, I figured out the following:
- Client A sends its RTPs from 80.32.23.17 to the SER-Mediaproxy, which
the SER-Mediaproxy considers a as 3rd party, and therefore it ignors
RTP packets coming from that source IP.
- Client B sends its RTP to the SER-Mediaproxy, which forwards them to
80.32.110.203 (the Interface, which Client A has put to the SDP).
Those are ignored by the VPN on the host of client A, as it only accepts
packets belonging to the VPN tunel.
--> Ergo, no RTP goes through. :-(
Any ideas, on how I can tell SER-Mediaproxy to accept packets from
80.32.23.17 ?
According to the logs the SER-Mediaproxy knows about this IP...
cheers,
Bernie
PS: The mediaproxy.log look as follows:
normaluser(a)test-sip.ch calls vpnuser(a)test-sip.ch
----------------------------------------------------
command request 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184
80.32.6.184:16672:audio 80.32.6.184 test-sip.ch local 217.162.217.186
remote CSCO/7
info=from:normaluser@test-sip.ch,to:vpnuser@test-sip.ch,fromtag:000bfd32e66e00627e7b69c3-6f480ec5,totag:,dispatcher
session 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184: started.
listening on 80.32.10.95:16604
command execution time: 2.80 ms
command lookup 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184
80.32.110.203:16384:audio 80.32.23.17 test-sip.ch local test-sip.ch
unknown SJLabs-SJphone/1.30.235a
info=from:normaluser@test-sip.ch,to:vpnuser@test-sip.ch,fromtag:000bfd32e66e00627e7b69c3-6f480ec5,totag:3505347165,dispatcher
command execution time: 0.52 ms
warning: Received packet from a third party: 80.32.23.17:16384
^^^^^^^^^^^^^^^^^
session 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184: caller signed in
from 80.32.6.184:16672 (RTP) (will return to 80.32.6.184:16672)
command lookup 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184
80.32.110.203:16384:audio 80.32.23.17 test-sip.ch local test-sip.ch
unknown SJLabs-SJphone/1.30.235a
info=from:normaluser@test-sip.ch,to:vpnuser@test-sip.ch,fromtag:000bfd32e66e00627e7b69c3-6f480ec5,totag:3505347165,dispatcher
command execution time: 0.20 ms
command lookup 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184
80.32.110.203:16384:audio 80.32.23.17 test-sip.ch local test-sip.ch
unknown SJLabs-SJphone/1.30.235a
info=from:normaluser@test-sip.ch,to:vpnuser@test-sip.ch,fromtag:000bfd32e66e00627e7b69c3-6f480ec5,totag:3505347165,dispatcher
command execution time: 0.25 ms
command lookup 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184
80.32.110.203:16384:audio 80.32.23.17 test-sip.ch local test-sip.ch
unknown SJLabs-SJphone/1.30.235a
info=from:normaluser@test-sip.ch,to:vpnuser@test-sip.ch,fromtag:000bfd32e66e00627e7b69c3-6f480ec5,totag:3505347165,dispatcher
command execution time: 0.21 ms
session 7FB39E34-1DD2-11B2-A6E5-C208B29D816F(a)80.32.110.203: 0/0/0 packets,
0/0/0 bytes (caller/called/relayed)
session 7FB39E34-1DD2-11B2-A6E5-C208B29D816F(a)80.32.110.203: ended (did
timeout).
command delete 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184
info=dispatcher
session 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184: 515/0/515
packets, 103000/0/103000 bytes (caller/called/relayed)
session 000bfd32-e66e0027-0b258da4-1e55a8b9(a)80.32.6.184: ended.
command execution time: 0.47 ms
vpnuser(a)test-sip.ch calls normaluser(a)test-sip.ch
---------------------------------------------------
command request ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203
80.32.110.203:16386:audio 80.32.23.17 test-sip.ch local 80.32.6.184 remote
SJLabs-SJphone/1.30.235a
info=from:vpnuser@test-sip.ch,to:normaluser@test-sip.ch,fromtag:3505381983,totag:,dispatcher
session ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203: started.
listening on 80.32.10.95:16606
command execution time: 0.97 ms
command lookup ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203
80.32.6.184:16674:audio 80.32.6.184 test-sip.ch local test-sip.ch unknown
CSCO/7
info=from:vpnuser@test-sip.ch,to:normaluser@test-sip.ch,fromtag:3505381983,totag:000bfd32e66e00630d9f84f8-56b109d0,dispatcher
command execution time: 0.50 ms
session ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203: caller signed
in from 80.32.23.17:16386 (RTP) (will return to 80.32.23.17:16386)
session ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203: called signed
in from 80.32.6.184:16674 (RTP) (will return to 80.32.6.184:16674)
command delete ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203
info=dispatcher
session ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203: 327/316/643
packets, 65400/63200/128600 bytes (caller/called/relayed)
session ADFBCDAC-1DD1-11B2-8626-975F6F226C9C(a)80.32.110.203: ended.
command execution time: 0.48 ms
Hello.
I have been experimenting a weird problem in SER. I'm using a
SIP-H323 protocol translator from SipQuest. All my callf from SER are going
to the SIP-H323. When i made a call and the remote user (in SipQuest) sends
a BYE message to SER i get the following answer.
U sipquest.mydomain.com:5060 -> sersip.mydomain.com:5060
BYE sip:1111234567@sersip.mydomain.com;ftag=60425286a4;lr=on SIP/2.0
Via: SIP/2.0/UDP sipquest.magenta.cl:5060;
branch=z9hG4bKsKpiQfXRAwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_
From: <sip:1111234567@sersip.mydomain.com>;tag=3896741524
To: <sip:5555832351@sersip.mydomain.com>;tag=60425286a4
CSeq: 1 BYE
Call-ID: 60ce9b42-4559-5298-8186-0002a400f1e9(a)64.76.148.242
Contact: <sip:1111234567@sipquest.magenta.cl>
Route: <sip:5555832351@sersip.mydomain.com>
Max-Forwards: 69
Content-Length: 0
#
U sipquest.mydomain.com:5060 -> sersip.mydomain.com:5060
BYE sip:1111234567@sersip.mydomain.com;ftag=60425286a4;lr=on SIP/2.0
Via: SIP/2.0/UDP sipquest.magenta.cl:5060;
branch=z9hG4bKsKpiQfXRAwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_
From: <sip:1111234567@sersip.mydomain.com>;tag=3896741524
To: <sip:5555832351@sersip.mydomain.com>;tag=60425286a4
CSeq: 1 BYE
Call-ID: 60ce9b42-4559-5298-8186-0002a400f1e9(a)64.76.148.242
Contact: <sip:1111234567@sipquest.magenta.cl>
Route: <sip:5555832351@sersip.mydomain.com>
Max-Forwards: 69
Content-Length: 0
#
U sersip.mydomain.com:5060 -> sipquest.mydomain.com:5060
SIP/2.0 483 Too Many Hops
Via: SIP/2.0/UDP sipquest.magenta.cl:5060;received=sipquest.mydomain.com;
branch=z9hG4bKsKpiQfXRAwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_
From: <sip:1111234567@sersip.mydomain.com>;tag=3896741524
To: <sip:5555832351@sersip.mydomain.com>;tag=60425286a4
CSeq: 1 BYE
Call-ID: 60ce9b42-4559-5298-8186-0002a400f1e9(a)64.76.148.242
Server: Sip EXpress router (0.8.14 (i386/linux))
Content-Length: 0
Warning: 392 sersip.mydomain.com:5060 "Noisy feedback tells: pid=14202
req_src_ip=sersip.mydomain.com
req_src_port=5060in_uri=sip:1111234567@sersip.mydomain.com;ftag=60425286a4;l
r=on out_uri=sip:1111234567@sersip.mydomain.com;ftag=60425286a4;lr=on
via_cnt==70"
But when the SER user sent yhe BYE message the call is procesed OK. Here is
the BYE
64.76.148.242:5060 -> sersip.mydomain.com:5060
BYE sip:1111234567@sipquest.magenta.cl SIP/2.0
Via: SIP/2.0/UDP 64.76.148.242:5060;branch=z9hG4bK2c423483a4283
From: <sip:5555832351@sersip.mydomain.com>;tag=2c423483a4
To: <sip:1111234567@sersip.mydomain.com>;tag=3896741524
Call-ID: 2cce9b42-1f88-34fd-8183-0002a400f1e9(a)64.76.148.242
CSeq: 283 BYE
Route: <sip:1111234567@sersip.mydomain.com;ftag=2c423483a4;lr=on>
Date: Tue, 31 May 2005 02:39:19 GMT
User-Agent: AddPac SIP Gateway
Contact: <sip:5555832351@64.76.148.242>
Content-Length: 0
Max-Forwards: 70
I'm using RADIUS and this problem is generating at least a 50 radius stop
messages. I can send you the SER debug. I hope that someone can help me.
Ricardo.-