Publish Secondary Extension State

Hello,

I’m really new to this but was hoping this would come with a simple answer. To give some background, I have a misc app that is connected to time conditions. Basically when a user dials the extension for the app, it determines based on the time condition which office to send the call.

There are 3 extensions in total, but I would like them to all publish a state for the custom app extension so I can add that one extension to the reception phone as a BLF. The whole point is for a receptionist to not have to follow a schedule for a user but rather the phone system do it for them. I just want to complete the package with a BLF status that’s portable as well.

In the Asterisk CLI, try “show hints” and look for the hint that is getting set for the Time Condition. Set your BLF up to watch that hint.

1 Like

How will the destination extensions be updating that hist when they call out, that’s what i’m trying to accomplish.

Time condition x501 takes a caller either to 101, 201, or 301. and I want a BLF for 501 to show busy when either of those 3 extensions makes a call.

It is a cool concept, something down this path maybe.

Haven’t tried anything like this before, so I would be very interested to hear back with what you come up with.

2 Likes

I tested this example in my lab. I was testing for 1001 to show busy when 1101 made a call but the state didn’t change in my case. I was able to find the context links inside of my config files, but i’m not really sure where to go from here.

Here is what I added to my extensions_custom.conf file:

[ext-dnd-hints-custom]
exten => 1101,hint,SIP/1101&SIP/1001&Custom:DND1001

Looking at the Hints table in asterisk with an active test call on 1101, I notice there’s another context hint for 1101 which is mirroring the status making me wonder if that context string is backwards.

Also is it going to be an issue that the time condition is in a separate contact since it isn’t an extension??

[email protected]: Custom:TC1 State:Idle Presence:not_set Watchers 1
[email protected] : PJSIP/1101&Custom:DN State:InUse Presence: Watchers 4
[email protected]: PJSIP/1101&PJSIP/100 State:InUse Presence:not_set Watchers 0

Got it working. So after flipping the string I was able to get the notify to replicate out and I assumed that I would just add another line for the second extension I wanted to loop into this, but that didn’t work. After adding the second line I noticed there was still only one hint listed in asterisk. I then circled back and realized I could just add another extension for notify to this string

Working single state replication:
exten => 1001,hint,PJSIP/1001&PJSIP/1101&Custom:DND1101

Working dual state replication:
exten => 1001,hint,PJSIP/1001&PJSIP/1101&Custom:DND1101&PJSIP/1201&Custom:DND1201

So now if either 1101 OR 1201 get on a call, the state for my application @ 1001 shows as busy.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.