Re: [SR-Users] dlg_manage() and dlg_flag

2018-03-23 Thread Daniel-Constantin Mierla
Hello,

indeed the dlg_flag modparam should be made optional, or even removed.

Cheers,
Daniel


On 23.03.18 19:49, Alex Balashov wrote:
> Hi,
>
> One aspect of the dialog module that is very confusing to newbies is the
> relationship between the dlg_flag modparam and dlg_manage().
>
> According to the documentation, dlg_manage() effectively seems to
> obsolete the requirement for a flag[1]:
>
>Process current SIP request with dialog module. It is an 
>alternative to setting dialog flag for initial INVITE and 
>Route-parameter-callback execution for within-dialog requests.
>
> Yet, if one does not set a dlg_flag modparam, the dialog module fails to
> load:
>
>Mar 23 15:42:29 evaristesys-legacy /usr/local/sbin/kamailio[2900]: ERROR: 
> dialog [dialog.c:500]: mod_init(): invalid dlg flag -1!!
>
> Perhaps the flag modparam should be made optional, and any arguments for
> using one over the other more clearly explained in the documentation.
> I'd make the latter contribution, but unfortunately am not entirely sure
> what those are.
>
> Cheers,
>
> -- Alex
>
> [1] 
> https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.f.dlg_manage
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] have successfully installed but ..

2018-03-23 Thread Henning Westerholt
Am Mittwoch, 21. März 2018, 20:34:48 CET schrieb Adrian Bartlett:
> we have 2 upstream carriers .. one we are currently using and one whice we
> have an account with and use as a fallback if the upstream carrier is to
> expensive
> we have 2 servers one for business one for residential customers ... the
> incoming call needs to ber routed to either business or residential servers
> after being altered to to match our dialing patterns
> 
> and then sent to external carriers if that then is forwarded to external
> numbers like a mobile
> 
> the 2 servers business and residential are running freeswitch the business
> server has multidomains and the residential is single domain
> 
> so far we take the number from the upstream carrier .. massage it correctly
> to match our dialing scheme .. and pass it to server 1 ... server 1 returns
> 404 not found then passes the call back to the upstream carrier ... and
> does not seem to concider the next server at all
> 
> this is from log file
>  syslog.1:Mar 20 18:24:51 cr-1 kamailio[13959]: {1 39416 INVITE
> a7b4b42426c37563c33a6ce4f258448f3126813e@123.102.36.131} 10(13973) DEBUG:
> registrar [lookup.c:233]: lookup_helper(): '61390928411' Not found in usrloc

Hello Adrian,

this error message indicates that your kamailio can't find an entry in the 
user location database for the given number. Is this number registered to the 
server, if this is a normal phone? If you just want to route the call without 
user registration, you don't need the user location module.

Best regards,

Henning

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Can't get route[AUTH] working as expected.

2018-03-23 Thread Aqs Younas
Thanks Samy for replying.

I wanted if Caller IP was not allowed it should be asked for digest
authentication. But above default AUTH route only do that if from_uri is
local. If someone set a different URI in from header he will be able to
bypass the security check. Correct me if I am wrong somewhere.

I know I can modify the route to get the expected request.

But just wanted to ask if setting #!define WITH_AUTH and #!define
WITH_IPAUTH was not enough in default configuration just to make sure
caller is legitimate.

Br. Aqs.

On 23 March 2018 at 23:54, SamyGo  wrote:

