What is the best way to view the sgml documentation included in the
ser-0.9.6 tarball?
Preferrably a website or such where it is already rendered?
Thanks
Mark Price
Hi All
I am trying to implement blind call-forwarding. But from ser logs m
getting "Oct 19 14:48:52 localhost /usr/sbin/ser[3971]: CRITICAL:
invalid sendtoparameters one possible reason is the server is bound to
localhost and attempts to send to the net".
And when I am trying 'serctl ping sip:sony@imsfw.de' its giving me
477!!! Why it is so?? Even when I enable listen=IP_address into my
ser.cfg my clients unable to register with ser but if I comment it out
then it works fine & starts listening on my IP.
Please give me your valuable suggestions.
Thanks in anticipation
Kamal Mann
Hello!
I'm using postgresql for the db backend for my ser instance, after creating and populating
a few obvious tables by handI seem to have it "mostly working". ( using ser-0.9.4 )
However, I'm stuck on the following:
Oct 18 21:09:36 server /usr/sbin/ser[23595]: ERROR: permissions: trusted_reload(): Database problem
Oct 18 21:09:36 server /usr/sbin/ser[23595]: init_trusted(): Reload of trusted table failed
Oct 18 21:09:36 server /usr/sbin/ser[23595]: Error while initializing allow_trusted function
Scratching my head, trying to figure out what might be causing that, but with no
success - any clues?
What I imagine is the relevant info:
server ser # psql -U ser -W ser
Password for user ser:
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
ser=# \dt
List of relations
Schema | Name | Type | Owner
--------+------------+-------+-------
public | subscriber | table | ser
public | trusted | table | ser
public | version | table | ser
(3 rows)
ser=# \d trusted
Table "public.trusted"
Column | Type | Modifiers
--------------+-----------------------+-----------
src_ip | character varying(39) | not null
proto | character varying(4) | not null
from_pattern | character varying(64) | not null
Indexes:
"trusted_pkey" PRIMARY KEY, btree (src_ip, proto, from_pattern)
Am I missing a table, or a column somewhere? Is this a ser issue, or a db/sys-admin/permissions
issue? Should I also provide my ser.cfg?
Many thanks for any help/advice!
( also, is it possible to use the ser-0.10.x ser_postgres.sh/ser_dbtext.sh scripts
for ser-0.9.4, rather than doing it all by hand? )
Hi all
When the save function called the value of FLAG is 1 and when we want to get this from pseudo $mf the value is 64. I only set flag to 6. Is there any conversation at here or something wrong??
Thanks
Fatih Cerit
Hey All,
I have tried to set up forwarding using a document for SER which I found
at http://siprouter.onsip.org/doc/gettingstarted/ch10.html. In trying to
get it to work though I am having a couple of issues:
1)
Call forward immediate and not available works, but the billing party is
set to the caller and it needs to be rewritten to be the account doing
the forward.
2)
Call forward busy and no answer don't work at all. The caller's phone
drops the call and the forwarding destination phone does not ring at all.
I believe the solution to both of those problems is the same: find out
how branching works and set it up properly, but I am struggling to find
some documentation to help.
Does anyone have a sample config they can send me. I'm sure it would
help enormously!
I'm using OpenSER 1.1.0 with mediaproxy 1.7.2 on debian sarge.
Regards
Darryl
Hi,
I am trying to set up openser with mediaproxy (at xx.xx.xx.133) to route
calls from UA behind NAT to asterisk as voicemail (at xx.xx.xx.134) and
PSTN gateways (at xx.xx.xx.32)
I can see in the SDP payload that the RTP is being sent from asterisk to
mediaproxy, but in sessions.py it shows the private ip not the public
one and I have one way audio.
Can anybody help please.
opnser.cfg below.
Marnus
--
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
log_facility=LOG_LOCAL6
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/openser_fifo"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/uri_db.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
# Logging
loadmodule "/usr/local/lib/openser/modules/xlog.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
#tm timeout for voicemail params
modparam("tm", "fr_timer", 3)
modparam("tm", "fr_inv_timer", 35)
modparam("tm", "noisy_ctimer", 1)
# parms for NAT/mediaproxy
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/openser/sip-clients")
modparam("mediaproxy", "rtp_asymmetrics",
"/usr/local/etc/openser/rtp-clients")
modparam("registrar", "nat_flag", 6)
# ------------------------- request routing logic -------------------
# main routing logic
route {
#check for old messages: could mean a problem with the DNS
entries or some other loop-causer...
if (!mf_process_maxfwd_header("10"))
{
xlog("L_WARN", "WARNING: Too many hops\n");
sl_send_reply("483", "Too many hops, forward count
exceeded limit\n");
return;
};
#check for extremely large messages; we don't need a sip dos attack
if (msg:len >= 2048)
{
xlog("L_WARN", "WARNING: Message too large, &>= 2048
bytes\n");
sl_send_reply("513", "Message too large, exceeded limit\n");
return;
};
# Track what is happening
xlog("L_INFO", "SIP Request: method [$rm] from [$fu] to [$tu]\n");
#record everything besides registers and acks
if(method!="REGISTER" && method!="ACK")
{
setflag(1);
};
# Record Route Section
if (method=="INVITE" && client_nat_test("3"))
{
record_route_preset("xx.xx.xx.133:5060;nat=yes");
}
else if (method!="REGISTER")
{
record_route();
}
# Call tear down section
if (method=="BYE" || method=="CANCEL")
{
end_media_session();
}
#do not send to voicemail if BYE or CANCEL
#is used to end call before user pickup or timeout
if(method=="CANCEL" || method=="BYE")
{
setflag(10);
};
#grant route if route headers already present
if (loose_route())
{
# May need client_nat_test & use_media_proxy here...
route(1);
return;
};
#Always require authentication, which could result in a PSTN
if (method=="REGISTER")
{
if (!search("^Contact:[ ]*\*") && client_nat_test("7"))
{
setflag(6);
fix_nated_register();
force_rport();
};
if(!www_authorize("domain.tld", "subscriber"))
{
www_challenge("domain.tld", "0");
return;
}
else
{
if (!check_to())
{
sl_send_reply("401", "Unauthorized");
return;
};
#Save into user database, used below when
checking if user is available
xlog("L_INFO", "REGISTER: User $fu Authenticated
Correctly\n");
save("location");
return;
};
};
if (method=="INVITE")
{
if (client_nat_test("3"))
{
setflag(7);
force_rport();
fix_nated_contact();
};
if(uri=~"sip:\*86@.*")
{
#authorize if a call is going to VM
if(!proxy_authorize("domain.tld", "subscriber"))
{
proxy_challenge("domain.tld", "0");
return;
};
xlog("L_INFO", "CALL: Call from $fu to check
voicemail\n");
rewritehostport("vm.domain.tld:5060");
}
else
{
if (does_uri_exist())
{
#Call is to sip client, so do nothing
but route
xlog("L_INFO", "CALL: Sip client\n");
if (!lookup("location"))
{
sl_send_reply("404", "Not Found");
xlog("L_ERROR", "ERROR: User
$tu Not Found\n");
return;
};
}
else
{
#authorize if a call is going to PSTN
if(!proxy_authorize("domain.tld",
"subscriber"))
{
proxy_challenge("domain.tld", "0");
return;
};
#Call destination is PSTN, so send it to
the gateway
xlog("L_INFO", "CALL: PSTN $tu from $fu
\n");
rewritehostport("ast1.domain.tld:5060");
};
};
#Make sure that all subsequent requests go through us;
#done at the top already
#record_route();
}
else
{
if (does_uri_exist())
{
#Call is to sip client, so do nothing but route
xlog("L_INFO", "CALL: Sip client\n");
if (!lookup("location"))
{
sl_send_reply("404", "Not Found");
xlog("L_ERROR", "ERROR: User $tu Not
Found\n");
return;
};
}
else
{
#Call destination is PSTN, so send it to the gateway
xlog("L_INFO", "CALL: PSTN $tu from $fu \n");
rewritehostport("ast1.domain.tld:5060");
};
#record_route();
};
#ALL PROCESSING IS DONE, SO ROUTE
route(4);
route(1);
}
route[1]
{
#send the call outward
if(method=="INVITE" && !isflagset(10))
{
t_on_failure("2"); # voicemail if failure
};
if (!t_relay())
{
xlog("L_WARN", "ERROR: t_relay failed");
sl_reply_error();
};
}
# -----------------------------------------------------------------
# NAT Traversal Section
# -----------------------------------------------------------------
route[4]
{
if (isflagset(6) || isflagset(7))
{
if (!isflagset(8))
{
setflag(8);
use_media_proxy();
};
};
}
failure_route[2]
{
if(!t_was_cancelled() && !t_check_status("407"))
{
revert_uri();
rewritehostport("vm.domain.tld:5060");
append_branch();
#PREVENT SOME CRAZY VOICEMAIL LOOP
xlog("L_INFO", "INFO: CALL TO VOICEMAIL");
setflag(10);
route(1);
}
}
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();
};
}
--
"Opportunity is missed by most people because it is
dressed in overalls and looks like work."
Thomas Alva Edison - Inventor of 1093 patents,
including the light bulb, phonogram and motion pictures.
>> Locking it to 10/full was what the MCI technician recommended after
>> I opened a ticket because the line was dropping to 500Kbs
>> up/down. This was a 4Mbit up/down line burstable to 10. They said
>> it was not possible to increase the capacity of this line, so I
>> guess they are using their old 10Mbit equipment for this. Since
>> locking it like they asked speed has been fine,
OK, it wasn't clear that you were talking about a specialized
circuit delivered from a telco.
BTW, this phrase "the line was dropping to 500Kbs up/down"
implies that there was some protocol synching taking place
that negotiated the speed at that level (like a dsl line).
It would be more accurate to type "my observed throughput was
only 500Kbs up/down."
>> and the cable is a 2 meter factory made one plugging into the
>> datacenter patch-panel, so I don't think that's a problem...
My reference to the cable was for a situation where we're talking
about a real local area network, where you might have a central
switching fabric and machines distributed perhaps throughout a building
and was meant to apply to the cable run from the main switches to the
openser box.
So, now I don't get your set-up... when you typed "I had to lock-down
the network card to 10mbit full-duplex" and then the bit above about
the MCI technician and the 4Mbit circuit etc. then this sounds like
you have a box running openser that is directly plugged into a
metro-lan-style connection that is hardcoded at the provider end to
10/full.
And yet, when you type "datacenter patch-panel" this implies that
there is a local area network which implies some sort of central
switching fabric and then when I consider "old 10Mbit equipment"
together with the phrase "datacenter" my jaw hits the ground...
Where is your server?
Thanks,
-mark
>> Could someone please explain to me the actual difference between *Alias=*and
>> *Listen=*. I have read the documentation (
>> [snip]
>> listen=udp:sip1.foobar.com:5060 /* Domain 1 */
Ahh, this links back to your previous message and adds a little light.
IMO, it is not good practice to put domain names for listen.
I would only list IP addresses, and that list should be relatively small
because you don't need the IP address to distinguish between clients.
For example, I just have one listen command in my config.
For a critical service like this, either hard-coding in the IP addresses
to listen on, or be willing to listen on all attached interfaces,
should be Standard Operating Procedure (I vote for the former).
>> alias="sip1.foobar.com:5060" /* Aliases for Domain 1 */
Don't put the port in there. Just list the domains that
the server is responsible for.
>> Now if I understand correctly then *if (uri==myself) { }* should
>> now be true for each of these domains.
I think this should be explained more fully by someone in the know...
For example, if you are using the "domain" module then would we
expect to never have to use "uri==myself" and not have to list aliases?
(using is_uri_host_local() instead)
An earlier hint from someone here to me said something like
"openser doesn't know that the message is directed at itself"
and I wonder how the use of the "domain" module affects things
*inside* the openser core.
And then there is the environment variable SIP_DOMAIN...
does that have any bearing on the function of openser
or is it just used for the supporting scripts (openserctl).
What is the role of this variable in a multi-domain setting?
-mark
Hi,
After followed the INSTALL file set up the serweb.
Have configure
Alias /serweb "/var/serweb/html"
in httpd.conf
But while trying to browse
http://192.168.0.200/serweb/admin/index.php the error
message showed up on the broswer:
Forbidden
You don't have permission to access
/serweb/admin/index.php on this server
If I just browse form the local machine as:
/var/serweb/html/admin/index.php
the content of index.php would show up
What could be wrong of my setting?
I have:
httpd-2.2.3
php-5.1.6
serweb-0.9.4
installed in my redhat 9.0 machine where ser-0.9.6 has
been working fine.
Thanks a lot for help.
Ling
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
>> Thus, openser internally has a list of aliases it is responsible of.
>> This list includes:
>> [snip]
>> - all the domain names found out by reverse lookups of the listening IPs
I see that Richard Bennett had discovered that as he earlier typed:
== it seems something was trying to look-up the aliases
== that that server itself was listening on
where he likely meant IP addresses and not aliases.
I have to say that this is a big mistake. Doing the lookups is a bad
idea and basing any sort of operational aspects of openser on the
domains culled from such reverse lookups is even worse.
The list of supported domains should be purely under the
explicit configuration control of the person running the
openser box... either with explicit "alias" statements,
or with the use of the "domain" module.
I could support this claim with a lengthy, experience supported,
argument. But I'll save time with just this:
70.22.4.4.in-addr.arpa name = wbar1.sjo1-4-4-022-070.sjo1.dsl-verizon.net.
-mark