Hello,
Well, first of all we need to define two things:
1.- when you use the command dialplan add extension this command will create an extension in the dialplan. Note: a extension and device are two different thing in asterisk. An extension is this:
exten => 1234,1,playback(tt-monkeys) This is a extension number 1234, when you dial 1234 in your phones asterisk will run the application Playback with the sounds of a weird monkeys screaming. Every extension are configured in extension.conf -in asterisk-
A device in asterisk is a peer, or user or friend, normally attached to hard-phones, soft-phones or fax, these devices are configured in sip.conf -in asterisk-.
2.- Trixbox differs a little in the configurations files against asterisk from scratch build. In the directory /etc/asterisk/ you will see many archives with _custom and _additional per example you will see:
sip_additional.conf
sip.conf
sip_custom.conf
Trixbox use sip_additional to generate all device from the web page. The file called sip_custom.conf, is the file that you can use to create your devices from console, or other program, but this extensions aren’t showed in the web page, if you can to view in the web page you can add or edit the php code to view your custom extension.
I think you want to create devices, not extensions, to create devices you can make an script that send the values to your sip_custom.conf, in linux is easy from console even using cat and >> to append the content.
In linux i cant use this for append data in sip_custom.conf:
[code]#!/bin/bash
echo nombre
read name
echo “[$name]” >> sip_custom.conf
echo usuario
read username
echo “username=$username” >> sip_custom.conf
echo tipo
read type
echo “type=$type” >> sip_custom.conf[/code]
an so on for each parameter.