[asterisk-users] Transfer call from analog telephone

Daniel Bareiro daniel-listas at gmx.net
Sat Jun 6 21:16:58 CDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Bareiro wrote:

> As I've commented in a previous message, after dial *60 (of *600 to Echo
> test), I obtain like a tone cut in three parts followed of a continuous tone,
> causing that I'm incapable to dial the extension completely. The
> "waitfordigit" appears after to hangup. The <cell_number> seems to be some
> number that I has dial previously. Testing again with a SIP extension, this
> problem does not happen.
>
> Also it draws attention to me that the DTMF has a duration of 0ms.
>
> It is peculiar... after to have a restart of Asterisk, I can dial without
> problems to *600. This is Asterisk log corresponding to the successful
> communication with the extension: 
>
> - --------------------------------------------------------------------------
> [Jun  4 23:03:30] DTMF[28905]: channel.c:2229 __ast_read: DTMF end '*' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:03:30] DTMF[28905]: channel.c:2271 __ast_read: DTMF end accepted without begin '*' on DAHDI/2-1
> [Jun  4 23:03:30] DTMF[28905]: channel.c:2282 __ast_read: DTMF end passthrough '*' on DAHDI/2-1
> [Jun  4 23:03:30] DTMF[28905]: channel.c:2229 __ast_read: DTMF end '6' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:03:30] DTMF[28905]: channel.c:2271 __ast_read: DTMF end accepted without begin '6' on DAHDI/2-1
> [Jun  4 23:03:30] DTMF[28905]: channel.c:2282 __ast_read: DTMF end passthrough '6' on DAHDI/2-1
> [Jun  4 23:03:31] DTMF[28905]: channel.c:2229 __ast_read: DTMF end '0' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:03:31] DTMF[28905]: channel.c:2271 __ast_read: DTMF end accepted without begin '0' on DAHDI/2-1
> [Jun  4 23:03:31] DTMF[28905]: channel.c:2282 __ast_read: DTMF end passthrough '0' on DAHDI/2-1
> [Jun  4 23:03:31] DTMF[28905]: channel.c:2229 __ast_read: DTMF end '0' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:03:31] DTMF[28905]: channel.c:2271 __ast_read: DTMF end accepted without begin '0' on DAHDI/2-1
> [Jun  4 23:03:31] DTMF[28905]: channel.c:2282 __ast_read: DTMF end passthrough '0' on DAHDI/2-1
>     -- Executing [*600 at phones:1] Answer("DAHDI/2-1", "") in new stack
> [Jun  4 23:03:31] DEBUG[28905]: chan_dahdi.c:3174 dahdi_answer: Took DAHDI/2-1 off hook
>     -- Executing [*600 at phones:2] Playback("DAHDI/2-1", "demo-echotest") in new stack
>     -- <DAHDI/2-1Playing 'demo-echotest' (language 'es')
>  == Spawn extension (phones, *600, 2) exited non-zero on 'DAHDI/2-1'
>     -- Hungup 'DAHDI/2-1'
> - --------------------------------------------------------------------------
>
> As you will see, the duration is always of 0 ms (also when I dial to the cell
> phone). After this I make several tests. To dial from cell phone to the analog
> phone and I did not have problems in to call immediately to *600 after to have
> dial to the cell phone in each opportunity. But if from my extension 201 I
> dial the analog phone and after that from my analog phone I dial to *600, it
> happens the same of problem of not to be able to dial beyond *60. Log of the
> CLI for this situation is the following one:
>
> - --------------------------------------------------------------------------
> [Jun  4 23:08:45] DTMF[29017]: channel.c:2229 __ast_read: DTMF end '*' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:08:45] DTMF[29017]: channel.c:2271 __ast_read: DTMF end accepted without begin '*' on DAHDI/2-1
> [Jun  4 23:08:45] DTMF[29017]: channel.c:2282 __ast_read: DTMF end passthrough '*' on DAHDI/2-1
> [Jun  4 23:08:46] DTMF[29017]: channel.c:2229 __ast_read: DTMF end '6' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:08:46] DTMF[29017]: channel.c:2271 __ast_read: DTMF end accepted without begin '6' on DAHDI/2-1
> [Jun  4 23:08:46] DTMF[29017]: channel.c:2282 __ast_read: DTMF end passthrough '6' on DAHDI/2-1
> [Jun  4 23:08:46] DTMF[29017]: channel.c:2229 __ast_read: DTMF end '0' received on DAHDI/2-1, duration 0 ms
> [Jun  4 23:08:46] DTMF[29017]: channel.c:2271 __ast_read: DTMF end accepted without begin '0' on DAHDI/2-1
> [Jun  4 23:08:46] DTMF[29017]: channel.c:2282 __ast_read: DTMF end passthrough '0' on DAHDI/2-1
>     -- Blacklisting number 201
> [Jun  4 23:08:54] DEBUG[29017]: chan_dahdi.c:6244 ss_thread: waitfordigit returned < 0...
>     -- Hungup 'DAHDI/2-1'
> - --------------------------------------------------------------------------

Testing some more I could verify than if I changed the number for echo test to
*700 instead of *600, the problem of not being able to dial beyond *60
disappears. Investigating a little in Internet and reading the source code, I
found the following in the line 2834 of chan_mgcp.c file:

- -----------------------------------------------------------------------------
2834       } else if (!ast_strlen_zero(p->lastcallerid) && !strcmp(p->dtmf_buf, "*60")) {
2835               if (option_verbose > 2) {
2836                       ast_verbose(VERBOSE_PREFIX_3 "Blacklisting number %s\n", p->lastcallerid);
2837               }
2838               res = ast_db_put("blacklist", p->lastcallerid, "1");
2839               if (!res) {
2840                       /*res = tone_zone_play_tone(p->subs[index].zfd, DAHDI_TONE_DIALRECALL);*/
2841                       transmit_notify_request(sub, "L/sl");
2842                       memset(p->dtmf_buf, 0, sizeof(p->dtmf_buf));
2843                       len = 0;
2844               }
- -----------------------------------------------------------------------------

I do not have left very clear what this portion of code does, but I have the
sensation that the problem that I had happens through this. What do you think? 

Regards,
Daniel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkorI2sACgkQZpa/GxTmHTdcfwCfY4s3ffPyq2y2gKrTIgWCyJyx
+a8AoIFn+8qdPVi05pRkTMugdIaoGfVo
=1owu
-----END PGP SIGNATURE-----




More information about the asterisk-users mailing list