[Home]

Summary:ASTERISK-03840: [branch][post 1.4] add manager "Listdialplan" command
Reporter:Olle Johansson (oej)Labels:
Date Opened:2005-04-01 15:54:54.000-0600Date Closed:2006-10-30 15:22:55.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) managerdialplan.txt
( 1) managerdialplan.txt
( 2) managersip.txt
Description:This patch adds manager listdialplan command, using the syntax for multiple entries used in "status" and "sippeers".
Ugly, but the standard... :-)

Disclaimer on file.

****** ADDITIONAL INFORMATION ******

As requested on IRC ;-)
Comments:By: Stefan Reuter (srt) 2005-04-01 17:55:29.000-0600

I tried the patch and it seems to work quite well. Thanks for such a quick response to our discussion on irc!
2 issues I encountered:

1. idtext is not initialized if no ActionId is send. Changing line 200 to
    char idtext[256] = "";
  should fix this.
2. Some values are surrounded by single quotes (IncludeContext, Switch). I
  don't think we need this and it adds additional work when parsing the
  events.

Why is it implemented in pbx.c and not in manager.c as most of the other actions?

By: Kevin P. Fleming (kpfleming) 2005-04-01 19:22:06.000-0600

It's implemented in pbx.c because it is accessing data that is private to that module.

Can you describe what you intend to use this for? I'm a little leery of adding a manager action that can generate such a huge amount of output.

By: Olle Johansson (oej) 2005-04-02 03:16:34.000-0600

Thank you for the feedback.

kpfleming: It generates a lot of output if you don't specify context and/or extension. It's very useful in combination with parking and automatic extensions (like in SIP and IAX2)

By: Olle Johansson (oej) 2005-04-02 03:43:19.000-0600

Found a bug. When we have an error, we first reply happily a "success" then a Response: error.

Positive thinking is good, but in this case it can mess things up...
Will fix.

By: Olle Johansson (oej) 2005-04-02 03:48:51.000-0600

Need to change syntax of all multiple event commands, to better support a proxy (see mail to -dev list). This will change SIPpeers and status as well, but in separate bug reports.

By: Olle Johansson (oej) 2005-04-02 03:50:05.000-0600

Thinking of it, the SIP peer list manager command can output quite a lot of messages as well, can't it Kevin?

We really need to add *a lot* of fully parsable manager commands to make manager more useful. :-) Help appreciated!

By: Kevin P. Fleming (kpfleming) 2005-04-02 17:56:59.000-0600

Yes, you are correct, the 'list peers' commands can do so as well. That's not really an issue I should be worried about :-)

By: Olle Johansson (oej) 2005-04-03 14:54:11

* Now only acks when we have a result.
* Changed manager api, added header "EventList" with values "Start", "Complete"
* Remove single quotes in includecontext, switch

Please test!

By: Olle Johansson (oej) 2005-04-03 14:56:15

Also changes the "status" command, adding EventList and ListItems headers.

By: Olle Johansson (oej) 2005-04-03 15:01:22

Added patch for chan_sip to include EventList: headers.
Also removed comment about XML format ;-)

By: Stefan Reuter (srt) 2005-04-07 16:22:42

The latest patch is still missing the initialization of idtext in line 209.

In some cases i receive multiple Responses and the Events follow the Response directly without a newline separated.

Example:

action: listdialplan
actionid: 1234
extension: 1310

Response: Success
ActionID: 1234
Message: DialPlan list will follow
EventList: start
Event: ListDialplan
ActionID: 1234
Context: demo
Extension: _13XX
Priority: 1
Application: Dial
AppData: IAX2/guest@deprecated/${EXTEN}
Registrar: pbx_config

Response: Success
ActionID: 1234
Message: DialPlan list will follow
EventList: start
Event: ListDialplan
ActionID: 1234
Context: demo
Extension: _13XX
Priority: 1
Application: Dial
AppData: IAX2/guest@deprecated/${EXTEN}
Registrar: pbx_config

Response: Success
ActionID: 1234
Message: DialPlan list will follow
EventList: start
Event: ListDialplan
ActionID: 1234
Context: demo
Extension: _13XX
Priority: 1
Application: Dial
AppData: IAX2/guest@deprecated/${EXTEN}
Registrar: pbx_config

Response: Success
ActionID: 1234
Message: DialPlan list will follow
EventList: start
Event: ListDialplan
ActionID: 1234
Context: demo
Extension: _13XX
Priority: 1
Application: Dial
AppData: IAX2/guest@deprecated/${EXTEN}
Registrar: pbx_config

Response: Success
ActionID: 1234
Message: DialPlan list will follow
EventList: start
Event: ListDialplan
ActionID: 1234
Context: demo
Extension: _13XX
Priority: 1
Application: Dial
AppData: IAX2/guest@deprecated/${EXTEN}
Registrar: pbx_config

Event: ListDialplan
ActionID: 1234
Context: dundi-e164-switch
Switch: DUNDi/e164
Registrar: pbx_config

Event: ShowDialPlanComplete
EventList: Complete
ListItems: 6
ListExtensions: 5
ListPrios: 5
ListContexts: 5
ActionID: 1234

By: Olle Johansson (oej) 2005-04-12 10:30:14

Been travelling, will continue to travel for a few days. Will look at this shortly.

/O

By: Olle Johansson (oej) 2005-05-01 14:44:23

Coming back to this bug report... :-)

By: Kevin P. Fleming (kpfleming) 2005-05-15 18:16:47

This is one of your pending issues... have you had a chance to address the problem(s) reported here?

By: Olle Johansson (oej) 2005-05-16 00:55:08

Not yet, it's on the to-do-list

By: Olle Johansson (oej) 2005-06-05 17:18:42

Closing this to re-open later when I have some free time to fix it.

By: Olle Johansson (oej) 2005-11-28 10:32:23.000-0600

Re-opening this issue for 1.3 dev... Will need update.

By: Matt O'Gorman (mogorman) 2006-01-08 11:06:47.000-0600

Olle did you forget about your patch ^_^?  is this guy good enough to go in or do you need more work on it?

By: Olle Johansson (oej) 2006-01-09 00:51:46.000-0600

Forgot all about it... Will open a branch.

By: Olle Johansson (oej) 2006-01-09 02:33:19.000-0600

This patch is now at

http://svn.digium.com/svn/asterisk/team/oej/managerstuff/

By: Olle Johansson (oej) 2006-02-02 01:21:41.000-0600

Anyone that wants to test the latest version in the branch? Thanks.

By: Olle Johansson (oej) 2006-03-03 02:41:57.000-0600

Eleven months in the bug tracker... Giving up on this soon.

By: Serge Vecher (serge-v) 2006-05-04 09:48:12

If anybody tested this, please provide feedback. Thanks!

By: Olle Johansson (oej) 2006-06-02 02:01:40

Quite a lot of feedback indeed ;-(

By: Serge Vecher (serge-v) 2006-06-06 13:00:47

Olle: I'll help you test this. Please either fix the test-this-branch or update the patch here and I'll do my best. Thanks.

By: Matt O'Gorman (mogorman) 2006-09-26 14:11:46

oej  i am sorry for the lack of interest in said patch.  If you still wish for it to go in, can you bring it up to date so i can review it.

mog

By: Olle Johansson (oej) 2006-10-30 15:22:26.000-0600

Committed to svn trunk.