[asterisk-ss7] libss7 and IAM/ACM

Kristian Nielsen knmeister at gmail.com
Thu Jun 19 06:00:22 CDT 2008


Anders Baekgaard <ab at dicea.dk> writes:

> The current behaviour of chan_ss7 where ACM is sent when there is a match in 
> the dial plan is right in most cases. It allows chan_ss7 to automatically 
> send REL with cause value UNALLOCATED when there is no math.

Agree.

The use_connect option was made to avoid sending ACM when the dialplan would
in any case cause ANM to be sent immediately afterwards; this produces an
annoying cut-off dial tone for voice mail or other automatic answering
dialplans.

But if the dialplan instead is used to further route the call via SIP or
something, sending ACM is good; once we start executing the dialplan the
address is certainly considered complete, as there is no way to process any
extra digits anyway.

> Christian's path will ensure that ACM is sent before any CPG or ANM is sent, 
> if you also specify use_connect in the configuration file. However, the patch 
> is wrong because it implicitly changes timeout values. If chan_ss7 does not 
> receive CPG or ANM, and consequenly does not send ACM to the calling swith, 
> then the calling switch, after sending IAM, will timeout waiting for ACM, 
> rather than waiting for ANM or CON. These timeout values are different.

Yeah. Asterisk does not work well as a general SS7/ISUP switch/router.

The use_connect option, and any implicit/explicit sending of ACM controlled by
dialplan, is at best hacks that may be useful in special situations if used
carefully.

>
> There is one more issue in the patch: the chunk
>
> @@ -886,7 +886,13 @@ static int ss7_indicate(struct ast_channel *chan, int 
> condition, const void* dat
>    case AST_CONTROL_RINGING:
>      ast_log(LOG_DEBUG, "Sending ALERTING call progress for CIC=%d in-band 
> ind=%d.\n",
>  	    pvt->cic, pvt->has_inband_ind);
> -    ss7_send_call_progress(pvt, 0x01);
> +    if (pvt->state == ST_GOT_IAM) {
> +      isup_send_acm(pvt, 1);
> +      pvt->state = ST_SENT_ACM;
> +    } else {
> +      ss7_send_call_progress(pvt, 0x01);
> +    }
> +
>
> should be
>
> @@ -886,7 +886,12 @@ static int ss7_indicate(struct ast_channel *chan, int 
> condition, const void* dat
>    case AST_CONTROL_RINGING:
>      ast_log(LOG_DEBUG, "Sending ALERTING call progress for CIC=%d in-band 
> ind=%d.\n",
>  	    pvt->cic, pvt->has_inband_ind);
> -    ss7_send_call_progress(pvt, 0x01);
> +    if (pvt->state == ST_GOT_IAM) {
> +      isup_send_acm(pvt, 1);
> +      pvt->state = ST_SENT_ACM;
> +    }
> +     ss7_send_call_progress(pvt, 0x01);
> +
>
> otherwise chan_ss7 will not pass on the first received indication.

Thanks. Yes, it seems some more work is needed for this, probably any initial
indication should be encoded as parameters in the ACM when possible, and sent
as separate CPG when not.

 - Kristian.



More information about the asterisk-ss7 mailing list