Forum Discussion

Joe_Erchul_4263's avatar
Joe_Erchul_4263
Icon for Nimbostratus rankNimbostratus
Aug 01, 2012

Reselecting RTSP server based on RTSP_RESPONSE

Gang,

 

 

Our voice team has requested that we architect Music on Hold fail-over behind our load-balancers to their Helix servers. Packet captures show that the servers will send a status code of 203 if the media stream is interrupted. I would like to watch for this status code within an iRule, then reselect a different node in the pool if I see that.

 

 

 

I've tried to build my rule as follows, but this is erroring out on line 3:

 

 

 

when RTSP_RESPONSE {

 

if { ([RTSP::status] equals "203")}{

 

LB::reselect pool server_pool

 

}

 

}

 

 

 

 

The error message is as follows:

 

 

 

01070151:3: Rule [/Common/Reselect] error:

 

line 3: [command is not valid in current event context (RTSP_RESPONSE)] [LB::reselect pool server_pool]

 

 

 

I re-worked it so that it doesn't error by using the "when LB_SELECTED", but that results in an immediate reset of the connection when it's applied.

 

 

 

 

 

when LB_SELECTED {

 

if { ([RTSP::status] equals "203")}{

 

LB::reselect pool server_pool

 

}

 

}

 

 

 

 

 

 

Any pearls of wisdom as to what I'm doing incorrectly?

 

 

Thanks in advance.

 

 

 

Joe

 

No RepliesBe the first to reply