Summary: | ASTERISK-18809: pbx_config.c assumes [macro-stdexten] | ||||||
Reporter: | Jay Allen (jayallen) | Labels: | |||||
Date Opened: | 2011-11-02 23:27:48 | Date Closed: | 2012-01-05 17:08:01.000-0600 | ||||
Priority: | Minor | Regression? | |||||
Status: | Closed/Complete | Components: | PBX/pbx_config | ||||
Versions: | 10.0.0-beta2 | Frequency of Occurrence | |||||
Related Issues: |
| ||||||
Environment: | VMWare guest running Ubuntu 10 | Attachments: | ( 0) gosub_patch-pbx_config.patch | ||||
Description: | It appears that the example [stdexten] in extensions.conf is not compatible with pbx_config.c. In pbx_config.c there is still an assumption that the features of stdexten are invoked with Macro(stdexten) | ||||||
Comments: | By: Leif Madsen (lmadsen) 2011-11-03 14:58:43.382-0500 How does this get called and from where? I'm trying to figure out exactly what is being created in pbx_config.c with the code you're pointing out. Need to be able to test it in order to figure out if it's as simple as changing Macro to GoSub, or if something more thorough needs to be implemented. Thanks! By: Jay Allen (jayallen) 2011-11-03 23:27:10.338-0500 ./configure --prefix=/home/jay/ast10-beta-2 --disable-xmldoc make mkdir /home/jay/ast-10-beta-2 make install make samples ---------------------------------------------------------------- now edit users.conf, creating a couple of users: [6001] fullname = Jimmy JoeBob description = A user named bob email = joe@foo.bar secret = 1234 hasvoicemail = yes vmsecret = 1234 hassip = yes hasiax = no context = local [6002] fullname = Susan Longston description = A gurl named Sue email = sue@google.com secret = 1234 hasvoicemail = yes vmsecret = 1234 hassip = yes hasiax = no context = local ----------------------------------------------------------- Now start asterisk 10 beta-2 and show dialplan: ubuntu10*CLI> dialplan show default [ Context 'default' created by 'pbx_config' ] '6001' => hint: SIP/6001 [pbx_config] 1. Macro(stdexten,6001,${HINT}) [pbx_config] '6002' => hint: SIP/6002 [pbx_config] 1. Macro(stdexten,6002,${HINT}) [pbx_config] Include => 'demo' [pbx_config] ----------------------------------------------------------- When you call from 6001 to 6002 here is what you see: [Nov 3 20:11:32] WARNING[4166]: app_macro.c:309 _macro_exec: No such context 'macro-stdexten' for macro 'stdexten'. Was called by 6002@local By: Jay Allen (jayallen) 2011-11-04 22:52:33.478-0500 OK, this diff against pbx/pbx_config.c seems to fix it. Change to Gosub and fix up the arguments passed to it: <inline patch removed by lmadsen> By: Leif Madsen (lmadsen) 2011-11-07 10:41:19.822-0600 You can't provide patches inline. Please attach as a unified diff (svn diff /tmp/mypatch.txt) after signing the license agreement (if you haven't already done so). By: Leif Madsen (lmadsen) 2011-11-21 14:18:47.006-0600 Jay, can you provide a patch? If not, then I'm going to go ahead and close this. Thanks! By: Jay Allen (jayallen) 2011-11-24 12:17:28.574-0600 allows for sample dialplan [stdexten] to work now that its implemented as a subroutine rather then the older macro style. By: George Joseph (gjoseph) 2012-03-01 11:36:58.749-0600 Just trying the latest trunk with this patch included and although the sample extensions.conf might work, it seems to break just about every existing use of stdexten including that used by Asterisk-GUI. Did you really mean to jump to the called extension, priority stdexten in the same context? If so, then that's more than just changing the Macro to Gosub, it means changing the structure of a lot of dialplans. |