[Freeswitch-users] Hint for DTMF handling in sofia.c

Michael Jerris mike at jerris.com
Thu Jan 8 06:09:23 PST 2009


This workaround was added to address phones that specifically send  
info dtmf incorrectly.  Do you have a specific device that is not  
working with 1.0.2?  If so, can you please show the exact packet it is  
sending.

Mike

On Jan 8, 2009, at 6:46 AM, Helmut Kuper wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> today we found a DTMF problem in an older FS build. We weren't able to
> pass "*" and "#" to PSTN. FS sents those chars as "0". I fixed that on
> my own. After that I searched in build 11055M to if it was already  
> fixed
> in trunk.
>
> I found it was fixed in parts. I found that in INFO messages of
> application type "dtmf-relay" the rfc2833 DTMF events  "*#ABCD" are  
> now
> handled correct, but "EF" are still ignored. In INFO messages of
> application type "dtmf" EVENTS 0-9 are considered. The others are  
> still
> ignored resp. changed to "0".
>
>
> So I would recommend to replace the code beginning in line 3535
>
> <<<<<<<<<<<<<<<<<<
> if (*signal_ptr && (*signal_ptr == '*' || *signal_ptr == '#' ||
> *signal_ptr == 'A' || *signal_ptr == 'B' || *signal_ptr == 'C' ||
> *signal_ptr == 'D')) {
>                                                dtmf.digit =  
> *signal_ptr;
>                                        } else {
>                                                tmp = atoi(signal_ptr);
>                                                dtmf.digit =
> switch_rfc2833_to_char(tmp);
> 		}
> <<<<<<<<<<<<<<<<<<
>
>
> with this two lines:
>
>
>>>>>>>>>>>>>>>
> tmp=switch_char_to_rfc2833(*signal_ptr);
> dtmf.digit = switch_rfc2833_to_char(tmp);
>>>>>>>>>>>>>>>
>
>
> This will handle all rfc2833 dtmf events in dtmf-relay INFO messages
> correctly. This is tested by me with snom and AVM clients.
>
>
> Further replace the line 3556
>
> <<<<<<<<<<<<<<
> int tmp = atoi(sip->sip_payload->pl_data);
> <<<<<<<<<<<<<<
>
> with this line:
>>>>>>>>>>>>>>>
> int tmp=switch_char_to_rfc2833(*(sip->sip_payload->pl_data));
>>>>>>>>>>>>>>>
>
> That should handle all rfc2833 DTMF-Events in dtmf INFO messages.
> This last patch isn't tested by me, cause I've no phone which  
> genereates
> INFO messages of type applicatin/dtmf...
>
> best regards and a late "happy new year" to all of u!
> Helmut
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
>
> iEYEARECAAYFAkll54QACgkQ4tZeNddg3dxJgwCfULx8X9hw6xDd1q8r/Iih5unx
> c6EAn1T/7GK56pLLrMi140x50HLnO6i1
> =3ENR
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list