[OpenSIPS-Users] YNT: Re: YNT: Re: YNT: Re: YNT: Re: RFC3261 transaction matching failed error for the second 401 Unauthorized - Challenging the UE

Kaan Dandin kaandandin at yahoo.com
Mon Oct 20 21:09:01 CEST 2014


Hi Bogdan,

With the below workaround,  I have managed to make load balancing with Opensips dispather module . I am using record_route for INVITE message. 
Thanks a lot for your support.
Kind regards,
Kaan


Related part of Opensips script

.......

        else if (is_method("INVITE")) {
                #load_balance("1","pstn");
                xlog("xlog_initialinvite");
                if($si=="192.168.2.11") {

                ds_select_dst("1","1");
                }
                record_route();
                if(!t_relay()) {
                sl_reply_error();
                xlog("xlog_invitereplyerror");
                }
                exit;


.......

                if (loose_route()) {
                xlog("xlog_loose_route");
                if($si=="192.168.2.11") {
                t_relay();
                exit;
                }
                else if($si=="192.168.2.3" or $si=="192.168.2.5" ) {
                $du = "sip:192.168.2.11:4060";
                append_branch();
                t_relay();
                exit;
                }
.....
ims_bench output

 1-   ims_uac-0-   Scenario Screen    - [1-9]: Change Screen - 6663
  Call-rate(length)     Port   Total-time  Total-calls  Remote-host
   0.0(0 ms)/1.000s   5060      65.32 s           65  192.168.2.141:4060(UDP)
 
  0 new calls during 0.287 s period      1 ms scheduler resolution
  0 calls (limit 0)                      Peak was 32 calls, after 45 s
  0 Running, 1 Paused, 1 Woken up, 0 Sync
  0 out-of-call msg (discarded)        
  0 open sockets                        
 
                                 Messages  Retrans   Timeout   Unexpected-Msg
 0            [ NOP ]               
 1            [ SENDRMT ]         11       
 2            [ RECVRMT ]         11                  0        
 3            [ SYNC ]            11       
 
 4     INVITE ----------> B1,2,4  11        0         0        
 5        100 <----------         11        0                   0        
 6        180 <----------         11        0                   0        
 7        183 <----------         0         0                   0        
 8        200 <----------         11        0                   0        
 9        ACK ---------->         11        0                            
10        180 <----------         0         0                   0        
11      Pause [Exp(2:00)]         11                            0        
12        BYE ----------> B3      11        0         0        
13        180 <----------         0         0                   0        
14        200 <---------- E3,4    11        0                   0        
 
15            [ RECVRMT ]         11                  0        
------------------------------ Test Terminated --------------------------------
 
 1-   ims_uac-0-  Statistics Screen   - [1-9]: Change Screen - 6663
  Start Time             | 2014-10-20 11:17:42                                  
  Last Reset Time        | 2014-10-20 11:18:34                                  
  Current Time           | 2014-10-20 11:18:34                                  
-------------------------+---------------------------+--------------------------
  Counter Name           | Periodic value            | Cumulative value
-------------------------+---------------------------+--------------------------
  Elapsed Time           | 00:00:00:290              | 00:00:51:987             
  Call Rate              |    0.000 cps              |    0.212 cps             
-------------------------+---------------------------+--------------------------
  Incoming call created  |        0                  |        0                 
  OutGoing call created  |        0                  |       11                 
  Total Call created     |                           |       11                 
  Current Call           |        0                  |                          
-------------------------+---------------------------+--------------------------
  Successful call        |        3                  |       11                 
  Failed call            |        0                  |        0                 
-------------------------+---------------------------+--------------------------
  Response Time 1        | 00:00:00:000              | 00:00:00:000             
  Response Time 2        | 00:00:44:121              | 00:00:55:011             
  Response Time 3        | 00:00:00:000              | 00:01:07:341             
  Response Time 4        | 00:00:00:000              | 04:08:44:054             
  Response Time 5        | 01:14:06:022              | 01:09:59:415             
  Response Time 7        | 00:01:01:869              | 00:01:10:633             
  Response Time 8        | 00:00:00:000              | 00:01:35:927             
  Response Time 9        | 00:00:00:000              | 04:31:24:539             
  Response Time 10       | 01:16:07:446              | 01:15:34:687             
  Response Time 12       | 00:00:00:000              | 00:00:00:000             
  Response Time 13       | 00:00:00:000              | 00:00:00:000             
  Response Time 14       | 00:00:00:000              | 00:00:00:000             
  Response Time 15       | 00:00:00:000              | 00:00:00:000             
  Call Length            | 06:30:22:487              | 05:04:58:398             
------------------------------ Test Terminated --------------------------------
 
over 192.168.2.3
===================
 
No.     Time        Source                Destination           Protocol Info
   1604 18.894833   192.168.2.11          192.168.2.141         SIP/SDP  Request: INVITE sip:subs004467 at open-ims.test, with session description
   1605 18.895716   192.168.2.141         192.168.2.11          SIP      Status: 100 Giving a try
   1606 18.896051   192.168.2.141         192.168.2.3           SIP/SDP  Request: INVITE sip:subs004467 at open-ims.test, with session description
   1607 18.918473   192.168.2.3           192.168.2.141         SIP      Status: 100 trying -- your call is important to us
   1608 18.929113   192.168.2.3           192.168.2.141         SIP/SDP  Request: INVITE sip:subs004467 at 192.168.2.11:11468, with session description
   1609 18.930230   192.168.2.141         192.168.2.3           SIP      Status: 100 Giving a try
   1611 18.930915   192.168.2.141         192.168.2.11          SIP/SDP  Request: INVITE sip:subs004467 at 192.168.2.11:11468, with session description
   1612 18.932105   192.168.2.11          192.168.2.141         SIP      Status: 180 Ringing
   1613 18.933501   192.168.2.141         192.168.2.3           SIP      Status: 180 Ringing
   1614 18.949184   192.168.2.3           192.168.2.141         SIP      Status: 180 Ringing
   1615 18.950056   192.168.2.141         192.168.2.11          SIP      Status: 180 Ringing
   1658 23.994779   192.168.2.11          192.168.2.141         SIP/SDP  Status: 200 OK, with session description
   1659 23.995366   192.168.2.141         192.168.2.3           SIP/SDP  Status: 200 OK, with session description
   1660 24.006893   192.168.2.3           192.168.2.141         SIP/SDP  Status: 200 OK, with session description
   1661 24.007967   192.168.2.141         192.168.2.11          SIP/SDP  Status: 200 OK, with session description
   1662 24.008743   192.168.2.11          192.168.2.141         SIP      Request: ACK sip:subs004467 at 192.168.2.11:11468;transport=UDP
   1663 24.010836   192.168.2.141         192.168.2.3           SIP      Request: ACK sip:subs004467 at 192.168.2.11:11468;transport=UDP
   1664 24.025223   192.168.2.3           192.168.2.141         SIP      Request: ACK sip:subs004467 at 192.168.2.11:11468;transport=UDP
   1665 24.027505   192.168.2.141         192.168.2.11          SIP      Request: ACK sip:subs004467 at 192.168.2.11:11468;transport=UDP
   2300 27.281032   192.168.2.11          192.168.2.141         SIP      Request: BYE sip:subs004467 at 192.168.2.11:11468;transport=UDP
   2301 27.283582   192.168.2.141         192.168.2.3           SIP      Request: BYE sip:subs004467 at 192.168.2.11:11468;transport=UDP
   2302 27.294955   192.168.2.3           192.168.2.141         SIP      Request: BYE sip:subs004467 at 192.168.2.11:11468;transport=UDP
   2303 27.297687   192.168.2.141         192.168.2.11          SIP      Request: BYE sip:subs004467 at 192.168.2.11:11468;transport=UDP
   2304 27.297689   192.168.2.141         192.168.2.11          SIP      Request: BYE sip:subs004467 at 192.168.2.11:11468;transport=UDP
   2305 27.297691   192.168.2.11          192.168.2.141         SIP      Status: 200 OK
   2307 27.299660   192.168.2.141         192.168.2.3           SIP      Status: 200 OK
   2308 27.307834   192.168.2.3           192.168.2.141         SIP      Status: 200 OK
   2309 27.308408   192.168.2.141         192.168.2.11          SIP      Status: 200 OK
 
 
over 192.168.2.5
===================
 
 
No.     Time        Source                Destination           Protocol Info
   2040 25.595623   192.168.2.11          192.168.2.141         SIP/SDP  Request: INVITE sip:subs004783 at open-ims.test, with session description
   2041 25.596532   192.168.2.141         192.168.2.11          SIP      Status: 100 Giving a try
   2042 25.596952   192.168.2.141         192.168.2.5           SIP/SDP  Request: INVITE sip:subs004783 at open-ims.test, with session description
   2043 25.628108   192.168.2.5           192.168.2.141         SIP      Status: 100 trying -- your call is important to us
   2045 25.667842   192.168.2.5           192.168.2.141         SIP/SDP  Request: INVITE sip:subs004783 at 192.168.2.11:11784, with session description
   2046 25.668279   192.168.2.141         192.168.2.5           SIP      Status: 100 Giving a try
   2048 25.668533   192.168.2.141         192.168.2.11          SIP/SDP  Request: INVITE sip:subs004783 at 192.168.2.11:11784, with session description
   2049 25.668980   192.168.2.11          192.168.2.141         SIP      Status: 180 Ringing
   2050 25.669123   192.168.2.141         192.168.2.5           SIP      Status: 180 Ringing
   2051 25.698433   192.168.2.5           192.168.2.141         SIP      Status: 180 Ringing
   2052 25.698618   192.168.2.141         192.168.2.11          SIP      Status: 180 Ringing
   2407 30.767801   192.168.2.11          192.168.2.141         SIP/SDP  Status: 200 OK, with session description
   2408 30.768519   192.168.2.141         192.168.2.5           SIP/SDP  Status: 200 OK, with session description
   2409 30.831684   192.168.2.5           192.168.2.141         SIP/SDP  Status: 200 OK, with session description
   2410 30.831977   192.168.2.141         192.168.2.11          SIP/SDP  Status: 200 OK, with session description
   2411 30.832405   192.168.2.11          192.168.2.141         SIP      Request: ACK sip:subs004783 at 192.168.2.11:11784;transport=UDP
   2412 30.833398   192.168.2.141         192.168.2.5           SIP      Request: ACK sip:subs004783 at 192.168.2.11:11784;transport=UDP
   2413 30.855147   192.168.2.5           192.168.2.141         SIP      Request: ACK sip:subs004783 at 192.168.2.11:11784;transport=UDP
   2414 30.855872   192.168.2.141         192.168.2.11          SIP      Request: ACK sip:subs004783 at 192.168.2.11:11784;transport=UDP
   3425 40.770843   192.168.2.11          192.168.2.141         SIP/SDP  Status: 200 OK, with session description
   3439 43.412789   192.168.2.11          192.168.2.141         SIP      Request: BYE sip:subs004783 at 192.168.2.11:11784;transport=UDP
   3440 43.414207   192.168.2.141         192.168.2.5           SIP      Request: BYE sip:subs004783 at 192.168.2.11:11784;transport=UDP
   3441 43.467117   192.168.2.5           192.168.2.141         SIP      Request: BYE sip:subs004783 at 192.168.2.11:11784;transport=UDP
   3442 43.467826   192.168.2.141         192.168.2.11          SIP      Request: BYE sip:subs004783 at 192.168.2.11:11784;transport=UDP
   3443 43.467983   192.168.2.141         192.168.2.11          SIP      Request: BYE sip:subs004783 at 192.168.2.11:11784;transport=UDP
   3444 43.468176   192.168.2.11          192.168.2.141         SIP      Status: 200 OK
   3446 43.468627   192.168.2.141         192.168.2.5           SIP      Status: 200 OK
   3447 43.490269   192.168.2.5           192.168.2.141         SIP      Status: 200 OK
   3448 43.490468   192.168.2.141         192.168.2.11          SIP      Status: 200 OK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20141020/5e80cde5/attachment-0001.htm>


More information about the Users mailing list