[Amportal-users] distinctive ring on Zap channels

I am writing an article for The Linux Journal about Trixbox as a home
phone system for VoIP and POTS service.

One thing I am doing now with my hand-crafted * 1.0.x system is that I
have distinctive ring on my office phone. Normal ring if the call came
from the Zap trunk (the normal POTS phone line), /r1 if the call came
from an internal extension, /r2 if the call came from my office VoIP
trunk and was from another office extension, and /r3 if the call came
from my office VoIP trunk and was from an outside caller.

On a new Trixbox system, I can emulate the /r2 and /r3 conditions by
putting incoming calls from that VoIP trunk into a special context that
will only ring my device and will append the /rX to the channel. A bit
of a kludge, but it would work for my purposes.

However, I have not yet figured out a way to put /r1 on the calls
from other house extensions… I want voicemail and extension numbering
and all that to remain the same, I just want the ring different.

I haven’t come up with a “freePBX way” to do it as it is now. I might
be able to finesse it with the “devicesandusers” settings, I’ll have to
think about that…

I also thought about modifying freePBX so that on a Zap channel one can
define some CID reg.exps that are tied to /rX for 1 <= X <= 4 so that
when a call comes to that channel, if it matches a regexp, that “/rX” is
appended to the channel name. I’ve not yet looked into the freePBX
source, so this would be a bit more involved and I wouldn’t have that
done by the deadline for my article…

If anyone has achieved this Zap-channel distinctive ring with a standard
freePBX system, I would appreciate the advice.

If not, and I get it figured out (or modify freePBX to accommodate it),
I will let the list know.

Thanks!


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

I do the same as you on my hand-crafted asterisk box, and not having
this kind of feature is rather holding me back from trying FreePBX on my
main box.

Interested to hear what you come up with

Ed W

Michael George wrote:

[quote] I am writing an article for The Linux Journal about Trixbox as a home
phone system for VoIP and POTS service.

One thing I am doing now with my hand-crafted * 1.0.x system is that I
have distinctive ring on my office phone. Normal ring if the call came
from the Zap trunk (the normal POTS phone line), /r1 if the call came
from an internal extension, /r2 if the call came from my office VoIP
trunk and was from another office extension, and /r3 if the call came
from my office VoIP trunk and was from an outside caller.

On a new Trixbox system, I can emulate the /r2 and /r3 conditions by
putting incoming calls from that VoIP trunk into a special context that
will only ring my device and will append the /rX to the channel. A bit
of a kludge, but it would work for my purposes.

However, I have not yet figured out a way to put /r1 on the calls
from other house extensions… I want voicemail and extension numbering
and all that to remain the same, I just want the ring different.

I haven’t come up with a “freePBX way” to do it as it is now. I might
be able to finesse it with the “devicesandusers” settings, I’ll have to
think about that…

I also thought about modifying freePBX so that on a Zap channel one can
define some CID reg.exps that are tied to /rX for 1 <= X <= 4 so that
when a call comes to that channel, if it matches a regexp, that “/rX” is
appended to the channel name. I’ve not yet looked into the freePBX
source, so this would be a bit more involved and I wouldn’t have that
done by the deadline for my article…

If anyone has achieved this Zap-channel distinctive ring with a standard
freePBX system, I would appreciate the advice.

If not, and I get it figured out (or modify freePBX to accommodate it),
I will let the list know.

Thanks!

[/quote]


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

On Tue, Jun 20, 2006 at 11:29:58AM -0400, Lee Marzke wrote:

The problem is that the distRing goes on the channel definition, so
we’re talking about modifying at the channel level, which is all
generated in the AGI script. I think it’ll take a bit of work to modify
it there, as I will have to grok all that the AGI script does.

My best idea so far is to create separate ZAP definitions in the configs
(maybe separating the users and devices), each with a different "dial"
command.

While each extension/device has a “mailbox” setting, I think that is for MWI,
not for what VM is used on no answer. So, to have those separate
"extensions" tie to the same voicemail, I would have to manually symlink
the directories (which would work, it’s just not The freePBX Way).

