[SR-Users] What is the best SIP trunk authentication strategy

2015-03-19 Thread Juha Heinanen
i suggest you use tls common names to identify servers behind your
trunks,

-- 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


[SR-Users] missing BYE when 2 redundant kamailio servers share the same database

2015-03-19 Thread Ding Ma
Hi, all



I'm trying to set up 2 kamailio servers for active-active redundancy. The
two kamailio severs share the the same database with db_mode=3, and no
registration replication. Use pjsua2 as SIP client for testing. The test
setup is as follows:



kamailio server 1(k1): 10.0.1.30:5061

kamailio server 2(k2): 10.0.1.32:5061

sip client c1: sip:16317@10.0.1.30, client ip: 10.0.1.254

sip client c2: sip:72316@10.0.1.30, client ip: 10.0.1.254



c1 is registered with k1.

c2 is registered with k2.



When c1 calls c2, the call flow is as follows:

INVITE:

c1--k1--k2--c2

200 OK:

c1--k1--k2--c2



So far, the INVITE works. c1 and c2 can establish a call. However, when c2
hangs up and sends BYE, the BYE is forwarded all the way to k1, and then k1
gives a 500 server error.

The log on k1 seems to indicate k1 was attempting to create a TLS
connection to itself instead of using the existing TLS connection to c1 to
forward the BYE.



BYE:

c1   X   k1--k2--c2

   |

   |---Connection refused/500



Here is the kamailio log on k1:

Mar 16 10:34:21 kamailio.sip.com /usr/sbin/kamailio[13396]: ERROR: core
[tcp_main.c:2740]: tcpconn_1st_send(): connect 10.0.1.30:55999 failed (RST)
Connection refused

Mar 16 10:34:21 kamailio.sip.com /usr/sbin/kamailio[13396]: ERROR: core
[tcp_main.c:2750]: tcpconn_1st_send(): 10.0.1.30:55999: connect  send  for
0x7fc96a68a1a0 failed: Connection refused (111)



This is the routing logic for BYE in kamailio.cfg:

