[OpenSIPS-Users] Load Balancer Failing on search_body - Looks okay?

Alan Frisch frisch.alan at gmail.com
Thu Apr 14 22:54:24 CEST 2011


Bogdan,

That is correct... however, I replaced the search_body with
codec_exists and seems to be fine for now.  Perhaps over this weekend,
I'll run some tests with the old config and see what pops up in the
logs.

AF

On Wed, Apr 13, 2011 at 9:58 AM, Bogdan-Andrei Iancu
<bogdan at opensips.org> wrote:
> Hi Alan,
>
> So if I understand correctly, the load_balance() function fails and you send
> the 503 from the script ? if so, do you get anything relevant in logs (about
> the failure)? try to set debug=6 to get more info (not recommended if a
> production system).
>
> Regards,
> Bogdan
>
> On 04/11/2011 05:22 AM, Alan Frisch wrote:
>>
>> For some odd reason my OpenSIPs load_balancer module seems to fail
>> with certain clients.  Works fine with Asterisk and some other
>> servers, but have had the occasional client get a 503 returned to it.
>> In this case, it's a SIP application for an Android phone... I get a
>> "bug - cannot find request resource in dst" in my logs.
>>
>> Relevant OpenSIPs code is below.  I'm searching for PCMU and PCMA, for
>> some reason the tutorial uses search_body with "G711" but you never
>> see G711 in SDP, AFAIK.
>>
>> if (!search_body("[Pp][Cc][Mm][Uu]")&&  !search_body("[Pp][Cc][Mm][Aa]"))
>> {
>>                 if (!load_balance("1","transc;pstn","1"))
>>                 {
>>                         t_reply("503", "Circuit Unavailable - TP");
>>                         exit;
>>                 }
>>         } else {
>>                 if (!load_balance("1","pstn","1"))
>>                 {
>>                         t_reply("503", "Circuit Unavailable - P");
>>                         exit;
>>                 }
>>         }
>> }
>>
>> The incoming SDP is:
>>
>> v=0
>> o=- 3511475179 3511475179 IN IP4 99.28.22.29
>> s=pjmedia
>> c=IN IP4 99.228.252.229
>> t=0 0
>> a=X-nat:8
>> m=audio 4000 RTP/AVP 0 8 18 101
>> a=rtcp:4001 IN IP4 99.28.22.29
>> a=rtpmap:0 PCMU/8000
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:18 G729/8000
>> a=fmtp:18 annexb=no
>> a=sendrecv
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-15
>>
>>
>> My LB list looks like this:
>>
>> Destination:: sip:x.x.x.10:5060 id=1 group=1 enabled=yes auto-re=on
>>         Resource:: pstn max=30 load=5
>>         Resource:: transc max=30 load=1
>> Destination:: sip:x.x.x.11:5060 id=10 group=1 enabled=yes auto-re=on
>>         Resource:: pstn max=40 load=7
>>         Resource:: transc max=40 load=2
>>
>> The destination machines in the LB list are not loaded down but the
>> call falls down to the second part (since no transcoding is needed)
>> but then fails totally.  Is there a way to find out what resource it
>> is trying to look for?
>>
>> Any help is appreciated!
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS eBootcamp - 2nd of May 2011
> OpenSIPS solutions and "know-how"
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list