This theory suffers 2 drawbacks:

  1. It is a kludge, and the computer scientist in me dislikes that.
  2. It requires all IVRs to disallow direct extension dialing in their
    configs and manually put in all extensions as IVR options…

[quote] Ed W wrote:

I do the same as you on my hand-crafted asterisk box, and not having
this kind of feature is rather holding me back from trying FreePBX on my
main box.

Interested to hear what you come up with

Ed W

Michael George wrote:

I am writing an article for The Linux Journal about Trixbox as a home
phone system for VoIP and POTS service.

One thing I am doing now with my hand-crafted * 1.0.x system is that I
have distinctive ring on my office phone. Normal ring if the call came
from the Zap trunk (the normal POTS phone line), /r1 if the call came
from an internal extension, /r2 if the call came from my office VoIP
trunk and was from another office extension, and /r3 if the call came
from my office VoIP trunk and was from an outside caller.

On a new Trixbox system, I can emulate the /r2 and /r3 conditions by
putting incoming calls from that VoIP trunk into a special context that
will only ring my device and will append the /rX to the channel. A bit
of a kludge, but it would work for my purposes.

However, I have not yet figured out a way to put /r1 on the calls
from other house extensions… I want voicemail and extension numbering
and all that to remain the same, I just want the ring different.

I haven’t come up with a “freePBX way” to do it as it is now. I might
be able to finesse it with the “devicesandusers” settings, I’ll have to
think about that…

I also thought about modifying freePBX so that on a Zap channel one can
define some CID reg.exps that are tied to /rX for 1 <= X <= 4 so that
when a call comes to that channel, if it matches a regexp, that “/rX” is
appended to the channel name. I’ve not yet looked into the freePBX
source, so this would be a bit more involved and I wouldn’t have that
done by the deadline for my article…

If anyone has achieved this Zap-channel distinctive ring with a standard
freePBX system, I would appreciate the advice.

If not, and I get it figured out (or modify freePBX to accommodate it),
I will let the list know.

Thanks!


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

[/quote]

[quote] begin:vcard
fn:Lee Marzke
n:Marzke;Lee
email;internet:[email protected]
tel;work:800 393 5217
tel;home:610 454 9354
version:2.1
end:vcard

[/quote]

[quote] _______________________________________________
Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users
[/quote]


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

On Wed, Jun 21, 2006 at 08:49:35AM +0100, Ed W wrote:

My homebrewed setup focuses more on Zap channels than most systems. The
way I did it was to have a definition of each extension which would have
a setting for “internal” calls and when a call was determined to be
intra-pbx, it would have that variable appended. It is a bit kludgy
because the variable has little meaning for SIP devices unless they can
define separate extensions for their incoming context. This covers my
normal (from zap trunk) calls and intra-pbx calls.

Then my voip trunk from work drops into a separate context which is
easier to deal with (in my hand-crafted and freePBX configurations)
because there is no VM to deal with on the local system as voicemail is
kept on the work system.

So I think we did similar things in our hand-crafted configurations.
The problem with the “normal” case in freePBX (calls from a trunk where
device determination and voicemail handling are done locally) is that an
AGI script determines the DIAL() string and that is where the "/rX"
needs to be appended. Also, the macro which does the dialing is in
extensions.conf, which should not be modified as future upgrades will
likely break it.

I suggested on the ticket system at freepbx.org that perhaps for ZAP
channels a CID regexp to set that dial suffix. No word back yet. If I
have a chance, I’ll dig into that AGI script, but I have quite a
learning curve to traverse: not only to ascertain what their AGI script
does, but to also learn how AGI scripts work with * in toto…

I don’t think I will be able to do the latter in time for this
article…


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

On Wed, Jun 21, 2006 at 07:41:22AM -0400, Michael George wrote:

Another option that might be an even more clean way to handle this
situation would be to define a Custom device/extension that dials:
Local/<device/extension>@custom-context

and have custom-context do the differentiation of source and handle the
distinctive ring. In my case that will probably work, as CID will
differentiate my calls (I get no CID on the zap trunk, internal
extensions are _2x, office internal extensions are _2xx, and office
incoming calls are _NxxNxxxxxx). To differentiate based on incoming
trunk might be more tricky depending on what information is preserved
through the dial() to Local/…


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