if (loose_route()) {

route(DLGURI);

if (is_method(BYE)) {

xlog(L_DBG, =BYE $ru from $fu
$si:$sp to $du=\n);

dlg_manage();

setflag(FLT_ACC); # do accounting ...

setflag(FLT_ACCFAILED); # ... even if the
transaction fails

}

else if ( is_method(ACK) ) {

# ACK is forwarded statelessy

route(NATMANAGE);

}

else if ( is_method(NOTIFY) ) {

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

record_route();

}

route(RELAY);

exit;

} else {..



If I add location based routing for BYE from peer kamailio, then the BYE
seems to be forwarded correctly:

if (loose_route()) {

route(DLGURI);

if (is_method(BYE)) {

xlog(L_DBG, =BYE $ru from $fu
$si:$sp to $du=\n);

dlg_manage();

setflag(FLT_ACC); # do accounting ...

setflag(FLT_ACCFAILED); # ... even if the
transaction fails

# If BYE coming from Kamailio  peer, route
BYE by location

$var(peerlist)=$sel(cfg_get.trusted.peers);

$var(i) = 0;


while($var(i)$(var(peerlist){param.count})) {

xlog(L_DBG,
=$(var(peerlist){param.count})=$(var(peerlist){param.valueat,$var(i)})=\n);


if(src_ip==$(var(peerlist){param.valueat,$var(i)})) {

lookup(location);

xlog(L_DBG, =BYE
from $fu $si:$sp to $du=\n);

break;

}

$var(i) = $var(i) + 1;

}

}

else if ( is_method(ACK) ) {

# ACK is forwarded statelessy

route(NATMANAGE);

}

else if ( is_method(NOTIFY) ) {

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

record_route();

}

route(RELAY);

exit;

} else {..



My first question is why k1 loose_route sends the BYE to itself instead of
the client. Is this a bug?

My next question is whether the above location routing for BYE from peer
kamailio a good/safe approach.

The SIP traces are enclosed.



Thanks


pjsua2_missingbye.log
Description: Binary data


pjsua2_good.log
Description: Binary 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] Timeout after t_suspend and failure route

2015-03-19 Thread Daniel-Constantin Mierla
Have you tried forwarding after the timeout of suspended transaction
occurred? What kind of operations you had in the failure route. Trying
to see what scenarios were covered...

Cheers,
Daniel

On 18/03/15 21:13, Mickael Marrache wrote:

 Thanks Daniel!

  

 Your patch seems to have fixed it…

  

 Mickael

  

 *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
 *Sent:* Wednesday, March 18, 2015 8:54 PM
 *To:* Mickael Marrache; Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Timeout after t_suspend and failure route

  

 Can you try with the patch from the next commit?

 -
 https://github.com/kamailio/kamailio/commit/6484b199fb48acc2c55f318812f2c968b845ca80

 Cheers,
 Daniel

 On 18/03/15 17:09, Mickael Marrache wrote:

 Confirmed.

  

 Thanks,

 Mickael


 On 18 במרץ 2015, at 18:06, Daniel-Constantin Mierla
 mico...@gmail.com mailto:mico...@gmail.com wrote:

 Hello,

 can't check the code right now, but to confirm, if you use
 t_on_failure() before suspending the transaction, isn't executed?

 Cheers,
 Daniel

 On 18/03/15 15:56, Mickael Marrache wrote:

 Hi,

  

 When receiving an INVITE, I arm a failure route and set
 the fr_timer to 30 seconds. After the fr_timer expires, I
 need to do some operations however I see the failure route
 is not executed.

  

 I guess it is related to the fact the INVITE has not been
 forwarded?

  

 If yes, how can I execute code when a transaction times
 out after calling t_suspend?

  

 Thanks,

 Mickael




 ___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
 mailing list

 sr-users@lists.sip-router.org 
 mailto:sr-users@lists.sip-router.org

 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 -- 

 Daniel-Constantin Mierla

 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda

 Kamailio World Conference, May 27-29, 2015

 Berlin, Germany - http://www.kamailioworld.com

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



 -- 
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
I already looked at your presentation, the PUSH is send synchronously.

 

What I'm trying to achieve is sending the PUSH asynchronously. So, when I
receive an incoming call and the callee has no registration, I would like to
suspend the transaction and then delegate PUSH sending to another process.

 

In your presentation, I see the following:

 

route[PUSHASYNC] {

if (!is_method(INVITE))

return;

if(registered(location))

return;

route(SENDPUSH);

if(!t_suspend()) {

xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

send_reply(501, Unknown destination);

exit;

}

xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

$sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

xdbg(htale key value [$sht(vtp=join::$rU)]\n);

exit;

}

 

The route block is not execute asynchronously since it is called by the
calling block using regular way (i.e. route(PUSHASYNC)). Therefore, all
these operations are executed by the same process which is a worker process.
I would like to delegate execution of all the route block to a separate
process (at least execution of the SENDPUSH route block).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, March 19, 2015 10:04 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.
Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael






___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Sending PUSH notification asynchronously

2015-03-19 Thread Daniel-Constantin Mierla
You can define as many rtimer processes as you want and tell them to
execute same route block, consuming from the same queue.

Cheers,
Daniel

On 19/03/15 09:39, Mickael Marrache wrote:

 Thanks, it helps.

  

 However, if I create a timer and specify mode to 1, I will only have
 one extra process to send all PUSH notifications. Therefore, at some
 point, this extra process will be continuously busy handling messages
 in the queue, and the queue will grow over and over.

  

 Is it possible to have a pool of timers fetching from the same message
 queue?

  

 *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
 *Sent:* Thursday, March 19, 2015 10:28 AM
 *To:* Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
 *Subject:* Re: [SR-Users] Sending PUSH notification asynchronously

  

 You can delegate to send of the push to a rtimer process using mqueue
 -- see same presentation, the section about tweeting.

 Cheers,
 Daniel

 On 19/03/15 09:14, Mickael Marrache wrote:

 I already looked at your presentation, the PUSH is send synchronously.

  

 What I'm trying to achieve is sending the PUSH asynchronously. So,
 when I receive an incoming call and the callee has no
 registration, I would like to suspend the transaction and then
 delegate PUSH sending to another process.

  

 In your presentation, I see the following:

  

 route[PUSHASYNC] {

 if (!is_method(INVITE))

 return;

 if(registered(location))

 return;

 route(SENDPUSH);

 if(!t_suspend()) {

 xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

 send_reply(501, Unknown destination);

 exit;

 }

 xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU =
 $rU\n);

 $sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

 xdbg(htale key value [$sht(vtp=join::$rU)]\n);

 exit;

 }

  

 The route block is not execute asynchronously since it is called
 by the calling block using regular way (i.e. route(PUSHASYNC)).
 Therefore, all these operations are executed by the same process
 which is a worker process. I would like to delegate execution of
 all the route block to a separate process (at least execution of
 the SENDPUSH route block).

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *Daniel-Constantin Mierla
 *Sent:* Thursday, March 19, 2015 10:04 AM
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Sending PUSH notification asynchronously

  

 Hello,

 don't do explicit t_suspend() if you are calling the
 async_task_route() because it is done internally.

 I presented a way for async push notifications during the Kamailio
 World Conference 2014, see:

   -
 
 http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.Mierla-Kamailio.cfg-Async.pdf

 A video should be also on youtube.

 Cheers,
 Daniel

 On 19/03/15 08:49, Mickael Marrache wrote:

 Hi,

  

 I'm trying to add PUSH support to my system using Kamailio.

  

 When a call is received and the callee has no active
 registration, a PUSH is sent to the callee endpoint. In order
 to send this PUSH, my proxy sends an HTTP requests to another
 server that will send the PUSH.

  

 So, my route block is as follows:

  

 route[PUSH] {

 #Send PUSH notification using a custom module I wrote

  

 #Suspend transaction execution.

 t_on_failure(MANAGE_FAILURE);

 if(!t_suspend()) {

 send_reply(503, Service Unavailable);

 exit;

 }

  

 $sht(push=join::$rU) =  + $T(id_index) + : +
 $T(id_label);

 exit;

 }

  

 I would like to execute this route block asynchronously (i.e.
 in a separate process).

  

 I tried using the async_task_route command, and I can see the
 route block is execute in a separate process, however some
 stuffs are broken (e.g. transaction timeout, failure route).
 So, I thought it may be related to the fact asynchronous
 execution is implemented using t_suspend/t_continue and in
 this case, t_suspend/t_continue would be called twice.

  

 The important point is to make the interaction with the PUSH
 server asynchronous.

  

 Any idea?

  

 Thanks,

 Mickael





 ___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list

 sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org

 

Re: [SR-Users] Timeout after t_suspend and failure route

2015-03-19 Thread Daniel-Constantin Mierla
OK, if you do more advanced scenarios, with forwarding, let me know the
results. If no issues, the fix can be considered for backporting.

Cheers,
Daniel

