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

Alan Frisch frisch.alan at gmail.com
Mon Apr 11 04:22:12 CEST 2011

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");
        } else {
                if (!load_balance("1","pstn","1"))
                        t_reply("503", "Circuit Unavailable - P");

The incoming SDP is:

o=- 3511475179 3511475179 IN IP4
c=IN IP4
t=0 0
m=audio 4000 RTP/AVP 0 8 18 101
a=rtcp:4001 IN IP4
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
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!

More information about the Users mailing list