[OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

2017-08-30 Thread Alain Bieuzent
Hi all,

 

I’m trying to migrate my proxy from 2.1.5 to 2.2.5, since i migrate, i found a 
lot of log about load_balancer module (of course in 2.1.5 i don’t have this 
error logs). 

For me this message have not impact on the call flow, but i think it’s not 
normal …..

 

Someone can help me ?

 

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 102 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7723]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7723]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

 

Regards, Alain

 

 

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


Re: [OpenSIPS-Users] clusterer module

2017-08-30 Thread Denis via Users
Hello! Any information about the problem? Thank you. -- С уважением, Денис.Best regards, Denis 25.08.2017, 16:51, "Denis via Users" :Hello! Back to 2.2.5 resolved the problem. I got replication of, for example, dialog/profile-- С уважением, Денис.Best regards, Denis 24.08.2017, 17:46, "Denis via Users" :Hello! I am developing VoIP architecture with two proxies and one LB.Between these proxies i have a cluster, using corresponding module. All instances (proxies and LB) are on the same server.I started from 2.2 and there were no problems with the cluster.Recently, I upgraded Opensips from 2.2. to 2.3.1 and have got such situation ./opensipsctl.sh fifo clusterer_listCluster:: 1    Node:: 2 DB_ID=2 URL="" Enabled=1 Link_state=Probe   Next_hop=none Description=none ./opensipsproxyctl.sh fifo clusterer_listCluster:: 1    Node:: 1 DB_ID=1 URL="" Enabled=1 Link_state=Up  Next_hop=1 Description=none tcpdump10:33:47.101956 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 381492:381525, ack 3259636718, win 342, options [nop,nop,TS val 65425778 ecr 65424597], length 3310:33:47.101984 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 33, win 6146, options [nop,nop,TS val 65425778 ecr 65425778], length 010:33:51.725437 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 33:66, ack 1, win 342, options [nop,nop,TS val 65426934 ecr 65425778], length 3310:33:51.725458 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 66, win 6146, options [nop,nop,TS val 65426934 ecr 65426934], length 0 and 10:35:12.589476 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 1471487774:1471487807, ack 2063326017, win 342, options [nop,nop,TS val 65447150 ecr 65445995], length 3310:35:12.589491 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 33, win 342, options [nop,nop,TS val 65447150 ecr 65447150], length 010:35:17.158143 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 33:66, ack 1, win 342, options [nop,nop,TS val 65448292 ecr 65447150], length 3310:35:17.158153 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 66, win 342, options [nop,nop,TS val 65448292 ecr 65448292], length 0   As you can see node 1 cannot see node 2 (Link_state=Probe). The question is why? Thank you. -- С уважением, Денис.Best regards, Denis   ,___Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users,___Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

2017-08-30 Thread Răzvan Crainea

Hi, Alain!

Did you also migrate your script functions from load_balancer() to 
lb_start() and lb_next()?
Can you post your database resources and the way you are using 
load_balancer in the script?


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 08/30/2017 11:40 AM, Alain Bieuzent wrote:


Hi all,

I’m trying to migrate my proxy from 2.1.5 to 2.2.5, since i migrate, i 
found a lot of log about load_balancer module (of course in 2.1.5 i 
don’t have this error logs).


For me this message have not impact on the call flow, but i think it’s 
not normal …..


Someone can help me ?

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 112  - unable to calculate free resources


Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 112  - unable to calculate free resources


Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 101  - unable to calculate free resources


Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 102  - unable to calculate free resources


Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 101  - unable to calculate free resources


Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 101  - unable to calculate free resources


Aug 30 10:30:27 ded-lb-out-master opensips[7723]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Aug 30 10:30:27 ded-lb-out-master opensips[7723]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 101  - unable to calculate free resources


Regards, Alain



___
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


Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

2017-08-30 Thread Alain Bieuzent
Hi Razvan, 

 

No i don’t modify my script, will check this new functions before continuing to 
bother you.

 

Many thanks

 

De : Users  au nom de Răzvan Crainea 

