Re: [SR-Users] Problem using ds_is_from_list in failure_route

2016-09-21 Thread Andrew Pogrebennyk
Hi Joel,

On 21/09/16 00:37, Joel Serrano | VOZELIA wrote:
> I managed to solve this problem using ds_is_from_list in failure_route like 
> this:
>
> ds_is_from_list("8201", "3", "sip:$T_rpl($si):$T_rpl($sp)"))
>
> But I don't understand why I needed to do it that way.
>
> I would still like anyone to explain if they know the reason!

per my understanding in the failure route you are in the context of the
original INVITE message, so without explicitly telling ds_is_from_list
the IP address it is checking based on the source IP of INVITE.

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 513 Message too big for VIDEO calls

2016-05-31 Thread Andrew Pogrebennyk
This is the wrong mailing list, opensips != kamailio.

On 05/27/2016 10:47 AM, Varghese Paul wrote:
> Hi all,
> 
> I am trying to setup WSS on opensips-2.2. I am getting "513 Message too
> big " when i am trying to make video calls. Audio calls and Registration
> is working fine.I tried to change the message_chunk_size in WSS module
> but still i am getting the message.
> 
> Client : SIPML5 and JSSIP 
> Opensip version : 2.2 
> 
> I am attaching the sipml5 console logs. Please let me know is there any
> settings i can apply to resole this.
> 
> Thanks in Advance 
> 
> Varghese Paul 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] should the AVPs be available in CANCEL?

2016-04-14 Thread Andrew Pogrebennyk
Alex Balashov wrote:
> Strictly speaking, CANCEL is a different request, and accordingly, a 
> different transaction.
> 
> However, you should be able to access INVITE transaction data from the 
> failure_route triggered in connection with transaction cancellation.

Thanks, Alex!

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] should the AVPs be available in CANCEL?

2016-04-14 Thread Andrew Pogrebennyk
Hi all,
it seems that the AVPs not available when when processing CANCEL
message, even though they have been set for this transaction initially.
Is this the expected behavior?
P.S. kamailio 4.3.4
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] uac "restore_mode" is auto: effective when using core variables?

2016-04-14 Thread Andrew Pogrebennyk
Per my understanding the uac module stores the "vsf" parameter in
Record-Route and should be able to update the From/To URIs automatically
in all in-dialog requests that carry this parameter.
http://kamailio.org/docs/modules/stable/modules/uac.html#uac.p.restore_mode

“auto” - all sequential requests and replies will be automatically
updated based on stored original URI. For this option you have to set
“modparam("rr", "append_fromtag", 1)”.

What makes me wonder is: does that only work in From/To was changed by
uac_replace_from()/uac_replace_to() or also when assigning directly to
the $fu and $tu variables? I'm changing those variables and I am using
restore_mode auto but that does not change anything in in-dialog ACK.
I presume this is expected behavior because I'm not using uac when
assigning to variables, isn't it?

Thanks.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Append to reply in default action of failure_route

2015-12-28 Thread Andrew Pogrebennyk
Thanks Dmitri, I have to look closer at it, but for me it breaks
parallel forking, e.g. I need to reply only when it's the last branch.

Andrew

On 12/22/2015 05:46 PM, Dmitri Savolainen wrote:
> Andrew, I use smth like this for adding header to any response
> 
> request_route{
> 
> if (is_method("INVITE")){
> t_check_trans();
> t_on_failure("INV_FAIL");
> t_relay("mysip", "5060");
> }
> 
> }
> 
> 
> failure_route[INV_FAIL] {
> xlog("L_INFO", "failure_route code: $T_reply_code; reason:
> $T_reply_reason;");
> append_to_reply("MyField: my_field_content\r\n");
> send_reply("$T_reply_code","$T_reply_reason");
> exit;
> 
> }


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Append to reply in default action of failure_route

2015-12-22 Thread Andrew Pogrebennyk
Hello Efelin,
I stumbled upon the issue you described here. Have you been able to find
a solution? I've tried to play with t_reply(), but no luck so far.

Regards,
Andrew

On 11/18/2013 10:00 AM, Efelin Novak wrote:
> Hi,
> 
> I would like to append a header to a 'winning' negative reply in
> failure_route and let the Kamailio do the default action (state fully
> forward the winning reply).
> 
> When I use append_to_reply("Foo: bar\r\n"); and then call exit; in
> failure_route nothing is appended.
> When I use same append_to_reply then t_relay("505","Error"); and exit;
> the header is appended.
> When I use append and t_reply with dialog modul turned on I got a bug
> I'm solving here '[SR-Users] t_reply in failure route with dialog module'.
> 
> So my question is how to put a header into a reply when I don't want to
> alter its code or text?
> 
> I'm using Kamilio 4.0.4 on Debian 7.1
> 
> Thanks for an answer
> 
> Efelin


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] why msg_apply_changes() from REQUEST_ROUTE only

2015-12-22 Thread Andrew Pogrebennyk
Hi,
I have a similar issue with kamailio 4.3.4. I want to append a header to
external 486 or 603 reply. If I got it right I should call append_hf,
not append_to_reply which is for locally generated replies.

I've added append_hf() and in the end of failure route call exit but for
some reason that header does not appear on the wire.
So I have added msg_apply_changes() in failure route to see if it
changes something for me.
1st surprise is that kamailio actually started with this config. 2nd
surprise is that is still doesn't work and throws an error which I
didn't see before:

Dec 22 16:01:34 sp1 (local7.info) proxy[23957]: INFO: 

[SR-Users] registered4() is not adding xavp with details of the record

2015-09-03 Thread Andrew Pogrebennyk
Hi,
I was trying to use registered("location", "$ru", 0, 1)
Last parameter is the flag according to
http://kamailio.org/docs/modules/stable/modules/registrar.html#registrar.f.registered

flag values is as follows:
1 - set xavp_rcd with value from matched contact

But I'm getting NULL instead of ruid.. While the same works after
lookup("location").

So I took a quick look into the code and that confirms that registered4
does not add the xavp with details of the record (ruid), i.e. it does
not do what the lookup_helper does.

Is this done on purpose or an oversight? While fixing this it might be
reasonable to introduce a new function for setting the XAVPs and call it
from lookup and registered4 functions, especially since we are going to
extend the attributes list beyond just ruid, but right now I'm
struggling just to understanding how the XAVP should be built.. Ideas?

Thanks,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] usage of t_flush_flags() in event_route

2015-07-20 Thread Andrew Pogrebennyk
Hi,
ideas anyone?

BR,
Andrew

On 06/17/2015 12:12 PM, Andrew Pogrebennyk wrote:
> Daniel,
> I'm reviving this old thread..
> 
> On 05/27/2015 01:40 PM, Andrew Pogrebennyk wrote:
>> thanks for the answer, that's what I was thinking - maybe the flags do
>> not persist or are destroyed after the per-branch failure route.
>>
>> However, the t_flush_flags description says this function can be used in
>> any route, so in should be fixed in the long term.. Let me check if I
>> can come up with some workaround in config script for the time being.
> 
> I didn't manage to come up with any workaround so far.
> 
> The problem appears if the initial call leg coming from, let's say, the
> application server didn't have the accounting flags set. Long story put
> short, if the UA responds with the 302 response and we are going to
> process that, we want to create an acc record for the new target from
> 302 message because this call may incur additional costs.
> 
> I'm setting the accounting flags and even calling t_flush_flags() but
> that doesn't work (no accounting record for INVITE with Call-ID:
> rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1).
> 
> if($var(redirected_forward) == 1)
> {
> setflag(FLAG_ACC_FAILED);
> setflag(FLAG_ACC_DB);
> t_flush_flags();
> }
> 
> From attached log:
>> root@sp2:~# grep -i acc kamailio.log
>> Jun 17 11:49:38 sp2 proxy[12702]: INFO: 

Re: [SR-Users] usage of t_flush_flags() in event_route

2015-06-17 Thread Andrew Pogrebennyk
Daniel,
I'm reviving this old thread..

On 05/27/2015 01:40 PM, Andrew Pogrebennyk wrote:
> thanks for the answer, that's what I was thinking - maybe the flags do
> not persist or are destroyed after the per-branch failure route.
> 
> However, the t_flush_flags description says this function can be used in
> any route, so in should be fixed in the long term.. Let me check if I
> can come up with some workaround in config script for the time being.

I didn't manage to come up with any workaround so far.

The problem appears if the initial call leg coming from, let's say, the
application server didn't have the accounting flags set. Long story put
short, if the UA responds with the 302 response and we are going to
process that, we want to create an acc record for the new target from
302 message because this call may incur additional costs.

I'm setting the accounting flags and even calling t_flush_flags() but
that doesn't work (no accounting record for INVITE with Call-ID:
rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1).

if($var(redirected_forward) == 1)
{
setflag(FLAG_ACC_FAILED);
setflag(FLAG_ACC_DB);
t_flush_flags();
}

>From attached log:
> root@sp2:~# grep -i acc kamailio.log
> Jun 17 11:49:38 sp2 proxy[12702]: INFO: 

Re: [SR-Users] usage of t_flush_flags() in event_route

2015-05-27 Thread Andrew Pogrebennyk
Hi Daniel,
thanks for the answer, that's what I was thinking - maybe the flags do
not persist or are destroyed after the per-branch failure route.

However, the t_flush_flags description says this function can be used in
any route, so in should be fixed in the long term.. Let me check if I
can come up with some workaround in config script for the time being.

Regards,
Andrew

On 05/27/2015 08:19 AM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> I haven't used this event route and the flags, if they don't persist
> afterwards, then maybe it needs a patch to be fixed. Hugh implemented
> it, iirc, not sure if he was looking at this aspect.
> 
> Cheers,
> Daniel


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] usage of t_flush_flags() in event_route

2015-05-26 Thread Andrew Pogrebennyk
Hi Daniel and others,
I'm having a problem with acc module if I'm using the event_route/
branch-failure:
say, the call comes from the app server and goes to the registered user.
We arm the the failure route and per-branch failure route for the 302
redirect from the UA. We explicitly reset the accounting flags because
we don't want to account the calls from the app server. The transaction
is created implicitly by the t_relay().

Now if the UA responds with the 302 response and we are going to process
that, we want to create an acc record for the new target from 302
message because this call may incur additional costs. I'm setting the
accounting flags and calling t_flush_flags() but that doesn't work (no
accounting record). Any idea if I'm doing something wrong or maybe
there's a bug when changing the flags and then calling t_flush_flags
from the event_route?

Here are the module parameters:

modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 1)
modparam("acc", "detect_direction", 1)
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "db_url", PAIR_URL)
modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "multi_leg_info", "src_leg=$avp(i:901);dst_leg=$avp(i:902)")
modparam("acc", "time_mode", 2)
modparam("acc", "time_attr", "time_hires")
modparam("acc", "cdr_log_enable", 0)


FTR, we tried 4.1.6 and 4.1.8.

And here is the event route (with flags defined like this:
 flags  FLAG_ACC_DB:1, FLAG_ACC_MISSED:2, FLAG_ACC_FAILED:3, ...):

event_route[tm:branch-failure:redirect]
{
route(ROUTE_STOP_RTPPROXY_BRANCH);
if($T_rpl($rs) == 301 || $T_rpl($rs) == 302)
{
# initialise variables when entering failure route
route(ROUTE_INITVARS);

# these need to be avps because we need it in reply/failure-route
$(avp(s:from_faxserver)[*]) = 0;
$(avp(s:to_faxserver)[*]) = 0;
$(avp(s:cf_from_pstn)[*]) = 0;
$(avp(s:from_pstn)[*]) = 0;
$(avp(s:proxylu_from_pstn)[*]) = 0;
$(avp(s:lcr_flags)[*]) = 0;
$(avp(s:em_call)[*]) = 0;
$(avp(s:from_pbx)[*]) = 0;
$(avp(s:p_to_device)[*]) = 0;
$(avp(s:p_to_group)[*]) = 0;
$(avp(s:is_primary)[*]) = 0;

# now let's process a 30x
$(avp(s:acc_state)[*]) = "cfb";
$(avp(s:orig_acc_caller_user)[*]) = $avp(s:acc_caller_user);
$(avp(s:orig_acc_caller_domain)[*]) = $avp(s:acc_caller_domain);
$(avp(s:acc_caller_user)[*]) = $avp(s:acc_callee_user);
$(avp(s:acc_caller_domain)[*]) = $avp(s:acc_callee_domain);
$(avp(s:caller_uuid)[*]) = $avp(s:callee_uuid);
$(avp(s:callee_uuid)[*]) = $null;
# the $var(no_acc) is 0 at this point but the flags may have
been reset
# if this is a call from PBX user - we do want accounting for
the 302 redirect
if(isflagset(FLAG_ACC_DB)) {
xlog("L_NOTICE", "++ ACC flag is set - [% logreq -%]\n");
} else {
xlog("L_NOTICE", "-- ACC flag is NOT set - [% logreq
-%]\n");
}
setflag(FLAG_ACC_FAILED);
setflag(FLAG_ACC_DB);
t_flush_flags();

# get last URI from destination-set and set it as R-URI
$var(contact) = $T_rpl($ct);
$var(contact) = $(var(contact){nameaddr.uri});
if($var(contact) == 0 || $var(contact) == $null)
{

xlog("L_ERROR", "Failed to fetch contact '$ct' from 301/302
- [% logreq -%]\n");
acc_db_request("480", "acc");
$var(announce_handle) = "callee_tmp_unavailable";
$var(announce_set) = $xavp(callee_real_prefs[0]=>sound_set);
$(avp(s:announce_code)[*]) = 480;
$(avp(s:announce_reason)[*]) = "Temporarily Unavailable";
route(ROUTE_EARLY_REJECT);
}
$ru = $var(contact);
xlog("L_NOTICE", "Redirect from UAC intercepted - [% logreq -%]\n");
$(avp(s:forwarder_cli_userprov)[*]) = $T_rpl($tU);
$(avp(s:forwarder_domain_userprov)[*]) = $T_rpl($td);
$var(forward) = 1;
$var(redirected_forward) = 1;
route(ROUTE_LOAD_CALLER_PREF);
route(ROUTE_FIND_CALLEE);
}
}

Thanks.

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Unix timestamp with millisecond precision

2014-10-22 Thread Andrew Pogrebennyk
See http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables#tv_name

On 10/22/2014 10:40 AM, Grant Bagdasarian wrote:
> Hello,
> 
>  
> 
> I’m currently using the $TS psuedovariable to get the current unix
> timestamp, but this only returns the timestamp up to a second precision.
> 
> Is it possible in kamailio to get the current unix timestamp with
> milliseconds precision?
> 
>  
> 
> Regards,
> 
>  
> 
> Grant

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] textopsx issue when modifying same header several times

2014-10-16 Thread Andrew Pogrebennyk
Hi,
we are filtering some method names from the Allow header with kamailio
4.1: depending in the configuration:
if (hf_value_exists("Allow", "INFO"))
{
xlog("L_INFO", "Remove INFO from Allow\n");
exclude_hf_value("Allow", "INFO");
}
if (hf_value_exists("Allow", "REFER")) {
xlog("L_INFO", "Remove REFER from Allow\n");
exclude_hf_value("Allow", "REFER");
}