On 19/03/15 09:06, Mickael Marrache wrote:

 No, I didn't try forwarding after transaction timeout because no
 voicemail server is configured.

  

 failure_route[MANAGE_FAILURE] {

 route(NATMANAGE);

  

 if (t_is_canceled()) {

 exit;

 }

  

 if (t_check_status(3[0-9][0-9])) {

 t_reply(404, Not found);

 exit;

 }

  

 if (t_check_status(486|408)) {

 $du = $null;

 route(TOVOICEMAIL);

 exit;

 }

 }

  

 Mickael

  

 *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
 *Sent:* Thursday, March 19, 2015 10:00 AM
 *To:* Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
 *Subject:* Re: [SR-Users] Timeout after t_suspend and failure route

  

 Have you tried forwarding after the timeout of suspended transaction
 occurred? What kind of operations you had in the failure route. Trying
 to see what scenarios were covered...

 Cheers,
 Daniel

 On 18/03/15 21:13, Mickael Marrache wrote:

 Thanks Daniel!

  

 Your patch seems to have fixed it…

  

 Mickael

  

 *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
 *Sent:* Wednesday, March 18, 2015 8:54 PM
 *To:* Mickael Marrache; Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Timeout after t_suspend and failure route

  

 Can you try with the patch from the next commit?

 -
 
 https://github.com/kamailio/kamailio/commit/6484b199fb48acc2c55f318812f2c968b845ca80

 Cheers,
 Daniel

 On 18/03/15 17:09, Mickael Marrache wrote:

 Confirmed.

  

 Thanks,

 Mickael


 On 18 במרץ 2015, at 18:06, Daniel-Constantin Mierla
 mico...@gmail.com mailto:mico...@gmail.com wrote:

 Hello,

 can't check the code right now, but to confirm, if you use
 t_on_failure() before suspending the transaction, isn't
 executed?

 Cheers,
 Daniel

 On 18/03/15 15:56, Mickael Marrache wrote:

 Hi,

  

 When receiving an INVITE, I arm a failure route and
 set the fr_timer to 30 seconds. After the fr_timer
 expires, I need to do some operations however I see
 the failure route is not executed.

  

 I guess it is related to the fact the INVITE has not
 been forwarded?

  

 If yes, how can I execute code when a transaction
 times out after calling t_suspend?

  

 Thanks,

 Mickael





 ___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
 mailing list

 sr-users@lists.sip-router.org 
 mailto:sr-users@lists.sip-router.org

 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




 -- 

 Daniel-Constantin Mierla

 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda

 Kamailio World Conference, May 27-29, 2015

 Berlin, Germany - http://www.kamailioworld.com

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




 -- 

 Daniel-Constantin Mierla

 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda

 Kamailio World Conference, May 27-29, 2015

 Berlin, Germany - http://www.kamailioworld.com



 -- 
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Kamalio call issue

2015-03-19 Thread Daniel-Constantin Mierla
Hello,

look at the sip traffic on server to see if it is forwarded or not, and
if yes, where. You can use ngrep, like:

ngrep -d any -qt -W byline sip port 5060

Also, check your syslog file to see if any error message is printed there.

It is not possible to guess what a fix would be if the real issue is not
known.

Cheers,
Daniel


On 19/03/15 09:59, Yogendra Gupta wrote:

 Hello,

 We have setup kamalio at server and it is working at some DNS with
 call/chat.

 At some IP chat is working but when we call then it is not working. At
 some DNS(Net IP) it is working .

 What can be problem at server?

  

 Following is login for SIP test user:

  

 tester1@23.253.110.48 

 123456

  

 Host IP : 23.253.110.48 

  

 I have attached mu kamalio config file.

  

 Let me know what we need to change at config file or server

  

 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

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Sending PUSH notification asynchronously

2015-03-19 Thread Daniel-Constantin Mierla
Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

 Hi,

  

 I'm trying to add PUSH support to my system using Kamailio.

  

 When a call is received and the callee has no active registration, a
 PUSH is sent to the callee endpoint. In order to send this PUSH, my
 proxy sends an HTTP requests to another server that will send the PUSH.

  

 So, my route block is as follows:

  

 route[PUSH] {

 #Send PUSH notification using a custom module I wrote

  

 #Suspend transaction execution.

 t_on_failure(MANAGE_FAILURE);

 if(!t_suspend()) {

 send_reply(503, Service Unavailable);

 exit;

 }

  

 $sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

 exit;

 }

  

 I would like to execute this route block asynchronously (i.e. in a
 separate process).

  

 I tried using the async_task_route command, and I can see the route
 block is execute in a separate process, however some stuffs are broken
 (e.g. transaction timeout, failure route). So, I thought it may be
 related to the fact asynchronous execution is implemented using
 t_suspend/t_continue and in this case, t_suspend/t_continue would be
 called twice.

  

 The important point is to make the interaction with the PUSH server
 asynchronous.

  

 Any idea?

  

 Thanks,

 Mickael



 ___
 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

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
Thanks, it helps.

 

However, if I create a timer and specify mode to 1, I will only have one
extra process to send all PUSH notifications. Therefore, at some point, this
extra process will be continuously busy handling messages in the queue, and
the queue will grow over and over.

 

Is it possible to have a pool of timers fetching from the same message
queue?

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 10:28 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

You can delegate to send of the push to a rtimer process using mqueue -- see
same presentation, the section about tweeting.

Cheers,
Daniel

On 19/03/15 09:14, Mickael Marrache wrote:

I already looked at your presentation, the PUSH is send synchronously.

 

What I'm trying to achieve is sending the PUSH asynchronously. So, when I
receive an incoming call and the callee has no registration, I would like to
suspend the transaction and then delegate PUSH sending to another process.

 

In your presentation, I see the following:

 

route[PUSHASYNC] {

if (!is_method(INVITE))

return;

if(registered(location))

return;

route(SENDPUSH);

if(!t_suspend()) {

xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

send_reply(501, Unknown destination);

exit;

}

xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

$sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

xdbg(htale key value [$sht(vtp=join::$rU)]\n);

exit;

}

 

The route block is not execute asynchronously since it is called by the
calling block using regular way (i.e. route(PUSHASYNC)). Therefore, all
these operations are executed by the same process which is a worker process.
I would like to delegate execution of all the route block to a separate
process (at least execution of the SENDPUSH route block).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, March 19, 2015 10:04 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.
Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael







___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Sending PUSH notification asynchronously

2015-03-19 Thread Daniel-Constantin Mierla
You can delegate to send of the push to a rtimer process using mqueue --
see same presentation, the section about tweeting.

Cheers,
Daniel