Répondre à : OpenSIPS users mailling list 
Date : mercredi 30 août 2017 à 11:01
À : 
Objet : Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

 

Hi, Alain!

Did you also migrate your script functions from load_balancer() to lb_start() 
and lb_next()?
Can you post your database resources and the way you are using load_balancer in 
the script?

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 08/30/2017 11:40 AM, Alain Bieuzent wrote:

Hi all,

 

I’m trying to migrate my proxy from 2.1.5 to 2.2.5, since i migrate, i found a 
lot of log about load_balancer module (of course in 2.1.5 i don’t have this 
error logs). 

For me this message have not impact on the call flow, but i think it’s not 
normal …..

 

Someone can help me ?

 

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 102 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7723]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7723]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

 

Regards, Alain

 

 




___
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 

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


Re: [OpenSIPS-Users] $(avp(attr)[$T_branch_idx]) is NULL for second INVITE. How to solve it ?

2017-08-30 Thread Liviu Chircu
You could persist it at dialog level, once the 200 OK reply arrives in 
an onreply_route, like so:



onreply_route [store_attr] {

$dlg_val(callee_attr) = $(avp(attr)[$T_branch_idx])

}

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 29.08.2017 20:33, Rodrigo Pimenta Carvalho wrote:


Hi Liviu.


Thank you for your reply!


I guess the second INVITE is a Re-INVITE, as you commented.

In this case, is it possible to keep stored the value of $avp(attr) 
and use it when necessary even after receiving the Re-INVITE?



--


Yes we have a retry, not a parallel forked call, but just when the 
Re-INVITE is received by OpenSIPS. By other side, the first INVITE is 
for a parallel forked call, if I'm well understanding the SIP here.


The first INVITE is:


SIP Message: INVITE sip:g1r2u3p4o5@127.0.0.1 SIP/2.0
Via: SIP/2.0/TLS 
127.0.0.1:42194;rport;branch=z9hG4bKPjd3128578-0158-4c58-8c1c-676aa864d8ca;alias

Max-Forwards: 70
From: "ext1" 
;tag=469b3a48-1548-4af6-8e03-a5c855ce85f4

To: 
Contact: "ext1" 
;+sip.ice

Call-ID: 22cb74fc-3d3b-4a37-9572-32f48c9943ff
CSeq: 21431 INVITE
Route: 
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, 
NOTIFY, REFER, MESSAGE, OPTIONS

Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length:  1267

There is more than one registered (on-line) subscriber g1r2u3p4o5. So, 
g1r2u3p4o5 has more than one AOR. I have 3 devices online for the 
subscriber g1r2u3p4o5.
The reply SIP OK comes from another network (not the local one), from 
IP 10.0.60.246. After such reply, the Re-INVITE is:



SIP Message: INVITE sip:g1r2u3p4o5@10.0.60.246:59673;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 
192.168.0.81:54188;rport;branch=z9hG4bKPjdde63995-7ed0-436a-983f-61d0e5df9498;alias

Max-Forwards: 70
From: "ext1" 
;tag=469b3a48-1548-4af6-8e03-a5c855ce85f4

To: ;tag=393a402c
Contact: "ext1" 
;+sip.ice

Call-ID: 22cb74fc-3d3b-4a37-9572-32f48c9943ff
CSeq: 21433 INVITE
Route: 
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, 
NOTIFY, REFER, MESSAGE, OPTIONS

Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800;refresher=uac
Min-SE: 90
Content-Type: application/sdp
Content-Length:   332

In this moment I need to know if the device (callee) is in another 
network, in fact, to take some fixes in SDP of INVITEs and SIP OKs.

The $(avp(attr)[$T_branch_idx]) should have the information that I need.

If it is not possible to keep the $(avp(attr)[$T_branch_idx]) stored, 
is it possible to know if a device is in another network when it is a 
callee?


Any hint will be very helpful !!

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



*De:* Users  em nome de Liviu Chircu 


*Enviado:* terça-feira, 29 de agosto de 2017 12:34
*Para:* users@lists.opensips.org
*Assunto:* Re: [OpenSIPS-Users] $(avp(attr)[$T_branch_idx]) is NULL 
for second INVITE. How to solve it ?


