[asterisk-ss7] possible overlapped dial bug in chan_ss7

Facundo Ameal fameal at gmail.com
Fri Jul 17 13:27:03 CDT 2009


On Tue, Jun 9, 2009 at 06:28, Ngo-Vi Hoai-Anh<hoaianh at gmx.de> wrote:
> Dear chan_ss7 users,
>
> I've bumped into a problem when using chan_ss7 1.0.0 in Germany. Overlapped
> dialing didn't work properly.
>
> The relevant ss7 configuration reads
>
> ...
> enable_st => yes
> t35 => 4000,st
>
> Asterisk configuration reads
> ...
> exten => _0X.,1,Dial(ss7/myss7/${EXTEN:1})
> ...
>
> The DTM switch is configured  to signal incoming calls to Asterisk when it
> receives min. 7 digits.
>
> If I dial a number longer than 7 digits using an analog handset. Asterisk
> tried to make ougoing call as soon as it has received 7 digits. Everything
> is OK if I use a digital handset, where the number is sent as a block.
>
> After having traced the debug output I've found out when I call using analog
> handset the inmsg->iam.dni.complete is set to 0 but the function
> process_iam() calls check_iam_sam(pvt) anyway.
>
> I've modified the code a bit and it works fine for me now. The modification
> is to be found in the attached patch file.
>
> I'm very grateful if someone can take a look at my modification and gives
> feedback.
>
> Cheers,
> Hoai-Anh
>
> --- chan_ss7-1.0.0/l4isup.c     2007-11-27 10:18:05.000000000 +0100
> +++ chan_ss7-1.0.0.hngovi/l4isup.c      2009-06-08 16:04:31.000000000 +0200
> @@ -2655,7 +2655,8 @@
>   remove_from_idlelist(pvt);
>   pvt->state = ST_GOT_IAM;
>   memcpy(&pvt->iam, &inmsg->iam, sizeof(pvt->iam));
> -  check_iam_sam(pvt);
> +  /* hngovi: if DNI complete call check_iam_sam(pvt) */
> +  if (inmsg->iam.dni.complete == 1) check_iam_sam(pvt);
>   pvt->link->linkset->incoming_calls++;
>  }
>
> @@ -2675,7 +2676,10 @@
>   }
>   strcat(pvt->iam.dni.num, inmsg->sam.sni.num);
>   pvt->iam.dni.complete = pvt->iam.dni.complete || inmsg->sam.sni.complete;
> -  check_iam_sam(pvt);
> +
> +  /* hngovi: if DNI complete call check_iam_sam(pvt) */
> +  if (pvt->iam.dni.complete == 1) check_iam_sam(pvt);
> +
>  }

Hoai-Anh,
   I've met the same issue a couple of days ago and tested your patch.
Could make it solve the overlap dial. I 've noticed that t35 timer was
not started anymore, and needed it. I found another solution for this,
an dit works for me. It's a modification to check_iam_sam() function.
Take a look at the patch, when Asterisk could handle the extension, it
didn't take into account if the number was completed or not.

I wrote a short article about this issue here:
http://facundoameal.blogspot.com/2009/07/overlap-dial-and-chanss7.html
 I also attach the patch and paste it inline.

I'd love some feedback and thoughts about this.


--- chan_ss7-1.1/l4isup.c       2009-07-17 14:58:12.000000000 -0300
+++ chan_ss7-1.1.fameal/l4isup.c        2009-07-17 15:04:22.000000000 -0300
@@ -1618,8 +1618,9 @@ static void handle_complete_address(stru

 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);
+  /* fameal: in all cases check if DNI is complete */
+  int complete = pvt->iam.dni.complete &&
+    (pvt->link->linkset->enable_st ||
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");

Best,

-- 
Facundo Ameal.
fameal<at>gmail<dot>com
Linux User #395088
Asterisk User #299

Share your knowledge, use free software.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: l4isup_overlap_dial.patch
Type: text/x-patch
Size: 748 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-ss7/attachments/20090717/d14eb3fd/attachment.bin 


More information about the asterisk-ss7 mailing list