[svn-commits] rmudgett: branch rmudgett/ss7_27_knk r373089 - /team/rmudgett/ss7_27_knk/chan...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Sep 14 17:51:11 CDT 2012
Author: rmudgett
Date: Fri Sep 14 17:51:07 2012
New Revision: 373089
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373089
Log:
Fix extension matching with T10. Made RLC set call_leve IDLE.
Modified:
team/rmudgett/ss7_27_knk/channels/sig_ss7.c
Modified: team/rmudgett/ss7_27_knk/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ss7_27_knk/channels/sig_ss7.c?view=diff&rev=373089&r1=373088&r2=373089
==============================================================================
--- team/rmudgett/ss7_27_knk/channels/sig_ss7.c (original)
+++ team/rmudgett/ss7_27_knk/channels/sig_ss7.c Fri Sep 14 17:51:07 2012
@@ -1338,22 +1338,31 @@
*/
static void ss7_match_extension(struct sig_ss7_linkset *linkset, struct sig_ss7_chan *p, ss7_event *e)
{
- ast_verb(3, "SS7 exten: %s complete: %i\n", p->exten, p->called_complete);
- if (ast_exists_extension(NULL, p->context, p->exten, 1, p->cid_num) &&
- (!ast_matchmore_extension(NULL, p->context, p->exten, 1, p->cid_num) || p->called_complete)) {
+ ast_verb(3, "SS7 exten: %s complete: %d\n", p->exten, p->called_complete);
+
+ if (!p->called_complete
+ && linkset->type == SS7_ITU /* ANSI does not support overlap dialing. */
+ && ast_matchmore_extension(NULL, p->context, p->exten, 1, p->cid_num)
+ && !isup_start_digittimeout(linkset->ss7, p->ss7call)) {
+ /* Wait for more digits. */
+ return;
+ }
+ if (ast_exists_extension(NULL, p->context, p->exten, 1, p->cid_num)) {
+ /* DNID is complete */
p->called_complete = 1;
- /* Set DNID */
sig_ss7_set_dnid(p, p->exten);
- if ((e->e == ISUP_EVENT_IAM) ? !(e->iam.cot_check_required || e->iam.cot_performed_on_previous_cic) :
- (!(e->sam.cot_check_required || e->sam.cot_performed_on_previous_cic) || e->sam.cot_check_passed)) {
- ss7_start_call(p, linkset); /* If COT succesful start call! */
- }
- } else if (ast_canmatch_extension(NULL, p->context, p->exten, 1, p->cid_num) && !p->called_complete) {
- isup_start_digittimeout(linkset->ss7, p->ss7call);
- } else if (!ast_matchmore_extension(NULL, p->context, p->exten, 1, p->cid_num) || p->called_complete) {
- ast_debug(1, "Call on CIC for unconfigured extension %s\n", p->exten);
- isup_rel(linkset->ss7, (e->e == ISUP_EVENT_IAM) ? e->iam.call : e->sam.call, AST_CAUSE_UNALLOCATED);
- }
+
+ /* If COT successful start call! */
+ if ((e->e == ISUP_EVENT_IAM)
+ ? !(e->iam.cot_check_required || e->iam.cot_performed_on_previous_cic)
+ : (!(e->sam.cot_check_required || e->sam.cot_performed_on_previous_cic) || e->sam.cot_check_passed)) {
+ ss7_start_call(p, linkset);
+ }
+ return;
+ }
+
+ ast_debug(1, "Call on CIC for unconfigured extension %s\n", p->exten);
+ isup_rel(linkset->ss7, (e->e == ISUP_EVENT_IAM) ? e->iam.call : e->sam.call, AST_CAUSE_UNALLOCATED);
}
/* This is a thread per linkset that handles all received events from libss7. */
@@ -1818,12 +1827,20 @@
break;
}
p = linkset->pvts[chanpos];
+ sig_ss7_lock_private(p);
ast_debug(1, "Digittimeout on CIC: %d PC: %d\n", e->digittimeout.cic, e->digittimeout.opc);
- sig_ss7_lock_private(p);
- p->called_complete = 1;
- sig_ss7_set_dnid(p, p->exten);
- if (!(e->digittimeout.cot_check_required || e->digittimeout.cot_performed_on_previous_cic) || e->digittimeout.cot_check_passed) {
- ss7_start_call(p, linkset); /* If COT succesful start call! */
+ if (ast_exists_extension(NULL, p->context, p->exten, 1, p->cid_num)) {
+ /* DNID is complete */
+ p->called_complete = 1;
+ sig_ss7_set_dnid(p, p->exten);
+
+ /* If COT successful start call! */
+ if (!(e->digittimeout.cot_check_required || e->digittimeout.cot_performed_on_previous_cic) || e->digittimeout.cot_check_passed) {
+ ss7_start_call(p, linkset);
+ }
+ } else {
+ ast_debug(1, "Call on CIC for unconfigured extension %s\n", p->exten);
+ isup_rel(linkset->ss7, e->digittimeout.call, AST_CAUSE_UNALLOCATED);
}
sig_ss7_unlock_private(p);
break;
@@ -2185,6 +2202,7 @@
sig_ss7_lock_owner(linkset, chanpos);
if (!p->owner) {
p->ss7call = isup_free_call_if_clear(ss7, e->rlc.call);
+ p->call_level = SIG_SS7_CALL_LEVEL_IDLE;
} else {
p->do_hangup = SS7_HANGUP_DO_NOTHING;
ast_softhangup_nolock(p->owner, AST_SOFTHANGUP_DEV);
More information about the svn-commits
mailing list