[OpenSIPS-Users] Load balancer sending 403 when caller hangs uo

2009-06-18 Thread James Wiegand
Hi all,

I am using OpenSIPS 1.5.1 and the lb module.  Following the example I
see this chunk of code execute when the caller hangs up as the dial
progresses (but before the other side answers):

# from now on we have only the initial requests
if (!is_method("INVITE")) {
send_reply("405","Method Not Allowed");
exit;
}

This leaves a session hanging in the load balancer:

Destination:: sip:XXX.XXX.XXX.XXX id=3
Resource:: pstn max=1 load=1

I'm seeing CANCEL come in from the caller and it looks like
!t_check_trans() is not picking this up?  How do I catch this case?

Thanks for the help,

-jim


-- 
-- 
Jim Wiegand
---
Home:  originaljimda...@gmail.com
AIM: originaljimdandy

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


Re: [OpenSIPS-Users] Load balancer sending 403 when caller hangs uo

2009-06-19 Thread James Wiegand
drei
Iancu wrote:
> Hi James,
>
> Could you please check if the "dialog" module sees the call as ended? Use
> "opensipsctl fifo dlg_list"
>  (http://www.opensips.org/html/docs/modules/1.5.x/dialog.html#id272726) and
> paste the output here.
>
> Also, do you have a full SIP trace of the call (ngrep) ?
>
> Regards,
> Bogdan
>
>
>
> James Wiegand wrote:
>>
>> Hi all,
>>
>> I am using OpenSIPS 1.5.1 and the lb module.  Following the example I
>> see this chunk of code execute when the caller hangs up as the dial
>> progresses (but before the other side answers):
>>
>>        # from now on we have only the initial requests
>>        if (!is_method("INVITE")) {
>>                send_reply("405","Method Not Allowed");
>>                exit;
>>        }
>>
>> This leaves a session hanging in the load balancer:
>>
>> Destination:: sip:XXX.XXX.XXX.XXX id=3
>>        Resource:: pstn max=1 load=1
>>
>> I'm seeing CANCEL come in from the caller and it looks like
>> !t_check_trans() is not picking this up?  How do I catch this case?
>>
>> Thanks for the help,
>>
>> -jim
>>
>>
>>
>
>



-- 
-- 
Jim Wiegand
---
Home:  originaljimda...@gmail.com
AIM: originaljimdandy

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


Re: [OpenSIPS-Users] Load balancer sending 403 when caller hangs uo

2009-06-19 Thread James Wiegand
Don't know if this is the right thing to try, but when I set the
dialog timeout the session clears after a few moments.  Is 30 seconds
too short for use on general calling patterns?  I am looking to pass
on the order of 700 simultaneous calls.

...
modparam("dialog", "default_timeout", 30)
...

-jim

On Fri, Jun 19, 2009 at 9:28 AM, James
Wiegand wrote:
> Hi Bogdan,
>
> Here's the dialog from a test call.
> The remote client is Eyebeam on a PC connected to Asterisk.  I made a
> call and hung up before answering.  The call has been terminated for
> some time.  I can do an lb_reload to clear out the hung lb session.
>
> opensipsctl fifo lb_list
> Destination:: sip:XXX.XXX.XXX.6 id=1
>        Resource:: pstn max=0 load=0
> Destination:: sip:XXX.XXX.XXX.7 id=2
>        Resource:: pstn max=0 load=0
> Destination:: sip:XXX.XXX.XXX.8 id=3
>        Resource:: pstn max=1 load=1
> Destination:: sip:XXX.XXX.XXX.9 id=4
>        Resource:: pstn max=0 load=0
>
> opensipsctl fifo dlg_list
> dialog::  hash=3498:265315739
>        state:: 3
>        user_flags:: 0
>        timestart:: 1245419911
>        timeout:: 99843
>        callid:: 30cd5dba1a90fbe7023054f8293fc...@yyy.yyy.yyy.12
>        from_uri:: sip:8705082...@yyy.yyy.yyy.12
>        from_tag:: as14720305
>        caller_contact:: sip:8705082...@yyy.yyy.yyy.12
>        caller_cseq:: 102
>        caller_route_set::
>        caller_bind_addr:: udp:XXX.XXX.XXX.24:5060
>        to_uri:: sip:8706569...@xxx.xxx.xxx.24
>        to_tag:: as4042950a
>        callee_contact:: sip:8706569...@xxx.xxx.xxx.8
>        callee_cseq:: 102
>        callee_route_set::
>        callee_bind_addr:: udp:XXX.XXX.XXX.24:5060
> dialog::  hash=3895:1205860066
>        state:: 3
>        user_flags:: 0
>        timestart:: 1245419947
>        timeout:: 99879
>        callid:: 768a3fbb026fec2038c9334c05e12...@yyy.yyy.yyy.12
>        from_uri:: sip:8705082...@yyy.yyy.yyy.12
>        from_tag:: as5a726731
>        caller_contact:: sip:8705082...@yyy.yyy.yyy.12
>        caller_cseq:: 102
>        caller_route_set::
>        caller_bind_addr:: udp:XXX.XXX.XXX.24:5060
>        to_uri:: sip:8706569...@xxx.xxx.xxx.24
>        to_tag:: as3ac79c83
>        callee_contact:: sip:8706569...@xxx.xxx.xxx.8
>        callee_cseq:: 102
>        callee_route_set::
>        callee_bind_addr:: udp:XXX.XXX.XXX.24:5060
>
>
> TCP SIP trace, not from the same call, but with the same result:
>
> 09:08:37.758213 IP (tos 0x0, ttl  45, id 34347, offset 0, flags
> [none], proto: UDP (17), length: 855) YYY.YYY.YYY.12.sip >
> XXX.XXX.XXX.24.sip: SIP, length: 827
>        INVITE sip:8706569...@xxx.xxx.xxx.24 SIP/2.0
>        Via: SIP/2.0/UDP YYY.YYY.YYY.12:5060;branch=z9hG4bK1fe6bb8d;rport
>        From: "device" ;tag=as0fb4ac11
>        To: 
>        Contact: 
>        Call-ID: 6d25870c2c9d32c90c6e4498079dc...@yyy.yyy.yyy.12
>        CSeq: 102 INVITE
>        User-Agent: Asterisk PBX
>        Max-Forwards: 70
>        Date: Fri, 19 Jun 2009 14:00:50 GMT
>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
>        Supported: replaces
>        Content-Type: application/sdp
>        Content-Length: 284
>
>        v=0
>        o=root 3848 3848 IN IP4 YYY.YYY.YYY.12
>        s=session
>        c=IN IP4 YYY.YYY.YYY.12
>        t=0 0
>        m=audio 6962 RTP/AVP 0 3 8 101
>        a=rtpmap:0 PCMU/8000
>        a=rtpmap:3 GSM/8000
>        a=rtpmap:8 PCMA/8000
>        a=rtpmap:101 telephone-event/8000
>        a=fmtp:101 0-16
>        a=silenceSupp:off - - - -
>        a=ptime:20
>        a=sendrecv
>
> 09:08:37.759853 IP (tos 0x10, ttl  64, id 0, offset 0, flags [DF],
> proto: UDP (17), length: 345) XXX.XXX.XXX.24.sip > YYY.YYY.YYY.12.sip:
> SIP, length: 317
>        SIP/2.0 100 Giving a try
>        Via: SIP/2.0/UDP YYY.YYY.YYY.12:5060;branch=z9hG4bK1fe6bb8d;rport=5060
>        From: "device" ;tag=as0fb4ac11
>        To: 
>        Call-ID: 6d25870c2c9d32c90c6e4498079dc...@yyy.yyy.yyy.12
>        CSeq: 102 INVITE
>        Server: VistaVox SIP Service
>        Content-Length: 0
>
>
> 09:08:40.113592 IP (tos 0x10, ttl  64, id 0, offset 0, flags [DF],
> proto: UDP (17), length: 874) XXX.XXX.XXX.24.sip > YYY.YYY.YYY.12.sip:
> SIP, length: 846
>        SIP/2.0 183 Session Progress
>        Via: SIP/2.0/UDP
> YYY.YYY.YYY.12:5060;received=YYY.YYY.YYY.12;branch=z9hG4bK1fe6bb8d;rport=5060
>        Record-Route: 
>        From: "device" ;tag=as0fb4ac11
>        To: ;tag=as2661bdde
>        Call-ID: 6d25870c2c9d32c90c6e4498079dc...@yyy.yyy.yyy.12
>        CSeq: 102 INVITE
>        User-Agent: Asterisk PB

[OpenSIPS-Users] Basic dynamic routing question

2009-06-19 Thread James Wiegand
Hi all,

I am trying to get dynamic routing working and can't seem to get any
traction on the problem

when I do a do_routing() call in the request loop nothing seems to
happen.  I am at a loss troubleshooting this problem.  How can you
tell what possible matches there are?

Routing setup I have includes the following items - OpenSIPS 1.5.1

table dr_rules:

ruleid  groupid prefix  timerec priorityrouteid 
gwlist  description
1   1   870 20040101T00 0   0   
1   Default route

table dr_gateways:

gwidtypeaddress  strip  pri_prefix  attrs   
description
1   10  XXX.XXX.XXX.XXX  0  NULLNULLProvider

route {

...
do_routing("1");
xlog("-gw attr is $avp(s:dr_attrs)\n");

if(use_next_gw())
{
  if (!t_relay())
  {
sl_reply_error();
  }
  exit;


} else {
  sl_send_reply("503", "No destination available");
  exit;
}

}

>From the log:

Jun 19 17:10:55 [9270] DBG:drouting:do_routing: using dr group 1
Jun 19 17:10:55 [9270] DBG:drouting:internal_check_rt: found rgid 1
(rule list 0xb60d4dc8)
Jun 19 17:10:55 [9270] DBG:drouting:do_routing: setting attr [] as for ruri
Jun 19 17:10:55 [9270] DBG:drouting:do_routing: setting the gw [0] as
ruri "sip:8706569...@xxx.xxx.xxx.xxx"
-gw attr is 


Thanks,

-jim
-- 
-- 
Jim Wiegand
---
Home:  originaljimda...@gmail.com
AIM: originaljimdandy

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


Re: [OpenSIPS-Users] Basic dynamic routing question

2009-06-23 Thread James Wiegand
Ah, yes, now I see where I went wrong. In switching to OpenSIPS, I
left off a prefix.

Thanks so much for your help!!!

-jim

On Tue, Jun 23, 2009 at 3:42 AM, Bogdan-Andrei
Iancu wrote:
> Hi James,
>
> I would say the script ids working, but you do not print the right stuff.
> After do_routing() the first GW is already set as ruri in the request;
> $avp(s:dr_ruri) is storing the next GWs to be used (if any). Try:
>
>
> ..
> modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
> modparam("drouting", "ruri_avp", '$avp(s:dr_ruri)')
> ...
> route {
> ...
>       # set failure route for forward
>       t_on_failure("1");
>       # detect resources and do balancing
>       xlog("-Doing routing\n");
>
>       if (!do_routing("1")) {
>           sl_send_reply("503", "No destination available");
>           exit;
>       }
>       xlog("- gw attr is $avp(s:dr_attrs)\n");
>       xlog("- ruri is $ru\n");
>
>       if (!t_relay()) {
>         xlog("- relay failed\n");
>         sl_reply_error();
>     }
> }
>
>
>
>
> Regards,
> Bogdan
>
>
> James Wiegand wrote:
>>
>> Still no luck ... I can see the routing match, but the relay always fails.
>>
>> -Doing routing
>> Jun 22 11:55:35 [12508] DBG:drouting:do_routing: using dr group 1
>> Jun 22 11:55:35 [12508] DBG:drouting:internal_check_rt: found rgid 1 (rule
>> list
>>  0xb60cadc8)
>> Jun 22 11:55:35 [12508] DBG:drouting:do_routing: setting attr [] as for
>> ruri
>> Jun 22 11:55:35 [12508] DBG:drouting:do_routing: setting the gw [0] as
>> ruri "si
>> p:87...@xx.xx.xx.59 <mailto:p%3a8706569...@66.234.135.59>"
>> - gw attr is
>> - ruri is 
>> Jun 22 11:55:35 [12508] DBG:core:pv_get_dsturi: no destination URI
>> -to uri is 
>> Jun 22 11:55:35 [12508] DBG:tm:t_newtran: transaction on entrance=(nil)
>> Jun 22 11:55:35 [12508] DBG:core:parse_headers: flags=
>> Jun 22 11:55:35 [12508] DBG:core:get_hdr_field: content_length=388
>> Jun 22 11:55:35 [12508] DBG:core:get_hdr_field: found end of header
>>
>>
>> My config:
>>
>> ...
>> modparam("drouting", "attrs_avp", '$avp(s:dr_attrs)')
>> modparam("drouting", "ruri_avp", '$avp(s:dr_ruri)')
>> ...
>> route {
>> ...
>>        # set failure route for forward
>>        t_on_failure("1");
>>        # detect resources and do balancing
>>        xlog("-Doing routing\n");
>>
>>      if (!do_routing("1")) {
>>        sl_send_reply("503", "No destination available");
>>        exit;
>>       }
>>      xlog("- gw attr is $avp(s:dr_attrs)\n");
>>      xlog("- ruri is $avp(s:dr_ruri)\n");
>>
>>      xlog("-to uri is $du\n");
>>
>>      if (!t_relay())
>>      {
>>          xlog("- relay failed\n");
>>          sl_reply_error();
>>      }
>> }
>>
>> What am I missing here?
>>
>> -jim
>>
>> On Fri, Jun 19, 2009 at 6:05 PM, Bogdan-Andrei Iancu
>> mailto:bog...@voice-system.ro>> wrote:
>>
>>    Hi James,
>>
>>    The logic is a bit different that the one for lcr - the
>>    do_routing() functions already pushes the initial destination, so
>>    no need to do the "use_next_gw" after it:
>>
>>    route {
>>
>>    ...
>>          if (!do_routing("1")) {
>>
>>            sl_send_reply("503", "No destination available");
>>            exit;
>>           }
>>          xlog("-gw attr is $avp(s:dr_attrs)\n");
>>
>>
>>          if (!t_relay())
>>          {
>>              sl_reply_error();
>>          }
>>
>>    }
>>
>>
>>    Regards,
>>    Bogdan
>>
>>
>>
>>    James Wiegand wrote:
>>
>>        Hi all,
>>
>>        I am trying to get dynamic routing working and can't seem to
>>        get any
>>        traction on the problem
>>
>>        when I do a do_routing() call in the request loop nothing seems to
>>        happen.  I am at a loss troubleshooting this problem.  How can you
>>        tell what possible matches there are?
>>
>>        Routing setup I have includes the following items - OpenS

[OpenSIPS-Users] SIP Consulting Opportunity

2009-07-23 Thread James Wiegand
Hi,

We are looking for a SIP consultant with experience in wholesale
provisioning, dynamic routing, and distributed servers.

Please send me a brief background, rates and availability if interested.

Mountain Home, AR, Houston, TX, or remote OK too.

Apologies to the list if this is out of place.

-jim


-- 
-- 
Jim Wiegand
---
Home:  originaljimda...@gmail.com
AIM: originaljimdandy

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


[OpenSIPS-Users] drouting crash in 1.6.2

2010-05-06 Thread James Wiegand
Hi,

I am just moving to 1.6.2 and it works great except for the drouting
module crashes out under load.  I saw this happening before in the
forum but never saw a resolution.  Is there a fix for this?  The same
config works under 1.5.1.

When the crash happens the threads just go away one by one and leave
no core.  Here is an entry from the log:

/usr/local/opensips/sbin/opensips[14398]: Memory status (pkg):
/usr/local/opensips/sbin/opensips[14398]: fm_status (0x81b3d60):
/usr/local/opensips/sbin/opensips[14398]:  heap size= 1048576
/usr/local/opensips/sbin/opensips[14398]:  used= 111464,
used+overhead=136132, free=937112
/usr/local/opensips/sbin/opensips[14398]:  max used (+overhead)= 154524
/usr/local/opensips/sbin/opensips[14398]: dumping free list:
/usr/local/opensips/sbin/opensips[14398]: hash = 2049 fragments no.:
 1, unused:     0              bucket size:     16384 -     32768
(first     21744)
/usr/local/opensips/sbin/opensips[14398]: hash = 2054 fragments no.:
 1, unused:     0              bucket size:    524288 -   1048576
(first    915368)
/usr/local/opensips/sbin/opensips[14398]: TOTAL:      2 free fragments
= 937112 free bytes
/usr/local/opensips/sbin/opensips[14398]: TOTAL: 937112 large bytes
/usr/local/opensips/sbin/opensips[14398]: TOTAL: 12 overhead
/usr/local/opensips/sbin/opensips[14398]: -


--
--
Jim Wiegand
---
Explicit coquina que est optima medicina.



-- 
-- 
Jim Wiegand
---
Explicit coquina que est optima medicina.

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