[OpenSIPS-Users] OpenSIPS and Internet of Things. Where to find examples.

2016-07-08 Thread Rodrigo Pimenta Carvalho
Dear OpenSIPS users;


This year, in November, I will teach classes about Internet of Things, SIP, SIP 
Proxy and messaging systems, at Inatel.

I would like to speak about the use of SIP and SIP Proxies in projects related 
to Internet of Things. But, I am beginning right now looking for the use of SIP 
in Internet of Things and possibly the use of SIP Proxies in such context.


Does someone here could point me some web site or youtube video that shows any 
example of using OpenSIPS or any SIP Proxy in an Internet of Things context, 
please? For example, some article, or site, or document that shows what is the 
future of SIP in Internet of Things or why a SIP Proxy is useful in IoT will be 
very appreciated.


Any indication will be very helpful!


Thanks a lot.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Truncated Branch in Via

2016-07-08 Thread Bogdan-Andrei Iancu

Hi Rahul,

Indeed, that is a good pointhere, thanks for bring it up. Let me 
investigate the code a bit and I will update you.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.07.2016 22:01, Gupta, Rahul wrote:


Hi Bogdan, so the problem we are facing is the endpoint has a new 
branch however the difference in the branch value is *AFTER* the 
MAX_BRANCH_PARAM_LEN, the highlighted text.Since opensips is copying 
the partial branch which is same as the previous Via and thus our SIP 
stack (OCCAS) is sending back 401 Unauthorized for both thinking it’s 
a retransmit.


This is also in line with RFC3261. Shouldn’t it copy the entire Via to 
make sure it’s different from previous Message ?


*REGISTER 1*

Via: SIP/2.0/UDP 
10.204.70.156:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_11391


Via: SIP/2.0/UDP 
10.205.236.44:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_113915620064228_MTAuMTIuMy4xMQ


*REGISTER 2*

Via: SIP/2.0/UDP 
10.204.70.156:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_11391


Via: SIP/2.0/UDP 
10.205.236.44:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_113915656050004_MTAuMTIuMy4xMQ


*Thanks*

*Rahul Gupta***

Systems Architect

*T*+1 732-690-3845 |*E* rahul.gu...@ipc.com 

cid:image006.jpg@01D1940F.3E021840

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Thursday, July 07, 2016 4:43 AM
*To:* Gupta, Rahul
*Cc:* Elliott, Ray; users@lists.opensips.org
*Subject:* Re: [OpenSIPS-Users] Truncated Branch in Via

Hi Rahul,

The received VIA hdr (with the .44 IP) is properly preserved when 
forwarding (in the outbound message).


The VIA hdr added by OpenSIPS ( .156 IP) is a completely new VIA and 
its branch value is completely independent from the branch of other 
VIA hdrs.


Why do they look the same ? The RFC3261 says that for stateless fwd 
(when basically there is no transaction, so no branch value), to avoid 
populating its VIA with ";branch=0" , the proxy may "copy" and use a 
branch value from an older VIA (a received VIA) - keep in mind it does 
not say to copy it entirely or part. So, OpenSIPS copies a 
MAX_BRANCH_PARAM_LEN length string from the previous branch param.


Everything is correct and legal (from RFC perspective).

PS: if you would use t_relay() instead of forward() - doing statefull 
proxy -, you will see that the branch in the VIA added by OpenSIPS 
will be completly different from the value in the previous VIA.


Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.07.2016 03:42, Gupta, Rahul wrote:

Hi Bogdan,

Here is a Ethernet trace (pcap) file that has a successful and an
unsuccessful registration.

Frames 1-8 illustrate the successful case with Frames 2 and 6 show
how opensips adds an extra VIA header that has a full VIA;branch

Frame:2

Via: SIP/2.0/UDP
10.204.70.156:5060;branch=z9hG4bK-c45d6-2ff0ce63-4583dc45-6bd144f8

Via: SIP/2.0/UDP
10.204.45.122:5060;branch=z9hG4bK-c45d6-2ff0ce63-4583dc45-6bd144f8

Frames 9-16 illustrate the unsuccessful case where Frames 10 and
14 show how opensips adds an extra VIA header that has a truncated
branch.

Frame 10:

Via: SIP/2.0/UDP

10.204.70.156:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_11391

