Summary: | ASTERISK-10985: Asterisk rejects legitimate G.729a call with 488 Not Acceptable Here | ||
Reporter: | daniel g (revolution) | Labels: | |
Date Opened: | 2007-12-06 09:33:27.000-0600 | Date Closed: | 2007-12-11 09:47:23.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/RTP |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) accepted.cap ( 1) full ( 2) full2 ( 3) full3 ( 4) full4 ( 5) rejected.cap ( 6) rtp.diff | |
Description: | Linksys/Sipura brand phones send rtpmap:18 as G729a (other brands may as well). Although technically legitimate and correct, INVITE is being rejected with 488 Not acceptable here -- i.e. no compatible codecs despite the fact that realtime sip peer is set to allow g729. After going into Linksys/Sipura SPA-941 (as well as SPA-2100) and altering name of rtpmap:18 to G729 (sans the a) -- call was accepted and completed as expected. Attaching two capture files (for the rejected call and the accepted call) as well as a patch to rtp.c which seems to fix this minor issue (mostly just an annoyance). | ||
Comments: | By: daniel g (revolution) 2007-12-06 09:34:34.000-0600 This is the first patch I've ever tried to write -- so if it has been done incorrectly -- my bad. By: daniel g (revolution) 2007-12-06 11:35:12.000-0600 p.s. if anyone wants to test the patch prior to my being approved by digium... let me know and i'll shoot it to you. Just remember that you probably need a Linksys/Sipura phone or ATA, Ast 1.4.15 (including addons-1.4.5 and codec v33) and active g729 licenses. thanks much. By: Olle Johansson (oej) 2007-12-06 12:54:02.000-0600 Please retest with latest 1.4 from svn, thanks. I belive this was fixed. By: Olle Johansson (oej) 2007-12-06 12:54:52.000-0600 And, according to the bug guidelines, you don't upload pcap files here. We need SIP Debugs with verbose/debug set to 4 so we see what's happening in your asterisk. The pcap doesn't show how Asterisk reacts. Thanks. By: daniel g (revolution) 2007-12-06 14:02:43.000-0600 Also -- they weren't actual pcap files... they're both text files... originally captured using wireshark then edited to text files for the sake of legibility. Have updated to svn 91501 -- issue still present. will upload a second log after editing the codec name from G729a to G729 to show that the calls go through. Would you like me to upload a third log after applying the patch to show that Asterisk now accepts calls from G729a? By: daniel g (revolution) 2007-12-06 14:26:38.000-0600 full - Asterisk rejecting the INVITE b/c rtpmap:18 = G729a full2 - Asterisk accepting the INVITE after editing rtpmap:18 to G729 full3 - (patched) Asterisk accepting the INVITE with rtpmap:18 = G729a By: Olle Johansson (oej) 2007-12-06 14:27:02.000-0600 a=rtpmap:18 G729a/8000¨' That's a label we fail to understand. By: daniel g (revolution) 2007-12-06 14:32:09.000-0600 v=0 o=- 268478 268478 IN IP4 a2a.b2b.c2c.d2d s=- c=IN IP4 a2a.b2b.c2c.d2d t=0 0 m=audio 16448 RTP/AVP 18 101 a=rtpmap:18 G729a/8000 <------- a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:30 a=sendrecv Seems that the Linksys/Sipura hardware we have here refers to G729a precisely whereas Asterisk refers to G729 generically. Worked perfectly up until 1.4.15 upgrade... this may affect other brands of hardware but I do not know as I use Cisco/Linksys/Sipura. By: Steve Langstaff (srl100) 2007-12-07 02:39:13.000-0600 RFC 3551 says: The speech coding algorithms in the main body of G.729 and in G.729 Annex A are fully interoperable with each other, so there is no need to further distinguish between them. An implementation that signals or accepts use of G729 payload format may implement either G.729 or G.729A unless restricted by additional signaling specified elsewhere related specifically to the encoding rather than the payload format. So it would appear that the Linksys/Sipura hardware is being somewhat non-standard in it's rtpmap statement for G.729. By: Olle Johansson (oej) 2007-12-07 04:05:25.000-0600 http://www.iana.org/assignments/rtp-parameters There's no definition of a label "G729a". Linksys has a bug in their software. RFC4856 defines the following headers: audio/G729 audio/G729D audio/G729E And I can't find any documented use of "audio/G729a". Also see * https://lists.cs.columbia.edu/pipermail/sip-implementors/2006-July/013659.html Anyway, let's implement it as an alias if it breaks communication. By: Olle Johansson (oej) 2007-12-07 04:11:26.000-0600 The question here is if they accept us sending only "G729" and not "G729a" By: daniel g (revolution) 2007-12-07 10:35:32.000-0600 I can/will test that for you oej and report back with appropriate logs. By: daniel g (revolution) 2007-12-07 17:04:54.000-0600 OK... Call Dropped when attempting to bridge audio. Call made from Peer A (Grandstream 496 ATA) to Peer B (Linksys SPA-941). GS-496 uses G729 as rtpmap:18 whereas SPA-941 uses G729a as rtpmap:18. Peer B rang and Peer A heard ringing, but when attemping to connect call -- it immediately dropped. Have attached log showing this (from Asterisk CLI). Is there anything else I can get for you oej? By: David Huang (dhuang) 2007-12-07 21:15:09.000-0600 Just want to re-confirm this bug. I've just upgraded to Asterisk SVN-branch-1.4-r91890 and is facing the same problem with Linksys/Sipura (SPA-1001,SPA-2102,SPA-3000). I had to change the Linksys/Sipura setting "G729a Codec Name:" under the SIP settings from G729A to G729. By: daniel g (revolution) 2007-12-07 21:42:49.000-0600 hey dhuang... it'd be really great if you could test the rtp.diff mini-patch so I know it's not just me or something I randomly did on the side. thanks much. By: Digium Subversion (svnbot) 2007-12-10 10:33:20.000-0600 Repository: asterisk Revision: 92204 U branches/1.4/main/rtp.c ------------------------------------------------------------------------ r92204 | file | 2007-12-10 10:33:19 -0600 (Mon, 10 Dec 2007) | 6 lines Add G729A as another possible payload name for G729. Some devices use this instead of G729, which is perfectly normal since the payload number itself is defined and can't be used by anything else so the name doesn't matter that much. (closes issue ASTERISK-10985) Reported by: revolution Patches: rtp.diff uploaded by revolution (license 346) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=92204 By: Digium Subversion (svnbot) 2007-12-10 10:34:40.000-0600 Repository: asterisk Revision: 92205 _U trunk/ U trunk/main/rtp.c ------------------------------------------------------------------------ r92205 | file | 2007-12-10 10:34:39 -0600 (Mon, 10 Dec 2007) | 14 lines Merged revisions 92204 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92204 | file | 2007-12-10 12:36:15 -0400 (Mon, 10 Dec 2007) | 6 lines Add G729A as another possible payload name for G729. Some devices use this instead of G729, which is perfectly normal since the payload number itself is defined and can't be used by anything else so the name doesn't matter that much. (closes issue ASTERISK-10985) Reported by: revolution Patches: rtp.diff uploaded by revolution (license 346) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=92205 By: Digium Subversion (svnbot) 2007-12-11 09:47:23.000-0600 Repository: asterisk Revision: 92303 _U team/file/bridging/ U team/file/bridging/Makefile U team/file/bridging/Makefile.moddir_rules U team/file/bridging/apps/Makefile U team/file/bridging/apps/app_queue.c U team/file/bridging/apps/app_voicemail.c U team/file/bridging/build_tools/make_version U team/file/bridging/build_tools/make_version_h U team/file/bridging/cdr/Makefile U team/file/bridging/channels/Makefile U team/file/bridging/channels/chan_sip.c U team/file/bridging/channels/chan_zap.c U team/file/bridging/codecs/Makefile U team/file/bridging/doc/CODING-GUIDELINES U team/file/bridging/doc/manager_1_1.txt U team/file/bridging/formats/Makefile U team/file/bridging/funcs/Makefile U team/file/bridging/include/asterisk/_private.h U team/file/bridging/include/asterisk/adsi.h U team/file/bridging/include/asterisk/ael_structs.h U team/file/bridging/include/asterisk/aes.h U team/file/bridging/include/asterisk/agi.h U team/file/bridging/include/asterisk/alaw.h U team/file/bridging/include/asterisk/app.h U team/file/bridging/include/asterisk/ast_expr.h U team/file/bridging/include/asterisk/astdb.h U team/file/bridging/include/asterisk/astobj2.h U team/file/bridging/include/asterisk/callerid.h U team/file/bridging/include/asterisk/causes.h U team/file/bridging/include/asterisk/cdr.h U team/file/bridging/include/asterisk/devicestate.h U team/file/bridging/include/asterisk/doxyref.h U team/file/bridging/include/asterisk/dsp.h U team/file/bridging/include/asterisk/event.h U team/file/bridging/include/asterisk/extconf.h U team/file/bridging/include/asterisk/frame.h U team/file/bridging/include/asterisk/hashtab.h U team/file/bridging/include/asterisk/io.h U team/file/bridging/include/asterisk/localtime.h U team/file/bridging/include/asterisk/logger.h U team/file/bridging/include/asterisk/mod_format.h U team/file/bridging/main/rtp.c U team/file/bridging/pbx/Makefile U team/file/bridging/res/Makefile U team/file/bridging/res/res_agi.c U team/file/bridging/utils/Makefile U team/file/bridging/utils/check_expr.c U team/file/bridging/utils/clicompat.c ------------------------------------------------------------------------ r92303 | file | 2007-12-11 09:47:21 -0600 (Tue, 11 Dec 2007) | 193 lines Merged revisions 92082-92084,92103-92104,92122,92140,92159-92160,92199,92201,92203,92205-92206,92243,92267,92285 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r92082 | rizzo | 2007-12-09 23:50:38 -0400 (Sun, 09 Dec 2007) | 23 lines Put into Makefile.moddir_rules the common instructions used to generate loadable and embedded module lists. Individual Makefiles now are a lot simpler, possibly as simple as this: -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps MODULE_PREFIX=cdr_ all: _all include $(ASTTOPDIR)/Makefile.moddir_rules and also more flexible because in a single directory we can combine various types of modules (app_, cdr_, func_, ... ) by simply listing them in the MODULE_PREFIX variable. The individual Makefiles can also create list of modules to be excluded by listing them in the variablel MODULE_EXCLUDE (see an example in channels/Makefile). With this change it becomes trivial to integrate a directory with locally created/modified sources into the main build. ................ r92083 | rizzo | 2007-12-10 00:18:07 -0400 (Mon, 10 Dec 2007) | 7 lines Fix the detection of modules installed from this build. You can now add the path of local module subdirs from the command line with make LOCAL_MOD_SUBDIRS= .... ................ r92084 | rizzo | 2007-12-10 00:38:49 -0400 (Mon, 10 Dec 2007) | 3 lines add a bit of info on the build infrastructure ................ r92103 | rizzo | 2007-12-10 04:35:35 -0400 (Mon, 10 Dec 2007) | 2 lines simplify this file ................ r92104 | rizzo | 2007-12-10 04:40:59 -0400 (Mon, 10 Dec 2007) | 12 lines remove relative paths and use ASTTOPDIR instead. Give a default value to ASTTOPDIR if unset so we can at least do a 'make clean' without too much trouble. The proper fix, however, is to partition the top level Makefile in a 'setup' and a 'main' part, in a way that the 'setup' part can be included from subdirs' Makefiles and allow targets to be built without going through the top level Makefile. ................ r92122 | rizzo | 2007-12-10 05:00:44 -0400 (Mon, 10 Dec 2007) | 2 lines simplify/cleanup the scripts ................ r92140 | oej | 2007-12-10 09:29:57 -0400 (Mon, 10 Dec 2007) | 8 lines Add a few extra headers in the voicemail users listing in manager 1.1. Update documentation too. (closes issue ASTERISK-10996) Reported by: caio1982 Patches: extra_vm_manager_info1.diff uploaded by caio1982 (license 22) ................ r92159 | oej | 2007-12-10 10:10:24 -0400 (Mon, 10 Dec 2007) | 24 lines Merged revisions 92158 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92158 | oej | 2007-12-10 15:04:44 +0100 (M?�95?Y?�94?un, 10 Dec 2007) | 16 lines Avoid reinvite race situations with two Asterisks trying to reinvite each other in 1.4 and trunk. This patch implements support for the 491 error code that Asterisk 1.4 generates on situations where we get an incoming INVITE and already has one in progress. Thanks to mavetju for reporting and to Raj Jain for an excellent explanation of the problem. Patch by myself. Tested with 8 Asterisk servers connected to each other in a training network. Closes issue ASTERISK-10105 ........ ................ r92160 | oej | 2007-12-10 10:18:21 -0400 (Mon, 10 Dec 2007) | 2 lines Removing some LOG_DEBUG items ................ r92199 | file | 2007-12-10 12:07:33 -0400 (Mon, 10 Dec 2007) | 4 lines Only send a SIGHUP if the pid is greater than -1, otherwise all PIDs greater than -1 will get the SIGHUP... and that is bad. (closes issue ASTERISK-10962) Reported by: alanmcmillan ................ r92201 | file | 2007-12-10 12:15:06 -0400 (Mon, 10 Dec 2007) | 11 lines Blocked revisions 92200 via svnmerge ........ r92200 | file | 2007-12-10 12:13:43 -0400 (Mon, 10 Dec 2007) | 4 lines It is possible for nativeformats to contain more then one codec, so print out multiple ones. (closes issue ASTERISK-10877) Reported by: ovi ........ ................ r92203 | mmichelson | 2007-12-10 12:30:46 -0400 (Mon, 10 Dec 2007) | 15 lines Merged revisions 92202 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92202 | mmichelson | 2007-12-10 10:29:44 -0600 (Mon, 10 Dec 2007) | 7 lines If there are no members in a queue, then the loop where the datastore for detecting duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means that when we try to free it, there's a crash. This stops that crash from occurring. (closes issue ASTERISK-10998, reported by slavon, patched by eliel) ........ ................ r92205 | file | 2007-12-10 12:37:35 -0400 (Mon, 10 Dec 2007) | 14 lines Merged revisions 92204 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92204 | file | 2007-12-10 12:36:15 -0400 (Mon, 10 Dec 2007) | 6 lines Add G729A as another possible payload name for G729. Some devices use this instead of G729, which is perfectly normal since the payload number itself is defined and can't be used by anything else so the name doesn't matter that much. (closes issue ASTERISK-10985) Reported by: revolution Patches: rtp.diff uploaded by revolution (license 346) ........ ................ r92206 | file | 2007-12-10 12:48:18 -0400 (Mon, 10 Dec 2007) | 4 lines Add ast_atomic_fetchadd_int_slow to check_expr for platforms that need it. (closes issue ASTERISK-10986) Reported by: snuffy ................ r92243 | dbailey | 2007-12-10 16:18:25 -0400 (Mon, 10 Dec 2007) | 2 lines Add CLI commands to dynamically set hw and sw gains ................ r92267 | oej | 2007-12-11 05:26:25 -0400 (Tue, 11 Dec 2007) | 2 lines Doxygen updates ................ r92285 | oej | 2007-12-11 10:17:29 -0400 (Tue, 11 Dec 2007) | 2 lines A lot of doxygen updates ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=92303 |