> Hi Aqs,
> What seems to be the problem ! do you want this caller to be IP
> Authenticated or Digest Authenticated or denied !?
>
>
> On Fri, Mar 23, 2018 at 6:16 AM, Aqs Younas  wrote:
>
>> Greetings list.
>>
>> I can see that I was able to bypass the default route[AUTH] if I send an
>> invite containing from_uri which is not local but requested line containing
>> a local user.
>>
>> llisten=udp:172.16.40.10:5060
>>
>> route[AUTH] {
>> #!ifdef WITH_AUTH
>> #!ifdef WITH_IPAUTH
>> if((!is_method("REGISTER")) && allow_source_address()) {
>> # source IP allowed
>> return;
>> }
>> #!endif
>> if (is_method("REGISTER") || from_uri==myself) {
>> # authenticate requests
>> if (!auth_check("$fd", "subscriber", "1")) {
>> auth_challenge("$fd", "0");
>> exit;
>> }
>> # user authenticated - remove auth header
>> if(!is_method("REGISTER|PUBLISH"))
>> consume_credentials();
>> }
>> # if caller is not local subscriber, then check if it calls
>> # a local destination, otherwise deny, not an open relay here
>> if (from_uri!=myself && uri!=myself) {
>> sl_send_reply("403","Not relaying");
>> exit;
>> }
>> #!else
>> # authentication not enabled - do not relay at all to foreign networks
>> if(uri!=myself) {
>> sl_send_reply("403","Not relaying");
>> exit;
>> }
>> #!endif
>> return;
>> }
>>
>> Below INVITE get passed above auth route.
>>
>>
>> INVITE sip:60129879190@172.16.40.10 SIP/2.0
>> Via: SIP/2.0/UDP 139.5.177.91:5060;branch=z9hG4bK31edc7f4;rport
>> Max-Forwards: 70
>> From: ;tag=as2274e806
>> To: 
>> Contact: 
>> Call-ID: 7b6d32bc6c679bb23eb248b955c0ac8b@139.5.177.91:5060
>> CSeq: 102 INVITE
>> User-Agent: FPBX-13.0.194.2(13.17.0)
>> Date: Fri, 23 Mar 2018 09:33:01 GMT
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
>> PUBLISH, MESSAGE
>> Supported: replaces, timer
>> Content-Type: application/sdp
>> Content-Length: 321
>>
>> v=0
>> o=root 237494576 237494576 IN IP4 139.5.177.99
>> s=Asterisk PBX 13.17.0
>> c=IN IP4 139.5.177.99
>> t=0 0
>> m=audio 15332 RTP/AVP 0 18 8 101
>> a=rtpmap:0 PCMU/8000
>> a=rtpmap:18 G729/8000
>> a=fmtp:18 annexb=no
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-16
>> a=ptime:20
>> a=maxptime:150
>> a=sendrecv
>>
>> From INVITE and route[AUTH] I can see why it is being passed.
>>
>> But should not it by default authenticate every request if IP address is
>> not allowed in permission module.
>>
>> Br, Aqs.
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Can't get route[AUTH] working as expected.

2018-03-23 Thread SamyGo
Hi Aqs,
What seems to be the problem ! do you want this caller to be IP
Authenticated or Digest Authenticated or denied !?


On Fri, Mar 23, 2018 at 6:16 AM, Aqs Younas  wrote:

> Greetings list.
>
> I can see that I was able to bypass the default route[AUTH] if I send an
> invite containing from_uri which is not local but requested line containing
> a local user.
>
> llisten=udp:172.16.40.10:5060
>
> route[AUTH] {
> #!ifdef WITH_AUTH
> #!ifdef WITH_IPAUTH
> if((!is_method("REGISTER")) && allow_source_address()) {
> # source IP allowed
> return;
> }
> #!endif
> if (is_method("REGISTER") || from_uri==myself) {
> # authenticate requests
> if (!auth_check("$fd", "subscriber", "1")) {
> auth_challenge("$fd", "0");
> exit;
> }
> # user authenticated - remove auth header
> if(!is_method("REGISTER|PUBLISH"))
> consume_credentials();
> }
> # if caller is not local subscriber, then check if it calls
> # a local destination, otherwise deny, not an open relay here
> if (from_uri!=myself && uri!=myself) {
> sl_send_reply("403","Not relaying");
> exit;
> }
> #!else
> # authentication not enabled - do not relay at all to foreign networks
> if(uri!=myself) {
> sl_send_reply("403","Not relaying");
> exit;
> }
> #!endif
> return;
> }
>
> Below INVITE get passed above auth route.
>
>
> INVITE sip:60129879190@172.16.40.10 SIP/2.0
> Via: SIP/2.0/UDP 139.5.177.91:5060;branch=z9hG4bK31edc7f4;rport
> Max-Forwards: 70
> From: ;tag=as2274e806
> To: 
> Contact: 
> Call-ID: 7b6d32bc6c679bb23eb248b955c0ac8b@139.5.177.91:5060
> CSeq: 102 INVITE
> User-Agent: FPBX-13.0.194.2(13.17.0)
> Date: Fri, 23 Mar 2018 09:33:01 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Content-Type: application/sdp
> Content-Length: 321
>
> v=0
> o=root 237494576 237494576 IN IP4 139.5.177.99
> s=Asterisk PBX 13.17.0
> c=IN IP4 139.5.177.99
> t=0 0
> m=audio 15332 RTP/AVP 0 18 8 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=ptime:20
> a=maxptime:150
> a=sendrecv
>
> From INVITE and route[AUTH] I can see why it is being passed.
>
> But should not it by default authenticate every request if IP address is
> not allowed in permission module.
>
> Br, Aqs.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dlg_manage() and dlg_flag

