Call is initiated by LCR:
If a call is received from LCR, a MESSAGE_NEWREF is received first.
+The ref_was_assigned ist set to 1.
A new chan_call instance is created. The call reference (ref) is given by
-MESSAGE_NEWREF. The state is CHAN_LCR_STATE_IN_PREPARE.
+the received MESSAGE_NEWREF. The state is CHAN_LCR_STATE_IN_PREPARE.
After receiving MESSAGE_SETUP from LCR, the ast_channel instance is created
using ast_channel_alloc(1). The setup information is given to asterisk.
The new Asterisk instance pointer (ast) is stored to chan_call structure.
If a call is requested from Asterisk, a new chan_call instance is created.
The new Asterisk instance pointer (ast) is stored to chan_call structure.
The current call ref is set to 0, the state is CHAN_LCR_STATE_OUT_PREPARE.
-If the call is received (lcr_call) A MESSASGE_NEWREF is sent to LCR requesting
+If the call is received (lcr_call) A MESSAGE_NEWREF is sent to LCR requesting
a new call reference (ref).
+The ref_was_assigned ist set to 1.
Further dialing information is queued.
After the new callref is received by special MESSAGE_NEWREF reply, new ref
is stored in the chan_call structure.
A MESSAGE_RELEASE is received with the call reference (ref) to be released.
The current ref is set to 0, to indicate released reference.
+The ref_was_assigned==1 shows that there is no other ref to be assigned.
The state changes to CHAN_LCR_STATE_RELEASE.
ast_queue_hangup() is called, if asterisk instance (ast) exists, if not,
the chan_call instance is destroyed.
a MESSAGE_RELEASE is sent to LCR and the chan_call instance is destroyed.
If the ref is 0 and the state is not CHAN_LCR_STATE_RELEASE, the new state is
set to CHAN_LCR_STATE_RELEASE.
+The ref_was_assigned==0 shows that a ref is still requested.
Later, if the MESSAGE_NEWREF reply is received, a MESSAGE_RELEASE is sent to
LCR and the chan_call instance is destroyed.
If the ref is 0 and the state is CHAN_LCR_STATE_RELEASE, see the proceedure
/* check bridge */
if (!call) return;
if (!call->bridge_call) return;
- CDEBUG(call, NULL, "Sending message due briding.\n");
+ CDEBUG(call, NULL, "Sending message due bridging.\n");
send_message(message_type, call->bridge_call->ref, param);
}
/* use bridge to forware message not supported by asterisk */
if (call->state == CHAN_LCR_STATE_CONNECT) {
- CDEBUG(call, call->ast, "Call is connected, briding.\n");
+ CDEBUG(call, call->ast, "Call is connected, bridging.\n");
bridge_message_if_bridged(call, message_type, param);
}
}
struct ast_frame *f;
int bridge_id;
- CDEBUG(NULL, NULL, "Received briding request from Asterisk.\n");
+ CDEBUG(NULL, NULL, "Received bridging request from Asterisk.\n");
carr[0] = ast1;
carr[1] = ast2;
/* join, if both call instances uses dsp */
if (!call1->nodsp && !call2->nodsp) {
- CDEBUG(NULL, NULL, "Both calls use DSP, briding via DSP.\n");
+ CDEBUG(NULL, NULL, "Both calls use DSP, bridging via DSP.\n");
/* get bridge id and join */
bridge_id = new_bridge_id();
bchannel_join(call2->bchannel, bridge_id);
} else
if (call1->nodsp && call2->nodsp)
- CDEBUG(NULL, NULL, "Both calls use no DSP, briding in channel driver.\n");
+ CDEBUG(NULL, NULL, "Both calls use no DSP, bridging in channel driver.\n");
else
- CDEBUG(NULL, NULL, "One call uses no DSP, briding in channel driver.\n");
+ CDEBUG(NULL, NULL, "One call uses no DSP, bridging in channel driver.\n");
call1->bridge_call = call2;
call2->bridge_call = call1;
}
- CDEBUG(NULL, NULL, "Releasing bride.\n");
+ CDEBUG(NULL, NULL, "Releasing bridge.\n");
/* split channels */
ast_mutex_lock(&chan_lock);