Hi Rodrigo,


Just trying to understand the flow here - could it be actually a 
Re-INVITE that goes through your sequential routing block, thus 
lookup() is not called, leaving $avp(attr) NULL throughout that 
transaction?



Regardless of the above, in OpenSIPS terms, each "branch" points to a 
different destination. In our case, we're talking about a retry, not a 
serial/parallel forked call. Which means that you should only bother 
with $T_branch_idx if a lookup() could yield more than one device to 
be contacted for the same AoR.



Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com


Home — OpenSIPS Solutions 
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. 
OpenSIPS is more than a SIP proxy/router as it includes 
application-level functionalities.


On 29.08.2017 18:05, Rodrigo Pimenta Carvalho wrote:



Dear SIPusers,


In my project I use to keep a valuable information in table location. 
This is about the state of a subscriber's localization.


I have to read such information for the callees, every time a new 
branch is created and every time a INVITE is answered with SIP OK.


So, my OpenSIPS configuration has something similar to the following 
code:



1route{

2   ...  // hidden code for simplification.

3 lookup("location","m")

4   ...

5 route(relay);

6}


7route[relay]{

8   if (is_method("INVITE")) {
9...
10 t_on_branch("per_branch_ops");
11 t_on_reply("handle_nat");
12 t_on_failure("missed_call");
13 }
14 ...

15  }


16branch_route[per_branch_ops] {
17

18$(avp(attr)[$T_branch_idx])

19...

20}


21onreply_route[handle_nat] {

22...

23 $(avp(attr)[$T_branch_idx])

24...

25}

26...


In a determ

Re: [OpenSIPS-Users] clusterer module

2017-08-30 Thread Vlad Patrascu

Hi Denis,

I can't really tell what the problem is from the information you've 
provided (the traces aren't much help as the messages between nodes are 
binary data). Can you provide some logs relevant to the clusterer 
(including debug level) from around the time when the nodes first try to 
establish the links ?


Regards,

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com

On 08/30/2017 11:46 AM, Denis via Users wrote:

Hello!
Any information about the problem?
Thank you.
--
С уважением, Денис.
Best regards, Denis
25.08.2017, 16:51, "Denis via Users" :

Hello!
Back to 2.2.5 resolved the problem. I got replication of, for 
example, dialog/profile

--
С уважением, Денис.
Best regards, Denis
24.08.2017, 17:46, "Denis via Users" >:

Hello!
I am developing VoIP architecture with two proxies and one LB.
Between these proxies i have a cluster, using corresponding module. 
All instances (proxies and LB) are on the same server.

I started from 2.2 and there were no problems with the cluster.
Recently, I upgraded Opensips from 2.2. to 2.3.1 and have got such 
situation

./opensipsctl.sh fifo clusterer_list
Cluster:: 1
Node:: 2 DB_ID=2 URL=bin:1.1.1.1:5041 Enabled=1 
Link_state=Probe   Next_hop=none Description=none

./opensipsproxyctl.sh fifo clusterer_list
Cluster:: 1
Node:: 1 DB_ID=1 URL=bin:1.1.1.1:5040 Enabled=1 
Link_state=Up  Next_hop=1 Description=none

tcpdump
10:33:47.101956 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 
381492:381525, ack 3259636718, win 342, options [nop,nop,TS 
val 65425778 ecr 65424597], length 33
10:33:47.101984 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 33, 
win 6146, options [nop,nop,TS val 65425778 ecr 65425778], length 0
10:33:51.725437 IP 1.1.1.1.40428 > 1.1.1.1.5040: Flags [P.], seq 
33:66, ack 1, win 342, options [nop,nop,TS val 65426934 ecr 
65425778], length 33
10:33:51.725458 IP 1.1.1.1.5040 > 1.1.1.1.40428: Flags [.], ack 66, 
win 6146, options [nop,nop,TS val 65426934 ecr 65426934], length 0

and
10:35:12.589476 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 
1471487774:1471487807, ack 2063326017, win 342, options [nop,nop,TS 
val 65447150 ecr 65445995], length 33
10:35:12.589491 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 33, 
win 342, options [nop,nop,TS val 65447150 ecr 65447150], length 0
10:35:17.158143 IP 1.1.1.1.34850 > 1.1.1.1.5041: Flags [P.], seq 
33:66, ack 1, win 342, options [nop,nop,TS val 65448292 ecr 
65447150], length 33
10:35:17.158153 IP 1.1.1.1.5041 > 1.1.1.1.34850: Flags [.], ack 66, 
win 342, options [nop,nop,TS val 65448292 ecr 65448292], length 0
As you can see node 1 cannot see node 2 (Link_state=Probe). The 
question is why?

Thank you.
--
С уважением, Денис.
Best regards, Denis
,

___
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




___
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


Re: [OpenSIPS-Users] $(avp(attr)[$T_branch_idx]) is NULL for second INVITE. How to solve it ?

2017-08-30 Thread Rodrigo Pimenta Carvalho
Hi.


Very good.


Thank you very much!




RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



De: Users  em nome de Liviu Chircu 

Enviado: quarta-feira, 30 de agosto de 2017 06:44
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] $(avp(attr)[$T_branch_idx]) is NULL for second 
INVITE. How to solve it ?


You could persist it at dialog level, once the 200 OK reply arrives in an 
onreply_route, like so:


onreply_route [store_attr] {

$dlg_val(callee_attr) = $(avp(attr)[$T_branch_idx])

}

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

[http://www.opensips-solutions.com/imgs/slideshow/slide1.jpg]

Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 29.08.2017 20:33, Rodrigo Pimenta Carvalho wrote:

Hi Liviu.


Thank you for your reply!


I guess the second INVITE is a Re-INVITE, as you commented.

In this case, is it possible to keep stored the value of $avp(attr) and use it 
when necessary even after receiving the Re-INVITE?


--


Yes we have a retry, not a parallel forked call, but just when the Re-INVITE is 
received by OpenSIPS. By other side, the first INVITE is for a parallel forked 
call, if I'm well understanding the SIP here.

The first INVITE is:


SIP Message: INVITE sip:g1r2u3p4o5@127.0.0.1 SIP/2.0
Via: SIP/2.0/TLS 
127.0.0.1:42194;rport;branch=z9hG4bKPjd3128578-0158-4c58-8c1c-676aa864d8ca;alias
Max-Forwards: 70
From: "ext1" 
;tag=469b3a48-1548-4af6-8e03-a5c855ce85f4
To: 
Contact: "ext1" 
;+sip.ice
Call-ID: 22cb74fc-3d3b-4a37-9572-32f48c9943ff
CSeq: 21431 INVITE
Route: 

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length:  1267

There is more than one registered (on-line) subscriber g1r2u3p4o5. So, 
g1r2u3p4o5 has more than one AOR. I have 3 devices online for the subscriber 
g1r2u3p4o5.
The reply SIP OK comes from another network (not the local one), from IP 
10.0.60.246. After such reply, the Re-INVITE is:


SIP Message: INVITE sip:g1r2u3p4o5@10.0.60.246:59673;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 
192.168.0.81:54188;rport;branch=z9hG4bKPjdde63995-7ed0-436a-983f-61d0e5df9498;alias
Max-Forwards: 70
From: "ext1" 
;tag=469b3a48-1548-4af6-8e03-a5c855ce85f4
To: ;tag=393a402c
Contact: "ext1" 
;+sip.ice
Call-ID: 22cb74fc-3d3b-4a37-9572-32f48c9943ff
CSeq: 21433 INVITE
Route: 

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800;refresher=uac
Min-SE: 90
Content-Type: application/sdp
Content-Length:   332

In this moment I need to know if the device (callee) is in another network, in 
fact, to take some fixes in SDP of INVITEs and SIP OKs.
The $(avp(attr)[$T_branch_idx]) should have the information that I need.

If it is not possible to keep the $(avp(attr)[$T_branch_idx]) stored, is it 
possible to know if a device is in another network when it is a callee?

Any hint will be very helpful !!

Best regards.

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



De: Users 
 em 
nome de Liviu Chircu 
Enviado: terça-feira, 29 de agosto de 2017 12:34
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] $(avp(attr)[$T_branch_idx]) is NULL for second 
INVITE. How to solve it ?