There is a problem in case multiple rewrites are done on the same header
so the resulting message is going to be broken:

Input:
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, SUBSCRIBE, NOTIFY,
PRACK, INFO, REFER

OUTPUT:
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, SUBSCRIBE, NOTIFY,
PRACK,

The trailing comma is not allowed. So we have to use
msg_apply_changes(). But kamailio is quite restrictive on where you can
call msg_apply_changes():
1. it must be done before record_route()* and
2. it is not allowed in the branch route. As for me it's valid use case
when you need to do some header manipulations only for some of the
branches, isn't?

*(1) is further aggravated by the fact that the record_route() for
loose-routed requests is usually called quite early in the processing
pipeline. Imagine kamailio.cfg would look like:

request_route {

# per request initial checks
route(REQINIT);

# NAT detection
route(NATDETECT);

# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans()) {
route(RELAY);
}
exit;
}

# ---> filter Allow
route(FILTER_ALLOW_METHODS);

# handle requests within SIP dialogs
route(WITHINDLG);

I don't like the idea of changing the message before loose-routing.

Taking (1) and (2) into account, would it be possible to

a) fix exclude_hf_value to allow to filter multiple values in a single
pass and
b) allow msg_apply_changes() in branch route without any ill effects on
the record-route headers?

Please share your ideas.

Thanks,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] howto synchronize ruid across multiple proxy instances

2014-09-18 Thread Andrew Pogrebennyk
Hi,
OK, thanks for the clarification. Maybe we will check the
load_db_contacts("userid") way with Victor.

Regards,
Andrew

On 09/15/2014 12:04 PM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> On 12/09/14 15:42, Andrew Pogrebennyk wrote:
>> Hi,
>> let's say I'm running two proxies/registrars that need to access Shared
>> location DB in db_mode=1 (all changes to usrloc are immediately
>> reflected in database too). I have observed that if the UAC re-registers
>> before the previous registration's expiry and the new REGISTER reaches
>> the other proxy than the one that processed the registration originally,
>> this new proxy is going to insert the second record for the same
>> username into location table instead of updating the existing
>> registration.
>>
>> I assume the problem is the ruid calculation,
> if the proxy doesn't have the record in memory, it will not matter if it
> is with same ruid or not, it will create a new record. If it is the same
> ruid, it will be a failure when inserting in database, not updating it
> there, leaving the old record in place.
> 
> Also, even if this one will overwrite in database, the other proxy will
> still have in memory and will route calls to it.
> 
> Alex mentioned in a separate email the db only mode - that could be a
> solution.
> 
> Also, you can try deleting the record from db via sqlops based on
> username, domain, contact uri if the registered() returns false for that
> user, before doing save().
> 
> If looking at writing C code to get it done, maybe it can be achieved
> with a new function to load_db_contacts("userid") to be called before
> save().
> 
> Back on ruid, just for sake of clarifications, by the way ruid is
> generated, is unlikely to get it the same across many systems, because
> it uses pid and local counters.
> 
> Cheers,
> Daniel


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] howto synchronize ruid across multiple proxy instances

2014-09-12 Thread Andrew Pogrebennyk
Hi,
let's say I'm running two proxies/registrars that need to access Shared
location DB in db_mode=1 (all changes to usrloc are immediately
reflected in database too). I have observed that if the UAC re-registers
before the previous registration's expiry and the new REGISTER reaches
the other proxy than the one that processed the registration originally,
this new proxy is going to insert the second record for the same
username into location table instead of updating the existing registration.

I assume the problem is the ruid calculation, because proxy2 generated a
different ruid than proxy1 since internal state of the two nodes is not
shared. I have two questions: 1) is that assumption correct? 2) is there
any way to synchronize the "ruid" of the two nodes in usrloc module,
similar to the "secret" parameter in the auth module, or a better
solution? I prefer the load-balancer to select random proxy and not do a
hash based on From URI.

I don't have the trace of the two registrations at the moment, but could
get one next week. The issue popped up when running some sipp tests, but
it's also possible that some cheap SIP endpoint would register well
before the expiration time, creating duplicate registration. So if
someone dials its number it's going to receive multiple incoming calls.

Here are the module parameters I am using, all quite ordinary:

modparam("usrloc", "use_domain", USE_DOMAIN)
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "db_url", CENTRAL_URL)
modparam("usrloc", "db_check_update", 0)
modparam("usrloc", "nat_bflag", FLB_NATB)

modparam("registrar", "default_expires", 3600)
modparam("registrar", "min_expires", 60)
modparam("registrar", "max_expires", 43200)
modparam("registrar", "method_filtering", 0)
modparam("registrar", "append_branches", 1)
modparam("registrar", "max_contacts", 5)
modparam("registrar", "received_avp", "$avp(s:received)")
modparam("registrar", "use_path", 1)
modparam("registrar", "path_mode", 0)
modparam("registrar", "path_use_received", 1)
modparam("registrar", "gruu_enabled", 0)

Any ideas?

Thanks in advance.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] no rtpengine.so module

2014-07-03 Thread Andrew Pogrebennyk
On 03/07/14 16:42, Yuriy Gorlichenko wrote:
> thanks for fas reply. If I may user rtpengine as rtpproxy maybe you
> already use it or just know - does rtpengine provide ridge mode as
> rtpproxy between internal and external interfaces? At my instalne if I add
> rtpengine --ip=my.ext.net.addr/my.int.net.addr 
> It shows that ip if wrong, but I neet proxy rtp between interfaces.
> Thanks.

rtpengine does not support the bridge mode.

Regards,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] parallel forking and 30x

2014-02-21 Thread Andrew Pogrebennyk
In the meantime it works if I access $T_rpl($ct) from per-branch failure
route.

Thanks.

On 02/20/2014 02:14 PM, Andrew Pogrebennyk wrote:
> Daniel,
> 
> we do seem to have a problem here, the get_redirects() function can be
> used from the FAILURE_ROUTE only, not from per branch failure route
> ("Command cannot be used in the block").
> Does it mean that uac_redirect module needs an update?
> 
> Andrew
> 
> On 02/18/2014 10:38 AM, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> starting with 4.1, you can have per branch failure routing block:
>>
>> http://www.kamailio.org/docs/modules/4.1.x/modules/tm.html#tm.f.t_on_branch_failure
>>
>>
>> Cheers,
>> Daniel
>>
>> On 18/02/14 10:28, Andreas Granig wrote:
>>> Hi,
>>>
>>> What is the intended behaviour from a general point of view if you get a
>>> 1xx on one branch and a 30x on another branch for a parallel fork?
>>>
>>>  From my understanding, the 30x is a final reply, so it's kept in tm
>>> until all other branches are finished, then it enters failure-route with
>>> the highest error code (e.g. a 487 if you cancel the other branch).
>>>
>>> What I actually want is intercepting the 30x and send another INVITE to
>>> the Contact of the 30x in the failure route. This works fine if you only
>>> have one branch, but it doesn't enter failure route for 30x if you have
>>> another active branch (e.g. in ringing state). Would it be possible to
>>> create a new branch directly from the reply route, or force to enter
>>> failure route for a specific reply/branch?
>>>
>>> Andreas
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] parallel forking and 30x

2014-02-20 Thread Andrew Pogrebennyk
Daniel,

we do seem to have a problem here, the get_redirects() function can be
used from the FAILURE_ROUTE only, not from per branch failure route
("Command cannot be used in the block").
Does it mean that uac_redirect module needs an update?

Andrew

On 02/18/2014 10:38 AM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> starting with 4.1, you can have per branch failure routing block:
> 
> http://www.kamailio.org/docs/modules/4.1.x/modules/tm.html#tm.f.t_on_branch_failure
> 
> 
> Cheers,
> Daniel
> 
> On 18/02/14 10:28, Andreas Granig wrote:
>> Hi,
>>
>> What is the intended behaviour from a general point of view if you get a
>> 1xx on one branch and a 30x on another branch for a parallel fork?
>>
>>  From my understanding, the 30x is a final reply, so it's kept in tm
>> until all other branches are finished, then it enters failure-route with
>> the highest error code (e.g. a 487 if you cancel the other branch).
>>
>> What I actually want is intercepting the 30x and send another INVITE to
>> the Contact of the 30x in the failure route. This works fine if you only
>> have one branch, but it doesn't enter failure route for 30x if you have
>> another active branch (e.g. in ringing state). Would it be possible to
>> create a new branch directly from the reply route, or force to enter
>> failure route for a specific reply/branch?
>>
>> Andreas


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Error with ACK from SIPML5

2014-02-14 Thread Andrew Pogrebennyk
Sorry for reviving this old thread. I think I've come across the same
issue as Jayesh and it is triggered by the Route
inserted by sipml5 into in-dialog requests like ACK - Route:


Jayesh had two Route headers that belong to this kamailio instance and I
also have two of them:
Route:

Route:


Although RFC3261 doesn't seem to forbit that explicitly, but when sipml5
adds a pre-existing Route to *in-dialog* request, it creates a set where
not all URIs are unique. What happens in kamailio is that when
loose_route encounters the topmost Route from sipml5 client, it does not
remove other routes before sending the request, e.g. I see no further
processing after "Next URI is a loose router". I can share the kamailio
debug log, but the most important part is:

> Feb 14 23:26:54 spce lb[3773]: DEBUG: websocket [ws_frame.c:589]: 
> ws_frame_receive(): Rx SIP message:
> ACK 
> sip:ngcp-lb@172.18.101.48:5060;ngcpct=7369703a3132372e302e302e313a35303830 
> SIP/2.0
> Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKPLN9elJsPlfeyLsMqN2J;rport
> From: "4252143385";tag=RtycJXR6JIUFzAezAbRX
> To: ;tag=1F9894DE-52FE982E000437E0-321A4700
> Contact: 
> "4252143385";+g.oma.sip-im;+sip.ice;language="en,fr"
> Call-ID: 1bff80ac-1e47-ab0f-3ea4-6a7b8637030b
> CSeq: 43084 ACK
> Content-Length: 0
> Route: 
> Max-Forwards: 70
> Proxy-Authorization: …
> Route: 
> 
> Route: 
> 
> Route: 
> 
> User-Agent: IM-client/OMA1.0 sipML5-v1.2014.01.27
> Organization: Doubango Telecom
> [...]
> Feb 14 23:26:54 spce lb[3773]: DEBUG: rr [loose.c:778]: after_loose(): 
> Topmost route URI: 'sip:172.18.101.48:5060;lr;sipml5-outbound;transport=udp' 
> is me
> Feb 14 23:26:54 spce lb[3773]: DEBUG: rr [loose.c:862]: after_loose(): URI to 
> be processed: 
> 'sip:172.18.101.48;transport=ws;r2=on;lr=on;ftag=RtycJXR6JIUFzAezAbRX;nat=yes;ngcplb=yes;socket=ws:172.18.101.48:5060'
> Feb 14 23:26:54 spce lb[3773]: DEBUG: rr [loose.c:871]: after_loose(): Next 
> URI is a loose router
> Feb 14 23:26:54 spce lb[3773]: DEBUG: rr [rr_cb.c:97]: run_rr_callbacks(): 
> callback id 0 entered with 
> Feb 14 23:26:54 spce lb[3773]: DEBUG: siputils [checks.c:106]: has_totag(): 
> totag found
> Feb 14 23:26:54 spce lb[3773]: DEBUG: rr [loose.c:974]: check_route_param(): 
> params are <;lr;sipml5-outbound;transport=udp>
> Feb 14 23:26:54 spce lb[3773]: INFO: 

Re: [SR-Users] NAT helper frustrations with multiple kamailios

2014-02-05 Thread Andrew Pogrebennyk
On 02/05/2014 11:20 AM, Daniel Tryba wrote:
> Off to figure out why uac_test incorrectly flags the onhold process as 
> needing 
> the nat helper...

Well, nat_uac_test is pretty straightforward, it does what the flags
tell it to do:
http://kamailio.org/docs/modules/stable/modules/nathelper.html#idp1655008
What I do is skip nat_uac_test for the requests and responses coming
from other proxies' IPs..

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] reg event support in subscribe

2014-02-05 Thread Andrew Pogrebennyk
Hi,
See presence_reginfo - Extension to Presence server for registration
info replication (RFC3680)
http://kamailio.org/docs/modules/stable/modules/presence_reginfo.html

On 02/05/2014 07:56 AM, Premchandiran wrote:
> Hi All,
> 
> May  I know whether kamailio supports event header with reg (EVENT:reg)
> (rfc 3680) , if kamailio supports may I know the module whether it is in
> presence or presence_xml or any other module?
> 
>  
> 
> Regards,
> 
> *Prem Chandiran M***
> 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio with mediaproxy-ng, 488 Not Acceptable Here

2014-02-04 Thread Andrew Pogrebennyk
Hi,
could you please post also your Chrome js developer log?
Does the problem exist if you start the jssip clients without video support?

Andrew

On 02/03/2014 12:00 PM, Mihai Marin wrote:
> Hello,
> 
> Another weekend struggling to make a call from jssip to another jssip
> behind firewall and I still receive 488 - Not Acceptable Here. I tried
> all the ideas that I had/received without any success - including catch
> 488 and re-invite.
> [...]
> What do I miss from my configuration?
> 
> Thank you.
> 
> Best regards,
> Mihai M


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio behind NAT

2014-01-24 Thread Andrew Pogrebennyk
On 01/23/2014 05:12 PM, Klaus Darilion wrote:
>> It is necessary to use the cwie / cwei flags in the rtpproxy_manage call?
> 
> If rtpproxy uses only a single listen-IP, then these flags are not
> needed. Only if you operate rtpproxy in bridge mode, then you need these
> flags. Bridge mode is necessary if you do not have IP routing between
> the internal network and the "virtual external" network, or if you want
> to bridge between IPv4 and IPv6.

John,
This function can be used to check the direction of every message:
http://kamailio.org/docs/modules/4.0.x/modules/rr.html#idp223296
You might also need to append the record-route parameters to remember
the flags you have passed to the manage_rtpproxy() initially.
Based on the direction of the request and initial flags you can
determine what flags to use when calling manage_rtpproxy() for a given
in-dialog requests and reply.

Hope this helps.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Help with authenticating using Kamailio

2014-01-14 Thread Andrew Pogrebennyk
Hi,
check if this answers your question: http://kb.asipto.com/asterisk:index

Andrew

On 01/13/2014 04:19 PM, Kasinath wrote:
> Hi All,
> 
> I just installed Kamailio in one server and Asterisk in another.
> Asterisk loads it sipusers info from database which is in Kamailio server.
> 
> I don't know how to go further. How can I authenticate Asterisk users
> through Kamailio. I am trying to authenticate using a sipphone. But no
> luck.
> 
> I am missing alot here. I know we can add users using the following command
>>> kamctl add username password
> 
> But I already have users in asterisk realtime db. Is there any
> difference? Awaiting your reply,
> 
> Thanks in advance,
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Update R-URI after lookup("location")

2014-01-14 Thread Andrew Pogrebennyk
Hi,

You should create a branch_route and perform this manipulation there..

BR,
Andrew

