I would like to know what all can be done using openser/kamailio as a registrar server alone. i.e. in the real world scenario how does openser can be useful as a registrar sever alone.I would like to make myself clear by pointing to the below example. i can integrate openser and asterisk and make openser as a registrar (only)server and can make use of asterisk for call functionality purposes.. Similarly, i would like to know where openser fits in (openser should only be used as a registrar server again).
Your guidance is greatly appreciated.
--
Regards,
Rajesh
Hi,
In kamailio 1.5.2-notls, I'm trying to get the CallID of a dialog that has timed out:
if (is_method( "INVITE" ) && !has_totag())
{
$dlg_ctx(timeout_route) = 21;
}
...
route[21] {
xlog ("L_WARN", "Dead dialog: $dlg(callid)");
exit;
}
However, syslog says:
daemon.warn /usr/sbin/kamailio[6578]: Dead Dialog: <null>
daemon.warn /usr/sbin/kamailio[6578]: WARNING:dialog:dlg_ontimeout: timeout for dlg with CallID \
'8b2eb5e3-20493c20-14e681d(a)192.168.1.1' and tags '87F489DA-922DF157' '2XrwB5OcEJ2zQvyiTUIh-l2Zd1wjL51M'
dlg_handlers.c leads me to believe that the context is loaded before calling the route(21), and the dialog
timeout handler is nice enough to report it in syslog just after my script fails.
Am I missing something fundamental, or is this just not possible?
Thanks!
I Think I have thing configured correctly and yet I can not make
things work correctly.
This is what I am do
I have SER on an internal (10.1.1.x) IP address
I have RTPproxy on a different machine with a public IP address
206.75.15.x
I am routing the call out over our firewall and things 'almost' work.
SER sets up the call using the RTPproxy to set up the ports for the
RTP stream, and the RTP stream is returned from the far end to the
public IP address, however non of the RTP traffic is sent to the
internal address, I am guessing it is waiting for an rtp stream from
the internal address but neither SER nor the ip-phone send anything or
even seem to know about the RTPproxy.
Can anyone offer ANY suggestions as to how to direct the internal RTP
stream to the RTPproxy address?
Many thanks,
Jeffr
Please, don't forget to copy the list... _this_ is a list... ;)
Edson.
Jeff Russell escreveu:
> I think this is where the error is:
>
> 0(60402) ERROR: extract_body: message body has length zero
> 0(60402) ERROR: force_rtp_proxy2: can't extract body from the message
>
> ideas?
>
>
>
> On 2009-10-06, at 11:08 AM, Edson - Lists wrote:
>
>> I would suggest You to use NGREP and sniff both legs of the
>> communication flow...
>>
>> See what SER receives and responds, what's on the SDP body and look at
>> syslog to understand what RTPproxy is doing. Maybe also take a look on
>> what the internal client is sending and receiving.
>>
>> It should give You some hints.
>>
>> Edson.
>>
>> Jeff Russell escreveu:
>>> I Think I have thing configured correctly and yet I can not make
>>> things work correctly.
>>> This is what I am do
>>> I have SER on an internal (10.1.1.x) IP address
>>> I have RTPproxy on a different machine with a public IP address
>>> 206.75.15.x
>>> I am routing the call out over our firewall and things 'almost' work.
>>> SER sets up the call using the RTPproxy to set up the ports for the
>>> RTP stream, and the RTP stream is returned from the far end to the
>>> public IP address, however non of the RTP traffic is sent to the
>>> internal address, I am guessing it is waiting for an rtp stream from
>>> the internal address but neither SER nor the ip-phone send anything
>>> or even seem to know about the RTPproxy.
>>> Can anyone offer ANY suggestions as to how to direct the internal RTP
>>> stream to the RTPproxy address?
>>> Many thanks,
>>> Jeffr
>>> _______________________________________________
>>> Serusers mailing list
>>> Serusers(a)lists.iptel.org
>>> http://lists.iptel.org/mailman/listinfo/serusers
>
>
I could implement openser as a registrar(only) server .Thanks to the team openser for the timely help.I would like to know what all can be done using
openser/kamailio as a registrar server alone. i.e. in the real world scenario how does openser can be useful as a registrar sever alone.I would
like to make myself clear by pointing to the below example. i can integrate openser and asterisk and make openser as a registrar (only)server and can
make use of asterisk for call functionality purposes.. Similarly, i would like to know where openser fits in (openser should only be used as a
registrar server again).
Your responses can speed up my research work..
>
> Saúl Ibarra wrote:
>
> You are doing save_location before authentication. You should first
> challenge the REGISTER for authentication and then do save_location.
>
> 2009/10/6, Rajesh <Rajesh.sreedharan(a)siptech.com>:
>
>
> Dear All,
> I would like my kamailio server to act (only) as a
> Registrar server. I have configured my kamilio for performing
> authentication successfully, but this time i find that authentication is
> not being done.Your views on my cfg is greatly appreciated.
>
> # ------------------ module loading ----------------------------------
> debug=3
> log_stderror=yes
> mpath="/usr/local/lib/kamailio/modules/"
>
> loadmodule "db_mysql.so"
> loadmodule "mi_fifo.so"
> loadmodule "sl.so"
> loadmodule "pv.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> loadmodule "uri_db.so"
>
> loadmodule "auth.so"
> loadmodule "auth_db.so"
>
> port=5060
> # ----------------- setting module-specific parameters ---------------
>
>
> # ----- mi_fifo params -----
> modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
>
>
> # ----- auth_db params -----
> /* uncomment the following lines if you want to enable the DB based
> authentication */
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("auth_db", "db_url","mysql://openser:openserrw@localhost/openser")
> modparam("auth_db", "load_credentials", "")
>
> # -- usrloc params --
>
> modparam("usrloc", "db_url",
> "mysql://openser:openserrw@192.168.64.75/openser")
>
>
> modparam("usrloc", "db_mode", 3)
>
> # ------------------------- request routing logic -------------------
>
> # main routing logic
>
> route{
>
> # initial sanity checks -- too long messages
> if (msg:len >= 2048 ) {
> sl_send_reply("513", "Message too big");
> exit;
> };
>
> if (!uri==myself) {
> sl_send_reply("400", "Bad destination, only register
> messages destined for this server are accepted");
> exit;
> };
>
> # the only valid message for the registrar is the register message
> # other messages are answered with an error message
> if (uri==myself) {
>
> if (method=="REGISTER") {
>
> sl_send_reply("100", "Trying");
>
> if(!save("location")) {
> sl_reply_error();
> };
> exit;
> } else {
> sl_send_reply("403", "Forbidden");
> exit;
> };
> };
>
> # Authentication route
>
>
> if (is_method("REGISTER"))
> {
> # authenticate the REGISTER requests (uncomment to enable auth)
> if (!www_authorize("192.168.64.75", "subscriber"))
> {
> www_challenge("192.168.64.75", "0");
> exit;
> }
> ###the following lines are uncommented
> if ($au!=$tU)
> {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> }
> else
> {
> # authenticate if from local subscriber (uncomment to enable auth)
> if (from_uri==myself)
> {
> if (!proxy_authorize("", "subscriber"))
> {
> proxy_challenge("", "0");
> exit;
> }
> if (is_method("PUBLISH"))
> {
> if ($au!=$tU) {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> } else {
> if ($au!=$fU) {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> }
>
> consume_credentials();
> # caller authenticated
> }
> }
> return;
> }
>
>
>
> --
> Regards,
> Rajesh
>
This should have gone to the list... :)
On Tue, Oct 6, 2009 at 12:00 PM, Rajesh <Rajesh.sreedharan(a)siptech.com> wrote:
> I could implement openser as a registrar(only) server .Thanks to the team
> openser for the timely help.I would like to know what all can be done using
> openser/kamailio as a registrar server alone. i.e. in the real world
> scenario how does openser can be useful as a registrar sever alone.I would
> like to make myself clear by pointing to the below example. i can integrate
> openser and asterisk and make openser as a registrar (only)server and can
> make use of asterisk for call functionality purposes.. Similarly, i would
> like to know where openser fits in (openser should only be used as a
> registrar server again).
> Your responses can speed up my research work..
>
>
> Saúl Ibarra wrote:
>
> You are doing save_location before authentication. You should first
> challenge the REGISTER for authentication and then do save_location.
>
> 2009/10/6, Rajesh <Rajesh.sreedharan(a)siptech.com>:
>
>
> Dear All,
> I would like my kamailio server to act (only) as a
> Registrar server. I have configured my kamilio for performing
> authentication successfully, but this time i find that authentication is
> not being done.Your views on my cfg is greatly appreciated.
>
> # ------------------ module loading ----------------------------------
> debug=3
> log_stderror=yes
> mpath="/usr/local/lib/kamailio/modules/"
>
> loadmodule "db_mysql.so"
> loadmodule "mi_fifo.so"
> loadmodule "sl.so"
> loadmodule "pv.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> loadmodule "uri_db.so"
>
> loadmodule "auth.so"
> loadmodule "auth_db.so"
>
> port=5060
> # ----------------- setting module-specific parameters ---------------
>
>
> # ----- mi_fifo params -----
> modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
>
>
> # ----- auth_db params -----
> /* uncomment the following lines if you want to enable the DB based
> authentication */
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("auth_db", "db_url","mysql://openser:openserrw@localhost/openser")
> modparam("auth_db", "load_credentials", "")
>
> # -- usrloc params --
>
> modparam("usrloc", "db_url",
> "mysql://openser:openserrw@192.168.64.75/openser")
>
>
> modparam("usrloc", "db_mode", 3)
>
> # ------------------------- request routing logic -------------------
>
> # main routing logic
>
> route{
>
> # initial sanity checks -- too long messages
> if (msg:len >= 2048 ) {
> sl_send_reply("513", "Message too big");
> exit;
> };
>
> if (!uri==myself) {
> sl_send_reply("400", "Bad destination, only register
> messages destined for this server are accepted");
> exit;
> };
>
> # the only valid message for the registrar is the register message
> # other messages are answered with an error message
> if (uri==myself) {
>
> if (method=="REGISTER") {
>
> sl_send_reply("100", "Trying");
>
> if(!save("location")) {
> sl_reply_error();
> };
> exit;
> } else {
> sl_send_reply("403", "Forbidden");
> exit;
> };
> };
>
> # Authentication route
>
>
> if (is_method("REGISTER"))
> {
> # authenticate the REGISTER requests (uncomment to enable auth)
> if (!www_authorize("192.168.64.75", "subscriber"))
> {
> www_challenge("192.168.64.75", "0");
> exit;
> }
> ###the following lines are uncommented
> if ($au!=$tU)
> {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> }
> else
> {
> # authenticate if from local subscriber (uncomment to enable auth)
> if (from_uri==myself)
> {
> if (!proxy_authorize("", "subscriber"))
> {
> proxy_challenge("", "0");
> exit;
> }
> if (is_method("PUBLISH"))
> {
> if ($au!=$tU) {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> } else {
> if ($au!=$fU) {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
> }
>
> consume_credentials();
> # caller authenticated
> }
> }
> return;
> }
>
>
>
> --
> Regards,
> Rajesh
>
>
>
>
>
> --
> Regards,
> Rajesh
--
/Saúl
http://www.saghul.net | http://www.sipdoc.net
Dear All,
I would like my kamailio server to act (only) as a
Registrar server. I have configured my kamilio for performing
authentication successfully, but this time i find that authentication is
not being done.Your views on my cfg is greatly appreciated.
# ------------------ module loading ----------------------------------
debug=3
log_stderror=yes
mpath="/usr/local/lib/kamailio/modules/"
loadmodule "db_mysql.so"
loadmodule "mi_fifo.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "uri_db.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
port=5060
# ----------------- setting module-specific parameters ---------------
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
# ----- auth_db params -----
/* uncomment the following lines if you want to enable the DB based
authentication */
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url","mysql://openser:openserrw@localhost/openser")
modparam("auth_db", "load_credentials", "")
# -- usrloc params --
modparam("usrloc", "db_url",
"mysql://openser:openserrw@192.168.64.75/openser")
modparam("usrloc", "db_mode", 3)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- too long messages
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
if (!uri==myself) {
sl_send_reply("400", "Bad destination, only register
messages destined for this server are accepted");
exit;
};
# the only valid message for the registrar is the register message
# other messages are answered with an error message
if (uri==myself) {
if (method=="REGISTER") {
sl_send_reply("100", "Trying");
if(!save("location")) {
sl_reply_error();
};
exit;
} else {
sl_send_reply("403", "Forbidden");
exit;
};
};
# Authentication route
if (is_method("REGISTER"))
{
# authenticate the REGISTER requests (uncomment to enable auth)
if (!www_authorize("192.168.64.75", "subscriber"))
{
www_challenge("192.168.64.75", "0");
exit;
}
###the following lines are uncommented
if ($au!=$tU)
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
}
else
{
# authenticate if from local subscriber (uncomment to enable auth)
if (from_uri==myself)
{
if (!proxy_authorize("", "subscriber"))
{
proxy_challenge("", "0");
exit;
}
if (is_method("PUBLISH"))
{
if ($au!=$tU) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
} else {
if ($au!=$fU) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
}
consume_credentials();
# caller authenticated
}
}
return;
}
--
Regards,
Rajesh
Does SER 2.0.0-rc1/examples/pstn.cfg or the much more complete
one in Chapter 8 of "SER Getting Started" actually work when
it comes to a BYE comming from the PSTN gateway?
So far, it appears these two cfg files don't cope with the
called party on the PSTN hangs up first, and it isn't clear
how it could be made to work in anything more complex than
a one-SIP-call-source one pstn-gateway configuration.
Let's say I have four clients from which a call can originate
and arrive at SER, with the caller source IP addresses of
"A", "B", "C" and "D". "C" sends the INVITE of a call
that SER determined is destined for the PSTN gateway, which
is at IP address "P". Here, the INVITE, 100 Trying,
180/183, 200 OK and ACK messages all go to the right
places and look more or less correct.
If "C" sends a BYE to end the call, this also works
correctly, with SER forwarding that on to "P" and the
200 OK being returned. So far, so good.
However, if the called party on the PSTN hangs up first,
"P" sends SER a BYE and SER simply sends the BYE right
back to "P", whom responds with a "481" back. The
originating party at "C" never finds out that the call
has ended, because SER didn't pass the BYE on to the
calling device. The SIP phone stays in the "Connected"
state.
In my case, the calling sites A, B, C and D don't include
a Record-Route of their own, but sometimes have a Via:
header. In either case, SER still doesn't send a BYE or
re-INVITE coming from P to the correct destination of
A, B, C or D.
I don't know how I could force SER to send the BYE or INVITE
on to the right place, given four possible call-initiator
IP addresses, of which only "C" would know about
this sample call.
I don't believe I can stick in an extra Record-Route when
handling the original INVITE that has the call source IP
address in it (in addition to a Record-Route of my own),
simply because I don't believe SER will let me dynamically
select which senders IP address should go in the forged
Record-Route, or if doing so would really help the situation
later when that trail of crumbs might be helpful.
Also, even though the pstn.cfg sample in the book has lots
of steps to check for fraud before processing a re-INVITE
coming from the PSTN (and the footnotes say that this is what
these checks are for), I don't see how SER would know
the right place to send the re-INVITE that came from the
PSTN once it the authentication checks were done. It looks
like SER will always send it to "P" regardless of which
direction it should be sent, which doesn't help much, and
puts any call using Session-Expires: to failure, when 50%
of that time (plus 32.5 seconds) has passed.
So, is there with a corrected pstn.cfg out there, or better
still, has anybody actually made these two situations work,
which are:
(1) The called party on the PSTN hangs-up first which
causes a BYE to be sent to SER. SER forwards the BYE to
the right caller (or whatever the so-called proxy is
supposed to do), AND
(2) the SIP-PSTN gateway device sends a re-INVITE to
SER and it goes somewhere that will generate an OK reply
If someone has made it work, can they show an example,
rather than just say "it should be possible" or "works for me"?
Such responses are encouraging, but not that helpful.
Thanks in advance!
I am receiving intermittent INVITES from a couple of
sources where the INVITE includes a cic=nnnn. I need to
strip this off before it reaches the PSTN gateway switch
because that switch will try to use that value. However,
it appears to be a pseudo-CIC and isn't an assigned
carrier number so it can't be used for routing outside
the network that stuck it in there. That network should be
stripping it off before the call leaves their network,
but they are not and the call has passed through a few
entities by the time it reaches us, so we don't know whom to
contact about the problem.
Does SER have any mechanism that will strip this ONE item and
leave the rest of the INVITE intact, eg so I can call more
than one hard-coded number?
The documentation I examined (iptel.org SIP Express Router
v0.11.0 -- Admin's Guide, chapter 2.3, page 22) shows functions
to delete or replace everything but attributes following a
semi-colon and preceding the @. Is there something that is
undocumented?
Sample: (values altered)
INVITE sip:9615551212;cic=9234@208.37.38.39;user=phone SIP/2.0
Need to change that to:
INVITE sip:9615551212@208.37.38.39;user=phone SIP/2.0
(and leave any other parameters that might be present intact.)
Thanks in advance for suggestions.