On 19/03/15 09:14, Mickael Marrache wrote:

 I already looked at your presentation, the PUSH is send synchronously.

  

 What I'm trying to achieve is sending the PUSH asynchronously. So,
 when I receive an incoming call and the callee has no registration, I
 would like to suspend the transaction and then delegate PUSH sending
 to another process.

  

 In your presentation, I see the following:

  

 route[PUSHASYNC] {

 if (!is_method(INVITE))

 return;

 if(registered(location))

 return;

 route(SENDPUSH);

 if(!t_suspend()) {

 xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

 send_reply(501, Unknown destination);

 exit;

 }

 xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

 $sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

 xdbg(htale key value [$sht(vtp=join::$rU)]\n);

 exit;

 }

  

 The route block is not execute asynchronously since it is called by
 the calling block using regular way (i.e. route(PUSHASYNC)).
 Therefore, all these operations are executed by the same process which
 is a worker process. I would like to delegate execution of all the
 route block to a separate process (at least execution of the SENDPUSH
 route block).

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *Daniel-Constantin Mierla
 *Sent:* Thursday, March 19, 2015 10:04 AM
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Sending PUSH notification asynchronously

  

 Hello,

 don't do explicit t_suspend() if you are calling the
 async_task_route() because it is done internally.

 I presented a way for async push notifications during the Kamailio
 World Conference 2014, see:

   -
 http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.Mierla-Kamailio.cfg-Async.pdf

 A video should be also on youtube.

 Cheers,
 Daniel

 On 19/03/15 08:49, Mickael Marrache wrote:

 Hi,

  

 I'm trying to add PUSH support to my system using Kamailio.

  

 When a call is received and the callee has no active registration,
 a PUSH is sent to the callee endpoint. In order to send this PUSH,
 my proxy sends an HTTP requests to another server that will send
 the PUSH.

  

 So, my route block is as follows:

  

 route[PUSH] {

 #Send PUSH notification using a custom module I wrote

  

 #Suspend transaction execution.

 t_on_failure(MANAGE_FAILURE);

 if(!t_suspend()) {

 send_reply(503, Service Unavailable);

 exit;

 }

  

 $sht(push=join::$rU) =  + $T(id_index) + : +
 $T(id_label);

 exit;

 }

  

 I would like to execute this route block asynchronously (i.e. in a
 separate process).

  

 I tried using the async_task_route command, and I can see the
 route block is execute in a separate process, however some stuffs
 are broken (e.g. transaction timeout, failure route). So, I
 thought it may be related to the fact asynchronous execution is
 implemented using t_suspend/t_continue and in this case,
 t_suspend/t_continue would be called twice.

  

 The important point is to make the interaction with the PUSH
 server asynchronous.

  

 Any idea?

  

 Thanks,

 Mickael




 ___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

 sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org

 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 -- 
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


[SR-Users] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael

___
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] Timeout after t_suspend and failure route

2015-03-19 Thread Mickael Marrache
No, I didn't try forwarding after transaction timeout because no voicemail 
server is configured.

 

failure_route[MANAGE_FAILURE] {

route(NATMANAGE);

 

if (t_is_canceled()) {

exit;

}

 

if (t_check_status(3[0-9][0-9])) {

t_reply(404, Not found);

exit;

}

 

if (t_check_status(486|408)) {

$du = $null;

route(TOVOICEMAIL);

exit;

}

}

 

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 10:00 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Timeout after t_suspend and failure route

 

Have you tried forwarding after the timeout of suspended transaction occurred? 
What kind of operations you had in the failure route. Trying to see what 
scenarios were covered...

Cheers,
Daniel 

On 18/03/15 21:13, Mickael Marrache wrote:

Thanks Daniel!

 

Your patch seems to have fixed it…

 

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Wednesday, March 18, 2015 8:54 PM
To: Mickael Marrache; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Timeout after t_suspend and failure route

 

Can you try with the patch from the next commit?

- 
https://github.com/kamailio/kamailio/commit/6484b199fb48acc2c55f318812f2c968b845ca80

Cheers,
Daniel

On 18/03/15 17:09, Mickael Marrache wrote:

Confirmed.

 

Thanks,

Mickael


On 18 áîøõ 2015, at 18:06, Daniel-Constantin Mierla mico...@gmail.com wrote:

Hello,

can't check the code right now, but to confirm, if you use t_on_failure() 
before suspending the transaction, isn't executed? 

Cheers,
Daniel

On 18/03/15 15:56, Mickael Marrache wrote:

Hi,

 

When receiving an INVITE, I arm a failure route and set the fr_timer to 30 
seconds. After the fr_timer expires, I need to do some operations however I see 
the failure route is not executed.

 

I guess it is related to the fact the INVITE has not been forwarded?

 

If yes, how can I execute code when a transaction times out after calling 
t_suspend?

 

Thanks,

Mickael 







___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  - 
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  - 
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


[SR-Users] Kamalio call issue

2015-03-19 Thread Yogendra Gupta
Hello,

We have setup kamalio at server and it is working at some DNS with
call/chat.

At some IP chat is working but when we call then it is not working. At some
DNS(Net IP) it is working .

What can be problem at server?

 

Following is login for SIP test user:

 

tester1@23.253.110.48  

123456

 

Host IP : 23.253.110.48  

 

I have attached mu kamalio config file.

 

Let me know what we need to change at config file or server

 

Thanks

 



kamailio.cfg
Description: Binary 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] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
Thanks, it works great!

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 11:56 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

You can define as many rtimer processes as you want and tell them to execute
same route block, consuming from the same queue.

Cheers,
Daniel

On 19/03/15 09:39, Mickael Marrache wrote:

Thanks, it helps.

 

However, if I create a timer and specify mode to 1, I will only have one
extra process to send all PUSH notifications. Therefore, at some point, this
extra process will be continuously busy handling messages in the queue, and
the queue will grow over and over.

 

