<div>Hey peoples,</div>
<div> </div>
<div>I'm trying to write a script to pick up a leg of a call. It seems to work right...except I'm getting this error and the call leg dies after like a minute or so. </div>
<div> </div>
<div><font face="courier new,monospace">Oct 13 16:30:35 NOTICE[10799]: chan_sip.c:10201 do_monitor: Disconnecting call 'SIP/x7062618529b-0a27' for lack of RTP activity in 61 seconds<br></font></div>
<div>This is the section of code I added. Most of it came from the park pickup file, I think. cur is the channel I'm trying to get and chan is the channel I'm on. </div>
<div><font size="2">
<p><font face="courier new,monospace">struct ast_bridge_config config;<br>ast_moh_stop(cur);<br>ast_indicate(cur, AST_CONTROL_UNHOLD);<br>if (ast_channel_make_compatible(chan, cur) < 0) {<br>ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for bridge\n", chan->name, cur->name);
<br>ast_mutex_unlock(&cur->lock);<br>ast_mutex_unlock(&chan->lock);<br>return -1;<br>}<br>memset(&config, 0, sizeof(struct ast_bridge_config));<br>ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
<br>ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);<br>config.timelimit = 0;<br>config.play_warning = 0;<br>config.warning_freq = 0;<br>config.warning_sound=NULL;<br>if (ast_test_flag(cur, AST_FLAG_BLOCKING)) {
<br>ast_clear_flag(cur, AST_FLAG_BLOCKING);<br>}<br>if (ast_bridge_call(chan, cur, &config)) {<br>// call failed<br>} else {<br>ast_mutex_unlock(&cur->lock);<br>ast_mutex_unlock(&chan->lock);<br>return 0;
<br>}</font></p>
<p></p></font>I'm not getting any compile errors or errors running this script until the error above. Also, it only ends the one leg of the call that calls this function, the other leg goes to limbo somewhere...it's still connected but has no audio or anything. I can make calls all day long without getting the rtp error, so it's got to be something in this code. Please, if anyone sees what would be causing this, please help. Thanks a bunch.
<p>Flobi<br clear="all"><br>-- <br>Automated Signature: This message is from Flobi of <a href="http://Flobi.com">Flobi.com</a>.<br>Visit my website if you like: <a href="http://www.flobi.com/">http://www.flobi.com/</a><br>
<br>Please remember to tip your waitress and bartender. They are doing their best to serve you and your indignant, malcontent attitude. <br>-- </p></div>