On 01/14/2014 10:53 AM, Igor Potjevlesch wrote:
> Hello,
> 
>  
> 
> No one has an idea? I was thinking that each request goes to RELAY but
> even if I try to modify the R-URI in this route, it fails. I still had
> the contact URI taken from “location” instead of my modification.
> 
> 
> Regards,
> 
>  
> 
> Igor.
> 
>  
> 
> *De :*Igor Potjevlesch [mailto:igor.potjevle...@gmail.com]
> *Envoyé :* lundi 13 janvier 2014 17:15
> *À :* sr-users@lists.sip-router.org
> *Objet :* Update R-URI after lookup("location")
> 
>  
> 
> Hello,
> 
>  
> 
> I do an association between X aliases with 1 contact. This contact is
> connected one time in the location.
> 
> But sometimes, for some scenario, this contact can be connected 2 or 3
> times and the INVITE are sent with parallel forking.
> 
>  
> 
> When an INVITE is received, after lookup(“aliases”), I set the R-URI
> with the original SIP TO with the following instruction:
> avp_pushto("$ruri/username", "$tU"); before relay.
> 
>  
> 
> The issue occurred with the next contacts. They don’t passed through
> this instruction. How can I update all available R-URI in location
> before relay?
> 
>  
> 
> Regards,
> 
>  
> 
> Igor.
> 
> 
> 
> 
>    
> 
> Ce courrier électronique ne contient aucun virus ou logiciel malveillant
> parce que la protection Antivirus avast!  est
> active.
> 
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] (no subject)

2013-10-15 Thread Andrew Pogrebennyk
Hi,

On 10/11/2013 08:14 PM, Fred Posner wrote:
>> I use  "rwie" and "rwei" flags   but in ngcp-mediaproxy-ng  e and i
>> seems to be used for IPv4 / IPv6 ..
>> ...
> 
> I don't believe that mediaproxy-ng can be used to bridge two ipv4
> networks; only bridging for ipv6 <-> ipv4.

That's true, there's no bridge mode in mediaproxy-ng.

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [Spce-user] FYI: Package update(s) in release 2.8

2013-06-04 Thread Andrew Pogrebennyk
Dear 2.8 users,
this update includes the fixes for kamailio-lb config (multiple
sockets-related):
- added record-route param to store socket; review logic for relaying
in-dialog requests (fallback to default send socket if it's not defined
explicitly); fixed socket selection for ACK after 4xx and replies to
in-dialog requests to callee;
- also file descriptors limit has been lifted for sems.
The upgrade is highly recommended if you run the 2.8 version.

On 06/04/2013 12:16 PM, Sipwise Repository Tracker wrote:
> One or more updates have been released in NGCP release 2.8:
> 
> * ngcp-templates-ce-asterisk was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-cdr-exporter was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-ce-check-tools was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-ce-cleanup-tools was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-ce-hylafaxplus was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-ce-hylafaxplus-diva was updated from version 2.8.6 to 
> version 2.8.7
> * ngcp-templates-ce-hylafaxplus-iax was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-ce-iaxmodem was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-kamailio was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-lsb was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-mediaproxy-ng was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-ce-mediator was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-mysql was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-nginx was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-odbc was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-reminder was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-sems was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-system was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-ce-vmnotify was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-asterisk was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-callingcard was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-cdr-exporter was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-check-tools was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-cleanup-tools was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-glusterfs was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-ha was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-heartbeat2 was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-hylafaxplus was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-hylafaxplus-diva was updated from version 2.8.6 to 
> version 2.8.7
> * ngcp-templates-pro-hylafaxplus-iax was updated from version 2.8.6 to 
> version 2.8.7
> * ngcp-templates-pro-iaxmodem was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-kamailio was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-lsb was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-mediaproxy-ng was updated from version 2.8.6 to version 
> 2.8.7
> * ngcp-templates-pro-mediator was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-monit was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-monitoring-tools was updated from version 2.8.6 to 
> version 2.8.7
> * ngcp-templates-pro-mysql was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-nginx was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-odbc was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-pushd was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-redis was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-reminder was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-sems was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-system was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-vmnotify was updated from version 2.8.6 to version 2.8.7
> * ngcp-templates-pro-voisniff-ng was updated from version 2.8.6 to version 
> 2.8.7
> 
> To apply the latest update(s) execute:
> 
>   apt-get update && apt-get upgrade && \
>   ngcp-update-db-schema && ngcp-update-cfg-schema && \
>   ngcpcfg apply
> 
> If you encounter any problems please report a bug at
> the spce-u...@lists.sipwise.com mailing list.
> 
> Further documentation is available at:
> 
>   http://www.sipwise.com/products/spce/documentation/
> 
> This is an automated mail by the Continuous Delivery platform at Sipwise.com
> 
> ___
> Spce-user mailing list
> spce-u...@lists.sipwise.com
> http://lists.sipwise.com/li

[SR-Users] auth module Readme on website has missing ToC

2013-05-23 Thread Andrew Pogrebennyk
Hi,
please check the link
http://kamailio.org/docs/modules/stable/modules/auth.html - the Table of
Contents is missing, there's only examples list.

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] path uri problem

2013-04-09 Thread Andrew Pogrebennyk
On 04/09/2013 11:59 AM, Juha Heinanen wrote:
> because path-value starts with name-addr and my interpretation is that
> since there are <>s around this path header body:
> 
> Path: 
> 
> 
> solely consists of name-addr and does not include any rr-params.  sip
> uri included in name-addr in turn cannot have ; and = in its param
> values.

I see, probably you are right. We've had base64 encode/decode on our
todo list for some time already (for broken UAs, e.g. some of them cut
everything after "'"), so maybe we should offer user a choice of proper
escaping and base64 encoding here.

> it turned out that save error had nothing to do with syntax of path
> header, but was due to a bug that i fixed.
> 
> -- juha
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] path uri problem

2013-04-09 Thread Andrew Pogrebennyk
Hi Juha,

On 04/07/2013 01:51 PM, Juha Heinanen wrote:
> i escaped them, but it didn't help.  path header now looks like:
> 
> Path: 
> .
> 
> and i still get the same error:
> 
> Apr  7 14:49:47 wheezy1 /usr/sbin/sip-proxy[8709]: ERROR: registrar 
> [save.c:887]: Failed to parse Path: URI

I don't see why you think that ; and = should be escaped.

rfc3327 chapter 4 says:

   The syntax for Path is defined as follows:

   Path = "Path" HCOLON path-value *( COMMA path-value )

   path-value = name-addr *( SEMI rr-param )

   Note that the Path header field values conform to the syntax of a
   Route element as defined in [1].  As suggested therein, such values
   MUST include the loose-routing indicator parameter ";lr" for full
   compliance with [1].

The rules for Route element are as follows:

Route=  "Route" HCOLON route-param *(COMMA route-param)
route-param  =  name-addr *( SEMI rr-param )
name-addr  =  [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec  =  SIP-URI / SIPS-URI / absoluteURI

rr-param  =  generic-param
generic-param  =  token [ EQUAL gen-value ]
gen-value  =  token / host / quoted-string

Why would someone want to escape semicolor (SEMI) which separated either
Route or URI parameters?

Also EQUAL used in pname=pvalue does not need escaping.

We've already had a closer look at add_path_received() here at sipwise
when we found double quotes in Route param value to be invalid and
changed them to single ones. We have not observed the error in save()
you have posted in kamailio 3.3.. Moreover, the ibc's Ragel-SIP-Parser
suggests that the Path header above is correct :)

So, from my PoV:
- the ;transport=tcp;lr;received=... part are route-param's which follow
the above rules.
- the 'sip:192.98.102.10:58156;transport=tcp' part contains URI
parameters. It is still fine according to definition of Path/Route
element above - and agrees with the definition of other-param too:

SIP-URI = "sip:" [ userinfo ] hostport
 uri-parameters [ headers ]
uri-parameters = *( ";" uri-parameter)
uri-parameter = transport-param / user-param / method-param
 / ttl-param / maddr-param / lr-param / other-param
other-param = pname [ "=" pvalue ]
pvalue = 1*paramchar
paramchar = param-unreserved / unreserved / escaped
param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
unreserved = alphanum / mark
mark = "-" / "_" / "." / "!" / "~" / "*" / "'"
 / "(" / ")"
alphanum = ALPHA / DIGIT
escaped = "%" HEXDIG HEXDIG

Do you also have the save() problem in 3.3?

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] loose_route causing loop

2013-01-31 Thread Andrew Pogrebennyk
Hello,
Usually this happens when the RURI has the IP address/ domain which
points to this server or which is present in the domain table. There are
some clients which may put even server IP address into Contact of INVITE
or 200 OK instead of its own so the further requests will be mis-routed.
You should post the SIP trace and kamailio log with debug level 3 if
this doesn't answer your question.

On 31/01/2013 20:05, Renan Capaverde wrote:
> Hello,
> 
> I have a problem with my configuration file. When I receive a in-dialog
> request (REINVITE) with topmost route being my kamailio server, it
> enters in loop and then the call is dropped.
> 
> What is the easiest way to prevent this to happen?
> 
> Best Regards,
> -- 
> 
> 
> *Renan Capaverde*
> /Estagiário Nível Superior/
> /DDT - STE - Soluções em Tecnologia e Embarcados/
> 
> *DÍGITRO TECNOLOGIA*
> *E-mail:* renan.capave...@digitro.com.br
> 
> *Fone:* +55 48 3281-7000*Ramal:* 8132
> *Fax:* +55 48 3281-7299
> *Site:* www.digitro.com 
> 
> /"Antes de imprimir, pense na sua responsabilidade e no seu compromisso
> com o meio ambiente"/
> 
> Esta mensagem, incluindo seus anexos, é reservada somente à Dígitro e ao
> destinatário da mensagem. Caso você tenha recebido esta mensagem por
> engano, queira por favor, retorná-la ao remetente e apagá-la de seus
> arquivos.
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] REGISTER OK but on send "407 Proxy Authentication Required" with no ACK

2013-01-30 Thread Andrew Pogrebennyk
Carsten,

On 01/29/2013 08:25 PM, Carsten Maass wrote:
> Or does it mean, the authentication is rejected because the local part
> 030123456789 in URI does not match the subscriber 979?

Indeed, this is what happens when you call auth_check with flag "1":

if (!auth_check("$fd", "subscriber", "1")) {..}

flags - set of flags to control the behaviour of the function. If it is
1, then the function will check to see if the authentication username
matches either To or From header username, a matter of whether it is for
a REGISTER request or not..

Glad you solved it.

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] REGISTER OK but on send "407 Proxy Authentication Required" with no ACK

2013-01-29 Thread Andrew Pogrebennyk
Hi Carsten,

It looks like the challenge is generated by the config line 721 - could
you post somewhere what is in there (or your whole config)?

 5(31487) DEBUG: auth [api.c:218]: check_response: Authorization is OK
[...]
 5(31487) ERROR: *** cfgtrace: c=[//etc/kamailio/kamailio.cfg] l=721
a=27 n=auth_challenge

On 01/29/2013 05:25 PM, Carsten Maass wrote:
> Hello Andrew,
> 
> thanks for coming back to me.
> 
> On 29.01.2013 13:40, Andrew Pogrebennyk wrote:
>> I see no problem with an ACK in the trace. The t38modem ACK's the
>> 407, sends the new INVITE with authorization but it's not accepted
>> by kamailio. I'm not sure if t38modem can even perform the
>> authorization. Maybe you need to accept the calls from it without
>> authorization. But if it can and you have configured the password in
>> there, you should check that the subscriber 979 exist in kamailio
>> domain 10.1.1.148 and the passwords do match.
> 
> In the afterthought a siptrace might not have been the best way to show
> the problem, as it could have legitimate reasons to reject the
> Authentication.
> 
> Yes, the user exist in Kamailio:
> 
> # kamctl ul show --brief
> Domain:: location table=512 records=2 max_slot=1
>   AOR:: 979@10.1.100.148
>   AOR:: berofixtrunk@10.1.100.148
> 
> and they are successfully registered:
> 
> # kamctl monitor
> Server:: kamailio (3.3.3 (x86_64/linux))
> Build:: mi_core.c compiled on 11:15:34 Dec 20 2012 with gcc 4.4.4
> Flags:: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS,
> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP,
> PKG_MALLOC, F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
> USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
> GIT:: 412053
> Now:: Tue Jan 29 16:26:22 2013
> Up since:: Tue Jan 29 07:27:36 2013
> Up time:: 32326 [sec]
> 
> Transaction Statistics:
> tmx:UAS_transactions = 1
> tmx:UAC_transactions = 0
> tmx:inuse_transactions = 0
> 
> Stateless Server Statistics:
> sl:sent_replies = 791
> sl:sent_err_replies = 0
> sl:received_ACKs = 0
> 
> UsrLoc Stats:
> usrloc:location-contacts = 2
> usrloc:location-expires = 0
> usrloc:location-users = 2
> usrloc:registered_users = 2
> 
> On the t38modem side there is only one password, the same with which
> t38modem successfully registers at Kamailio.
> 
> Here is an exerpt from the t38modem.log:
> 
> 2013/01/29 16:39:15.973 Pool:0xc1b0d700 SIP Sending PDU
> INVITE sip: 030987654321@10.1.1.148:5123 (1167 bytes) to:
> rem=udp$10.1.1.148:5123,local=u
> dp$10.1.1.148:6050,if=10.1.1.148%eth0
> 2013/01/29 16:39:15.973 Pool:0xc1b0d700 OpalUDP Setting
> interface to 10.1.1.148%eth0
> 2013/01/29 16:39:15.975 Opal Liste...0xc1c52700 OpalUDP Binding to
> interface: 10.1.1.148:6050
> 2013/01/29 16:39:15.975 Opal Liste...0xc1c52700 SIP PDU 407  Proxy
> Authentication Required received:
> rem=udp$10.1.1.148:5123,local=udp$10.1.1.148:6050,
> if=10.1.1.148%eth0
> 2013/01/29 16:39:15.975 Opal Liste...0xc1c52700 OpalTransport clean
> up on termination
> 2013/01/29 16:39:15.975 Pool:0xc1b0d700 SIP Adding
> authentication information for user "979" at realm "10.1.1.148"
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 SIP Sending PDU ACK
> sip: 030987654321@10.1.1.148:5123 (682 bytes) to:
> rem=udp$10.1.1.148:5123,local=udp$1
> 0.1.100.148:6050,if=10.1.1.148%eth0
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 OpalUDP Setting
> interface to 10.1.1.148%eth0
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 SIP INVITE
> transaction id=z9hG4bK7892f2b4-9768-e211-98e4-005056bd002b completed.
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 SIP Received Proxy
> Authentication Required response
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 SIP Found auth info
> for realm "10.1.1.148", user "979"
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 SIP Authentication
> already performed using current credentials, not trying again.
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 OpalCon SetPhase from
> SetUpPhase to ReleasingPhase for
> Call[d4a716ee69]-EP[5c51f0b4-9768-e211-98e4-005056b
> d002b]
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 OpalCon Releasing
> Call[d4a716ee69]-EP[5c51f0b4-9768-e211-98e4-005056bd002b]
> 2013/01/29 16:39:15.976 Pool:0xc1b0d700 OpalCon Call end reason
> for Call[d4a716ee69]-EP[5c51f0b4-9768-e211-98e4-005056bd002b] set
> to EndedByQ931Ca
> use
> 
> T38modem gets a 407, sends out the Authorization request, gets back a
> 407 and doesn't try again, because the same credentials were alread

Re: [SR-Users] REGISTER OK but on send "407 Proxy Authentication Required" with no ACK

2013-01-29 Thread Andrew Pogrebennyk
Hello,
I see no problem with an ACK in the trace. The t38modem ACK's the 407,
sends the new INVITE with authorization but it's not accepted by
kamailio. I'm not sure if t38modem can even perform the authorization.
Maybe you need to accept the calls from it without authorization. But if
it can and you have configured the password in there, you should check
that the subscriber 979 exist in kamailio domain 10.1.1.148 and the
passwords do match.

On 01/29/2013 06:41 AM, Carsten Maass wrote:
> Hi all,
> 
> I am trying to set up a fax gateway in the following way:
> 
> PSTN-GW (10.1.1.150) <--> Kamailio (10.1.1.148:5123) <--> t38modem
> (10.1.1.148:6050) <--> Hylafax
> 
> PSTN-GW is a standalone Berofix appliance and Kamailio 3.3.3, t38modem
> 1.2 and Hylafax 6.0.3 running on the same host under Redhat EL6.
> 
> I used the default kamailio.cfg and just adjusted the PSTN route pattern
> to "if(!($rU=~"^(\+|00|0)[1-9][0-9]{3,20}$"))", to route all calls
> starting with 0 to the PSTN-GW.
> 
> Both PSTN-GW and t38modem Successfully register to Kamailio but when I
> try to send out a fax from t38modem, Kamailio doesn't ACK the
> Proxy-Authorization request and t38modem terminates the call:
> ... 
> 
> 
> 
> What do I have to adjust to make this work?
> Any help and pointers highly appreciated.
> 
> Thanks in advance and greetings,
> Carsten.
> 
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] LCR

