I have also had problems with getting the ACK back.
I don't completely understand your configuration, you
must allow for packets going both directions, right?
Here is my config :
route
{
# check to see if the message has been around too long
# probably means that it is looping
#
if (!mf_process_maxfwd_header("10"))
{
log("LOG: Too many hops\n");
sl_send_reply("483","Too Many Hops");
break;
};
#
# make sure the length of the message isn't too long!
#
if (len_gt( max_len ))
{
sl_send_reply("513", "Wow -- Message too large");
break;
};
#
# do the loose-routing thing, this is important!
#
if(loose_route())
{
log(1,"doing top loose route");
t_relay();
break;
};
# this is where I was dropping the ACKS.
# I was simply dropping these, but they must be relayed
# because they can be ACKs
if(!(uri==myself))
{
if(!t_relay())
{
sl_reply_error();
break;
};
break;
};
This gets the ACKs through for me.
By the way, I have this configured with Cisco ATAs, version 2.16.
---greg
>
>I have the same problem and posed it to the group yesterday ([Serusers]
>Ignored 200 OK message.) So far the only workaround that I have found is to
>use the rules in my gateway to rewrite the dialed digits before sending them
>to the PSTN PRI, thus leaving the origianl URI intact for SIP
>communications.
>
>One person told me that this is a bug in the Cisco ATA, but it happens on my
>IPDialog phones also. It seems to me that the INVITE is being processed by
>the SER dial rules and is rewritten, but the ACK is not.
>
>Sean
>_______________________________________________
>
>Sean Robertson
>
>NETXUSA
>p. 800-289-6389
>f. 864-233-4344 "Ask me about Voice over IP."
>http://www.netxusa.com/
>
>----- Original Message -----
>From: "Alexander Mayrhofer" <axelm(a)nic.at>
>To: <serusers(a)lists.iptel.org>
>Sent: Friday, June 27, 2003 12:15 PM
>Subject: [Serusers] rewrite & ACK forwarding problem
>
>
>>
>> Hi,
>>
>> we're running SER together with a PSTN Gateway. Before a call get's
>> forwarded to the gateway, we are rewriting the request URI to make
>> rewriting on the GW as simple as possible:
>>
>> route {
>> ...
>> strip(3); # +43xxx -> xxx
>> prefix("0"); # xxx -> 0xxx
>> rewritehostport(xxx.xxx.xxx.xxx, 5060); # request to gateway
>> route(1);
>> break;
>> ...
>>
>> SIP call flow looks like (record route enabled):
>>
>> (1) phone -> SER
>> INVITE sip:*43699xxxxxxxx@nic.at43.at SIP/2.0
>>
>> (2) SER -> phone
>> SIP/2.0 100 trying -- your call is important to us
>>
>> (3) SER -> GW
>> INVITE sip:0699xxxxxxxx@xx.xx.xx.xx:5060 SIP/2.0
>>
>> (4) GW -> SER
>> SIP/2.0 100 Trying
>>
>> (5) GW -> SER
>> SIP/2.0 183 Session Progress
>>
>> (6) SER -> phone
>> SIP/2.0 183 Session Progress
>>
>> (7) GW -> SER
>> SIP/2.0 180 Ringing
>>
>> (8) SER -> phone
>> SIP/2.0 180 Ringing
>>
>> (9) GW -> SER
>> SIP/2.0 200 OK
>> Contact: <sip:0699xxxxxxxx@xx.xx.xx.xx:5060>
>>
>> (10) SER -> phone
>> SIP/2.0 200 OK
>> Contact: <sip:0699xxxxxxx@xx.xx.xx.xx:5060>
>>
>> [ call established, we can talk, but ... ]
>>
>> (11) phone -> SER
>> ACK sip:0699xxxxxxxx@xx.xx.xx.xx:5060 SIP/2.0
>>
>> --> Here starts the problem. That ACK (11) never gets forwarded to the
>> Gateway, so after a few seconds, the GW starts over at (9). Those three
>> packets (9-11) repeat a few times until GW runs into a timeout and drops
>> the call.
>>
>> I have the impression that SER can't match the packet to the previous
>> requests because of the rewritten URI. Is that correct?
>>
>> The only output at debug level 3 is:
>>
>> Warning: sl_send_reply: I won't send a reply for ACK!!
>>
>> Is that a routing goof somewhere in our scripts or is that a more
>> generic problem? Is the problem that the warning indicates somehow
>> related to the fact that the ACK is not being forwarded?
>>
>> Help appreciated.
>>
>> cheers
>>
>> axelm
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers(a)lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
>>
>
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all...
I look through the list's archives, but an not finding info to help me.
The goal is use SER but not instaled in the GW/FW (it's not an acceptable
option, well it's acceptable, but not for now). So I'm trying to put the SER
in the Internal LAN (it could be installed in a DMZ also). So the question
is if there is any proxy that could be putted on the GW/FW to handle
incomming calls (INVITEs) and forward it correctly to the SER machine taken
over the NAT issues?
I already look at SIProxd and RTProxy, but the first didn't forward
incomming calls, and the second demands that it be instaled, with SER on the
GW/FW. I also am looking at SERMediaProxy (RTProxy alternative) but the
documentations aren't sufficient detailed to answer my question. Any help
would be appreciated.
Edson.
#=============================
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0
iQA/AwUBQBhxkDdMQB7Du1dpEQLaBwCgi6SrH3d6UtOdAnHDu+Tyfydn1BQAn0Md
VEsHHSQR/bgoF/eAi2yh2yW9
=Y13k
-----END PGP SIGNATURE-----
I am looking for a way to limit the number of simultaneous calls that a given user can establish thru ser at a time. I realize of course that any options would require stateful use of ser but that is already a requirement in this project.
Thanks for any insight
I'm trying hard to get a handle on configuring ser but I think I need a few hints..
I thought I was doing the accounting right but the acc table never receives any information.. In my reading I thought by using setflag(x) where x was the same number as the db_flag number stateful accounting records would be automatic.. is this wrong..?
Can someone clue me in as to what I'm doing wrong as I just can't get this.
Here's my config if it helps at all:
# ----------- global configuration parameters ------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
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"
fifo_mode=0666
alias="voip.domain.com"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/ser/lib/ser/modules/mysql.so"
loadmodule "/usr/local/ser/lib/ser/modules/sl.so"
loadmodule "/usr/local/ser/lib/ser/modules/tm.so"
loadmodule "/usr/local/ser/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/ser/lib/ser/modules/rr.so"
loadmodule "/usr/local/ser/lib/ser/modules/textops.so"
loadmodule "/usr/local/ser/lib/ser/modules/vm.so"
loadmodule "/usr/local/ser/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/ser/lib/ser/modules/registrar.so"
loadmodule "/usr/local/ser/lib/ser/modules/auth.so"
loadmodule "/usr/local/ser/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/ser/lib/ser/modules/acc.so"
loadmodule "/usr/local/ser/lib/ser/modules/group.so"
# ----------------- setting module-specific parameters ---------------
modparam("voicemail", "db_url","mysql://ser:heslo@localhost/ser")
modparam("voicemail", "email_column", "email_address")
modparam("voicemail", "subscriber_table", "subscriber")
modparam("voicemail", "user_column", "username")
modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)
modparam("acc", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("group", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("group", "table", "grp")
modparam("group", "user_column", "username")
modparam("group", "domain_column", "domain")
modparam("group", "group_column", "grp")
# If set to 1 then username@domain will be used for lookup, if
# set to 0 then only username will be used.
modparam("group", "use_domain", 0)
# ------------------------- 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")) {
t_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
t_reply("513", "Message too big");
break;
};
record_route();
if (loose_route()) {
t_relay();
break;
};
# label all transactions for accounting
setflag(1);
# decide if callee has voicemail
if (is_user_in("Request-URI", "voicemail")) {
setflag(4);
};
# decide if caller is allowed long distance
if (is_user_in("From", "ld")) {
setflag(5);
};
# only process for our sip domain
if (uri==myself) {
# authorize and save location
if (method=="REGISTER") {
if (!www_authorize("voip.domain.com", "subscriber")) {
www_challenge("voip.domain.com", "1");
sl_send_reply("404", "Incorrect Authorization");
break;
};
save("location");
break;
};
# lookup and handle local users first
if (lookup("location")) {
t_relay();
break;
} else {
if ((method=="INVITE" || method=="ACK") && t_newtran() ) {
# new call to offline user with voicemail flag
if (isflagset(4)) {
route(4);
break;
};
route(5);
break;
};
};
if (!t_relay()) {
sl_reply_error();
break;
};
} else {
t_reply("404","UA Configuration error - Incorrect domain");
break;
};
} # end main route
route[4] {
# Voicemail specific configuration - begin
if(method=="ACK" || method=="INVITE" || method=="BYE" || method=="REFER"){
if(t_newtran()){
t_reply("100","Trying -- just wait a minute !");
if(method=="INVITE" || method=="REFER"){
log("**************** vm start - begin ******************\n");
if( uri =~ "conference" ){
if(!vm("/tmp/am_fifo","conference")){
log("could not contact conference server\n");
t_reply("500","could not contact conference server");
};
} else if( uri =~ "echo" ){
if(!vm("/tmp/am_fifo","echo")){
log("could not contact echo\n");
t_reply("500","could not contact echo");
};
} else {
if(!vm("/tmp/am_fifo","voicemail")){
log("could not contact voicemail\n");
t_reply("500","could not contact voicemail");
};
};
log("**************** vm start - end ******************\n");
break;
};
if(method=="BYE"){
log("**************** vm end/refer - begin ******************\n"); if(!vm("/tmp/am_fifo","bye")){
log("could not contact the media server\n");
t_reply("500","could not contact the media server");
};
log("**************** vm end/refer - end ********************\n");
break;
};
} else {
log("could not create new transaction\n");
t_reply("500","could not create new transaction");
};
};
# Voicemail specific configuration - end
}
route[5] {
# protect the pstn from having to bother with calls to our local blocks
if (uri=~"^sip:555") {
t_reply("404","no such user");
break;
};
# dial plan routing - long distance or local lata/tandem transit
if ((uri=~"^sip:1") && (isflagset(5))) {
rewritehostport("172.16.0.7:5060");
t_relay();
break;
};
if (uri=~"^sip:7") {
rewritehostport("172.16.0.5:5060");
t_relay();
break;
};
if (uri=~"^sip:3") {
rewritehostport("172.16.0.5:5060");
t_relay();
break;
};
t_reply("404","Not Found");
break;
}
Hello,
Has anybody done this? Do you have any pointers on this or maybe even a
howto.
Thanks
--
--
Anton Yurchenko<phila(a)dg.net.ua>
Digital Generation
Sorry, I thought I did a "reply-all" but I didn't.
To provide a little more info:
To handle voice mail in the user doesn't answer the phone case, using a
falure_route timeout is not the best way to go. You have no control over
the time delay before the voice mail answers, on a per call/number
basis.
To overcome this problem, we append_branch a fork to the voice mail box
(asterisk modified), right away. The asterisk looks up in a database how
long to wait before answering. This works great, except for when the
user is busy.
In the case of the user busy, it still waits the delay time, before
answering.
Having the routing script be notified of a failure, if one fork fails,
and allowing the script to decide if it should let the rest proceed, or
cancel them and start new ones, would solve this problem.
Should the UAC of the user be busy, and only on a busy response, you
could then abort the other fork (the one waiting to answer), and place a
new INVITE to the vm box, to tell it to answer right away.
--Dave
-----Original Message-----
From: David R. Kompel [mailto:drk@drkngs.net]
Sent: Friday, January 30, 2004 1:50 AM
To: 'Jiri Kuthan'
Subject: RE: [Serusers] failure route and ERROR: t_should_relay: status
rewriteby UAS: stored: 408, received: 487
Not the idea of giving you N-1, but the ability if any one fails, to
decide if you want to let the others go, or cancel them, and start new
ones.
Example:
...
if(is_user_in("VM"))
append_branch();
rewritehostport("<your voice mail server that waits to
answer>");
t_on_failure("x");
};
...
failure_route[x]{
if(status =~ "^486") {
if(t_other_forks() > 0) {
t_cancle_all_forks();
};
prefix("special digits to tell vm server busy");
append_branch();
t_relay();
};
};
In other words, always pass script to failure_route, and let it decide
if the other forks should be continued, or allow it to abort them and
try something else.
In the case of voice mail, w/ delayed answer, if the user was busy, they
could get the VM instantly, not waiting for the time out, and in the
case of some vm systems, could play the user busy greeting, rather then
the user away greeting.
--Dave
-----Original Message-----
From: Jiri Kuthan [mailto:jiri@iptel.org]
Sent: Thursday, January 29, 2004 12:59 PM
To: David R. Kompel; serusers(a)lists.iptel.org
Subject: RE: [Serusers] failure route and ERROR: t_should_relay: status
rewriteby UAS: stored: 408, received: 487
At 08:04 PM 1/29/2004, David R. Kompel wrote:
>I'm glad this issue was brought up when it was, cause I was just about
>to post on it :) I am using the same trick for voice mail. The problem
>is, if the user is busy, there is no way to detect it, since
>t_on_failure doesn't call the failure_route[x], if only one of the
forks
>in the dset gets an error from the UAS.
>
>It would be nice to see a way that the failure_route could get called
if
>any fork gets an error, and had a way to test for other existing forks,
>and cancel them, and then re-direct the call.
I am not sure if there is a benefit in forking to N destinations and
giving
on N-1 of them if one fails... what is the use case? (I naively thought
you
fork in parallel to try as many destinations as you wish and fall back
to
other alternative such as voicemail only if none of these original
destinations
succeded.)
-jiri
Hello,
I have problem with natping_interval.. it is not pinging at all and
look like it just doesnot aware that I have something registered
I use lates table release: 0.8.12
I added some more debugging in nathelper.c to timer function:
DBG("DEBUG: nathelper buff != NULL\n");
cp = buf;
while (1) {
memcpy(&(c.len), cp, sizeof(c.len));
if (c.len == 0) {
LOG(L_ERR, "ERROR: nathelper::c.len == 0\n");
break;
}
and can see that it break from the loop with c.len = 0. but when i
look at location table in mysql there is few devices registered.
probably something with ul_get_all_ucontact from usrloc..
please advise
here is config:
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/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/auth_mssql.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/exec.so"
modparam("nathelper", "natping_interval", 10)
modparam("registrar", "nat_flag", 6)
# modparam("nathelper", "ping_nated_only", 1) # Ping only clients behind NAT
modparam("auth_db", "db_url","sql://ser:XXX@localhost/ser")
modparam ("usrloc", "db_mode", 1)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "db_url", "sql://ser:XXX@localhost/ser")
modparam("rr", "enable_full_lr", 1)
force_rport();
fix_nated_contact();
setflag(6); # Mark as natted all clients
if (!(method=="REGISTER")) record_route(); # 1=loose routing
# loose-route processing
if (loose_route()) {
log(1, "LOOSE ROUTE\n");
t_relay();
break;
};
if(!uri==myself) {
log(1, "URI!=myself");
t_relay();
break;
};
if (method=="REGISTER") {
log(1, "REGISTER REQUEST RECEIVED\n");
if (!mssql_authorize("209.227.183.21", "subscriber")) {
log(1, "AUTH FAILED, REQUESTED\n");
www_challenge("", "1");
break;
};
log(1, "AUTH OK, REGISTER\n");
save("location");
break;
};
.....
--
Best regards,
Vitali
Hello,
I'm new in SER, after installed ser 0.8.12 cvs versions, I try to add alias
to a user, but I met a problem.
After I type:
serctl alias add 8040 sip:jeytest@voip.orzar.net
It' shows:
sip:jeytest@voip.orzar.net
400 Table 'aliases' not found in memory, use save("aliases") or
lookup("aliases") in the configuration script first
I'm sure I have lookup("aliases"); in my /etc/ser/ser.cfg file, and I did
edit serctl script FOREVER_REL=1073741823 to FOREVER_REL=1003741823 follow
by http://lists.iptel.org/pipermail/serusers/2004-January/004949.html .
Thanks,
Jey
Hi,
I've just committed major update for rtpproxy/nathelper, which adds
support for proxying RTCP and also make RTP proxy behave much better for
non-NATed clients by pre-loading remote addresses[1] of each party from
the SIP request/reply. Please note that proxy's command protocol has
been extended to support new functionality, so that you need both new
rtp proxy and new nathelper (old nathelper will not work with new rtp
proxy and vice versa). Both of them can be obtained from the ser's cvs
repository:
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/rtpproxy/http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/modules/nathelper/
Please let me know if there are any problems with the new version.
-Maxim
[1] currently only IPv4 addresses can be pre-loaded, though it should be
trivial to extend proxy, nathelper and command protocol to accomodate
IPv6 as well. Proxy's core supports IPv4<->IPv4, IPv4<->IPv6 and
IPv6<->IPv6 relaying already both for RTP and RTCP.
Hi,
In 0.8.13 the location table stores values as "username@domain" in the
username column, but in previous versions it was just "username". Is
there is a config parameter to switch between one format and the other?
And the "serctl ul show <username>" never finds anyone, even though the
"serctl ul show" command clearly shows them there. For example:
serctl ul show 1040(a)sip.telesip.net
404 Username 1040 in table location not found
and....
serctl ul show....
...Record(0x422be248)...
domain: 'location'
aor : '1040(a)sip.telesip.net'
~~~Contact(0x422be2b8)~~~
domain : 'location'
aor : '1040(a)sip.telesip.net'
Contact: 'sip:1040@200.118.1.1:5060;user=phone;transport=udp'
Expires: 594
q : 0.00
Call-ID: '1436722947(a)200.118.1.1'
CSeq : 63
replic : 0
State : CS_DIRTY
Flags : 0
next : (nil)
prev : (nil)
~~~/Contact~~~~
Is there anything obvious I am missing here?
Thanks,
--
Andres
Network Admin
http://www.telesip.net