Duplicate callerid

How to stop duplicate caller id.
In our scenario, we are doing educational conference with confbridge and some time few naughty user double login/call from same number and start bothering with unwanted noises.

pls guide.

Any logic for this you’d have to write. So think about how that would be done, then look at what Asterisk provides.

If you can guarentee that NO ONE will EVER call in from behind a PBX, where everyone presents the main company number, you can check the caller ID of participants in the conference, and hangup duplicate connections. Beware, that sometimes if a caller looses connection for any reason, you can not be sure Asterisk receives a hangup request from your telephone provider (Eg. softphone on computer that crashes, cellphone loosing connection) In that situation the call stays in the conference until your provider terminates it. If you only look at the caller ID you will prevent the participant from rejoining for quite some time. (With our upstream providers we’ve seen calls linger around for at least 10 minutes)

Personally I’d solve the problem using an AGI script, as that would be the easiest way for me to get the conference participants. But you may be able to do it in the dialplan, I were too lazy to lookup possible dialplan functions and applications.

Thanks for reply.

Can we do something in dialplan to match existing caller id with excelif or some related command. ?
so that we can disconnect in initial stage , or some solution ?

I assume you mean execif, that will only work with conditions. Disconnecting the call, is the easy part. What you need to do is, checking the list of participants in the conference against the caller ID, if it’s already found, disconnect, else connect.

You would most likely need to take the conference ID yourself, instead of letting the conference bridge handle it.

An example flow would look like this

  1. Get conference number
  2. Check if caller ID matches a participant in that conference
  3. If a match is found, disconnect the new (Or perhaps the old?) call, else add caller to the bridge.

The ConfBridge application allows you to specify the conference number when you call it.


Yes I am using confbridge kick to disconnect user under conference, but my requirement is to stop duplicate number entry to system, so that any attempt for delicacy may restrict in starting through dialplan or agi.

And implementing the steps above, will get you there. But you’ll have to make the exact implementation yourself. I don’t need the feature, and as such, will not spend the time creating the needed dialplan and eventually scripts, to implement it, and serve it on a silver platter for you.

If you’re looking for a ready made solution, or someone cooking up a solution for you, well, I’m not your guy. If you hit a road block while trying to implement it yourself, well, feel free to ask, but I don’t have the time to hold someones hand, and guide them through every single step of the way, on the implementation.

This appears to be recurring issue for OP :frowning:

And I sympathize with the suggestion that:

Please allow me to add a couple more pieces to consider, including the BLACKLIST dial plan function to address this specific request to deny entry to the conference, and looking back at the ticket history, you might try using ChanSpy() and ConfKick() dial plan applications for more active engagement during the call when naughtiness is first observed.

@penguinpbx @Chano

I am trying to implement this to stop call delicacy as initiative

exten => s,n,System(/usr/sbin/asterisk -rx “core show channels concise” > /tmp/text1.txt)
exten => s,n,Set(Countvalue1=${SHELL(/usr/bin/grep -c ${CALLER_ID} /tmp/text1.txt)})
exten => s,n,Gotoif($[${Countvalue1} == 2]?AccessDeniedB)

When there is an issue, from the command line, you could run:

asterisk -rx "core show channels concise"

Find the problem channel and run:

asterisk -rx "database put blacklist 5551234 1"

Then replace those three lines of dial plan you were trying with:

exten => s,n,GotoIf($["${BLACKLIST()}"="1"]?AccessDeniedDB)

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