2018-03-23 Thread Alex Balashov
Hi,

One aspect of the dialog module that is very confusing to newbies is the
relationship between the dlg_flag modparam and dlg_manage().

According to the documentation, dlg_manage() effectively seems to
obsolete the requirement for a flag[1]:

   Process current SIP request with dialog module. It is an 
   alternative to setting dialog flag for initial INVITE and 
   Route-parameter-callback execution for within-dialog requests.

Yet, if one does not set a dlg_flag modparam, the dialog module fails to
load:

   Mar 23 15:42:29 evaristesys-legacy /usr/local/sbin/kamailio[2900]: ERROR: 
dialog [dialog.c:500]: mod_init(): invalid dlg flag -1!!

Perhaps the flag modparam should be made optional, and any arguments for
using one over the other more clearly explained in the documentation.
I'd make the latter contribution, but unfortunately am not entirely sure
what those are.

Cheers,

-- Alex

[1] 
https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.f.dlg_manage

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Dispatcher Routing Failure

2018-03-23 Thread Daniel W. Graham
What constitutes a 'failed request' in dispatcher module, in which a gateway is 
marked inactive?

>From documentation -
ds_ping_interval
With this parameter you can define the interval for sending a request to a 
gateway marked as inactive upon a failed request routing to it.

ds_probing_threshold
If you want to set a gateway into inactive mode, there can be a specific number 
of failed requests until it will change from "active" to "inactive".

Thanks,

-dan
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-23 Thread Sergiu Pojoga
Config code looks solid to me. Look at the 'c=' in SDP in the forward and
reply re-INVITEs. If it gets properly overwritten (same way as it is for
the dialog forming INVITE) when rtpengine is engaged, then I believe we are
facing some kind of bug in the 4.2 version of Kamailio, something about
this thread:
https://lists.kamailio.org/pipermail/sr-users/2012-September/074567.html

I can't upgrade Kamailio at the moment to test my theory as it's a
production environment, but may be you can?

On Fri, Mar 23, 2018 at 6:17 AM, gerry kernan 
wrote:

> Hi
>
>
>
> I think my issue is related to rtpengine when the call is take off hold.
> Im using a private address and a public address . below is route section of
> our Kamailio.cfg and do I have somethimg setup incorrectly for handleing
> re-invites?
>
>
>
>
>
> /usr/sbin/rtpengine --pidfile /var/run/rtpengine.pid --table=-1
> --interface=priv/192.X.X.X --interface=pub/212.X.X.X --listen-ng=
> 127.0.0.1:7722 --tos=184 --timeout=60 --log-level=7 --log-facility=local5
> --homer-protocol=udp --homer-id=2011
>
>
>
>
>
> request_route {
>
>
>
> route(SANITY);
>
>
>
> force_rport();
>
>
>
> # CANCEL processing
>
> if (is_method("CANCEL")) {
>
> if (t_check_trans()) {
>
> route(RELAY);
>
> }
>
> exit;
>
> }
>
>
>
> # handle retransmissions
>
> if (!is_method("ACK")) {
>
> if(t_precheck_trans()) {
>
> t_check_trans();
>
> exit;
>
> }
>
> t_check_trans();
>
> }
>
>
>
> # handle requests within SIP dialogs
>
> route(WITHINDLG);
>
>
>
> ### only initial requests (no To tag)
>
>
>
> # record routing for dialog forming requests (in case they are
> routed)
>
> if (is_method("INVITE|SUBSCRIBE")) {
>
> record_route();
>
> }
>
>
>
> if (af==INET) {
>
> route(SIPIPV4);
>
> } else {
>
> route(SIPIPV6);
>
> }
>
> }
>
>
>
> # Stateful fowarding
>
> route[RELAY] {
>
> if (!t_relay()) {
>
> sl_reply_error();
>
> }
>
> exit;
>
> }
>
>
>
> # Handle requests within SIP dialogs
>
> route[WITHINDLG] {
>
> if (!has_totag()) return;
>
>
>
> # sequential request withing a dialog should
>
> # take the path determined by record-routing
>
> if (loose_route()) {
>
> route(DLGURI);
>
> if ( is_method("ACK") ) {
>
> # ACK is forwarded statelessly
>
> if (has_body("application/sdp")) {
>
> rtpengine_answer();
>
> }
>
> } else if ( is_method("NOTIFY") ) {
>
> # Add Record-Route for in-dialog NOTIFY as per RFC
> 6665.
>
> record_route();
>
> }
>
> route(DISPATCH);
>
> exit;
>
> }
>
>
>
> if ( is_method("ACK") ) {
>
> if ( t_check_trans() ) {
>
> # no loose-route, but stateful ACK;
>
> # must be an ACK after a 487
>
> # or e.g. 404 from upstream server
>
> route(RELAY);
>
> exit;
>
> } else {
>
> # ACK without matching transaction ... ignore and
> discard
>
> exit;
>
> }
>
> }
>
> sl_send_reply("404","Not here");
>
> exit;
>
> }
>
>
>
> route[SIPIPV4] {
>
> if (src_ip != BACKEND_NET4)
>
> {
>
> # device (client) to server (backend)
>
> route(V4DEVTOSRV);
>
> } else {
>
> # server (backend) to devuce (client)
>
> route(V4SRVTODEV);
>
> }
>
> }
>
>
>
> route[SIPIPV6] {
>
> sl_send_reply("404", "Not routing for IPv6");
>
> exit;
>
> }
>
>
>
> route[V4DEVTOSRV] {
>
> xlog("L_NOTICE", "client->backend FROM CLIENT IP: $si $rm $ru  $td
> ID=$ci\n");
>
>
>
> # SIP request packet client->backend
>
>
>
> # - remove preloaded route headers
>
> remove_hf("Route");
>
>
>
> if (!lookup_domain("$td", "dattr_")) {
>
> xlog("L_ERR", "$si $rm $ru -- domain \"$td\" is not "
>
> "found in domain table\n");
>
> xlog("attempt to login with unkown domain from $si");
>
> sl_send_reply("404", "No route for domain");
>
> exit;
>
> }
>
>
>
> if (!defined $avp(dattr_routeset)) {
>
> xlog("L_ERR", "$si $rm $ru -- attribute \"routeset\" is " +
>
> "undefined for domain $td\n");
>
>   

Re: [SR-Users] nat_uac_test(8)

2018-03-23 Thread Daniel Tryba
On Fri, Mar 23, 2018 at 10:43:05AM +0100, Daniel Tryba wrote:
> On Thu, Mar 22, 2018 at 04:23:18PM -0400, John Petrini wrote:
> > If you're asking if nat_uac_test should be updated to check for 192.0.0.0/29
> > I think that's a great idea.
...
> I'm to lazy^W^Wdon't have the time to figure out how to do the
> appropriate git magic.S

I lied:
https://github.com/kamailio/kamailio/pull/1488

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-23 Thread gerry kernan
Hi 

 

I think my issue is related to rtpengine when the call is take off hold. Im 
using a private address and a public address . below is route section of our 
Kamailio.cfg and do I have somethimg setup incorrectly for handleing re-invites?

 

 

/usr/sbin/rtpengine --pidfile /var/run/rtpengine.pid --table=-1 
--interface=priv/192.X.X.X --interface=pub/212.X.X.X --listen-ng=127.0.0.1:7722 
--tos=184 --timeout=60 --log-level=7 --log-facility=local5 --homer-protocol=udp 
--homer-id=2011

 

 

request_route {

 

route(SANITY);

 

force_rport();

 

# CANCEL processing

if (is_method("CANCEL")) {

if (t_check_trans()) {

route(RELAY);

}

exit;

}

 

# handle retransmissions

if (!is_method("ACK")) {

if(t_precheck_trans()) {

t_check_trans();

exit;

}

t_check_trans();

}

 

# handle requests within SIP dialogs

route(WITHINDLG);

 

### only initial requests (no To tag)

 

# record routing for dialog forming requests (in case they are routed)

if (is_method("INVITE|SUBSCRIBE")) {

record_route();

}

 

if (af==INET) {

route(SIPIPV4);

} else {

route(SIPIPV6);

}

}

 

# Stateful fowarding

route[RELAY] {

if (!t_relay()) {

sl_reply_error();

}

exit;

}

 

# Handle requests within SIP dialogs

route[WITHINDLG] {

if (!has_totag()) return;

 

# sequential request withing a dialog should

# take the path determined by record-routing

if (loose_route()) {

route(DLGURI);

if ( is_method("ACK") ) {

# ACK is forwarded statelessly

if (has_body("application/sdp")) {

rtpengine_answer();

}

} else if ( is_method("NOTIFY") ) {

# Add Record-Route for in-dialog NOTIFY as per RFC 6665.

record_route();

}

route(DISPATCH);

exit;

}

 

if ( is_method("ACK") ) {

if ( t_check_trans() ) {

# no loose-route, but stateful ACK;

# must be an ACK after a 487

# or e.g. 404 from upstream server

route(RELAY);

exit;

} else {

# ACK without matching transaction ... ignore and 
discard

exit;

}

}

sl_send_reply("404","Not here");

exit;

}

 

route[SIPIPV4] {

if (src_ip != BACKEND_NET4)

{

# device (client) to server (backend)

route(V4DEVTOSRV);

} else {

# server (backend) to devuce (client)

route(V4SRVTODEV);

}

}

 

route[SIPIPV6] {

sl_send_reply("404", "Not routing for IPv6");

exit;

}

 

route[V4DEVTOSRV] {

xlog("L_NOTICE", "client->backend FROM CLIENT IP: $si $rm $ru  $td 
ID=$ci\n");

 

# SIP request packet client->backend

 

# - remove preloaded route headers

remove_hf("Route");

 

if (!lookup_domain("$td", "dattr_")) {

xlog("L_ERR", "$si $rm $ru -- domain \"$td\" is not "

"found in domain table\n");

xlog("attempt to login with unkown domain from $si");

sl_send_reply("404", "No route for domain");

exit;

}

 

if (!defined $avp(dattr_routeset)) {

xlog("L_ERR", "$si $rm $ru -- attribute \"routeset\" is " +

"undefined for domain $td\n");

sl_send_reply("404", "No route id for domain");

exit;

}

 

if( !ds_select_dst(4000 + $avp(dattr_routeset), "1") ) {

xlog("L_NOTICE", "Drop\n");

sl_send_reply("404", "No destination");

}

 

if (is_method("REGISTER")) {

add_path_received();

} else {

if (nat_uac_test("19")) {

if(is_first_hop()) {

add_contact_alias();

}

}

}

 

if (has_body("application/sdp")) {

rtpengine_offer("direction=pub direction=priv ICE=remove");

}

 

route(DISPATCH);

 

xlog("L_NOTICE", "DISPATCH: source address: $si SIP request's method: 
$rm SIP Request's URI: $ru ID=$ci\n");

exit;

}

 

route[V4SRVTODEV] {

# SIP request 

[SR-Users] Can't get route[AUTH] working as expected.

2018-03-23 Thread Aqs Younas
Greetings list.

I can see that I was able to bypass the default route[AUTH] if I send an
invite containing from_uri which is not local but requested line containing
a local user.

llisten=udp:172.16.40.10:5060

route[AUTH] {
#!ifdef WITH_AUTH
#!ifdef WITH_IPAUTH
if((!is_method("REGISTER")) && allow_source_address()) {
# source IP allowed
return;
}
#!endif
if (is_method("REGISTER") || from_uri==myself) {
# authenticate requests
if (!auth_check("$fd", "subscriber", "1")) {
auth_challenge("$fd", "0");
exit;
}
# user authenticated - remove auth header
if(!is_method("REGISTER|PUBLISH"))
consume_credentials();
}
# if caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (from_uri!=myself && uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
#!else
# authentication not enabled - do not relay at all to foreign networks
if(uri!=myself) {
sl_send_reply("403","Not relaying");
exit;
}
#!endif
return;
}

Below INVITE get passed above auth route.


INVITE sip:60129879190@172.16.40.10 SIP/2.0
Via: SIP/2.0/UDP 139.5.177.91:5060;branch=z9hG4bK31edc7f4;rport
Max-Forwards: 70
From: ;tag=as2274e806
To: 
Contact: 
Call-ID: 7b6d32bc6c679bb23eb248b955c0ac8b@139.5.177.91:5060
CSeq: 102 INVITE
User-Agent: FPBX-13.0.194.2(13.17.0)
Date: Fri, 23 Mar 2018 09:33:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 321

v=0
o=root 237494576 237494576 IN IP4 139.5.177.99
s=Asterisk PBX 13.17.0
c=IN IP4 139.5.177.99
t=0 0
m=audio 15332 RTP/AVP 0 18 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

>From INVITE and route[AUTH] I can see why it is being passed.

But should not it by default authenticate every request if IP address is
not allowed in permission module.

Br, Aqs.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Push and tcpconn_main_timeout

2018-03-23 Thread Daniel Tryba
On Thu, Mar 22, 2018 at 09:26:02PM +0100, Kjeld Flarup wrote:
> Thanks for Your suggestion. I'm however not sure that it will solve the
> problem which is a TCP connection problem.
> 
> I solved the issue by sending the call back to the kamailio which handles
> the registrations, and just let the other kamailio's do the topoh module.

That is exactly what Path does. My setup is a little different having 2
edge proxies/loadbalancers infront of 3 registrars, but the edge adds a
Path header with source/transport (path_add_received), this gets stored
in the location table. Now any backend knows which edge proxy to use,
that proxy uses the already established TCP connection to the endpoint.
 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] nat_uac_test(8)

2018-03-23 Thread Daniel Tryba
On Thu, Mar 22, 2018 at 04:23:18PM -0400, John Petrini wrote:
> If you're asking if nat_uac_test should be updated to check for 192.0.0.0/29
> I think that's a great idea.

Don't know if I got every use in the source tree of private nets, but
following diff should do the trick. This net can be used for ip4<->ipv6<->ipv4 
NAT translations. So 6TO4-RELAY in ipops fits better than PRIVATE. But is 
simply 
indicates NAT transversal for the nathelper module.

I'm to lazy^W^Wdon't have the time to figure out how to do the
appropriate git magic.

diff --git a/src/modules/ipops/detailed_ip_type.c 
b/src/modules/ipops/detailed_ip_type.c
index a37c4aacc..529645e99 100644
--- a/src/modules/ipops/detailed_ip_type.c
+++ b/src/modules/ipops/detailed_ip_type.c
@@ -41,6 +41,7 @@ static ip4_node IPv4ranges[IPv4RANGES_SIZE] = {
 { 0xc0586300,  "6TO4-RELAY", 0xff00 },  // 192.88.99.0/24
 { 0xc200,  "TEST-NET",   0xff00 },  // 192.0.2/24
 { 0xc000,  "RESERVED",   0xff00 },  // 192.0.0/24
+{ 0xc000,  "6TO4-RELAY", 0xfff8 },  // 192.0.0.0/29
 { 0xc0a8,  "PRIVATE",0x },  // 192.168/16
 { 0xa9fe,  "LINK-LOCAL", 0x },  // 169.254/16
 { 0xc612,  "RESERVED",   0xfffe },  // 198.18/15
diff --git a/src/modules/nat_traversal/nat_traversal.c 
b/src/modules/nat_traversal/nat_traversal.c
index ead4c696f..710d281f5 100644
--- a/src/modules/nat_traversal/nat_traversal.c
+++ b/src/modules/nat_traversal/nat_traversal.c
@@ -258,6 +258,7 @@ static NetInfo rfc1918nets[] = {
{"172.16.0.0", 0xac10UL, 0xfff0UL},
{"192.168.0.0", 0xc0a8UL, 0xUL},
{"100.64.0.0", 0x6440UL, 0xffc0UL}, // include rfc6598 shared 
address space as technically the same for our purpose
+   {"192.0.0.0", 0xc000UL, 0xfff8UL}, // include rfc7335 IPv4 
Service Continuity Prefix
{NULL, 0UL, 0UL}
 };
 
@@ -2156,4 +2157,4 @@ int mod_register(char *path, int *dlflags, void *p1, void 
*p2)
 {
sr_kemi_modules_add(sr_kemi_nat_traversal_exports);
return 0;
-}
\ No newline at end of file
+}
diff --git a/src/modules/nathelper/nathelper.c 
b/src/modules/nathelper/nathelper.c
index a45588a50..935c981ee 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -148,6 +148,7 @@ static struct {
{"172.16.0.0",  0, 0xu << 20},
{"192.168.0.0", 0, 0xu << 16},
{"100.64.0.0",  0, 0xu << 22}, /* rfc6598 - cg-nat */
+   {"192.0.0.0",   0, 0xu <<  3}, /* rfc7335 - IPv4 Service 
Continuity Prefix */
{NULL, 0, 0}
 };
 /* clang-format on */


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Re: Audio stops after resuming call from hold

2018-03-23 Thread gerry kernan
Hi Segriu

 

I think my issue is with  rtpengine . I’m using direction parameter to set a 
LAN and WAN IP on the offer and I think it’s getting messed up during re-invites

 

 

 

 

 

Best Regards

 

Gerry Kernan

 

From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Sergiu 
Pojoga
Sent: 23 March 2018 01:34
To: Kamailio (SER) - Users Mailing List 
Subject:  Re: [SR-Users] Audio stops after resuming call from hold

 

OMG, what are the odds, a client reported the same problem today! Edge proxy 
running same 4.2.3, requests are forwarded to a farm of Asterisks v13 in a 
similar way based on $rd, far-end NAT traversal is handled by Kamailio.

 

I've had only an hour or so to debug today. Re-invites containing SDP are 
handled the same way as invites in terms of SDP mangling, all looks good in 
that sense. There's nothing special to be done about re-invites.

 

Preliminary clue is that this happens (or not) depending on the type of 
firewall/NAT behind which the phone is located. In the case with the trouble, 
it's a Sonicwall, probably a Symmetric NAT. Is doesn't happen to a phone behind 
a Full/Restricted Cone NAT. 

 

What nat= are you setting for Asterisk peers?

Do you engage rtpproxy/rtpengine?

Any far-end NAT traversal manipulations involved such as SIP ALG or STUN?

 

Cheers.

 

On Thu, Mar 22, 2018 at 3:55 PM, gerry kernan  > wrote:

Hi 

 

Hoping someone can point me in the right direction.

I have a Kamailio Ver: 4.2.3-1.1  running in front of a few asterisk servers 
Ver: 13.17.2  sip is routed to an asterisk server depending the domain name in 
the sip request, all working as expected . but if a call is put on hold  after 
resuming the call the party that placed the call on hold can’t hear any audio. 
The other party can hear . do I need to do anything special to handle 
re-invites for calls put on hold?

 

 

Gerry Kernan

 



 

Infinity IT   |   17 The Mall   |   Beacon Court   |   Sandyford   |   Dublin 
D18 E3C8   |   Ireland

Tel:  +353 - (0)1 - 293 0090   |   E-Mail:   
 gerry.ker...@infinityit.ie

 

Managed IT Services   Infinity IT -   
www.infinityit.ie

IP TelephonyAsterisk Consulting –  
 www.asteriskconsulting.com

Contact CentreTotal Interact –   
www.totalinteract.com

 


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org  
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

 

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Bug in evrexec module?

2018-03-23 Thread Daniel-Constantin Mierla
Hello,

can you try with the latest git branch 5.1? I just pushed a patch to fix
it, a wrong function was used to search the route block for the stage of
modparam evaluation.

An workaround could be putting the modparam after the definition of
event_route, but with the pushed patch, it is not needed.

Cheers,
Daniel


On 22.03.18 21:54, Skip Morse wrote:
>
>  
>
> Hi all, anyone try the evrexec module yet? When I try, Kamailio fails
> to start and I’m getting an error that it can't find the event route
> I'm specifying in the modparam, but I started with trying the example
> from the docs. I think it might be a bug
>
> https://www.kamailio.org/docs/modules/5.1.x/modules/evrexec.html
>
>  
>
> Here’s what I tried:
>
> modparam("evrexec", "exec", "name=evrexec:timer;wait=1000;workers=1;")
>
>  
>
> event_route[evrexec:timer] {
>
>   $var(x) = 0;
>
>   while(1) {
>
>     xlog("$$var(x) is $var(x)\n");
>
>     $var(x) = $var(x) + 1;
>
>     sleep("600");
>
>   }
>
> }
>
>  
>
> Here’s the log:
>
> 0(1765) ERROR: evrexec [evrexec_mod.c:232]: evrexec_param(): event
> route not found: evrexec:timer
>
> 0(1765) CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error
> in config file /etc/kamailio/kamailio.cfg, line 136, column 70: Can't
> set module parameter
>
> ERROR: bad config file (1 errors)
>
>  
>
> Version info:
>
> kamailio -V
>
> version: kamailio 5.1.2 (x86_64/linux)
>
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLACKLIST, HAVE_RESOLV_RES
>
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>
> id: unknown
>
> compiled on 06:41:34 Mar  9 2018 with gcc 4.8.5
>
>  
>
> Thoughts?
>
> Thanks,
>
> -Skip
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Bug in evrexec module?

2018-03-23 Thread Skip Morse

Hi all, anyone try the evrexec module yet? When I try, Kamailio fails to start 
and I'm getting an error that it can't find the event route I'm specifying in 
the modparam, but I started with trying the example from the docs. I think it 
might be a bug
https://www.kamailio.org/docs/modules/5.1.x/modules/evrexec.html

Here's what I tried:
modparam("evrexec", "exec", "name=evrexec:timer;wait=1000;workers=1;")

event_route[evrexec:timer] {
  $var(x) = 0;
  while(1) {
xlog("$$var(x) is $var(x)\n");
$var(x) = $var(x) + 1;
sleep("600");
  }
}

Here's the log:
0(1765) ERROR: evrexec [evrexec_mod.c:232]: evrexec_param(): event route not 
found: evrexec:timer
0(1765) CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error in config 
file /etc/kamailio/kamailio.cfg, line 136, column 70: Can't set module parameter
ERROR: bad config file (1 errors)

Version info:
kamailio -V
version: kamailio 5.1.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, 
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, 
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 06:41:34 Mar  9 2018 with gcc 4.8.5

Thoughts?
Thanks,
-Skip
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users