Is it possible to have a pool of timers fetching from the same message
queue?

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 10:28 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

You can delegate to send of the push to a rtimer process using mqueue -- see
same presentation, the section about tweeting.

Cheers,
Daniel

On 19/03/15 09:14, Mickael Marrache wrote:

I already looked at your presentation, the PUSH is send synchronously.

 

What I'm trying to achieve is sending the PUSH asynchronously. So, when I
receive an incoming call and the callee has no registration, I would like to
suspend the transaction and then delegate PUSH sending to another process.

 

In your presentation, I see the following:

 

route[PUSHASYNC] {

if (!is_method(INVITE))

return;

if(registered(location))

return;

route(SENDPUSH);

if(!t_suspend()) {

xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

send_reply(501, Unknown destination);

exit;

}

xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

$sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

xdbg(htale key value [$sht(vtp=join::$rU)]\n);

exit;

}

 

The route block is not execute asynchronously since it is called by the
calling block using regular way (i.e. route(PUSHASYNC)). Therefore, all
these operations are executed by the same process which is a worker process.
I would like to delegate execution of all the route block to a separate
process (at least execution of the SENDPUSH route block).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, March 19, 2015 10:04 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.
Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael








___
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







-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin 

Re: [SR-Users] Kamalio call issue

2015-03-19 Thread Daniel-Constantin Mierla
Hello,

OPTIONS is not the request for initiating the calls, that is INVITE. You
would need to know SIP a bit in order to be able to understand and
configure Kamailio.

If you don't see any INVITE on kamailo server via ngrep when you call,
then the issue is on client side or there is a firewall dropping it.

Cheers,
Daniel

On 19/03/15 11:39, Yogendra Gupta wrote:

 Hello,

 Thanks for nice support.

 When we call to test2 user and run this command at server

 ngrep -d any -qt -W byline sip port 5060

  

 then we found following response at server:


-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] Kamalio call issue

2015-03-19 Thread Yogendra Gupta
Hello,

 

When I am calling with other SIP user then I did not see any INVITE . that
have issue with DNS.

 

If we call with different DNS that is working fine then we see INVITE option
like

 

U 2015/03/19 12:39:01.744616 117.215.244.16:63380 - 23.253.110.48:5060

SIP/2.0 180 Ringing.

CSeq: 2 INVITE.

Call-ID: d83c4bc1e75e54df5ebd06b74f9089ef@0:0:0:0:0:0:0:0.

From: tester1 sip:tester1@23.253.110.48;tag=ef809ce0.

To: sip:tester2@23.253.110.48;tag=23a5eaea.

Via: SIP/2.0/UDP
23.253.110.48;branch=z9hG4bKa1a3.21d8ef51bac2678fc26eca5975ae7b00.0,SIP/2.0/
UDP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-6f1017bcd9e693a4959717c9eabdc26e.

Record-Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester2
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48
.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Length: 0.

.

 

 

U 2015/03/19 12:39:01.744870 23.253.110.48:5060 - 115.252.208.170:62554

SIP/2.0 180 Ringing.

CSeq: 2 INVITE.

Call-ID: d83c4bc1e75e54df5ebd06b74f9089ef@0:0:0:0:0:0:0:0.

From: tester1 sip:tester1@23.253.110.48;tag=ef809ce0.

To: sip:tester2@23.253.110.48;tag=23a5eaea.

Via: SIP/2.0/UDP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-6f1017bcd9e693a4959717c9eabdc26e.

Record-Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester2
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48;
alias=117.215.244.16~63380~1.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Length: 0.

 

Can you tell me what can be issue of firewall dropping?

 

When I checked at server firewall:

 

sudo ufw status

Status: inactive

 

Let me know what can be other issue for it..

 

Thanks

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 5:50 PM
To: Yogendra Gupta; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Kamalio call issue

 

Hello,

OPTIONS is not the request for initiating the calls, that is INVITE. You
would need to know SIP a bit in order to be able to understand and configure
Kamailio.

If you don't see any INVITE on kamailo server via ngrep when you call, then
the issue is on client side or there is a firewall dropping it.

Cheers,
Daniel

On 19/03/15 11:39, Yogendra Gupta wrote:

Hello,

Thanks for nice support.

When we call to test2 user and run this command at server

ngrep -d any -qt -W byline sip port 5060

 

then we found following response at server:





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


Re: [SR-Users] What is the best SIP trunk authentication strategy

2015-03-19 Thread canuck15

Please keep in mind that I have no control over SIP trunk providers.

The vast majority do not allow me to do any of these things as far as I 
know.  This is something that needs to be solved in Kamailio with 
standard user/pass/realm authentication.  TLS is not an option for me.


On 3/18/2015 11:36 PM, Juha Heinanen wrote:

i suggest you use tls common names to identify servers behind your
trunks,

-- 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



___
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] RTPProxy issue?

2015-03-19 Thread Igor Potjevlesch
Hello Maxim,

 

Just to let you know that I quick-fixed this issue by increasing the value 
compared into ts_less in rtp.c. Instead of the bitwise calculation, I set the 
maximum value of an unsigned integer.

 

I will schedule to test, qualify and replace all my instances with the new 
version. I will let you know if I reproduce the issue with the new version.

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de 
Maxim Sobolev
Envoyé : lundi 9 mars 2015 19:09
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Igor, yes, I'd say give 2.0 a try and see if the problem is still there. There 
were tons of changes, particularly in the rtp_resize subsystem.

Thanks!

 

On Sun, Mar 8, 2015 at 7:31 AM, Igor Potjevlesch igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com  wrote:

Hello Maxim,

 

I'm running legacy 1.2 or 1.4, not sure.

I see in the latest code that the function is still there. Do you suggest to 
upgrade or there's a patch to make?

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org 
mailto:sr-users-boun...@lists.sip-router.org ] De la part de Maxim Sobolev
Envoyé : samedi 7 mars 2015 09:14


