[asterisk-ss7] chan_ss7 SAM and overlap signaling

Kristian Nielsen knielsen at mysql.com
Thu Mar 1 00:27:43 MST 2007


Ercan Yücebas <ercan at goldenphone.ch> writes:

> It looks like that chan_ss7 is checking whether the incoming number
> matches any extension, just before it gets the whole number?
> Therefore chan_ss7 doesn’t expect other SAM's, because there is not a
> matching extension
> After that it never goes to second choise, where it starts the timer,
> RIGHT?
> 
> My ;
> enable_st is yes
> 
> 
> static void check_iam_sam(struct ss7_chan* pvt)
> {
>   int complete = (pvt->link->linkset->enable_st &&
> pvt->iam.dni.complete) ||
>     ast_exists_extension(pvt->owner, pvt->context, pvt->iam.dni.num, 1,
> pvt->iam.rni.num);
>   if (complete) {
>     pvt->iam.dni.complete = 1;
>     ast_log(LOG_DEBUG, "Setting iam.dni.complete\n");
>     handle_complete_address(pvt);
>   } else {
>     if (ast_canmatch_extension(pvt->owner, pvt->context,
> pvt->iam.dni.num, 1, pvt->iam.rni.num) != 0) {
>       ast_log(LOG_DEBUG, "Processing addr %s, incomplete, starting
> T35\n", pvt->iam.dni.num);
>       t35_start(pvt);
>     }
>     else {
>       ast_log(LOG_DEBUG, "Unable to match extension, context: %s, dni:
> %s, rni: %s\n", pvt->context, pvt->iam.dni.num, pvt->iam.rni.num);
>       initiate_release_circuit(pvt, AST_CAUSE_UNALLOCATED);
>     }
>   }
> }

First, you need to determine who has the responsibility of determining how
many digits are needed for a complete address.

If it is a switch before you, then it will terminate the number with a 0xF
'digit', which is the pvt->iam.dni.complete condition I think.

If not, then _you_ need to determine if the address is complete, as the
further path into Asterisk does not support overlapped dialing.

This of course can get a bit complex, for example when people set up a local
gateway for cheap international calls, the number of digits required can
require detailed knowledge about the dial plan in individual contries. I think
some people try to handle that instead with timeouts (there is some timer for
this I believe), but it is not ideal.

I believe the above code tries to determine whether the address is complete by
examining the Asterisk dial plan and seeing if there is a match. You probably
have overlapping extensions there, causing an early match.

Basically, to support overlapped dialing, you clearly cannot have overlapping
numbers like '220' and 220123', as then there is no way of knowing, after user
dials '220', whether more digits are supposed to arrive.

 - Kristian.

-- 
Kristian Nielsen, Software Developer
MySQL AB, Hvidovre, Denmark, www.mysql.com
Office: +46 18 174 400 ext. 4525
Are you MySQL certified?  www.mysql.com/certification



More information about the asterisk-ss7 mailing list