2013-01-11 Thread Andrew Pogrebennyk
Hello,
try printing the $ru with xlog statement when the request comes into the
server and in the beginning of route[LCR].

On 11/01/2013 01:50, Douglas Ugalde wrote:
> Hi,
> 
> Im trying to configure LCR in Kamailio 3.3.3 but I dont Know how can I
> do to fix this error:
> 
>  ERROR: lcr [lcr_mod.c:1840]: error while parsing R-URI
> 
> This is my LCR configuration block:
> 
> route[LCR] {
> 
> if(!load_gws(1)){
>  sl_send_reply("500", "Internal server error, unable to load gateways");
>  xlog("L_NOTICE","Internal server error, unable to load gateways");
>  break;
>  }
>  if(!next_gw()){
>  sl_send_reply("503", "Service not available, no gateways found");
>  break;
>  }
> }
> 
> 
> I not sure if this configuration thats ok, please somebody help me.
> 
> Note:
> 
> Params and modules are already loaded,  sorry for my english.
> 
> 
> Best regards.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] why use received as RURI for nathelper OPTIONS ping?

2013-01-07 Thread Andrew Pogrebennyk
On 01/07/2013 01:29 PM, Andrew Pogrebennyk wrote:
> What I don't understand is why kamailio sets RURI of the OPTIONS message
> to value of "received" instead of the contact. I suspect a bug in the
> parser somewhere along these lines:
> 
>> > rval = 
>> > ul.get_all_ucontacts(buf,cblen,(ping_nated_only?ul.nat_flag:0),

This needs some overhaul. The get_all_mem_ucontacts prefers received
over contact. So what nathelper does is set Path as $du and Received as
$ru, then send it. But in case home proxy which generated the NAT ping
is sitting behind the edge proxy and the user is behind NAT, we need to
pass both Contact and Received to the edge proxy.

It looks like we (Sipwise) need to introduce a few modparams so the user
choose what to put into $ru and $du (like 1 - Contact, 2 - Received, 3 -
Path). I'm just wondering if there is anything speaking against that or
missing in the light of SIP-Outbound implementation.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] why use received as RURI for nathelper OPTIONS ping?

2013-01-07 Thread Andrew Pogrebennyk
Some Fritzbox devices don't accept the OPTIONS ping generated by
kamailio with RURI: sip:11.22.3.4:5060. In the location table we have:
received: sip:11.22.3.4:5060
contact: sip:user@11.22.3.4:5060;uniq=6633BC1386F4D4CC4EBD64DC7E967
path: 

Kamailio version is 3.3.2 and the nathelper config is nothing fancy:
modparam("nathelper", "natping_interval", 15)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "sip:pinger@sipwise.local")
modparam("nathelper", "received_avp", "$avp(s:received)")

What I don't understand is why kamailio sets RURI of the OPTIONS message
to value of "received" instead of the contact. I suspect a bug in the
parser somewhere along these lines:

> rval = 
> ul.get_all_ucontacts(buf,cblen,(ping_nated_only?ul.nat_flag:0),
>((unsigned int)(unsigned 
> long)timer_idx)*natping_interval+iteration,
>natping_processes*natping_interval);
> if (rval != 0) {
> pkg_free(buf);
> goto done;
> }
> }
> 
> if (buf == NULL)
> goto done;
> 
> cp = buf;
> while (1) {
> memcpy(&(c.len), cp, sizeof(c.len));
> if (c.len == 0)
> break;
> c.s = (char*)cp + sizeof(c.len);
> cp =  (char*)cp + sizeof(c.len) + c.len;
> memcpy( &send_sock, cp, sizeof(send_sock));
> cp = (char*)cp + sizeof(send_sock);
> memcpy( &flags, cp, sizeof(flags));
> cp = (char*)cp + sizeof(flags);
> memcpy( &(path.len), cp, sizeof(path.len));
> path.s = path.len ? ((char*)cp + sizeof(path.len)) : NULL ;
> cp =  (char*)cp + sizeof(path.len) + path.len;
> 
> /* determin the destination */
> if ( path.len && (flags&sipping_flag)!=0 ) {
> /* send to first URI in path */
> if (get_path_dst_uri( &path, &opt) < 0) {
> LM_ERR("failed to get dst_uri for Path\n");
> continue;
> }
> /* send to the contact/received */
> if (parse_uri(opt.s, opt.len, &curi) < 0) {
> LM_ERR("can't parse contact dst_uri\n");
> continue;
> }
> } else {

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] "maximum number of branches exceeded" after kamalilio restart

2013-01-04 Thread Andrew Pogrebennyk
Hello,

I'm getting some errors - if I restart kamailio on a live system, the
first call after restart fails with "max nr of branches exceeded".
However, we are not doing append_branch() or anything fancy for that
call at all:

Jan  3 15:26:54 sp1 /usr/sbin/kamailio[8078]: ERROR: 
[dset.c:306]: max nr of branches exceeded
Jan  3 15:26:54 sp1 /usr/sbin/kamailio[8078]: ERROR: registrar
[lookup.c:298]: failed to append a branch

Also it appears on the other system with a different config:

Jan  3 17:06:59 sip /usr/sbin/kamailio[7022]: ERROR: tm [t_fwd.c:656]:
ERROR: add_uac: maximum number of branches exceeded
Jan  3 17:06:59 sip /usr/sbin/kamailio[7022]: ERROR: tm [t_fwd.c:1534]:
ERROR: t_forward_nonack: failure to add branches
Jan  3 17:06:59 sip /usr/sbin/kamailio[7022]: ERROR: tm [tm.c:1369]:
ERROR: w_t_relay_to: t_relay_to failed

The second call however goes through and this error does not appear
until the next kamailio restart. What could be the problem here?
P.S. The kamailio version is 3.3.2.

Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Difficulties with with loose_route() when trying to handle non-compliant ACK

2012-11-23 Thread Andrew Pogrebennyk
Richard,

well, the RURI of remote ACK has proxy IP address 10.200.70.100 so proxy
thinks that previous hop was a strict router. I can't think of any
workaround that would not be an ugly hack at the moment, though.

On 11/23/2012 03:24 AM, Richard Brady wrote:
> Hi guys
> 
> I have a multihomed Kamailio proxy sitting between two B2BUAs on
> separate networks and record-routing all dialogs.
> 
> The problem I have is that when one of these devices receives a 200
> OK, it does not populate the RURI of the ACK correctly. Instead of
> taking it from the Contact header on the 200 OK, it uses the user part
> from the Contact header and sets the domain to the proxy IP. It then
> also populates the Route headers.
> 
> The ACKs are below and the IPs are:
> 
> 10.152.1.92:5060: UAC on outside
> 10.200.70.100:5060: proxy outside interface
> 192.168.242.100: proxy inside interface
> 192.168.242.102: UAS on inside
> 
> This the ACK message going into and coming out of the proxy.
> 
> # U 10.152.1.92:5060 -> 10.200.70.100:5060
> ACK sip:natted_ua*9197**192.168.242.102*5080*udp@10.200.70.100 SIP/2.0.
> Via: SIP/2.0/UDP 127.0.1.1:5060;branch=z9hG4bK-2280-1-5.
> Route:  
> ,.
> From: sipp ;tag=2280SIPpTag001.
> To: sut ;tag=p0FaeQ1QUS9ae.
> Call-ID: 1-2280@127.0.1.1.
> CSeq: 1 ACK.
> Contact: sip:sipp@127.0.1.1:5060.
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Length: 0.
> .
> 
> # U 10.200.70.100:5060 -> 192.168.242.100:5060
> ACK sip:192.168.242.100;r2=on;lr=on;nat=yes SIP/2.0.
> Via: SIP/2.0/UDP 10.200.70.100;branch=z9hG4bKcydzigwkX.
> Via: SIP/2.0/UDP
> 127.0.1.1:5060;rport=5060;received=10.152.1.92;branch=z9hG4bK-2280-1-5.
> Route:  .
> From: sipp ;tag=2280SIPpTag001.
> To: sut ;tag=p0FaeQ1QUS9ae.
> Call-ID: 1-2280@127.0.1.1.
> CSeq: 1 ACK.
> Contact: .
> Max-Forwards: 69.
> Subject: Performance Test.
> Content-Length: 0.
> 
> So I am trying to understand why it is trying to relay to itself (I
> have mhomed=1) and why it is rewriting the RURI as if it is a strict
> router.
> 
> Currently decode_contact() is disabled but enabling doesn't seem to
> help. Unless there is a very specific place where it belongs.
> 
> Any advice would be hugely appreciated. I can always paste logs /
> configs / traces.
> 
> Richard
> 
> --
> Richard Brady
> M: +44 (0)7771 623 348
> T:  +44 (0)20 8144 8160
> E: rnbr...@gmail.com
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] presence module makes excessive cleanups when subs_db_mode=3

2012-11-09 Thread Andrew Pogrebennyk
OK. Thank you, Peter.

On 11/09/2012 12:05 PM, Peter Dunkley wrote:
> This is by design.  When you have many thousands of presence
> subscriptions you need to service them evenly across time instead of in
> big lumps.
> 
> If you don't want this behaviour then you can set the notifier_processes
> modparam to 0.  But, if you do this you should consider not using
> subs_db_mode 3 as there are many race-hazards in presence that are fixed
> by using the notifier_processes.
> 
> Regards,
> 
> Peter
> 
> On Fri, 2012-11-09 at 12:01 +0100, Andrew Pogrebennyk wrote:
>> Hi,
>> when presence module is running with subs_db_mode=3 it makes an
>> excessive number of SQL select queries, litelly dozens per second:
>> >25232 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=64 AND event<>'presence.winfo'
>> >25233 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=116 AND event<>'presence.winfo'
>> >25233 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=116 AND event='presence.winfo'
>> >25232 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=64 AND event='presence.winfo'
>> >25231 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=14 AND event<>'presence.winfo'
>> >25231 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=14 AND event='presence.winfo'
>> >25233 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=118 AND event<>'presence.winfo'
>> >25232 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=66 AND event<>'presence.winfo'
>> >25233 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=118 AND event='presence.winfo'
>> >25232 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=66 AND event='presence.winfo'
>> >25231 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=16 AND event<>'presence.winfo'
>> >25231 Query select 
>> > presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
>> > updated=16 AND event='presence.winfo'
>>
>> Steps to reproduce: registers two subscribers in jitsi and add them to
>> contact lists of each other.
>> The kamailio version is 3.3.2. I'm not doing anything special
>> configuration-wise:
>>
>> loadmodule "presence.so"
>> modparam("presence", "db_url", "mysql://kamailio:snbF93@localhost/kamailio")
>> # in 3.3 the fallback2db change to subs_db_mode
>> modparam("presence", "subs_db_mode", 3)
>> modparam("presence", "notifier_processes", 3)
>>
>>
>> loadmodule "presence_xml.so"
>> modparam("presence_xml", "db_url",
>> "mysql://kamailio:snbF93@localhost/kamailio")
>> modparam("presence_xml", "force_active", 0)
>> modparam("presence_xml", "integrated_xcap_server", 1)
>> # retry-after 5 minutes
>> modparam("presence_xml", "xcapauth_userdel_reason",
>> "probation;retry-after=300")
>>
>> Q: it is a bug of a feature? :)
>> Thanks.
>> Andrew
>>
>> ___
>> sr-dev mailing list
>> sr-...@lists.sip-router.org <mailto:sr-...@lists.sip-router.org>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 
> -- 
> Peter Dunkley
> Technical Director
> Crocodile RCS Ltd
> 
> 
> 
> ___
> sr-dev mailing list
> sr-...@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] presence module makes excessive cleanups when subs_db_mode=3

2012-11-09 Thread Andrew Pogrebennyk
Hi,
when presence module is running with subs_db_mode=3 it makes an
excessive number of SQL select queries, litelly dozens per second:
>   25232 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=64 AND event<>'presence.winfo'
>   25233 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=116 AND event<>'presence.winfo'
>   25233 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=116 AND event='presence.winfo'
>   25232 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=64 AND event='presence.winfo'
>   25231 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=14 AND event<>'presence.winfo'
>   25231 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=14 AND event='presence.winfo'
>   25233 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=118 AND event<>'presence.winfo'
>   25232 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=66 AND event<>'presence.winfo'
>   25233 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=118 AND event='presence.winfo'
>   25232 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=66 AND event='presence.winfo'
>   25231 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=16 AND event<>'presence.winfo'
>   25231 Query select 
> presentity_uri,callid,to_tag,from_tag,event from active_watchers where 
> updated=16 AND event='presence.winfo'

Steps to reproduce: registers two subscribers in jitsi and add them to
contact lists of each other.
The kamailio version is 3.3.2. I'm not doing anything special
configuration-wise:

loadmodule "presence.so"
modparam("presence", "db_url", "mysql://kamailio:snbF93@localhost/kamailio")
# in 3.3 the fallback2db change to subs_db_mode
modparam("presence", "subs_db_mode", 3)
modparam("presence", "notifier_processes", 3)


loadmodule "presence_xml.so"
modparam("presence_xml", "db_url",
"mysql://kamailio:snbF93@localhost/kamailio")
modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "integrated_xcap_server", 1)
# retry-after 5 minutes
modparam("presence_xml", "xcapauth_userdel_reason",
"probation;retry-after=300")

Q: it is a bug of a feature? :)
Thanks.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Supporting TLS and DTLS in RTP Proxy