À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Ah, ok, I see now. I did not realize you guys are using resizer. Which version 
of the software are you actually using? I.e. is it latest rel_2_0 / master, or 
some legacy 1.x code? We've done quite some revamping down there, so that it 
needs to be checked against the very latest code to make sure. Let us know.

Thanks!

On Mar 6, 2015 12:31 AM, Igor Potjevlesch igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com  wrote:

Hi Maxim,

 

Hard to do because it's in production.

I have a serious finding since yesterday on how this happened. 

 

My understanding is that the function ts_less returns FALSE into 
rtp_resizer.c because the timestamp between the two packets is  (1  31) 
[for example: 3740425320].

That's result in a drop of any following packets as I can see it into a capture.

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org 
mailto:sr-users-boun...@lists.sip-router.org ] De la part de Maxim Sobolev
Envoyé : vendredi 6 mars 2015 07:44
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Hi Igor, that's bit strange, since the rtpproxy is not checking any of the rtp 
flags including marker bit. It would help if you can post a tcpdump capture of 
the streams in question along with the log output of the rtpproxy running at 
the dbug level. Thanks!

On Mar 5, 2015 5:54 AM, Igor Potjevlesch igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com  wrote:

I reviewed again a call trace and I can be more precise: a RTP packet comes 
with a new SSRC and the Marker bit set to True. This packet is properly 
forwarded.

 

Then, just after this packet, another RTP packet containing a new SSRC with the 
huge timestamp and the Marker bit set to True is coming from the UA. 

The RTPProxy stops forward since this packet.

 

Regards,

 

Igor.

 

De : Igor Potjevlesch [mailto:igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com ] 
Envoyé : jeudi 5 mars 2015 11:34
À : mico...@gmail.com mailto:mico...@gmail.com ; 'Kamailio (SER) - Users 
Mailing List'
Objet : RE: [SR-Users] RTPProxy issue?

 

Hello,

 

Thank you.

 

Just to let you know, the RTPProxy is running in bridging mode.

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de 
Daniel-Constantin Mierla
Envoyé : jeudi 5 mars 2015 09:33
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Hello,

maybe Maxim (cc-ed) will be able to provide more insights.

Cheers,
DAniel

On 04/03/15 16:59, Igor Potjevlesch wrote:

Hello,

 

I discovered an issue related to the handling of timestamp and/or Marker 
bit with rtpproxy (I use the latest Extension 20081224).

 

The call-flow is the following: one UA places a call to A and put this call on 
hold. Then, the same UA call another number B. Individual streams are ok.

When the UA tries to transfer A with B, the RTPProxy receive a RTP packet with 
a huge timestamp and the Marker bit set to True.

 

Just after this RTP packet, RTPProxy stop forward the RTP packets from A to B. 
B to C is still working.

 

Anyone have an idea?

Regards,

 

Igor.

 

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

 

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com


___
SIP Express Router 

Re: [SR-Users] Kamalio call issue

2015-03-19 Thread Yogendra Gupta
We got following response:

 

U 2015/03/19 13:00:00.87 23.253.110.48:5060 - 115.252.208.170:62554

SIP/2.0 180 Ringing.

CSeq: 2 INVITE.

Call-ID: 09b36cf7988131e179e345af90922a4c@0:0:0:0:0:0:0:0.

From: tester1 sip:tester1@23.253.110.48;tag=aca2e78b.

To: sip:tester2@23.253.110.48;tag=53a85e1d.

Via: SIP/2.0/UDP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-bbb85207996f538b1ac664a6a065d1fc.

Record-Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester2
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48;
alias=117.215.244.16~63380~1.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Length: 0.

.

 

 

U 2015/03/19 13:00:01.829846 117.215.244.16:63380 - 23.253.110.48:5060

SIP/2.0 200 OK.

CSeq: 2 INVITE.

Call-ID: 09b36cf7988131e179e345af90922a4c@0:0:0:0:0:0:0:0.

From: tester1 sip:tester1@23.253.110.48;tag=aca2e78b.

To: sip:tester2@23.253.110.48;tag=53a85e1d.

Via: SIP/2.0/UDP
23.253.110.48;branch=z9hG4bKf5a.b579cd6dc493912136143f67112a87f5.0,SIP/2.0/U
DP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-bbb85207996f538b1ac664a6a065d1fc.

Record-Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester2
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48
.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Type: application/sdp.

Content-Length: 430.

.

v=0.

o=tester2-jitsi.org 0 0 IN IP4 192.168.0.100.

s=-.

c=IN IP4 192.168.0.100.

t=0 0.

m=audio 0 RTP/AVP 96 97 98 9 100 102 0 8 103 3 104 4 101.

m=video 5061 RTP/AVP 105 99.

a=inactive.

a=rtpmap:105 H264/9.

a=fmtp:105 profile-level-id=4DE01f;packetization-mode=1.

a=imageattr:105 send * recv [x=[0-1600],y=[0-900]].

a=rtpmap:99 H264/9.

a=fmtp:99 profile-level-id=4DE01f.

a=imageattr:99 send * recv [x=[0-1600],y=[0-900]].

 

 

U 2015/03/19 13:00:01.851782 23.253.110.48:5060 - 115.252.208.170:62554

SIP/2.0 200 OK.

CSeq: 2 INVITE.

Call-ID: 09b36cf7988131e179e345af90922a4c@0:0:0:0:0:0:0:0.

From: tester1 sip:tester1@23.253.110.48;tag=aca2e78b.

To: sip:tester2@23.253.110.48;tag=53a85e1d.

Via: SIP/2.0/UDP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-bbb85207996f538b1ac664a6a065d1fc.

Record-Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester2
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48;
alias=117.215.244.16~63380~1.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Type: application/sdp.

Content-Length: 449.

.

v=0.

o=tester2-jitsi.org 0 0 IN IP4 23.253.110.48.

s=-.