Via: SIP/2.0/UDP

10.205.236.44:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_113915620064228_MTAuMTIuMy4xMQ

*Thanks*

*Rahul Gupta*

Systems Architect

*T*+1 732-690-3845 |*E* rahul.gu...@ipc.com


cid:image006.jpg@01D1940F.3E021840

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Wednesday, July 06, 2016 5:38 AM
*To:* OpenSIPS users mailling list
*Cc:* Elliott, Ray; Gupta, Rahul
*Subject:* Re: [OpenSIPS-Users] Truncated Branch in Via

Hi Rahul,

That define is used to calculate the the max VIA len when OpenSIPS
is generating its own VIA headers. That max len does not impact
the VIA headers which were received.

I do not understand exactly (in your example) what's the flow of
that VIA header. If you want, send me off-list the pcap/ngrep
showing the SIP package (before and after OpenSIPS) and how it is
affected.

Regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com

On 05.07.2016 20:57, Gupta, Rahul wrote:

We are using opensips 1.11.5 as a stateless proxy and seeing a
truncated Branch in Via for my REGISTER message. After some
code digging, the MAX length is calculated using the following
formula and seems like its truncating the branch after 55
characters. This is causing the REGISTER to fail in our case.
Is there a config level solution to this ?

*#define MA

Re: [OpenSIPS-Users] Truncated Branch in Via

2016-07-08 Thread Gupta, Rahul
Hi Bogdan, so the problem we are facing is the endpoint has a new branch 
however the difference in the branch value is AFTER the MAX_BRANCH_PARAM_LEN, 
the highlighted text. Since opensips is copying the partial branch which is 
same as the previous Via and thus our SIP stack (OCCAS) is sending back 401 
Unauthorized for both thinking it's a retransmit.

This is also in line with RFC3261. Shouldn't it copy the entire Via to make 
sure it's different from previous Message ?

REGISTER 1
Via: SIP/2.0/UDP 
10.204.70.156:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_11391
Via: SIP/2.0/UDP 
10.205.236.44:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_113915620064228_MTAuMTIuMy4xMQ

REGISTER 2
Via: SIP/2.0/UDP 
10.204.70.156:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_11391
Via: SIP/2.0/UDP 
10.205.236.44:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_113915656050004_MTAuMTIuMy4xMQ


Thanks
Rahul Gupta
Systems Architect
T +1 732-690-3845  *   E rahul.gu...@ipc.com

[cid:image006.jpg@01D1940F.3E021840]



From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Thursday, July 07, 2016 4:43 AM
To: Gupta, Rahul
Cc: Elliott, Ray; users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Truncated Branch in Via

Hi Rahul,

The received VIA hdr (with the .44 IP) is properly preserved when forwarding 
(in the outbound message).

The VIA hdr added by OpenSIPS ( .156 IP) is a completely new VIA and its branch 
value is completely independent from the branch of other VIA hdrs.

Why do they look the same ? The RFC3261 says that for stateless fwd (when 
basically there is no transaction, so no branch value), to avoid populating its 
VIA with ";branch=0" , the proxy may "copy" and use a branch value from an 
older VIA (a received VIA) - keep in mind it does not say to copy it entirely 
or part. So, OpenSIPS copies a MAX_BRANCH_PARAM_LEN length string from the 
previous branch param.

Everything is correct and legal (from RFC perspective).

PS: if you would use t_relay() instead of forward() - doing statefull proxy -, 
you will see that the branch in the VIA added by OpenSIPS will be completly 
different from the value in the previous VIA.

Best regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 07.07.2016 03:42, Gupta, Rahul wrote:
Hi Bogdan,

Here is a Ethernet trace (pcap) file that has a successful and an unsuccessful 
registration.

Frames 1-8 illustrate the successful case with Frames 2 and 6 show how opensips 
adds an extra VIA header that has a full VIA;branch
Frame:2
Via: SIP/2.0/UDP 
10.204.70.156:5060;branch=z9hG4bK-c45d6-2ff0ce63-4583dc45-6bd144f8
Via: SIP/2.0/UDP 
10.204.45.122:5060;branch=z9hG4bK-c45d6-2ff0ce63-4583dc45-6bd144f8