2012-10-16 Thread Andrew Pogrebennyk
Kamal,
perhaps RFC 5763 provides you some of the answers?

On 10/16/2012 11:06 AM, Kamal Palei wrote:
> Hi Johansson, All
> Sincier regards and thanks for input.
>  
> As I understand,  all media packets pass through RTP Proxy.  The RTP
> Proxy will receive simple UDP media packets from endpoints. Next RTP
> proxy today pass those RTP packets to destination party.
>  
> My job is precisely to support TLS and DTLS path between RTP Proxy and
> destination party. In my setup the destination party is a media server.
>  
> Do you really see a risk to have this setup. If so, please elaborate.
>  
> I underdstand here the challenge setup TLS/DTLS connection with media
> server and send/recv media packets with server usuing either TLS or DTLS.
>  
> Also you mentioned "There's also solutions for RTP over DTLS" , can you
> please share from where I can get the reference solution, it help me to
> great extent.
>  
> Best Regards
> Kamal
> 
> On Tue, Oct 16, 2012 at 12:08 AM, Olle E. Johansson  > wrote:
> 
> 
> 15 okt 2012 kl. 13:24 skrev Peter Lemenkov  >:
> 
> > Hello.
> >
> > 2012/10/15 Kamal Palei  >:
> >> Hi All
> >> I am planning to enhance RTP proxy to support TLS and DTLS.
> >> We have some requirements where we need to send RTP packets
> either over TLS
> >> or over DTLS.
> >
> > Shouldn't it be better to rely on SRTP/ZRTP instead rather than making
> > your own incompatible realisation?
> 
> SRTP use DTLS for key exchange. There's also solutions for RTP over
> DTLS,
> but the recommended way is DTLS+SRTP. This is what's standardized
> for WebRTC,
> and the way forward for SIP media as well.
> 
> However, I don't see how RTPproxy can be the endpoint for DTLS key
> exchange, since
> it breaks the end2end path. Clients should use TURN relays...
> 
> Curious on how you see this working!
> /O
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DB accounting missing if t_newtran() is called explicitly

2012-09-28 Thread Andrew Pogrebennyk
Hi Daniel,

Thank you for this advice.. I'm still struggling to get it work, still
no luck even with t_flush_flags() immediately after setflag(). Maybe I
will try to reproduce it during the weekend with kamailio default
config. FTR the version used is kamailio 3.3.1.

On 09/27/2012 05:17 PM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> you can try after you set the flag you wanted to be in transaction, to
> be sure it gets there.
> 
> Cheers,
> Daniel
> 
> On 9/26/12 7:43 PM, Andrew Pogrebennyk wrote:
>> Hi Daniel,
>>
>> No, I don't. Thanks for the tip. Could you advice where t_flush_flags()
>> should be placed? I tried in branch_route and immediately before
>> t_relay(), it didn't help..
>>
>> On 09/26/2012 05:53 PM, Daniel-Constantin Mierla wrote:
>>> Hello,
>>>
>>> do you use t_flush_flags()?
>>>
>>> http://kamailio.org/docs/modules/3.3.x/modules_k/tmx.html#id2543767
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 9/26/12 3:30 PM, Andrew Pogrebennyk wrote:
>>>> Hi,
>>>>
>>>> I have found recently that in order to detect retransmits I have to
>>>> create a transaction explicitly when the request comes in:
>>>>   force_rport();
>>>>   if(!t_check_trans())
>>>>   t_newtran();
>>>>   sl_send_reply("100", "Trying");
>>>>   xlog("L_INFO", "New request - $ci\n");
>>>>
>>>> it appears like there are carriers or UAs that do not honor the T1
>>>> retransmission interval retransmit the INVITE sooner than proxy creates
>>>> a transaction in t_relay(). And since we are counting concurrent calls,
>>>> we count the same call multiple times, which is not good.
>>>>
>>>> But with this patch we've faced another sporadic problem - if the
>>>> transaction is created beforehand the accounting record is lost.. we
>>>> use
>>>> acc_db mode and set flag to account the transaction. And there are no
>>>> errors in kamailio log but no insert into acc in mysql binlog either. I
>>>> wasn't successful reproducing it in the lab systems with identical
>>>> setup.
>>>>
>>>> Is anybody here perhaps aware of some limitation in acc module or
>>>> callbacks which makes a transaction created beforehand not accountable?
>>>>
>>>> On a related note, it could make sense to create a transaction
>>>> implicitly if dlg_manage() is called to avoid counting same call many
>>>> times, I just don't know yet how common this issue is in real life.
>>>>
>>>> ___
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>> sr-users@lists.sip-router.org
>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DB accounting missing if t_newtran() is called explicitly

2012-09-26 Thread Andrew Pogrebennyk
Hi Daniel,

No, I don't. Thanks for the tip. Could you advice where t_flush_flags()
should be placed? I tried in branch_route and immediately before
t_relay(), it didn't help..

On 09/26/2012 05:53 PM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> do you use t_flush_flags()?
> 
> http://kamailio.org/docs/modules/3.3.x/modules_k/tmx.html#id2543767
> 
> Cheers,
> Daniel
> 
> On 9/26/12 3:30 PM, Andrew Pogrebennyk wrote:
>> Hi,
>>
>> I have found recently that in order to detect retransmits I have to
>> create a transaction explicitly when the request comes in:
>>  force_rport();
>>  if(!t_check_trans())
>>  t_newtran();
>>  sl_send_reply("100", "Trying");
>>  xlog("L_INFO", "New request - $ci\n");
>>
>> it appears like there are carriers or UAs that do not honor the T1
>> retransmission interval retransmit the INVITE sooner than proxy creates
>> a transaction in t_relay(). And since we are counting concurrent calls,
>> we count the same call multiple times, which is not good.
>>
>> But with this patch we've faced another sporadic problem - if the
>> transaction is created beforehand the accounting record is lost.. we use
>> acc_db mode and set flag to account the transaction. And there are no
>> errors in kamailio log but no insert into acc in mysql binlog either. I
>> wasn't successful reproducing it in the lab systems with identical setup.
>>
>> Is anybody here perhaps aware of some limitation in acc module or
>> callbacks which makes a transaction created beforehand not accountable?
>>
>> On a related note, it could make sense to create a transaction
>> implicitly if dlg_manage() is called to avoid counting same call many
>> times, I just don't know yet how common this issue is in real life.
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] DB accounting missing if t_newtran() is called explicitly

2012-09-26 Thread Andrew Pogrebennyk
Hi,

I have found recently that in order to detect retransmits I have to
create a transaction explicitly when the request comes in:
force_rport();
if(!t_check_trans())
t_newtran();
sl_send_reply("100", "Trying");
xlog("L_INFO", "New request - $ci\n");

it appears like there are carriers or UAs that do not honor the T1
retransmission interval retransmit the INVITE sooner than proxy creates
a transaction in t_relay(). And since we are counting concurrent calls,
we count the same call multiple times, which is not good.

But with this patch we've faced another sporadic problem - if the
transaction is created beforehand the accounting record is lost.. we use
acc_db mode and set flag to account the transaction. And there are no
errors in kamailio log but no insert into acc in mysql binlog either. I
wasn't successful reproducing it in the lab systems with identical setup.

Is anybody here perhaps aware of some limitation in acc module or
callbacks which makes a transaction created beforehand not accountable?

On a related note, it could make sense to create a transaction
implicitly if dlg_manage() is called to avoid counting same call many
times, I just don't know yet how common this issue is in real life.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Registration Authentication Error

2012-09-19 Thread Andrew Pogrebennyk
On 09/18/2012 04:58 PM, Nathaniel L Keeling III wrote:
> 11(28548) DEBUG: db_postgres [km_dbase.c:393]: PQclear(1008b8560) result
> set
> 11(28548) DEBUG: auth_db [authorize.c:124]: HA1 string calculated:
> e13d569284e76a33ca63e4d6203f844a
> 11(28548) DEBUG: auth [api.c:211]: check_response: Our result =
> '18210b5da2b3d27e6ba50977072599ea'
> 11(28548) DEBUG: auth [api.c:221]: check_response: Authorization failed

What realm do you use for proxy_challenge? Does it match the realm
configured in the client?

You can calculate and check the digest response yourself by using a
simple script like
http://code.google.com/p/variman/source/browse/website/trunk/docroot/support/digest.php

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] IM on Kamailio

2012-09-19 Thread Andrew Pogrebennyk
On 09/18/2012 12:15 PM, Gary Shergill wrote:
> Note that I am testing this with one computer connected by Bria and
> another computer connected via Blink. I am able to log on to a user on
> each (test1 and test2) and they are able to call each other. The issue
> is, with presence enabled, they are unable to IM each other (or add
> each other as contacts and see online status).

Gary,
I thought Bria uses RPID data format for presence (RFC 4480) while Blink
uses PIDF so they won't be able to see presence status of each other. I
see though that blink website mentions RPID as well, maybe somebody more
knowledgeable about blink can correct me.

For IM, add MESSAGE method to supported methods and send it after lookup
like INVITE. For offline message delivery, checkout the msilo module readme.

HTH,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] TCP Path received quotes

2012-09-15 Thread Andrew Pogrebennyk
Hello Spencer,

actually double quotes are not allowed in URI parameter. In the BNF
grammar the allowed chars in the "unreserved" definition are "alphanum"
and "mark", where "mark" is only "-" / "_" / "." / "!" / "~"
/ "*" / "'" / "(" / ")" ).

This is already fixed in 3.3.0 if I am not mistaken, please check
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a5b181bca6bf37b4a18ef502717b50d06e53d5e4
- maybe that helps you with your FreeSwitch.

On 09/15/2012 10:51 AM, Spencer Thomason wrote:
> I see.  FS complains about no transport protocol and gives a 503 with a 
> header like that.  Shouldn't they default to UDP in the absence of a 
> transport parameter?  It seems they are not honoring the quotes.
> 
> In this setup Kamailio handles NAT traversal and forwards the registers to 
> Freeswitch.  This works:
> Path: 
> 
> 
> This does not:
> Path: 
> 
> Spencer

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Remove m=video from SDP header

2012-08-13 Thread Andrew Pogrebennyk
You might need to upgrade to 3.3.1 to use sdpops module:
http://kamailio.org/docs/modules/stable/modules/sdpops.html

On 08/13/2012 09:52 AM, phillman25 wrote:
> Dear List
> 
> I am trying to remove specific lines from the following original SDP body:
> 
> 
> Content-Type: application/sdp
> Content-Length: 406
> 
> v=0
> o=root 3048 3048 IN IP4 xxx.xxx.xxx.xxx
> s=session
> c=IN IP4 xxx.xxx.xxx.xxx
> b=CT:384
> t=0 0
> m=audio 11904 RTP/AVP 0 8 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
> m=video 11602 RTP/AVP 34 99
> a=rtpmap:34 H263/9
> a=rtpmap:99 H264/9
> a=sendrecv
> 
> 
> 
> 
> I need to remove the following lines from the above SDP body as my
> International carrier does not support Video capabilities:
> 
> m=video 15042 RTP/AVP 34 99
> a=rtpmap:34 H263/9
> a=rtpmap:99 H264/9
> 
> 
> 
> 
> I used the following code in Kamailio config:
> 
> if(has_body("application/sdp") && search_body("m=video")){
> 
>subst_body('#m=video ([0-9]+) RTP/AVP (.*)$# #');
> 
>subst_body('#a=rtpmap:34 (.*)$# #');
> 
>subst_body('#a=rtpmap:99 (.*)$# #');
> 
>subst_body('#a=sendrecv(.*)$# #');
> 
> }   
> 
> 
> 
> 
> Content-Type: application/sdp
> Content-Length: 325
> P-hint: outbound
> v=0
> o=root 3048 3048 IN IP4 xxx.xxx.xxx.xxx
> s=session
> c=IN IP4 xxx.xxx.xxx.xxx
> b=CT:384
> t=0 0
> m=audio 11904 RTP/AVP 0 8 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
> 
> 
> As you can see the m=video body has been removed, however, calls are
> still failing. Is there something i have missed?
> 
> I am using Kamailio v3.2.2
> 
> 
> Thanking you in advance!
> 
> Phillip
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Best tool for crafting sip messages

2012-08-13 Thread Andrew Pogrebennyk
Same here, also you can use protoshoot provided by kamailio, see
utils/protoshoot.

On 08/13/2012 07:45 AM, Mark Anthony Delfin wrote:
> Hi Anton,
> 
> Previously I used the following.
> 
> sipsak
> http://sipsak.org/
> 
> or
> 
> sipp
> http://sipp.sourceforge.net/
> 
> Regards,
> 
> Mark


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] 302 redirect with 2 numbers registered

2012-08-03 Thread Andrew Pogrebennyk
Mino, I am not sure, but you could try the following:
set failure_reply_mode 3
(http://kamailio.org/docs/modules/stable/modules/tm.html#failure_reply_mode),
then handle 302 redirect in the proxy and use the contact as a new
branch like this:

if(status == "302")
{
$var(contact) = $ct;
$var(contact) = $(var(contact){nameaddr.uri});
$du = $var(contact);
append_branch();
t_relay();
}
Would it ring it while branch to Phone1 is still active? Maybe not, but
you will need to try..

On 08/03/2012 03:53 PM, Mino Haluz wrote:
> Hi,
> 
> one number is registered on 2 phones. Phone1 has Always redirect set
> to another number. When incoming call is initiated, Phone2 is ringing
> and Phone1 sends 302 to the proxy. However the proxy does not send 302
> to the caller (for ex. GW), but it waits for timeout of the Phone2.
> Then the proxy sends 302 to the caller.
> 
> Can I do in kamailio, that it will ring on the Phone1 and also on the
> number where it is redirected? I know kamailio is a proxy and cannot
> initiate a call, but is there any solution? Thanks.
> 
> Mino
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] New Wiki Site has problems?

2012-07-31 Thread Andrew Pogrebennyk
At least some links at http://www.kamailio.org/wiki/ don't work at the
moment:

Install Kamailio v3.3.x From GIT
Upgrade Kamailio v3.1.x to v3.2.0
Upgrade Kamailio v3.2.x to v3.3.0

you are redirected to some instruction from DokuWiki Installer when
trying to visit them. Could somebody please check it?

Thanks.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] lcr.dump_gws problem

2012-07-27 Thread Andrew Pogrebennyk
Hi Gary,

It was fixed already by Richard in 3.3 branch:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=28be16549831df46dd1b8312da223b02359d8a9c
(and master)

Thank you for the report.

On 07/24/2012 09:44 PM, Gary Chen wrote:
> Sorry, it should be Kamailio 3.3.0 not 3.2.0.
> 
>  
> 
> *From:*sr-users-boun...@lists.sip-router.org
> [mailto:sr-users-boun...@lists.sip-router.org] *On Behalf Of *Gary Chen
> *Sent:* Tuesday, July 24, 2012 3:39 PM
> *To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List
> *Subject:* [SR-Users] lcr.dump_gws problem
> 
>  
> 
> Kamailio 3.2.0
> 
>  
> 
> When testing Kamailio 3.2.0, I notice that lcr.dump_gws command does not
> display ip_addr correctly. Here is my output:
> 
> lcr_id: 3
> 
> gw_id: 15
> 
> gw_index: 2
> 
> gw_name: gateway_1
> 
> scheme: sip
> 
> ip_addr: 1273060816.0.0.0
> 
> hostname:
> 
> port: 5060
> 
> params:
> 
> strip: 0
> 
> prefix:
> 
> tag:
> 
> flags: 0
> 
> defunct_until: 0
> 
>  
> 
> LCR is still working correctly. It just does not display IP in the right
> form. Does any body also has the same problem?
> 
>  
> 
> Gary
> 
>  
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] lcr.dump_gws problem