In freePBX, why cant you simply set up a ZAP channel in the Incoming Route and select the correct ring command in Alert Info? Are you ringing devices SIP based? If so this should work, if not???

On Wed, Jun 21, 2006 at 07:36:15AM -0600, versodom wrote:

[quote] In freePBX, why cant you simply set up a ZAP channel in the Incoming Route and select the correct ring command in Alert Info? Are you ringing devices SIP based? If so this should work, if not???
[/quote]
The destination channel is ZAP (perhaps that’s not immediately clear from the
original post), not SIP. Also, the Alert Info will only tag calls
coming in a particular trunk, I also want to differentiate calls on the
same trunk from eachother based on the primary origin before showing up
on my trunk.


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

On Wed, Jun 21, 2006 at 08:15:25PM +0100, Ed W wrote:

How this would be done is not immediately apparent to me. Since the AGI
script constructs the argument(s) to DIAL(), any variables would have to
be detected there and set into that string. And then only if the
channels string (remember there can be multiple) contains (a) ZAP channel(s).

But I admit that I’m new to freePBX (working with it about 2mos) and
perhaps the extent of its configurability has not yet become apparent to
me.

I’m working out the preliminary configuration for the article now (it
sure goes a lot slower when taking notes on every single step!). Once I
pass that point, I can try a couple ideas for the distRing… I would
be happy to send you (or anyone) the freePBX config backup for you to
experiment on from the point I have it. However, not many people use
ZAP channels for their phonesets it seems…

Thanks again for your reply!


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.

All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Well, I’ve made some progress. I can create a custom context that will
ring a Zap channel with distinctive ring when entered.

exten => x/_2x,s,1,DIAL(ZAP/${EXTEN}r1)
exten => x,s,1,DIAL(ZAP/${EXTEN})

You can then create a cutom extension and the dial entry would be:
Local/[email protected] ; or …/2… or …/3…

The only problem is that when I make all my extensions Custom, I no
longer have the right CID on the ZAP channels when they pick up, because
freePBX has no record of them being defined (though they will still
default to the from-internal context).

I tried splitting the Devices and Users, but while that would assign a
CID to the ZAP channel, it would also be dialed for the extension and it
would be dialed before the Local/… one, which means that the
distinctive ring would not make it to the device (it would be
congested).

I see 2 solutions, one of which freePBX is not built for and the other
of which wastes extension numbers:

  1. Add callerid’s to channels in a zapata_custom.conf file that will not
    create an extension but will bind a specific CID to the channel.

  2. Create another extension for the ZAP channels with no voicemail or
    anything. They would be there only to impose a CID onto the ZAP
    channels – However, there is no good way to keep them from being
    called.

I have submitted a feature request ticket (#974) to the freePBX folks
asking for a zapata_custom.conf inclusion in zapata.conf.


-M

There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

[quote][quote] For inspiration: What I do on my homegrown setup is to use a different
context for each incoming trunk. Then I can use this to setup variables
determining what happens next, eg lines to ring, different timed events,
distinctive ring, etc. Then the a dial macro reads the variables like
distinctive ring and processes them.

Seems that this basic idea could work ok for FreePBX as well?

[/quote]
My homebrewed setup focuses more on Zap channels than most systems. The
way I did it was to have a definition of each extension which would have
a setting for “internal” calls and when a call was determined to be
intra-pbx, it would have that variable appended. It is a bit kludgy
because the variable has little meaning for SIP devices unless they can
define separate extensions for their incoming context. This covers my
normal (from zap trunk) calls and intra-pbx calls.

Then my voip trunk from work drops into a separate context which is
easier to deal with (in my hand-crafted and freePBX configurations)
because there is no VM to deal with on the local system as voicemail is
kept on the work system.

[/quote]
Why don’t you just use a cascaded context? Basically drop incoming
calls immediately into a context which notes where they are from and
then sets a few variables. Then you can drop them back into the main
context. You then don’t care what happens to the call, but on the
internal ring macro you can then modify it to dial the distinctive ring
based on the variable you set earlier

This seems to be mostly doable in freepbx even?

I think you can override extension.conf using the extensions-custom.conf
or similar?

Ed W

All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

[quote] The problem is that the distRing goes on the channel definition, so
we’re talking about modifying at the channel level, which is all
generated in the AGI script. I think it’ll take a bit of work to modify
it there, as I will have to grok all that the AGI script does.

My best idea so far is to create separate ZAP definitions in the configs
(maybe separating the users and devices), each with a different "dial"
command.

[/quote]

For inspiration: What I do on my homegrown setup is to use a different
context for each incoming trunk. Then I can use this to setup variables
determining what happens next, eg lines to ring, different timed events,
distinctive ring, etc. Then the a dial macro reads the variables like
distinctive ring and processes them.

Seems that this basic idea could work ok for FreePBX as well?

Ed W


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

If you use an Autoattendant you can add addtional custom code
( This was written for [email protected] 2.7)

In extensions_custom.conf

[aa_2-custom] # Auto-Attendant #2
exten => s,10,Background(pls-wait-connect-call)
exten => s,n,Wait(1)
exten => s,n,Background(for-quality-purposes)
exten => s,n,Background(this-call-may-be-monitored-or-recorded)
exten => s,n,Setvar(DIAL_OPTIONS=tm) # Provide music instead of
ringback
exten => s,n,Setvar(_ALERT_INFO=Classic-1) # For Sipura-841 phones
exten => s,n,Goto(ext-queues,280,5)
;exten => s,n,Goto(ext-group,1,1)

This sets a special ring for SIP phones (Classic-1)
My autoattendant for other lines sets a different ring.

Alternatively, if you use inbound queues, you can set the queue
"pre-announcment". This isn’t quite as good, but the system will
announce, for instance the “Company Name” to you when you pick
up the phone - before connecting the caller. If you answer many
different lines - this may actually be easier to use than remembering
the type of ring - and it works on any type of phone.

I’m actually combining both techniques - as you can see in the above
code. The AutoAttendent branches to a queue. So I get distinctive
ringing on the Sipura phones, and queue announcement for my
business lines everywhere.

Lee

Lee Marzke
4aero.com Consulting

Ed W wrote:

[quote] I do the same as you on my hand-crafted asterisk box, and not having
this kind of feature is rather holding me back from trying FreePBX on my
main box.

Interested to hear what you come up with

Ed W

Michael George wrote:

[quote] I am writing an article for The Linux Journal about Trixbox as a home
phone system for VoIP and POTS service.

One thing I am doing now with my hand-crafted * 1.0.x system is that I
have distinctive ring on my office phone. Normal ring if the call came
from the Zap trunk (the normal POTS phone line), /r1 if the call came
from an internal extension, /r2 if the call came from my office VoIP
trunk and was from another office extension, and /r3 if the call came
from my office VoIP trunk and was from an outside caller.

On a new Trixbox system, I can emulate the /r2 and /r3 conditions by
putting incoming calls from that VoIP trunk into a special context that
will only ring my device and will append the /rX to the channel. A bit
of a kludge, but it would work for my purposes.

However, I have not yet figured out a way to put /r1 on the calls
from other house extensions… I want voicemail and extension numbering
and all that to remain the same, I just want the ring different.

I haven’t come up with a “freePBX way” to do it as it is now. I might
be able to finesse it with the “devicesandusers” settings, I’ll have to
think about that…

I also thought about modifying freePBX so that on a Zap channel one can
define some CID reg.exps that are tied to /rX for 1 <= X <= 4 so that
when a call comes to that channel, if it matches a regexp, that “/rX” is
appended to the channel name. I’ve not yet looked into the freePBX
source, so this would be a bit more involved and I wouldn’t have that
done by the deadline for my article…

If anyone has achieved this Zap-channel distinctive ring with a standard
freePBX system, I would appreciate the advice.

If not, and I get it figured out (or modify freePBX to accommodate it),
I will let the list know.

Thanks!

[/quote]


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

[/quote]


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)