Summary:ASTERISK-20899: Dundi Lookup for Other Channel Drivers returng OTHER/[Mapping]
Reporter:Diederik de Groot (dkdegroot)Labels:
Date Opened:2013-01-06 21:26:55.000-0600Date Closed:2016-01-25 04:35:54.000-0600
Versions: 10.11.1 11.1.2 Frequency of
Environment:Attachments:( 0) pbx_dundi_trunk-378644.diff
Description:When using a channel driver besides IAX2/SIP/H323 the result from DUNDILOOKUP contains OTHER/[mapping], instead of just the mapping.

For example when using the chan-sccp-b channel driver, which does the appropriate regcontext setting for dundi to be able to lookup the extension. And having a mapping like:
local => sccpregistration,0,NONE,SCCP/${NUMBER},nopartial
local => sipregistration,0,SIP,${NUMBER},nopartial
in dundi.conf

Instead of DUNDILOOKUP(1234), returning OTHER/SCCP/1234 when it is able to find the record. It would be nicer to return SCCP/1234 instead. So that the returned string can be used a dial command directly. Instead of having to examine the returned string to see if it returned OTHER and cut that part of.

Changing Dundi to make it possible to register new channel tech for this purpose would/might be to difficult. Using the mapping above the needed result is returned and would even be usable in a Switch if only for the "OTHER" string at the start.

A simple change in pbx_dundi.c would make this possible.
Comments:By: Diederik de Groot (dkdegroot) 2013-01-06 21:31:58.879-0600

Diff against asterisk-trunk revision 378644

By: Diederik de Groot (dkdegroot) 2013-01-06 21:42:30.742-0600

I forgot to mention that this would work for any other channel drivers out there, including the once delivered with asterisk. Without further changes to pbx_dundi.c to support them.

There are multiple roads that could/can be followed to achieve this same goal:
- Adding a channel_tech_register/unregister method, to add new channel techs
- Adding channel_tech automatically when a channel driver module is loaded, and signifies that it is capable of supporting DUNDI
- Remove the technology dependence all together and always expect the Mapping column to start with the Dial String necessary to dial the particular channel driver.
- Or, use my simple method of getting rid of the "OTHER" string at the beginning of the returned result :-)



By: Rusty Newton (rnewton) 2013-01-11 10:13:48.528-0600

Thanks for this Diederik. Be aware that pbx_dundi is under extended support so it'll be up to a community developer to review this and marshal it through into Asterisk. You can always jump on #asterisk-dev and the http://lists.digium.com/mailman/listinfo/asterisk-dev list to find a community developer that can help out.

By: Diederik de Groot (dkdegroot) 2013-01-11 10:28:18.225-0600

Thank you Rusty.
I thought this was the right channel to go through.
I will check it out.

By: Diederik de Groot (dkdegroot) 2016-01-25 04:35:54.424-0600

Mappings only have to include trunk channel types