c=IN IP4 23.253.110.48.

t=0 0.

m=audio 0 RTP/AVP 96 97 98 9 100 102 0 8 103 3 104 4 101.

m=video 24322 RTP/AVP 105 99.

a=inactive.

a=rtpmap:105 H264/9.

a=fmtp:105 profile-level-id=4DE01f;packetization-mode=1.

a=imageattr:105 send * recv [x=[0-1600],y=[0-900]].

a=rtpmap:99 H264/9.

a=fmtp:99 profile-level-id=4DE01f.

a=imageattr:99 send * recv [x=[0-1600],y=[0-900]].

a=nortpproxy:yes.

 

 

U 2015/03/19 13:00:02.141163 115.252.208.170:62554 - 23.253.110.48:5060

ACK
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48;a
lias=117.215.244.16~63380~1 SIP/2.0.

Call-ID: 09b36cf7988131e179e345af90922a4c@0:0:0:0:0:0:0:0.

CSeq: 2 ACK.

Via: SIP/2.0/UDP
192.168.0.217:5060;branch=z9hG4bK-343938-155090537c14abf0495a2fba45f5683a.

From: tester1 sip:tester1@23.253.110.48;tag=aca2e78b.

To: tester2 sip:tester2@23.253.110.48;tag=53a85e1d.

Max-Forwards: 70.

Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester1
sip:tester1@192.168.0.217:5060;transport=udp;registering_acc=23_253_110_48
.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Length: 0.

.

 

 

U 2015/03/19 13:00:02.141537 23.253.110.48:5060 - 117.215.244.16:63380

ACK
sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48
SIP/2.0.

Call-ID: 09b36cf7988131e179e345af90922a4c@0:0:0:0:0:0:0:0.

CSeq: 2 ACK.

Via: SIP/2.0/UDP
23.253.110.48;branch=z9hG4bKf5a.1f70aef5a57bc3412e94ec02b865d6b1.0.

Via: SIP/2.0/UDP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-155090537c14abf0495a2fba45f5683a.

From: tester1 sip:tester1@23.253.110.48;tag=aca2e78b.

To: tester2 sip:tester2@23.253.110.48;tag=53a85e1d.

Max-Forwards: 69.

Contact: tester1
sip:tester1@192.168.0.217:5060;transport=udp;registering_acc=23_253_110_48;
alias=115.252.208.170~62554~1.

User-Agent: Jitsi2.6.5390Windows 7.

Content-Length: 0.

.

 

 

U 2015/03/19 13:00:02.345295 117.215.244.16:63380 - 23.253.110.48:5060

SIP/2.0 200 OK.

CSeq: 2 INVITE.

Call-ID: 09b36cf7988131e179e345af90922a4c@0:0:0:0:0:0:0:0.

From: tester1 sip:tester1@23.253.110.48;tag=aca2e78b.

To: sip:tester2@23.253.110.48;tag=53a85e1d.

Via: SIP/2.0/UDP
23.253.110.48;branch=z9hG4bKf5a.b579cd6dc493912136143f67112a87f5.0,SIP/2.0/U
DP
192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-34393
8-bbb85207996f538b1ac664a6a065d1fc.

Record-Route: sip:23.253.110.48;lr=on;nat=yes.

Contact: tester2

Re: [SR-Users] What is the best SIP trunk authentication strategy

2015-03-19 Thread Juha Heinanen
canuck15 writes:

 The vast majority do not allow me to do any of these things as far as I 
 know.  This is something that needs to be solved in Kamailio with 
 standard user/pass/realm authentication.  TLS is not an option for me.

then the vast majority don't care a bit about security, which is very
bad for your customers.

-- 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] What is the best SIP trunk authentication strategy

2015-03-19 Thread canuck15
It looks like auth_check() will work. It seems intelligent enough to 
scan all instances of the same domain as long as the username is unique 
so that should get things working.


The problem here is that there is a fundamental difference between 
Asterisk and Kamailio authentication.  Asterisk authentication works 
with FQDN or IP.  However, Kamailio is not designed to authenticate 
anything with FQDN unless it is also a realm and identified as such by 
the UA.  I believe that is the main issue here.  SIP trunks typically do 
not use or care about realm.  So after the initial invite response from 
Kamailio the SIP trunk provider typically responds with the IP address 
as the realm.


It does almost seem like there should be a special module to deal with 
this sort of thing.  None of the existing modules seem to be the right fit.



On 3/18/2015 9:03 AM, Daniel Tryba wrote:

On Wednesday 18 March 2015 08:32:10 canuck15 wrote:

I can run a cron job every hour to DNS lookup and update the ip_addr
table as needed so I think this is a satisfactory solution for IP
authentication.

Is there a mechanism to identify all originating servers for a
hostname/domain? If the answer is no (and AFAIK is it) then this solution
doesn't work.

I used this in the past, a subscriber has a userpref with ip/port combo. But
this ins't an answer for subaccounts on trunks (unles you can get the sender
to actually use different ports). 3 is the whitelist for ip adresses on
record. I abandoned this due to to much problems with trunks, they just have
to authenticate or go elsewere.

BTW only for tcp since udp sources can be spoofed. I guess the best way is to
use tls with certificate verification (good luck getting the trunks to
implement this :)

route[AUTHENTICATE]
{
 if(!is_method(REGISTER)  allow_address(3, $si, $sp) 
$proto==tcp)
 {
 if(!avp_db_query(select username from usr_preferences where
attribute='ip_authentication' and domain='$td' and (value='$si:$sp' or value
like '$si:%') order by length(value) limit 1))
 {
 xlog(L_ALERT,ACL: $rm from $fu (IP:$si:$sp)\n);
 sl_send_reply(403, Not Allowed by AUTHENTICATE
ACL);
 exit;
 }

 $avp(au)=$avp(i:1);
 }
 else
 {
 $var(authenticated)=www_authenticate($td, subscriber);

 if (!www_authenticate($td, subscriber)) {
 xlog(L_ALERT,AUTHENTICATE: $rm from $fu to $tu (IP:
$si:$sp)\n);
 www_challenge($td, 1);
 exit;
 }

 $avp(au)=$au;

 consume_credentials();
 }




___
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] Kamalio call issue

2015-03-19 Thread Daniel-Constantin Mierla
These are replies to INVITE requests, but if you see them, the INVITE
passed through the server as well.

If you are not aware of a firewall, then perhaps you don't have one
unless is a default installation with it enabled or one on the network.

I suggest you do sip tracing on the client machine to see if the invite
requests leave to the proper IP.

Ultimately can be also a problem caused by a NAT router with ALG, if the
client is behind such device.

Cheers,
Daniel

On 19/03/15 13:50, Yogendra Gupta wrote:

 Hello,

  

 When I am calling with other SIP user then I did not see any INVITE .
 that have issue with DNS.

  

 If we call with different DNS that is working fine then we see INVITE
 option like

  

 U 2015/03/19 12:39:01.744616 117.215.244.16:63380 - 23.253.110.48:5060

 SIP/2.0 180 Ringing.

 CSeq: 2 INVITE.

 Call-ID: d83c4bc1e75e54df5ebd06b74f9089ef@0:0:0:0:0:0:0:0.

 From: tester1 sip:tester1@23.253.110.48;tag=ef809ce0.

 To: sip:tester2@23.253.110.48;tag=23a5eaea.

 Via: SIP/2.0/UDP
 23.253.110.48;branch=z9hG4bKa1a3.21d8ef51bac2678fc26eca5975ae7b00.0,SIP/2.0/UDP
 192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-343938-6f1017bcd9e693a4959717c9eabdc26e.

 Record-Route: sip:23.253.110.48;lr=on;nat=yes.

 Contact: tester2
 sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48.

 User-Agent: Jitsi2.6.5390Windows 7.

 Content-Length: 0.

 .

  

  

 U 2015/03/19 12:39:01.744870 23.253.110.48:5060 - 115.252.208.170:62554

 SIP/2.0 180 Ringing.

 CSeq: 2 INVITE.

 Call-ID: d83c4bc1e75e54df5ebd06b74f9089ef@0:0:0:0:0:0:0:0.

 From: tester1 sip:tester1@23.253.110.48;tag=ef809ce0.

 To: sip:tester2@23.253.110.48;tag=23a5eaea.

 Via: SIP/2.0/UDP
 192.168.0.217:5060;rport=62554;received=115.252.208.170;branch=z9hG4bK-343938-6f1017bcd9e693a4959717c9eabdc26e.

 Record-Route: sip:23.253.110.48;lr=on;nat=yes.

 Contact: tester2
 sip:tester2@192.168.0.100:5060;transport=udp;registering_acc=23_253_110_48;alias=117.215.244.16~63380~1.

 User-Agent: Jitsi2.6.5390Windows 7.

 Content-Length: 0.

  

 Can you tell me what can be issue of firewall dropping?

  

 When I checked at server firewall:

  

 sudo ufw status

 Status: inactive

  

 Let me know what can be other issue for it..

  

 Thanks

  

 *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
 *Sent:* Thursday, March 19, 2015 5:50 PM
 *To:* Yogendra Gupta; 'Kamailio (SER) - Users Mailing List'
 *Subject:* Re: [SR-Users] Kamalio call issue

  

 Hello,

 OPTIONS is not the request for initiating the calls, that is INVITE.
 You would need to know SIP a bit in order to be able to understand and
 configure Kamailio.

 If you don't see any INVITE on kamailo server via ngrep when you call,
 then the issue is on client side or there is a firewall dropping it.

 Cheers,
 Daniel

 On 19/03/15 11:39, Yogendra Gupta wrote:

 Hello,

 Thanks for nice support.

 When we call to test2 user and run this command at server

 ngrep -d any -qt -W byline sip port 5060

  

 then we found following response at server:



 -- 
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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


[SR-Users] Kamailio hardware requirements

2015-03-19 Thread Mickael Marrache
Hi,

 

We are currently deploying an entire architecture composed of load
balancers, proxies and media relays. All the components except the media
relays are Kamailio instances. The media relays are RTP proxy instances.

 

We are trying to determine the hardware requirements for the different
servers.

 

We will start with an architecture composed of:

. 2 load balancers (one kept as backup to ensure availability)

. 2 proxies (load is balanced over the 2 using the DISPATCHER
module)

. 2 media relays

 

We are trying to determine the recommended hardware for the different
components taking into account we will need to serve around 40 users.

 

How many registrations per second can Kamailio support?

How many concurrent calls can Kamailio support?

What is the recommended number of children processes?

What is the recommended size for PKG memory?

What is the recommended size for SHM memory?

 

Thanks for your help,

Mickael

___
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] auth_diameter module

2015-03-19 Thread Daniel-Constantin Mierla
Hello,

the module hasn't be used for long time and was developed when diameter
was a draft (like 2003 -- iirc). Not being demanded, it was no focus on
it and somehow marked as obsolete. I expect to be easy to fix/update if
there is any issue. If you can, give it a try and report the results.

Cheers,
Daniel

On 19/03/15 15:49, Grant Bagdasarian wrote:

 Hello,

  

 Does Kamailio still support authentication using the auth_diameter module?

 There is a note on the modules page stating the module is now obsolete.

  

 “NOTE: diameter support was developed for DISC (DIameter Server Client
 project at http://developer.berlios.de/projects/disc/). This project
 seems to be no longer maintained and DIAMETER specifications were
 updated in the meantime. Thus, the module is obsolete and needs rework
 to be usable with opendiameter or other DIAMETER servers.”

  

 Is the page referring to this module or the DISC?

  

 Are there perhaps any other ways to do authentication with Kamailio
 using diameter?



 ___
 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

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.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