DIALGROUP usage help please!

I find that this causes me all sorts of woes in a rather sneaky fashion. Pretty much to the point where I can’t use it.

; silent ring line keys (SANYO SIP-PHONEs)
exten = 500,1,NoOp(5f)
exten = 500,n,Set(DIALGROUP(5f,add)=SIP/500@phone-512.office)
exten = 500,n,Set(DIALGROUP(5f,add)=SIP/500@phone-513.office)
exten = 500,n,Set(DIALGROUP(5f,add)=SIP/500@phone-521.office)
exten = 500,n,Set(DIALGROUP(5f,add)=SIP/500@phone-522.office)
exten = 500,n,Dial(${DIALGROUP(5f)},ikKtT)
exten = 500,n,Hangup

Why?
Because it never forgets.

In this case, every time I dial extension 500, it would add these 4 extensions again.

show database:

/dialgroup/5f : SIP/500@phone-521.office&SIP/500@phone-521.office&SIP/500@phone-512.office&SIP/5
phone-512.office&SIP/500@phone-513.office&SIP/500@phone-522.office&SIP/500@phone-522.office

dial 500, see a pile of errors about “Skipping dialing interface … again …”

show database:

/dialgroup/5f : SIP/500@phone-521.office&SIP/500@phone-521.office&SIP/500@phone-521.office&SIP/5
phone-513.office&SIP/500@phone-512.office&SIP/500@phone-513.office&SIP/500@phone-512.office&SIP/500@phone-513.office&SIP/500@phone-5
office&SIP/500@phone-522.office

Clearly I am doing something wrong, would someone be so kind as to point me in the right direction as to how to do this?

Should I define extension 500 somewhere that only gets visited once, and then have just

exten = 500,s,Dial(${DIALGROUP(5f)},ikKtT)
exten = 500,n,Hangup

I hadn’t messed with DIALGROUP before, but I just took a look at it. Yes when you do the DIALGROUP(group,add) it appends to a record in the asterisk database. So each time those set commands are called it will add again to the line.

From reading your message, it looks that you have already figured out how to handle this problem.

To call the extensions, it should only have the Dial for the dialgroup. The sets need to be somewhere else…if you ever need them again. You could also change the astdb through other means to add or take away members from the dialgroups…such as the AMI.

No, I haven’t figured out a solution, merely illuminated the problem, viz, DIALGROUPS are persistent (but I see no documentation saying that?) and annoying in that they don’t magically reap duplicates.

If I was to initialise them separately, where would I do that in the config. I’m pretty much at the level of “* user with lead water-wings” here. It was frustrating enough to find out this magical “astdb” was keeping stuff I didn’t ask it to.

I still don’t understand queues, I don’t think that does what I want because I don’t want to answer the phone if there is no one there to pick up. (local calls aren’t free in Japan and that would miff callers.)

:frowning:

Since the astdb is keeping the information you set for the extension 500. With alittle bit of dialplan people could add or remove themselves from the extension 500.

perhaps something like…

exten => 500,1,Dial(${DIALGROUP(5f)},ikKtT)

exten => 501,1,DIALGROUP(5f,add)=SIP/500@phone-${CALLERID(num).office}
exten => 502,1,DIALGROUP(5f,del)=SIP/500@phone-${CALLERID(num).office}

As for queues. Basically you would define a queue in the queue.conf. Then in your dialplan make is so that your people can log into or out of the queue. Depending on how you have it set up would dictate if it will answer or not. If no agents are logged in, it could be set to bypass going to the queue.

The intent of queues is to stack people in line waiting for an agent to become available. Which depending on how many callers you get and how many agents you have available may make for some noticible wait times.

[quote=“mazzic”]Since the astdb is keeping the information you set for the extension 500. With alittle bit of dialplan people could add or remove themselves from the extension 500.
perhaps something like…
exten => 500,1,Dial(${DIALGROUP(5f)},ikKtT)
exten => 501,1,DIALGROUP(5f,add)=SIP/500@phone-${CALLERID(num).office}
exten => 502,1,DIALGROUP(5f,del)=SIP/500@phone-${CALLERID(num).office}
[/quote]

Though if DIALGROUP was smart enough to not add duplicates, that would rock even more.

extensions wont be adding/deleting themselves, the issue therefore is "how do I set up dialgroups outside all the extension stuff.

This may be that there is something fundamental I am missing, like "dialgroup goes in [general] of sip.conf …
As it is, after about a day or so, I end up just removing astdb since its functionality is more of a nuisance than not, and restarting *

:confused: