[Asterisk-Dev] Error No DNID: Dynamic Extension DB Application - DynExtenDB

Bryce Chidester bryce at rhinoequipment.com
Wed Jul 20 10:46:40 MST 2005


On Wed, 2005-07-20 at 12:46 -0400, Victor López(ACANTO) wrote:
> Hi all,
> does anybody have some experience working with Dynamic Extension DB
> Application? 
> I have installed and configured app_dynaextendb module as show when we
> bring up asterisk:
>  
>   [app_dynextendb.so] => (Dynamic Extension from MySQL Application)
>     == Parsing '/etc/asterisk/dynextendb.conf': Found
>     == Registered application 'DynExtenDB_Free'
>     == Registered application 'DynExtenDB'
>    .........................
>   Asterisk Ready.
>  
> But when we try to use DynExtenDB from extension.conf for 8901
> extension, we receive the following error:
> 
> *CLI>     -- Executing DynExtenDB("SIP/VLopez-13b9", "8901") in new
> stack
> Jul 20 12:35:12 ERROR[9108]: app_dynextendb.c:76 dynamic_extension: No
> DNID in channel found - not possible to query extension. Skipping.
> 
> I´ll appreciate if somebody knows if exist any patch to resolve it..
>  
> Best regards,
> Víctor
>  
> /etc/asterisk/extension.conf
> ----------------------------------------
> [sip]
> exten => 8901,1,DynExtenDB(${EXTEN})
>  
> /etc/asterisk/dynextendb.conf
> --------------------------------------------
> [global]
> hostname=AcantoPBX
> dbname=phone
> user=astcdr
> password=.acanto123
> dbname=phone
> tblname=extensions
> 
> MYSQL: Table extension contents
> --------------------------------------------------
> mysql> use phone
> Database changed
> mysql> select * from extensions;
> +-----+---------+-------+-----+----------+------------------+
> | eid | context | exten | pri | appl     | data             |
> +-----+---------+-------+-----+----------+------------------+
> |   1 | sip     | 8901  |   1 | Dial     | SIP/VLopez,20,tr |
> |   2 | sip     | 8901  |   2 | Playback | acanto_despedida |
> +-----+---------+-------+-----+----------+------------------+
> 2 rows in set (0.00 sec)
>  
> mysql>
> 
It would seem you didn't read the documentation very well (I'm using
http://andreasotto.net/asterisk/). DynExtenDB only supports CAPI
channels, not SIP, as CAPI sets the DNID data on the channel - it is not
sent as a parameter to the application. Also, this project hasn't been
maintained in nearly 3 years... I'm surprised you could even compile and
run it, unless you're not running a recent version of Asterisk either.
Main point is that this only works with CAPI channels. There are several
ways to do what you want to do today, with the biggest being to run
Asterisk Realtime, or you could write a macro that would use the MySQL
application to fetch what to do, or use the Asterisk extconfig facility
to store your extensions.conf in a database (though this would require a
reload every time you changed anything in the database).
Good luck!

-- 
-Bryce
bryce at rhinoequipment.com

NOTICE: The views expressed in this e-mail do not neccesarily reflect
those of my employer, this company, or its employees. This is a personal
e-mail and as such, the opinions expressed are my own.




More information about the asterisk-dev mailing list