Hi,
I'm trying to do add accounting to our OpenSER
server. Getting accounting to work is easy but
I'm having trouble saving client IP addresses with
every CDR.
Most of our SIP UAs are behind some form of
NAT and to "prove" that calls have originated at
the client I want to save the public IP address
and as extra service also the private IP
address of the UA.
Saving the private IP address is easy, $Ri
contains this value. I'm having trouble finding out
what to do to save the public IP address. I thought
that since I'm using fix_contact() I could save the
contact header body, but $ct still contained the
private IP address.
Is this even possible?
--
Andreas Sikkema
Hello everybody!
A new openser module named H350 is available in the openser devel
repository.
http://www.openser.org/docs/modules/devel/h350.html
This module allows a script writer to implement H.350 based SIP digest
authentication, call forwarding, SIP URI alias to AOR rewriting, and
service level parsing.
H.350 is an ITU-T Recommendation that standardizes how real-time
communications (RTC) account data is stored in an LDAP directory. In
particular, H.350.4 defines LDAP object classes for storing SIP account
data. H.350 and H.350.4 are also described in IETF RFC 3944.
The H350 module uses the LDAP module API to query H.350 directory
servers, and it exports script functions to parse H.350 LDAP attributes
into openser AVPs.
This allows to integrate openser proxies with an enterprise/provider's
existing identity management infrastructure.
The module documentation should provide all information needed to use
this module with your openser installation. Feel free to ask questions
regarding this module on this list.
/Christian - University of North Carolina
Hey everyone,
Following a very interesting but old and un-answered post here:
http://www.voipuser.org/forum_topic_6616.html
about the integration of Click-To-Call web applications with OpenSER I
wanted to give it a try
myself through the FIFO interface.
Before jumping into scripts and code I was wondering if someone can make
it clear how to use those fifo commands that "initiate" a call between 2
parties,
from that post, the user uses:
/* construct FIFO command */
$fifo_cmd=":t_uac:".$myfilename."\n".
"REFER\n".$caller."\n".
"p-version: ".$signature."\n".
"Contact: ".$web_contact."\n".
"Referred-By: ".$web_contact."\n".
"Refer-To: ".$callee."\n".
"\n". /* EoHeader */
".\n\n"; /* EoFifoRequest */
Is there documentation available on the various fifo commands like this that
I can use?
Can I simply echo the fifo command string to /tmp/openser_fifo?
Thanks in advance,
Regards,
Liran.
Hi all,
I'd like to log failed SIP REGISTER attempt either with xlog or with
sip_trace() but I cannot understand where to put related code to catch
the authentication error
Here is the part of my opensr.cfg dedicated to REGISTER handling
if (method=="REGISTER") {
if (!proxy_authorize("exorsa", "openser_view")) {
proxy_challenge("exorsa", "0");
exit;
}
if (!check_to()) {
sl_send_reply("403", "Digest username and URI username
do NOT match! Stay away!");
exit;
}
save("location");
exit;
};
Tnx in advance
Regards
Edoardo
Hey everyone,
I've enabled RADIUS accounting in my config file and setup
radiusclient.confand the servers
file with the appropriate data though OpenSER coredumps for some reason,
this is the backtrace
from gdb:
#0 0xb7afc168 in test_config (rh=0x824d450, filename=0x824b240
"/var/csis/cfg/radiusclient.conf") at config.c:389
389 config.c: No such file or directory.
in config.c
(gdb) backtrace
#0 0xb7afc168 in test_config (rh=0x824d450, filename=0x824b240
"/var/csis/cfg/radiusclient.conf") at config.c:389
#1 0xb7afbf49 in rc_read_config (filename=0x824b240
"/var/csis/cfg/radiusclient.conf") at config.c:312
#2 0xb7b1440b in extra2strar () from /usr/local/lib/openser/modules/acc.so
#3 0x0808dab1 in init_child ()
#4 0x0806d15b in main ()
servers file:
192.168.0.1 test123
the servers file was before with a key of some non-standard chars like
"test123!!5%^#" so I changed
it to "test123" thinking that this might have caused it but this is not the
reason.
Thanks in advnace,
Lir.
If the Route Header(sip:[ip add]:[port]) or Outbound Proxy(sip:[ip add]:[port]) in the PUBLISH request has no Lr parameter, the username field in 'presentity' table is null, and the domain field is also wrong. Without Lr parameter(no loose routing), the request received by Presence server is that placing the remote target URI into the Request URI(rfc 3561), and adding a Route Header with the value of the remote target URI. It seems the presence module just takes the Request-URI(which actually is the address of presence server) in the received request and save username and domain into the database. Thus, the username is null and the domain is the address of presence server. Is that right?? Why doesn't this happen in 1.2.0 version?THANK YOURegards,Kevin
_________________________________________________________________
通过 Windows Live Spaces 与朋友轻松共享您的生活。
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx…
Hey everyone,
When I'm doing sequential forking I'm seeing that for each gateway that
doesn't answer and I move forward
in the list of available gateways to forward the INVITE to, openser adds an
"a=nortpproxy:yes" into the SDP
so what happens is that the final gateway which is alive receives the sip
header with multiple lines
of "a=nortpproxy:yes" repeating themselves in the SDP and throws away the
packet.
>From my browsing in nathelper's code I see the only place that writes a
"a=nortpproxy:yes" string to
the SDP is the fix_nated_sdp function, and I'm actually not using it in my
cfg but rather using
fix_nated_register and fix_nated_contact which from what the README says are
not handling
the SDP part.
And so I'm asking, where could it be coming from?
And also, it would be easier if I can insert a piece of code that can do
some regular expression
miracles with the SIP header and remove any duplicate lines of the
"nortpproxy" string.
I'm running on openser 1.1.1
Thanks,
Lir.
Hi, in order to implement a ACL system for incoming calls I've
created a table "acl" with those columns:
- priority
- from_username
- from_domain
- to_username
- group_from
- group_to
- type | action
In that tables I store rules, and my idea is to work as a firewall:
the first match is ejecuted (action=ALLOW or action=REJECT) and exit.
But I can't do it since I don't know how to use all the AVP's JUST
for the first row, then for the second:
avp_db_query("SELECT priority,from_username,from_domain,to_username,group_from,group_to,type,action FROM acl", "$avp(s:priority);$avp(s:from_username);$avp(s:from_domain);$avp(s:to_username);$avp(s:group_from);$avp(s:group_to);$avp(s:type);$avp(s:action)");
This query results in many rows, but I can't analize each row, I just
can compare each AVP with a value, but for that AVP they are possible
all the values of any row.
Because this I'm thinking in using the "exec" module to call a system
script. Is not possible to access to tjhe query result by rows?
Thanks for any help.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
I would like to advise my users as to the reason the phone stopped ringing
(no, I'm not going to let it ring for 20 minutes as many of them wish that I
would). My grand design is to send the call to Asterisk which plays a
recording to the effect of, "the party you have dialed does not answer,
please try your call later" after the 2 minute timeout.
Upon 408 the call is sent to Asterisk, however there is no audio. The call
stays alive until Asterisk hits the Hangup() in the dialplan. I've tested
by adding extra audio (to make sure the call does stay up) and watching on
the Asterisk console. In other situations, audio passes fine between the
Asterisk and the endpoint (ie. Calling voicemail). Any advice would be
greatly appreciated.
Some relevant portions of the config:
loadmodule "tm.so"
modparam("tm", "fr_timer", 3)
modparam("tm", "fr_inv_timer", 120)
modparam("tm", "wt_timer", 10)
modparam("tm", "fr_inv_timer_avp", "$avp(s:timeout)")
route[ROUTE_TO_PSTN]
{
.SNIP. (RURI fixes, etc.)
rewritehostport("PSTN_IP:PSTN_PORT");
if (!is_method("BYE")) {
t_on_reply("ROUTE_TO_PSTN_ONREPLY");
t_on_failure("ROUTE_TO_PSTN_FAILURE");
if (isflagset(FLAG_DEBUG)) xlog("L_INFO", "Relaying to PSTN -
M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci - On Reply, On Failure Set\n");
};
if (!t_relay()) {
if (isflagset(FLAG_DEBUG)) xlog("L_INFO", "Relaying to PSTN -
M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci - Sending Reply Error\n");
sl_reply_error();
};
exit;
}
failure_route[ROUTE_TO_PSTN_FAILURE]
{
.SNIP. (SQL, etc for updating the CDR)
if (t_check_status("408")) {
rewriteuri("sip:ANC-408@ANS_IP:ANS_PORT");
append_branch();
t_relay();
exit;
};
exit;
}