Frames 9-16 illustrate the unsuccessful case where Frames 10 and 14 show how 
opensips adds an extra VIA header that has a truncated branch.
Frame 10:
Via: SIP/2.0/UDP 
10.204.70.156:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_11391
Via: SIP/2.0/UDP 
10.205.236.44:5060;branch=z9hG4bK1c68e33e-848e-412a-9137-4fb065a7b7eb_0efbfc5e_113915620064228_MTAuMTIuMy4xMQ

Thanks
Rahul Gupta
Systems Architect
T +1 732-690-3845  *   E rahul.gu...@ipc.com

[cid:image006.jpg@01D1940F.3E021840]



From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Wednesday, July 06, 2016 5:38 AM
To: OpenSIPS users mailling list
Cc: Elliott, Ray; Gupta, Rahul
Subject: Re: [OpenSIPS-Users] Truncated Branch in Via

Hi Rahul,

That define is used to calculate the the max VIA len when OpenSIPS is 
generating its own VIA headers. That max len does not impact the VIA headers 
which were received.

I do not understand exactly (in your example) what's the flow of that VIA 
header. If you want, send me off-list the pcap/ngrep showing the SIP package 
(before and after OpenSIPS) and how it is affected.

Regards,



Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 05.07.2016 20:57, Gupta, Rahul wrote:
We are using opensips 1.11.5 as a stateless proxy and seeing a truncated Branch 
in Via for my REGISTER message. After some code digging, the MAX length is 
calculated using the following formula and seems like its truncating the branch 
after 55 characters. This is causing the REGISTER to fail in our case. Is there 
a config level solution to this ?

#define MAX_BRANCH_PARAM_LEN  (MCOOKIE_LEN+8 /*!   Via: SIP/2.0/UDP 
XX.XX.XX.XX:5060;branch=z9hG4bK0fddbbc9-1487-4755-a0b3-0c319155b8c3_0efbfc5e_11160
Via from EndPoint-->   Via: SIP/2.0/UDP 
XX.XX.XX.XX:5060;branch=z9hG4bK0fddbbc9-1487-4755-a0b3-0c319155b8c3_0efbfc5e_1116078308924346_MTAuMTIuMy4xMQ


Thanks
Rahul Gupta


DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not an intended 
recipient of this e-mail, do not duplicate o

Re: [OpenSIPS-Users] crash in 2.2

2016-07-08 Thread Bogdan-Andrei Iancu

Hi Richard,

The crash indicates the siptrace module. The tarball ia a bit older, 
please try to grab directly the sources from GIT branch 2.2 - this will 
give you the latest sources.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 08.07.2016 16:42, Richard Robson wrote:

Hi Guys,


I'm testing ratelimiting and when I ramp up to about 4 or 5 cps opensips
crashes. I'm not sure if its the ratelimiting module or opensips itself
crashing dur to the number of calls.

its version 2.2 from the download page dated 16-Jun-2016 18:41

here is the back trace:

http://pastebin.com/yAwmYyhx

Regards,




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] crash in 2.2

2016-07-08 Thread Richard Robson
Hi Guys,


I'm testing ratelimiting and when I ramp up to about 4 or 5 cps opensips
crashes. I'm not sure if its the ratelimiting module or opensips itself
crashing dur to the number of calls.

its version 2.2 from the download page dated 16-Jun-2016 18:41 

here is the back trace:

http://pastebin.com/yAwmYyhx

Regards,

-- 
Richard Robson
Greenlight Support
01382 843843
supp...@greenlightcrm.com


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Number validation

2016-07-08 Thread Eric Tamme

yes, https://www.itu.int/rec/T-REC-E.164-201011-I/en


On 07/08/2016 07:05 AM, Hristo Donev wrote:

Hello,

I thinking of performing number validation before I pass the request 
to the upstream provider in order to minimize capacity waste because 
of malformed numbers. Can this be something I can do in OpenSIPS?
Also, any idea of  good source for this validation for global 
(international) numbers?


Best regards,
Hristo



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Number validation

2016-07-08 Thread Hristo Donev
Hello,

I thinking of performing number validation before I pass the request to the
upstream provider in order to minimize capacity waste because of malformed
numbers. Can this be something I can do in OpenSIPS?
Also, any idea of  good source for this validation for global
(international) numbers?

Best regards,
Hristo
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users