Hello everyone
I'm new with NCID and I think it's a great program.
I use it with a raspberry pi against telemarketing.
I would like to switch the rpi gpio only if a call is not in blacklist.
It is possible ? what is the way to do this?
For swith the gpio i can use a .sh in "/usr/share/ncid/modules"
run with "ncid --no-gui --program ncid-switch_gpio"
...
If someone can help me thanks in advance
Last edit: Alex 2016-12-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The ncid server creates various call types. If you configure the module for type CID, it will
not pass calls in the blacklist if the ncidd hangup option is enabled.
Look at /etc/ncid/conf.d/ncid-skel.conf for the list of call and message types. You can
select the type or types to process. The /usr/share/ncid/modules/ncid-skel module is intended to help users write a client module. The comments should tell you which lines of code to delete and which to replace.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok that's work, i can run a .sh with a no blacklist call.
But the prog can't controling the gpio without starting by "sudo"...
You know a solution for this?
Thank for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The setuid bit does not work on scripts, it would need to be set on the shell which would mean the shell would run as root for everyone. Thanks for bringing it up so I can explain the setuid only works on binaries, not scripts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you start ncid with the output module by hand, you need to use sudo. If you create an init script for it, then it will be run as root when the RPi boots.
You can copy and rename the /etc/init.d/ncid-page script. Modify the copy to start your module.
Ok it's great, everything goes very well with your explanations.
Thanks you!! Now i have a block-phone system with activation of the ring if call out blacklist !!
Thank you very much john.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Brilliant! You've described a very clever solution to a problem we're often asked about -- how to suppress the normal first ring on blacklisted callers.
Would you mind sharing your hardware and script solution? I'm sure other NCID users would want to know the details of how you did this. We already have a place where you could post your info: Useful -Scripts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think that you can implement different and probably better solution. Your scheme prevents one phone to ring. Think about using the relay (GPIO controlled) to cut off the phone line. In this way you can prevent every connected phone to ring(i.e. Analog PBX).
You should just try. :)
Regards.
Last edit: eikaff 2016-12-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone
I'm new with NCID and I think it's a great program.
I use it with a raspberry pi against telemarketing.
I would like to switch the rpi gpio only if a call is not in blacklist.
It is possible ? what is the way to do this?
For swith the gpio i can use a .sh in "/usr/share/ncid/modules"
run with "ncid --no-gui --program ncid-switch_gpio"
...
If someone can help me thanks in advance
Last edit: Alex 2016-12-07
Hi Alex,
The ncid server creates various call types. If you configure the module for type CID, it will
not pass calls in the blacklist if the ncidd hangup option is enabled.
Look at /etc/ncid/conf.d/ncid-skel.conf for the list of call and message types. You can
select the type or types to process. The /usr/share/ncid/modules/ncid-skel module is intended to help users write a client module. The comments should tell you which lines of code to delete and which to replace.
Thanks for your quick reply, I look at this
ok that's work, i can run a .sh with a no blacklist call.
But the prog can't controling the gpio without starting by "sudo"...
You know a solution for this?
Thank for your help.
Hello Alex,
maybe with the setuid bit ?
https://en.wikipedia.org/wiki/Setuid
Hi Laurent,
The setuid bit does not work on scripts, it would need to be set on the shell which would mean the shell would run as root for everyone. Thanks for bringing it up so I can explain the setuid only works on binaries, not scripts.
Hi John, OK thank you, I didn't knew that.
Hi Alex,
If you start ncid with the output module by hand, you need to use sudo. If you create an init script for it, then it will be run as root when the RPi boots.
You can copy and rename the /etc/init.d/ncid-page script. Modify the copy to start your module.
Review the AUTOSTART section in the Raspbian Install in the user manual.
Thank you, i try this
Ok it's great, everything goes very well with your explanations.
Thanks you!! Now i have a block-phone system with activation of the ring if call out blacklist !!
Thank you very much john.
Hi Alex,
Brilliant! You've described a very clever solution to a problem we're often asked about -- how to suppress the normal first ring on blacklisted callers.
Would you mind sharing your hardware and script solution? I'm sure other NCID users would want to know the details of how you did this. We already have a place where you could post your info: Useful -Scripts.
Hello, ok no problem, i have make a tuto but in french...
I translate it and I post it this week end, with drawings fritzing for hardware.
Done : https://sourceforge.net/p/ncid/wiki/Useful-Scripts/
Last edit: Alex 2016-12-10
I think that you can implement different and probably better solution. Your scheme prevents one phone to ring. Think about using the relay (GPIO controlled) to cut off the phone line. In this way you can prevent every connected phone to ring(i.e. Analog PBX).
You should just try. :)
Regards.
Last edit: eikaff 2016-12-10
Yes it's a good idea...
Thank you.
But you have to reconnect the line to be able to call?