Discussion:
[OpenWrt-Devel] releasing the PBX interface: luci-app-pbx
i iordanov
2011-10-14 05:44:24 UTC
Permalink
Hi Devs,

I have finally tied most of the loose ends, and have packaged the PBX
interface app. I've called it luci-app-pbx, since it is a luci app.

Here are links to both a ready-made ipk (which is
architecture-independent since there are no binaries), and the
"source", which you can unpack into backfire/package/, and then run
"make package/index". The app will show up under LuCI/Applications
when you run "make menuconfig" next time.

http://dancho.no-ip.com/pbx/luci-app-pbx_0.10.ipk
http://dancho.no-ip.com/pbx/luci-app-pbx-0.10.tar.gz

Can you please include this app into the openwrt repository if
possible, and if it meets your expectations for code quality, etc?

Thanks, and I hope you enjoy using this!
Iordan
--
The conscious mind has only one thread of execution.
Jo-Philipp Wich
2011-10-14 13:20:09 UTC
Permalink
Hi Iordan,

I gave it a try and it looks quite good on first sight.
However I have some issues, the sections in the call routing tab are
empty and the "Server Setting for Local SIP Devices" shows no input field.

You might want to recheck this on a fresh install, all I did was "opkg
install asterisk18" and "/etc/init.d/asterisk start" .

Otherwise, good work!

~ Jow
i iordanov
2011-10-14 13:47:40 UTC
Permalink
Hi Jow,
Post by Jo-Philipp Wich
I gave it a try and it looks quite good on first sight.
However I have some issues, the sections in the call routing tab are
empty
This is actually "intended" behavior, although it may seem strange.

1) When a provider's field in "Outgoing calls" is empty, this means
that the provider will be used to call any destination. I was thinking
of populating this field with an "X" by default, and I can still do
that if you think it'll make more sense.

2) When a provider's field in "Incoming calls" is empty, this means
that all users ring when a call comes into that provider. I was
thinking of populating this field with a list of all users, but if I
do that, the list gets saved by LuCI, and when more users are added,
they don't get added to the list. So, leaving it empty made more
sense. Perhaps putting down something like "All Users", and not saving
this input would also work, but then the user would have to manually
erase "All Users", and if they tamper with it partially, it'll get
saved and will break things...

3) When the user's field in "Providers Used for Outgoing Calls" is
left empty, it means the user is allowed to use all providers. The
same discussion as with point (2) applies here.
Post by Jo-Philipp Wich
and the "Server Setting for Local SIP Devices" shows no input field.
Now this is strange. I get the input for this field with a call:

m.uci:get("network", "lan", "ipaddr")

The same result is yielded by:

uci get network.lan.ipaddr

on the commandline. Can you please tell me if I'm doing something
wrong, or is it that your router has some special configuration? How
can I determine this value more reliably?
Post by Jo-Philipp Wich
You might want to recheck this on a fresh install, all I did was "opkg
install asterisk18" and "/etc/init.d/asterisk start" .
Perhaps on a fresh install the LAN ipaddr is not set? But how would
one contact a "real" router without a LAN ip address, and no serial
console? :)
Post by Jo-Philipp Wich
Otherwise, good work!
Thanks for all the support Jow! Any additional input on my questions
is highly appreciated.

Cheers,
Iordan
--
The conscious mind has only one thread of execution.
i iordanov
2011-10-17 13:20:07 UTC
Permalink
Hi Jow,

I had a bit of time over the weekend to try some stuff. I've changed
the behavior of pbx-calls.lua to now display a string saying what the
system will do instead of leaving the box empty (i.e. "Dials all
numbers"). The only drawback is that one would either have to delete
the string when adding prefixes, or hit enter and add the prefixes
after, and the the app will throw out the "Dials all numbers" string
since it is an "invalid" prefix.

I have not changed anything to do with ipaddr, since I got no
indication from anyone how I can reproduce this, or that my code is
wrong to get ipaddr from ("network", "lan", "ipaddr").

Here is a link to the new code:

http://dancho.no-ip.com/pbx/luci-app-pbx-0.11.tar.gz

Thanks!
Iordan
--
The conscious mind has only one thread of execution.
Jo-Philipp Wich
2011-10-17 16:22:57 UTC
Permalink
Hi,

you'll get the IP address behaviour if "lan" is set to proto dhcp or
something else which does not specify an ipaddr in advance.

~ Jow
i iordanov
2011-10-17 17:31:03 UTC
Permalink
Hi Jow,
Post by Jo-Philipp Wich
you'll get the IP address behaviour if "lan" is set to proto dhcp or
something else which does not specify an ipaddr in advance.
This makes sense. However, it also makes sense to not support dynamic
IP addresses, because if it changes, the configuration of all clients
will be invalid. If the user is advanced enough to have local DNS, and
to put in a hostname in the client configuration, then said user would
not need the output of this field anyway.

My thoughts are that if I get an empty string after quering
("network", "lan", "ipaddr"), I can print a short sentence that reads
something along these lines:

"IP address not static. Please set a static IP address in Network->LAN."

or even simply "IP address not static."

Would this work any better than just leaving the field empty?

Cheers,
Iordan
--
The conscious mind has only one thread of execution.
Jo-Philipp Wich
2011-10-17 17:33:35 UTC
Permalink
Yes, thats probably enough.

~ Jow
i iordanov
2011-10-17 19:40:23 UTC
Permalink
Hi Jow,
Post by Jo-Philipp Wich
Yes, thats probably enough.
The same link to the code was updated to also deal with dynamic IP addresses.

Cheers,
Iordan
--
The conscious mind has only one thread of execution.
i iordanov
2011-10-17 19:41:01 UTC
Permalink
Post by i iordanov
The same link to the code was updated to also deal with dynamic IP addresses.
For the record, it was:

http://dancho.no-ip.com/pbx/luci-app-pbx-0.11.tar.gz

Iordan
--
The conscious mind has only one thread of execution.
Loading...