[Asterisk-Dev] Disconnecting call ... for lack of RTP activity
Flobi
flobi.com at gmail.com
Thu Oct 13 14:19:47 MST 2005
Hey peoples,
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.
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
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.
struct ast_bridge_config config;
ast_moh_stop(cur);
ast_indicate(cur, AST_CONTROL_UNHOLD);
if (ast_channel_make_compatible(chan, cur) < 0) {
ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for
bridge\n", chan->name, cur->name);
ast_mutex_unlock(&cur->lock);
ast_mutex_unlock(&chan->lock);
return -1;
}
memset(&config, 0, sizeof(struct ast_bridge_config));
ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);
config.timelimit = 0;
config.play_warning = 0;
config.warning_freq = 0;
config.warning_sound=NULL;
if (ast_test_flag(cur, AST_FLAG_BLOCKING)) {
ast_clear_flag(cur, AST_FLAG_BLOCKING);
}
if (ast_bridge_call(chan, cur, &config)) {
// call failed
} else {
ast_mutex_unlock(&cur->lock);
ast_mutex_unlock(&chan->lock);
return 0;
}
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.
Flobi
--
Automated Signature: This message is from Flobi of Flobi.com<http://Flobi.com>
.
Visit my website if you like: http://www.flobi.com/
Please remember to tip your waitress and bartender. They are doing their
best to serve you and your indignant, malcontent attitude.
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20051013/fdf26ec4/attachment.htm
More information about the asterisk-dev
mailing list