Hi Rodrigo,


Just trying to understand the flow here - could it be actually a Re-INVITE that 
goes through your sequential routing block, thus lookup() is not called, 
leaving $avp(attr) NULL throughout that transaction?


Regardless of the above, in OpenSIPS terms, each "branch" points to a different 
destination. In our case, we're talking about a retry, not a serial/parallel 
forked call. Which means that you should only bother with $T_branch_idx if a 
lookup() could yield more than one device to be contacted for the same AoR.


Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

[http://www.opensips-solutions.com/imgs/slideshow/slide1.jpg]

Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 29.08.2017 18:05, Rodri

Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

2017-08-30 Thread Alain Bieuzent
Razvan, I’m trying to modify my code but without succes, please tell me what 
i’m wrong :

 

if (is_present_hf("X-Provider"))

    {

     $avp(lb_res) = $hdr(X-Provider);

    } else {

    send_reply("403","Forbidden");

    exit;

    }

      if ( !lb_start("1","$avp(lb_res)") ) {

 send_reply("503","Service full");

       exit;

    }

 

xlog("L_INFO","Sending Call to Provider $avp(lb_res), Gateway is : 
$du\n");

    # arm a failure route for be able to catch a failure event and to do

    # failover to the next available destination

    t_on_failure("LB_failed");

 

    # send it out

    $rd = $dd ;

    if (!t_relay()) {

    sl_reply_error();

    }

    }

 

failure_route[LB_failed]

{

    # skip if call was canceled

    if (t_was_cancelled()) {

    exit;

    }

 

    # was a destination failure ? (we do not want to do failover

    # if it was a call setup failure, so we look for 500 and 600

    # class replied and for local timeouts)

 if ( t_check_status("[56][0][03]") ||

    (t_check_status("408") && t_local_replied("all") ) ) {

    # this is a case for failover

    xlog("L_INFO","Gateway for provider $avp(lb_res) failed with 
code $T_reply_code for call to $rU");

    # try to re-route to next available destination

      if ( !lb_start_or_next("1","$avp(lb_res)") ) {

  send_reply("503","Service full");

    xlog("L_INFO","Route 2 : No resource for provider 
$avp(lb_res) for call to : $rU");

  exit;

    }

    xlog("L_INFO","Re-routing call for Provider $avp(lb_res) to $du 
\n");

    t_relay();

    }

xlog("L_INFO","Gateway for provider $avp(lb_res) failed with code $T_reply_code 
for call to $rU");

}

 

I sent you my database ressources offlist, because there is some confidential 
data.

 

Thaks

 

 

De : Users  au nom de Alain Bieuzent 

Répondre à : OpenSIPS users mailling list 
Date : mercredi 30 août 2017 à 11:30
À : OpenSIPS users mailling list 
Objet : Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

 

Hi Razvan, 

 

No i don’t modify my script, will check this new functions before continuing to 
bother you.

 

Many thanks

 

De : Users  au nom de Răzvan Crainea 

Répondre à : OpenSIPS users mailling list 
Date : mercredi 30 août 2017 à 11:01
À : 
Objet : Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

 

Hi, Alain!

Did you also migrate your script functions from load_balancer() to lb_start() 
and lb_next()?
Can you post your database resources and the way you are using load_balancer in 
the script?

Best regards,


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 08/30/2017 11:40 AM, Alain Bieuzent wrote:

Hi all,

 

I’m trying to migrate my proxy from 2.1.5 to 2.2.5, since i migrate, i found a 
lot of log about load_balancer module (of course in 2.1.5 i don’t have this 
error logs). 

For me this message have not impact on the call flow, but i think it’s not 
normal …..

 

Someone can help me ?

 

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 102 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 
 - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: 
WARNING:load_balan