2012-07-24 Thread Andrew Pogrebennyk
Hi Gary,
Yes, that's an old/known issue. You can convert the IP to common format
with a simple command:
perl -MSocket -le 'print inet_ntoa(pack("N", 1273060816))'
Maybe somebody from the kamailio team will take time to fix this.

On 07/24/2012 09:39 PM, Gary Chen wrote:
> Kamailio 3.2.0
> 
>  
> 
> When testing Kamailio 3.2.0, I notice that lcr.dump_gws command does not
> display ip_addr correctly. Here is my output:
> 
> lcr_id: 3
> 
> gw_id: 15
> 
> gw_index: 2
> 
> gw_name: gateway_1
> 
> scheme: sip
> 
> ip_addr: 1273060816.0.0.0
> 
> hostname:
> 
> port: 5060
> 
> params:
> 
> strip: 0
> 
> prefix:
> 
> tag:
> 
> flags: 0
> 
> defunct_until: 0
> 
>  
> 
> LCR is still working correctly. It just does not display IP in the right
> form. Does any body also has the same problem?
> 
>  
> 
> Gary
> 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio core request dropping - no reply

2012-06-19 Thread Andrew Pogrebennyk
On 06/19/2012 02:06 PM, Uri Shacked wrote:
> I am testing kamailio replies when an INVITE or another request arrives
> with lets say, "VIA" header missing
> The core drops the request. But, there is no reply for the originator
> (so it keep on resending the request...)
> Why?

If there was no Via header, the recipient would have no way to know
where to send the response.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Looking for RTP Proxy in TCP

2012-06-08 Thread Andrew Pogrebennyk
The papers talk about transport protocol for signaling, not media/RTP.
I didn't hear of anyone who does RTP over TCP neither. I doubt even that
the performance is a primary reason behind that, for media over TCP the
client link must be virtually packet-loss free (due to TCP
retransmissions), while over UDP sometimes up to 5% packet loss can be
tolerated. TCP was not designed as transport for real-time media :-)

On 06/08/2012 12:35 AM, Yang Hong wrote:
> Hello.
>  
> SIP over TCP would reduce server performance significantly when compared
> with SIP Over UDP.
>  
> Please read the following two papers. Combining RTP proxy with SIP over
> TCP would degrade SIP server performance even worse.
> ---
> http://www.cs.columbia.edu/~hgs/papers/Shen1008_TLS.pdf
>  
> The Impact of TLS on SIP Server Performance
>  
> "Securing SIP is accomplished by using TLS instead of UDP as the
> transport protocol. We show that using TLS can reduce performance by up
> to a factor of 17 compared to the typical case of SIP-over-UDP."
> 
> "Network operators considering deploying SIP over TLS will need to
> consider the extra resources required to provide the same service
> quality as would be the case with UDP."
> ---
> http://www.cs.columbia.edu/~hgs/nossdav/2007/files/file-27-session5-paper1-nahum.pdf
>  
> Evaluating SIP Proxy Server Performance
>  
> "The next most signicant performance feature is which transport
> protocol is used, TCP or UDP. Using TCP can reduce performance anywhere
> from 43 percent (the stateful proxying scenario with authentication) to
> 65 percent (state-less proxying without authentication).
> ---
> 
> Best regards,
>  
> Yang
>> Date: Thu, 7 Jun 2012 13:36:39 +0200
>> From: mico...@gmail.com
>> To: sr-users@lists.sip-router.org
>> Subject: Re: [SR-Users] Looking for RTP Proxy in TCP
>>
>> Hello,
>>
>> On 6/4/12 7:14 PM, Austin Einter wrote:
>> > Hi All
>> > Now I am using Kamailio 3.1.5 and RTP proxy 1.1.
>> > Looks both are compatible and working fine.
>> >
>> > The RTP Proxy basically sends/receives RTP packets over UDP.
>> > Is there any RTP Proxy available that does send/receive of RTP packets
>> > over TCP and also should be compatible with Kamailio 3.1.5.
>> >
>> > If you have any information in this regard, kindly share.
>> RTP itself is specified over UDP, also I am not aware of any SIP phone
>> doing RTP over TCP.
>>
>> MSRP is a mechanism specified for sending message streams over TCP, we
>> have a module for that, but I guess is not exactly what you are
> looking for:
>>
>> http://kamailio.org/docs/modules/devel/modules/msrp.html
>>
>> Maybe based on it you can implement one that fits your needs.
>>
>> Cheers,
>> Daniel
>>

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [NOT Solved]Creating RURI ($ru) from Contact ($ct)

2012-05-30 Thread Andrew Pogrebennyk
Hi,

On 05/30/2012 12:22 PM, Aft nix wrote:
> So i'm interested if RFC 3261 provides any mechanism by which we can
> differentiate a BYE whether its from "caller" or "callee".

Check out is_direction() function:
http://www.kamailio.org/docs/modules/3.2.x/modules_k/rr.html#id2527009

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Config include

2012-05-09 Thread Andrew Pogrebennyk
Konstantin,

You should put the include_file directive after loadmodule and modparam
directives. So it can be either before main route block or at the bottom
of your main kamailio.cfg.

On 05/09/2012 06:48 PM, Konstantin M. wrote:
> After including a part of main config to included file -- I got a
> several errors like:
> 
> 
>  0(1582) ERROR:  [cfg.y:3393]: cfg. parser: failed to find command
> is_method
>  0(1582) :  [cfg.y:3532]: parse error in config file
> /opt/kamailio/etc/kamailio/debug.cfg, line 4, column 55: unknown
> command, missing loadmodule?
> 
>  0(1582) ERROR:  [cfg.y:3393]: cfg. parser: failed to find command
> xlog
>  0(1582) :  [cfg.y:3532]: parse error in config file
> /opt/kamailio/etc/kamailio/debug.cfg, line 9, column 101: unknown
> command, missing loadmodule?


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Config include

2012-05-09 Thread Andrew Pogrebennyk
Hello,
It is already there, see
http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x

On 05/09/2012 06:04 PM, Konstantin M. wrote:
> Hi,
> 
> I would like (and a many people here I believe) to have a functional of
> including a multiple config files like (foe example asterisk's
> #include "path/to/some/config.conf").
> Is it possible to implement a such feature ?
> 
> Thanks!


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] reply code for lower cseq

2012-04-24 Thread Andrew Pogrebennyk
Hi Daniel,
See RFC 3261 section 12.2.2:

   If the remote sequence number was not empty, but the sequence number
   of the request is lower than the remote sequence number, the request
   is out of order and MUST be rejected with a 500 (Server Internal
   Error) response.

However, 400 or some 4xx response would seem more reasonable to me, to
let the UAC know it just did something wrong.
And I'm not the only one:
http://comments.gmane.org/gmane.ietf.sip-implementors/8970

On 04/24/2012 02:10 PM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> I was wondering if someone here can point quickly where specs mention
> what is the right reply code to send when a request within dialog is
> received with lower cseq value than the previous request. I couldn't
> spot the part in the RFC yet, if any related exists.
> 
> Cheers,
> Daniel
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] in doubt about in-dialog INVITE Route params processing

2012-04-05 Thread Andrew Pogrebennyk
Hi,
despite my initial doubt it works well :-) Thank you Daniel.

On 04/04/2012 05:51 PM, Daniel-Constantin Mierla wrote:
> Hello,
> 
> is record_route() executed as well as add_rr_param() for reinvites?
> Cannot spot in the logs. You can load debugger module and enable
> cfgtrace to see what actions are executed from the config file.
> 
> Cheers,
> Daniel
> 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] in doubt about in-dialog INVITE Route params processing

2012-04-04 Thread Andrew Pogrebennyk
I've been pondering an issue with Route header parameters being not
mirrored by kamailio proxy into Record-Route field on in-dialog requests
over the last few hours so I thought I'd just whether I'm missing
something obvious.

The call scenario in UA -> lb -> proxy -> sems. Everything is fine with
initial INVITE transaction where we add rr param ;rtpprx=yes. (We also
use dialog module.) The UA does re-INVITE where it mirrors RR headers to
Route set just fine. However, when forwarding re-INVITE kamailio proxy
removes own Route header and inserts RR header without rtpproxy, did etc
params.

The kamailio default config from branch 3.1 routes in-dialog requests in
the same fashion and I can't tell really if this is how it is supposed
to work? I can workaround this by add_rr_param() but shouldn't missing
did param cause a problem with dialog matching? Here is the debug with
log level 3:

> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [loose.c:792]: 
> Topmost route URI: 
> 'sip:127.0.0.1:5062;lr;ftag=8pTM6oKWVtC4H03478xjIR34SSsYuTU5;did=8a3.aab32831;mpd=ii;rtpprx=yes;vsf=aDNlNDEjPSkBJB9/YykkNnYYdTZ0KGUsfGZxVndVe1M-'
>  is me
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG:  
> [parser/msg_parser.c:103]: found end of header
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [loose.c:257]: No 
> next Route HF found
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [loose.c:811]: No 
> next URI found
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [rr_cb.c:97]: 
> callback id 1 entered with 
> 
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog 
> [dlg_handlers.c:910]: route param is '8a3.aab32831' (len=12)
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog [dlg_hash.c:442]: 
> ref dlg 0x7f0a0be918b0 with 1 -> 3
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog [dlg_hash.c:444]: 
> dialog id=327302058 found on entry 936
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog [dlg_hash.c:757]: 
> dialog 0x7f0a0be918b0 changed from state 4 to state 4, due event 8
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog 
> [dlg_handlers.c:1042]: sequential request successfully processed
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog 
> [dlg_timer.c:117]: inserting 0x7f0a0be91900 for 127601858
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: dialog [dlg_hash.c:411]: 
> cseq is 10760
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [rr_cb.c:97]: 
> callback id 0 entered with 
> 
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: uac [from.c:421]: 
> getting 'vsf' Route param
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: uac [from.c:429]: route 
> param is 'aDNlNDEjPSkBJB9/YykkNnYYdTZ0KGUsfGZxVndVe1M-' (len=44)
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: uac [from.c:479]: 
> decoded uris are: new=[sip:43991001@192.168.51.210] 
> old=[sip:sipwise-user1@192.168.51.210]
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [loose.c:983]: params 
> are 
> <;lr;ftag=8pTM6oKWVtC4H03478xjIR34SSsYuTU5;did=8a3.aab32831;mpd=ii;rtpprx=yes;vsf=aDNlNDEjPSkBJB9/YykkNnYYdTZ0KGUsfGZxVndVe1M->
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: siputils [checks.c:76]: 
> totag found
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: textops 
> [textops.c:1789]: content type is 196611
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [loose.c:983]: params 
> are 
> <;lr;ftag=8pTM6oKWVtC4H03478xjIR34SSsYuTU5;did=8a3.aab32831;mpd=ii;rtpprx=yes;vsf=aDNlNDEjPSkBJB9/YykkNnYYdTZ0KGUsfGZxVndVe1M->
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: DEBUG: rr [loose.c:983]: params 
> are 
> <;lr;ftag=8pTM6oKWVtC4H03478xjIR34SSsYuTU5;did=8a3.aab32831;mpd=ii;rtpprx=yes;vsf=aDNlNDEjPSkBJB9/YykkNnYYdTZ0KGUsfGZxVndVe1M->
> Apr  4 13:23:21 sp1 /usr/sbin/kamailio[7520]: INFO: 

Re: [SR-Users] Kamailio modifying ruri during loose-route

2012-03-26 Thread Andrew Pogrebennyk
Dan,
Well, it looks like kamailio recognizes 127.0.0.1 as its own URI that's
why it does rewrite. Do you have by chance such alias in your config (or
auto_aliases=yes)?

On 03/26/2012 03:47 PM, Dan-Cristian Bogos wrote:
> Hey Guys,
> 
> I have noticed some unexpected behavior (at least by me) during my tests.
> 
> When routing specific ACK message back to 200 OK originator, Kamailio
> will rewrite the ruri with the value of route header. Is that known or
> some memory access problem?
> 
> Call setup: B2BUA(127.0.0.1) -> Kamailio (1.2.3.4) -> End device (2.3.4.5).
> 
> Bellow is a trace of 200 OK -ACK flow before and after kamailio,
> together with the xlog capture of ruri before and after calling
> loose_route on ACK.
> 
> Thanks in advance for any kind of tip.
> 
> DanB
> 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] OT: is it allowed to send requests without waiting for the response of the previous request?

2012-03-14 Thread Andrew Pogrebennyk
Hello Klaus,
please check this thread:
http://www.mail-archive.com/sip-implementors@lists.cs.columbia.edu/msg10537.html

On 03/14/2012 05:11 PM, Klaus Darilion wrote:
> I wonder if a presence server may send a NOTIFY if the previous NOTIFY
> in the dialog did not received an answer yet. I "grep"ed the relevant
> RFCs but couldn't find a definition. Thus, pointers are appreciated.

HTH.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Rewrite $tU

2012-03-08 Thread Andrew Pogrebennyk
On 03/07/2012 08:46 PM, Lucas Alvarez wrote:.
> Something like this:
> 
>  if(($rU=~"^(box02)[0-9]{2,15}$")) {
>  $rU = $(rU{s.substr,5,0});
>  $ru = "sip:" + $rU + "@" + $sel(cfg_get.box02.gw_ip)  + ":"
> + $sel(cfg_get.box02.gw_port);
> }

BTW alternatively you can use dialplan the module to hold both regexp to
match and target IP with added benefit of in-database provisioning.

> The problem I'm having is I'm not being able to do blind tranfers. I
> think the cause is the prefix that remains in the TO field. After
> rewriting the TO field nothing change. I would appreciate if someone
> could point me to the right path.

Hmm, the blind transfers should be transparent to the proxy. So the
REFER request should go all the way through box02 to box01 and to the
caller, which should send a new INVITE so the box01 can apply the same
logic of finding out where the subscriber is registered to RURI.

What is the actual call flow that you see after REFER?

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Rewrite $tU

2012-03-07 Thread Andrew Pogrebennyk
On 03/07/2012 07:37 PM, Lucas Alvarez wrote:
> I want rewrite $tU but I'm not being able, I'm doing the following:
> 
>   remove_hf("To");
>   insert_hf("To: sip:$rU@$rd\r\n", "From");
> 
> Then I'm printing $tU and it is still having the previous value, any
> help will be appreciated.
> Thanks in advance.

Did you verify what is actually sent on the wire?
If it's just a logging issue you need to do msg_apply_changes().

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dialog doesn't clear calls that were re-INVITEd shortly after ACK

2012-02-29 Thread Andrew Pogrebennyk
Since Timo is most likely busy these days I will create an issue in the
tracker for that.

On 02/22/2012 08:48 PM, Andrew Pogrebennyk wrote:
> Hi,
> I noticed dialog module showing calls that have already been terminated
> with state=4.
> The kamailio version is 3.1.5, I'm aware of certain limitations of
> dialog module in this version (must use stateless replies, create dialog
> after 407), but this is something rather new.
> In kamailio config I'm using dlg_manage() for initial INVITEs and
> BYE/CANCEL and in-dialog requests are loose-routed, so nothing finicky.
> 
> The call scenario is: A calls B, B answers the call, A immediately after
> sending ACK for the 200 OK issues re-INVITE. After some seconds A hangs
> up, and the dialog stays in memory in state=4, e.g.:
> 
> dialog::  hash=3304:623200556
>   state:: 4
>   ref_count:: 2
>   timestart:: 1329938667
>   timeout:: 78590167
>   callid:: MGExMjRiYzMzN2Q5YWU4YjRiMjFjYTYwYWZlMGFlMzY.
>   from_uri:: sip:sipwise-user1@67.202.62.202
>   from_tag:: 4207e429
>   caller_contact:: sip:sipwise-user1@80.108.64.151:46420
>   caller_cseq:: 3
>   caller_route_set::
> ,
>   caller_bind_addr:: udp:127.0.0.1:5062
>   callee_bind_addr:: udp:127.0.0.1:5062
>   to_uri:: sip:43991002@67.202.62.202
>   to_tag:: 6C8F89E9-4F4540EA0001F575-AC557700
>   callee_contact:: sip:sipwise-user2@127.0.0.1:5080
>   callee_cseq:: 11
>   callee_route_set::
> 
> When I set dlg_match_mode=1 the problem goes away. I would like however
> to understand why the dialog fails to clear in default mode (DID_ONLY),
> because the dialog cookie seems to be preserved by caller in all
> in-dialog requests properly. There is nothing in the debug log and trace
> attached that catches my eye. Do you see anything wrong there?
> 
> In trace file the proxy address is 127.0.0.1:5062. You may notice that
> the actual signaling flow is a little bit more complicated, I will
> gladly answer any questions about it. For this test I've used two lines
> in the eyeBeam softphone, when one line answers the other is
> automatically put on hold which is what I want. Then I un-hold the
> callee and clear the call.
> 
> The customer is reporting multiple stale calls when re-INVITE is sent by
> Cirpack PSTN gw immediately after call connect, which is basically the
> same call flow I am talking about, it is just not practical for me to
> run kamailio with debug=3 there all the time. I am going to try
> theredlg_match_mode=1 though and see if the problem goes away.
> 
> Any ideas?
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dialog doesn't clear calls that were re-INVITEd shortly after ACK

2012-02-22 Thread Andrew Pogrebennyk
Hi,
I noticed dialog module showing calls that have already been terminated
with state=4.
The kamailio version is 3.1.5, I'm aware of certain limitations of
dialog module in this version (must use stateless replies, create dialog
after 407), but this is something rather new.
In kamailio config I'm using dlg_manage() for initial INVITEs and
BYE/CANCEL and in-dialog requests are loose-routed, so nothing finicky.

The call scenario is: A calls B, B answers the call, A immediately after
sending ACK for the 200 OK issues re-INVITE. After some seconds A hangs
up, and the dialog stays in memory in state=4, e.g.:

dialog::  hash=3304:623200556
state:: 4
ref_count:: 2
timestart:: 1329938667
timeout:: 78590167
callid:: MGExMjRiYzMzN2Q5YWU4YjRiMjFjYTYwYWZlMGFlMzY.
from_uri:: sip:sipwise-user1@67.202.62.202
from_tag:: 4207e429
caller_contact:: sip:sipwise-user1@80.108.64.151:46420
caller_cseq:: 3
caller_route_set::
,
caller_bind_addr:: udp:127.0.0.1:5062
callee_bind_addr:: udp:127.0.0.1:5062
to_uri:: sip:43991002@67.202.62.202
to_tag:: 6C8F89E9-4F4540EA0001F575-AC557700
callee_contact:: sip:sipwise-user2@127.0.0.1:5080
callee_cseq:: 11
callee_route_set::

When I set dlg_match_mode=1 the problem goes away. I would like however
to understand why the dialog fails to clear in default mode (DID_ONLY),
because the dialog cookie seems to be preserved by caller in all
in-dialog requests properly. There is nothing in the debug log and trace
attached that catches my eye. Do you see anything wrong there?

In trace file the proxy address is 127.0.0.1:5062. You may notice that
the actual signaling flow is a little bit more complicated, I will
gladly answer any questions about it. For this test I've used two lines
in the eyeBeam softphone, when one line answers the other is
automatically put on hold which is what I want. Then I un-hold the
callee and clear the call.

The customer is reporting multiple stale calls when re-INVITE is sent by
Cirpack PSTN gw immediately after call connect, which is basically the
same call flow I am talking about, it is just not practical for me to
run kamailio with debug=3 there all the time. I am going to try
theredlg_match_mode=1 though and see if the problem goes away.

Any ideas?


reinv.log.gz
Description: GNU Zip compressed data


reinv.txt.gz
Description: GNU Zip compressed data
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC canceling a specific early dialog with BYE

2012-02-21 Thread Andrew Pogrebennyk
On 02/21/2012 12:38 PM, Andrew Pogrebennyk wrote:
> The BYE follows the loose routing path, proxy gets 481 from the sbc and
> forwards that response back to PSTN gw, which somehow breaks it. AFAICS
> it's not specified in RFC what should the behavior look like when
> getting both a 200 and error-class response for the INVITE (quotes are
> most welcome!).

One more thing: since RFC section 15 allows UAC to terminate a specific
early dialog with BYE after receiving 200 OK on the other dialog:

"The BYE request is used to terminate a specific session or attempted
session. In this case, the specific session is the one with the peer UA
on the other side of the dialog. (...). The caller’s UA MAY send a BYE
for either confirmed or early dialogs, and the callee’s UA MAY send a
BYE on confirmed dialogs, but MUST NOT send a BYE on early dialogs."

..the UAC should probably follow the procedure for terminating a session
with a BYE request also specified in section 15 which says:

  "If the response for the BYE is a 481
   (Call/Transaction Does Not Exist) or a 408 (Request Timeout) or no
   response at all is received for the BYE (that is, a timeout is
   returned by the client transaction), the UAC MUST consider the
   session and the dialog terminated."

Should this be interpreted in such way that both dialogs must be
considered terminated or only the early one which we tried to terminate?
I'm not sure on that one and would appreciate any hints.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] UAC canceling a specific early dialog with BYE

2012-02-21 Thread Andrew Pogrebennyk
Hello,
we have a Kamailio proxy which gets the call from PSTN gw and does some
call forwarding (serial forking) to several destinations through our sbc
The call flow I am looking at is:
- Kamailio sends INVITE to branch_1.
- branch_1 sends 180 with to-tag*, proxy relays it to the gw
  * 180 meets the requirements for dialog creating 18x responses in
sections 12.1, 12.1.1 because it contains to-tag, contact and mirrored
record-route.
- After some seconds Kamailio sends a CANCEL to branch_1.
- And sends the INVITE to branch_2.
- branch_1 replies 200 for the CANCEL and 487 for the INVITE.
- branch_2 replies 180 and 200 for the INVITE.
- When PSTN gw receives that it sees it still needs to cancel other
early dialog established by 180 from branch_1.
- The PSTN gw sends a BYE with to-tag of branch_1 to cancel this
specific early dialog.

SIP allows early dialogs to individually released while other dialogs
continue, as written in RFC, section 15:
"The BYE request is used to terminate a specific session or attempted
session. In this case, the specific session is the one with the peer UA
on the other side of the dialog. (...). The caller’s UA MAY send a BYE
for either confirmed or early dialogs, and the callee’s UA MAY send a
BYE on confirmed dialogs, but MUST NOT send a BYE on early dialogs."

The BYE follows the loose routing path, proxy gets 481 from the sbc and
forwards that response back to PSTN gw, which somehow breaks it. AFAICS
it's not specified in RFC what should the behavior look like when
getting both a 200 and error-class response for the INVITE (quotes are
most welcome!).

IMO it would be more correct to absorb BYE in proxy but I see a big
problem here: branch_2 can even ring for 5 minutes and it's not feasible
for proxy to have a wt-timer that long. Also it's not possible to inform
the gw that early dialog has cleared as soon as we receive 200/487 from
branch_1.

So I'm not sure which party is at fault and if we can workaround that
somehow in the Kamailio. Any thoughts?

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Andrew Pogrebennyk
Hi Daniel,

On 02/17/2012 10:47 AM, Daniel-Constantin Mierla wrote:
> I made a patch for server reconnect -- I had no access to a computer
> with redis lib installed for the moment, hopefully it compiles. If you
> can try and tell the result, it would be great, I can commit then.

I may be able to test this patch as well. Currently compilations bails
out on attempt to redeclare redisc_reconnect_server function parameter:

CC (gcc) [M ndb_redis.so]   ndb_redis_mod.o
CC (gcc) [M ndb_redis.so]   redis_client.o
redis_client.c: In function ‘redisc_reconnect_server’:
redis_client.c:206:19: error: ‘rsrv’ redeclared as different kind of symbol
redis_client.c:202:46: note: previous definition of ‘rsrv’ was here
make[1]: *** [redis_client.o] Error 1
make: *** [modules] Error 1

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] image missing in xmlrpc module doc

2012-02-17 Thread Andrew Pogrebennyk
Hi,
Was reading through the xmlrpc docs, could anybody with an access check
why Figure "RPC Example" is missing from
http://kamailio.org/docs/modules/devel/modules/xmlrpc.html#fig.rpc_example
as well as 3.1 and 3.2 module docs?
Thanks,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] redirect client to keep original ruri

2012-02-01 Thread Andrew Pogrebennyk
On 02/01/2012 12:11 PM, Daniel-Constantin Mierla wrote:
>> I was getting an error for some reason:
>>
>>   0(7860) ERROR:  [pvapi.c:516]: error searching pvar "T_rpl"
>>   0(7860) ERROR:  [pvapi.c:720]: wrong char [$/36] in [$T_rpl($ct)]
>> at [7 (5)]
>>
>> version: kamailio 3.1.5
> do you have tmx module loaded?

It was missing, I've figured it out later. I am now using $T_rpl($ct)
and with failure_reply_mode set to 3 redirects work pretty fine for me.

But maybe the error above is not enough self-descriptive, for those who
are not reading the docs :)

Thanks.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] redirect client to keep original ruri

2012-01-30 Thread Andrew Pogrebennyk
Since this thread will probably end up in Google I''ll share my
experience. I ended up with this"

if(t_check_status("301|302"))
{
#NOTE: must assign to $du to keep R-URI intact
$var(contact) = $T_rpl($ct);
$var(contact) = $(var(contact){nameaddr.uri});
$du = $var(contact);
xlog("L_INFO", "Redirect from proxy intercepted - M=$rm
R=$ru F=$fu T=$tu IP=$avp(s:ip):$avp(s:port) ($si:$sp) ID=$ci\n");
append_branch();
route(ROUTE_RELAY);
exit;
}

where route(ROUTE_RELAY) is merely a call t_relay_to("0x01") wrapped up
in some logging. So far so good.

There was a problem when a new request target needed digest-ch'd the
caller with 407. The redirect server by default relayed not 407 but 302
reply back. I've set tm modparam failure_reply_mode to 3 - voila!

http://kamailio.org/docs/modules/3.1.x/modules/tm.html#failure_reply_mode

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio with Private IP - ACK for 200 OK problem

2012-01-26 Thread Andrew Pogrebennyk
On 01/26/2012 08:21 PM, Krishna Kurapati wrote:
> Is there a configuration option to let kamailio use Public IP when
> setting record-route in 200 OK?

Of course, you need record_route_preset() - see
http://kamailio.org/docs/modules/3.1.x/modules_k/rr.html#id2667590
Also I would expect you need to set advertised_address core parameter if
it's not set yet..

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] redirect client to keep original ruri

2012-01-25 Thread Andrew Pogrebennyk
On 01/25/2012 03:18 PM, Alex Balashov wrote:
> Put the 302 Contact URI in the destination set instead, i.e. $du, not
> $ru.  That will cause it to be relayed to the redirect destination on
> the network and transport level, but the logical target will remain the
> same.

Ok. I was thinking that uac_redirect is the way to go, but it seems
there isn't much going on behind the scenes anyway, so assigning to $du
is just as valid. Thanks.
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] redirect client to keep original ruri

2012-01-25 Thread Andrew Pogrebennyk
Daniel, thank you - method (2) works like a charm.

On 01/25/2012 03:16 PM, Daniel-Constantin Mierla wrote:
> an option - get the contact header from 302 in failure route via
> $T_rpl($ct). Use its uri to set $du.

I was getting an error for some reason:

 0(7860) ERROR:  [pvapi.c:516]: error searching pvar "T_rpl"
 0(7860) ERROR:  [pvapi.c:720]: wrong char [$/36] in [$T_rpl($ct)]
at [7 (5)]

version: kamailio 3.1.5

> Alternative, set onreply_route and if it is 302 reply, take the contact
> uri and add it in an avp. Use that avp in failure route.

This works.

Regards,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] redirect client to keep original ruri

2012-01-25 Thread Andrew Pogrebennyk
Hello,
assuming that I want to use contact from 302 response as outbound proxy
but keep the original Request-URI, what should I do? Calling the
revert_uri() after get_redirects() in failure_route doesn't do the trick.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio : Listening on multiple ports behind NAT

2012-01-16 Thread Andrew Pogrebennyk
Hi,

On 01/16/2012 03:41 PM, Reda Aouad wrote:
> I suggest that the function record_route( ) takes a public IP address as
> a parameter, still doing what it does (correct record routing and cookie
> addition did=xxx and loose route lr=on), but only replacing the private
> IP address on which Kamailio listens with a public IP address. Or that
> the record_route( ) function uses the advertised_address to construct
> the RR header.

maybe you are looking for the function record_route_advertised_address()
which is available in git master:
http://web.archiveorange.com/archive/v/jZFTGE0yjPqCTTcAkzuf

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ndb_redis module fails after a while

2012-01-13 Thread Andrew Pogrebennyk

Javi,
ndb_redis does not reconnect if the server closes connection on timeout. 
It should work if you set timeout to zero in server config. I thought 
that I created a ticket in the bugtracker for that before, but not sure, 
I can't find it right now.


On 13.01.2012 08:00, Javier Gallart wrote:

Hi all

I have started making some tests with the ndb_redis module. So far we 
have not stressed the module (no more than 5 HGET  commands/second at 
maximum). It works well, but with at some point it starts failing. The 
failures are easily found because the logs always show this:

INFO:  [main.c:811]: INFO: signal 13 received
After that the redis value is always null. If I restart kamailio it 
starts working again.
I've run kamailio with debug=4 but I haven't seen more useful 
information. On the redis side, I could find nothing in the logs either, 
the number of clientes connected is alway much less than the configured 
maximum, Any idea?
On the other hand, if I restart redis we need to restart kamailio to 
restore the connections. Is the reconnection to redis on the roadmap?


Thanks in advance

Regards

Javi


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Pseudo-variables for "Status-Line"

2011-12-29 Thread Andrew Pogrebennyk
On 12/29/2011 03:36 PM, Robert R wrote:
> Thank a lot. $T_reply_code works.
> I tried all variables in pv doc ($rc, $err.rcode, $rs ... ) and none of
> them works,

Actually the $rs pseudo-variable should also work as described here:
http://sip-router.org/wiki/cookbooks/pseudo-variables/devel#sip_reply_s_status_status-code_response-code_reply-code

Good that it helps.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Pseudo-variables for "Status-Line"

2011-12-29 Thread Andrew Pogrebennyk
On 12/29/2011 03:21 PM, Robert R wrote:
> What is the Pseudo-variables for "Status-Line" filed of SIP response
> messages (2xx, 3xx,4xx,5xx,6xx)? i.e., is there a Pseudo-variables to
> display the SIP response code?

You can test it with tm function t_check_status(...) or get it in a
config variable $T_reply_code:

http://www.kamailio.org/wiki/cookbooks/3.2.x/pseudovariables#t_reply_code

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] usrloc, timer process and cache cleanup

2011-12-23 Thread Andrew Pogrebennyk
On 12/23/2011 08:18 PM, Stefan Sayer wrote:
> shouldn't the db layer and driver be smart enough to do insert ... on
> duplicate key update at least where it's supported?

my fear is that such "first insert then update" policy will affect the
performance. can create noise in the log on some db backends too..

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] TLS<-->UDP not working with record_route_preset

2011-12-09 Thread Andrew Pogrebennyk
Gnani,
since version 3.2.0 kamailio accepts several arguments to
record_route_preset() function:
http://www.kamailio.org/docs/modules/3.2.x/modules_k/rr.html#id2542169
In 3.1.0 you can call insert_hf directly, but IMO it's worth upgrading.
Andrew

On 12/08/2011 08:50 PM, Gnaneshwar Gatla wrote:
> Hello All,
> 
>  
> 
> I have setup the Kamailio 3.1.0 behind a NAT/firewall. I’m using
> record_route_preset() function to keep the Public IP(advertised_address)
> in the Route header.
> 
> I have to setup a where TLS->UDP and UDP->TLS to work. The sip clients
> do TLS and we have third party sip clients that only do UDP.
> 
> The problem, Kamailio does not do double record-route when I provide
> record_route_preset().
> 
>  
> 
> This is leading to a problem where the call is either hung on TLS or
> UDP. I’m unsure how to go around this problem.
> 
> I  had posted earlier about this problem, is there a way I could use the
> advertised_address in the record route headers in this case?
> 
>  
> 
> Regards
> 
> Gnani
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] transport=TLS

2011-11-29 Thread Andrew Pogrebennyk
Bruno,
the address from contact header is put into R-URI on outgoing request to
that user. This is where I catch that parameter. I think we should debug
why kamailio sends the request using UDP, it is not clear, as Daniel
pointed out it should work automatically. I think I had to do these
manipulations because in my case the outbound proxy address is set

On 11/29/2011 05:38 PM, Bruno Bresciani wrote:
> In my case the transport=TLS is present in contact header, has the same
> treatment of R-URI?
> 
> Cheers


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] transport=TLS

2011-11-29 Thread Andrew Pogrebennyk
Hi Bruno,
What I have done is an explicit check
if (uri_param("transport","tls") || uri_param("transport","TLS"))
to call force_send_socket with either udp or tls port.
It would be cool for kamailio to select the proper socket automatically,
I think there was a discussion on that previously but I can't find it
right now. Hopefully someone else has a hint :)

On 11/29/2011 02:50 PM, Bruno Bresciani wrote:
> Hi All,
> 
> kamailio 3.1.2 recognize value "transport=TLS" on contact header or only
> "transport=tls"?
> 
> kamailio forwards (t_relay function) the message with UDP protocol when
> value "transport=TLS" is on contact header.
> 
> Cheers


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to limit number of calls in Kamailio proxy

2011-11-09 Thread Andrew Pogrebennyk
Austin,
the block beginning with dlg_manage() should be placed between
route(AUTH) and route(PSTN). It is commented out and put outside the
main routing block so I'm not sure if that was the case..

If the problem persists please get the dialogs list before calling,
while the callee's phone is ringing after the call is established and
after the call is cleared. If I am not mistaken the command is:
kamctl fifo profile_list_dlgs caller

On 11/05/2011 03:02 AM, Austin Einter wrote:
> Dear Andrew
> Here I am attaching the config file I am using currently.
> Please suggest me if something is wrong there. Also how do I limit the
> maximum number of calls.
> Thanks, Austin
>  

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to limit number of calls in Kamailio proxy

2011-11-03 Thread Andrew Pogrebennyk
Austin,

Actually you could share your config to the mailing list, I will tell
you if there is something blatantly wrong ;-)

Regards,
Andrew

On 11/03/2011 06:15 AM, Jason Penton wrote:
> Hi Austin,
> 
> Have a look at the TM module docs. You will find the appropriate
> commands there.
> 
> HTH
> 
> On Nov 3, 2011 3:01 AM, "Austin Einter"  > wrote:
> 
> Dear Andrew, Henning
> Thanks for sharing very useful information.
> I am bit new to kamailio, probably askingvery easy questions, please
> bear with me.
>  
> I am not sure if I am forwording the INVITE statelessly or not.
> How do I check if INVITE is forwarded statelessly.
> Andrew you have mentioned 'So make sure that a transaction exists or
> create it
> explicitly using the tm module".
>  
> Not sure, how do I check if transaction exists or not. And how can I
> create it.
>  
> Please give me some pointers or a sample config file.
>  
> Regards,
> Austin


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to limit number of calls in Kamailio proxy

2011-10-31 Thread Andrew Pogrebennyk
Austin,
That is strange, because I am using similar setup successfully. Actually
I don't know if it counts the calls that are being established, I didn't
care for it.

While looking through the docs:
http://kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524304
 the following note caught my eye:

IMPORTANT: Users of this function should make sure that the dialog
created is further processed statefully. Specifically, if a stateless
response is sent out after dlg_manage() is called, the dialog cannot be
handled properly. So make sure that a transaction exists or create it
explicitly using the tm module. This is a shortcoming of the current
implementation that may be resolved in a future version hopefully.

Could it be that you are forwarding the INVITE statelessly?
Regards,
Andrew

On 10/30/2011 01:08 PM, Austin Einter wrote:
> Thanks Andrew
> I added profile_with_value module parameter and with that I am able to
> overcome this error.
>  
> My code looks as below.
>  
> dlg_manage();
> if (is_method("INVITE")) {
>  if (!has_totag()) {
> #$var(SIZE) = 0;
> get_profile_size("caller", "$fu", "$var(SIZE)");
> xlog("Number of calls present now is 
> $var(SIZE)\n");
> if( $var(SIZE) > MAX_NUMBER_OF_CALLS ) {
> sl_send_reply("503", "Simultaneous calls
> limit reached");
> xlog("Rejected calls with 503
> Simultaneous calls limit reached\n");
> exit;
> }
> else {
>  xlog("Allowed call. Looks max calls
> limit not reached. Calls= $var(SIZE)\n");
> }
> set_dlg_profile("caller","$fu");
> }
> }
> Whole purpose is to limit number of active calls at any point of time.
> $var(SIZE) gives the number of calls are being established, but not the
> number of calls are already established.
>  
> So if I am making multiple calls at  a point of time, it is blocking
> call attempts beyond limit. But after all call setup complete, again
> $var(SIZE) becomes zero and allows new calls.
>  
>  
> Has anybody done this (limiting number of calls at any point of time).
> If so can you please share the configuration file changes.
>  
>  
> To get $var(SIZE) working properly, do I need to enable MySql, please
> advice.
>  
> Regards
> Austin
> 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to limit number of calls in Kamailio proxy

2011-10-29 Thread Andrew Pogrebennyk
On 10/30/2011 06:00 AM, Austin Einter wrote:
> When I run kamailio, I get below error.
>  
>  0(4925) CRITICAL: dialog [dialog.c:297]: profile  not definited
> [...]
> Any idea why this error comes and how to fix it.

You should really define profile caller by putting it into
profiles_with_value module parameter:
http://kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2523534

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio sip-capture error on compile

2011-10-03 Thread Andrew Pogrebennyk
Jeff,

On 10/03/2011 08:45 PM, Jeff Anderson wrote:
> I am trying to get kamailio sip-capture up and running for use with homer. I
> can get the service to start but i receive the following error.
> 
> [root@homer kamailio]# /usr/local/sbin/kamailio -c
> loading modules under
> /usr/local/lib/kamailio/modules_k/:/usr/local/lib/kamailio/modules/
>  0(10208) WARNING:  [socket_info.c:912]: WARNING: fix_hostname: could
> not rev. resolve 10.40.0.22
> [...]
> Does anyone have any ideas on how to resolve this error?

This message is from kamailio core, not sip-capture. I don't see
anything abnormal in the log. Could you please share what are you doing
and what makes you think sip-capture doesn't work?

Regards,
Andrew


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Account 403 to RADIUS

2011-09-26 Thread Andrew Pogrebennyk

On 09/26/2011 02:16 PM, Mino Haluz wrote:

Ok, the problem is the original feeradius package (squeeze) does not
support Update radius messages (it gives Unsupported Acct-Status-Type =
15).
It's not related to kamailio.

.. however anybody knows how to patch it?


The patches are here:
http://download.dns-hosting.info/CDRTool/contrib/freeradius-brandinger/
but you can just grab freeradiusd-xs from the AG repository as described 
here: http://cdrtool.ag-projects.com/wiki/Install

HTH.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Nat problems

2011-09-02 Thread Andrew Pogrebennyk

On 09/02/2011 10:33 PM, David Zambrano wrote:

Hi andrew. Thanks for your help. What module or config should I use to
make sure the connection goes back through the loadbalancer?


That's simply the task for record-route like:

if (is_method("INVITE"))
record_route();

But you also need the loose_route for routing new in-dialog requests.


For the failover I didnt specify anything ping related. Im using the
dispatcher module. Can I specify the ping config in that module or
should I use another module for that?


yes, it's in the documentation of dispatcher module:
http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html#id2806108


route{
ds_select_dst("2", "4");
 t_relay();
}


well, with such config the chances are that the subsequent BYE may 
arrive at the different server than the INVITE, so again you need the 
loose_route section for this. You should get familiar with the default 
config file to get a feeling of things.


Regards,
Andrew

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Nat problems

2011-09-02 Thread Andrew Pogrebennyk

On 09/02/2011 08:58 PM, David Zambrano wrote:

After doing some traces
on the network I realized that the transcoder is trying to reach the
router in front of the softphone and skipping the Kamailio
loadbalancer. The call never reaches the softphone so the phonecall
never completes. In UDP exactly the same thing happens, the call skips
the Kamailio loadbalancer but the call completes perfectly fine.


Well, you can not open the TCP connection to the client behind NAT. You 
need to reuse the existing connection created during registration, so 
the request should go via load balancer by record-route or path. I'm not 
sure why this works for UDP, probably your router is too permissive in 
this case :-)


Regarding the loadbalancing and failover, I don't understand what is the 
problem. Could you specify which lb module do you use and preferable 
post the part of config responsible for failover. I believe you don't 
need to send request to both transcoders. To skip the transcoder that 
goes down you need to setup ping checks, if that is the only problem.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] issue with tm callbacks / premature cancel

2011-08-02 Thread Andrew Pogrebennyk

Daniel,

On 02.08.2011 11:35, Daniel-Constantin Mierla wrote:

No, it does not (30 < 150). I've also tried settings max_inv_lifetime
to even greater 300 seconds, no luck..

OK. Btw, do you set both parameters of t_set_fr(...)?


I've tried adding a second parameter, also inserted t_reset_fr() before 
the call to t_set_fr(), still no luck.


--
Sincerely,
Andrew Pogrebennyk

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] issue with tm callbacks / premature cancel

2011-08-01 Thread Andrew Pogrebennyk

Hi Daniel,

On 01.08.2011 20:12, Daniel-Constantin Mierla wrote:

does it happen to exceed the max lifetime for transaction?
http://kamailio.org/docs/modules/stable/modules/tm.html#max_inv_lifetime


No, it does not (30 < 150). I've also tried settings max_inv_lifetime to 
even greater 300 seconds, no luck..


--
Sincerely,
Andrew Pogrebennyk

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] issue with tm callbacks / premature cancel

2011-08-01 Thread Andrew Pogrebennyk
I've got stuck today trying to implement some sequential forking 
scenario. When the call comes destined to the local user, I'm trying to 
reach it sequentially through two alternative extensions. For each 
extension, I'm calling t_set_fr with a timeout of 15sec. They reply only 
180 and do not pick up the phone. After that the call should go to the 
"last resort" PSTN number. I'm calling then t_set_fr with a timeout of 
30sec. But immediately after sending INVITE to PSTN gw Kamailio 
generates cancel and sends 408 Request Timeout to the initial INVITE.


In the debug log I'm seeing this:

Aug  1 17:34:43 localhost /usr/local/sbin/kamailio[28488]: DEBUG: tm 
[t_hooks.c:288]: DBG: trans=0xb60f543c, callback type 1048576, id 0 entered
Aug  1 17:34:43 localhost /usr/local/sbin/kamailio[28488]: DEBUG: tm 
[t_reply.c:1634]: DEBUG: relay_reply: branch=1, save=1, relay=-1
Aug  1 17:34:43 localhost /usr/local/sbin/kamailio[28488]: DEBUG: tm 
[t_cancel.c:328]: DEBUG: cancel_branch: sending cancel...


Does it look like something familiar to you?

Kamailio version: 3.1.4
Config of tm module:
modparam("tm", "fr_timer", 2)
modparam("tm", "fr_inv_timer", 12)
modparam("tm", "restart_fr_on_each_reply", 1)

The rest of config is really simple, I can upload it somewhere if it's 
necessary.


--
Sincerely,
Andrew Pogrebennyk

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Set CLI.

2011-07-29 Thread Andrew Pogrebennyk

Hello Henrik,

On 28.07.2011 19:08, Henrik Aagaard Sørensen wrote:

Is it possible to set CLI via the usr_preferences table in Kamailio?
Or any other way?
So that certain subscribers get there from-number overwritten with a
specific one.


Sure, you can script it in any way you like.
This is a working example from my system:

if (avp_db_load("$au", "$avp(s:allowed_cli)")) {
if (!avp_check("$avp(s:allowed_cli)", "eq/$fU/gi")) {
xlog("L_INFO", "User $au is denied CLI=$fU\n");
sl_send_reply("403", "Forbidden");
exit;
}
}

You see, I'm rejecting calls with a CLI that is not allowed.
To override CLI you may use something like this, probably this should be 
put directly before call to t_relay():


# Replace from if needed
if(is_avp_set("$avp(s:allowed_cli)")) {
uac_replace_from("","$avp(s:allowed_cli)");
xlog("L_INFO", "$ci : replaced from to $avp(s:allowed_cli)\n");
}

--
Sincerely,
Andrew Pogrebennyk

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


  1   2   >