Hi, I'm trying to make a call blocker with rpi but I've an issue when it comes to hang up. I've tried the ATH0 or ATH command but the lines remains up. If I give the command with minicom or putty (on windows) the behaviour is the same. I made some tests: If I make a call with the ATD command and then use ATH0 it ends the call; if I use the ATH1 command the line is busy but is I use the ATH0 the line returns free. What I'm missing?
Thanks
Modem US Robotics USB
RPI or Win10
analog line out from a modem router with GPON technology
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use NCID on a raspberry Pi to do call blocking. It has the ability to call my own external hangup scripts to decide when to hang up on the caller. You might want to explore this option further.
To do a simple hangup in your own software, send ATH1 to pick up the call, wait a few seconds and then send ATH0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With minicom, you should always see an OK return from the modem after ATH0.
Perhaps it is talking to the wrong tty device?
Watch the kernel log with "tail -f /var/log/kern.log" as you unplug the modem from the Pi and plug it in again. The log will show what tty device name is assigned, perhaps ttyACM0
[ 4.336267] usb 2-9: new full-speed USB device number 5 using ohci-pci [ 4.591251] usb 2-9: New USB device found, idVendor=0572, idProduct=1340 [ 4.591253] usb 2-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4.591255] usb 2-9: Product: USB Modem [ 4.591256] usb 2-9: Manufacturer: Conexant [ 4.591257] usb 2-9: SerialNumber: 12345678 [ 7.871088] cdc_acm 2-9:1.0: ttyACM2: USB ACM device
Then you can run "minicom -s" to start in setup mode and configure the device name. ("Exit" will then start a minicom session.)
In the minicom session, type AT (enter) until it says OK.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could you give the complete sequence of what you are sending to the modem with minicom, what it is sending back, and what you are expecting to happen at each step?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These is the output of dmesg: [ 5.301523] cdc_acm 1-1.3:2.0: ttyACM0: USB ACM device [ 5.302462] usbcore: registered new interface driver cdc_acm [ 5.302473] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
These is the minicom session:
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyACM0, 19:54:17
Press CTRL-A Z for help on special keys
RING
ATH1
RING
OK
ATH0
OK
After the ATH0 the line remains active
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With the second RING arriving after the ATH1 and before the OK, I'm thinking that there may not have been enough time allowed between the ATH1/OK and the sending of ATH0.
NCID sends AT, waits for OK, then sends ATH1, waits for OK, then waits 2 seconds for the phone system to notice before sending ATH0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, Is still not working...may be there some incompatiblity with the line (GPIO modem)? It is strange that if I use atd to make a call from the modem I'm able to hang up with ath0
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So the problem is that the voip of my carrier is set to not hang up when I put down the phone and has a time-out of 60s. So everything is working from my side and now I'ìve a working ncid raspi.
Thanks to all
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Glad you got it working and thanks for letting us know. In case someone else runs into this same issue, can you tell us the name of your carrier? Is the time-out something you're able to change (if so, can you provide specific instructions) or do you just have to live with it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
sure!
Carrier: Fastweb IT
Time-out: 60sec based on experience and not officially confirmed, I'm not able to change it and is not configured in the modem they provide.
The official answer is: You have to live with it
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm trying to make a call blocker with rpi but I've an issue when it comes to hang up. I've tried the ATH0 or ATH command but the lines remains up. If I give the command with minicom or putty (on windows) the behaviour is the same. I made some tests: If I make a call with the ATD command and then use ATH0 it ends the call; if I use the ATH1 command the line is busy but is I use the ATH0 the line returns free. What I'm missing?
Thanks
Modem US Robotics USB
RPI or Win10
analog line out from a modem router with GPON technology
I use NCID on a raspberry Pi to do call blocking. It has the ability to call my own external hangup scripts to decide when to hang up on the caller. You might want to explore this option further.
To do a simple hangup in your own software, send ATH1 to pick up the call, wait a few seconds and then send ATH0.
Yes I can try but I use putty or minicom to send the ATH0 but it takes no results
With minicom, you should always see an OK return from the modem after ATH0.
Perhaps it is talking to the wrong tty device?
Watch the kernel log with "tail -f /var/log/kern.log" as you unplug the modem from the Pi and plug it in again. The log will show what tty device name is assigned, perhaps ttyACM0
[ 4.336267] usb 2-9: new full-speed USB device number 5 using ohci-pci
[ 4.591251] usb 2-9: New USB device found, idVendor=0572, idProduct=1340
[ 4.591253] usb 2-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.591255] usb 2-9: Product: USB Modem
[ 4.591256] usb 2-9: Manufacturer: Conexant
[ 4.591257] usb 2-9: SerialNumber: 12345678
[ 7.871088] cdc_acm 2-9:1.0: ttyACM2: USB ACM device
Then you can run "minicom -s" to start in setup mode and configure the device name. ("Exit" will then start a minicom session.)
In the minicom session, type AT (enter) until it says OK.
I'm sure that I'm using the right tty port because the ATH1 or ATD commands works weel. The ATH0 command works well after the ATD for example...
I must be misunderstanding something here.
Could you give the complete sequence of what you are sending to the modem with minicom, what it is sending back, and what you are expecting to happen at each step?
These is the output of dmesg:
[ 5.301523] cdc_acm 1-1.3:2.0: ttyACM0: USB ACM device
[ 5.302462] usbcore: registered new interface driver cdc_acm
[ 5.302473] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
These is the minicom session:
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyACM0, 19:54:17
Press CTRL-A Z for help on special keys
RING
ATH1
RING
OK
ATH0
OK
After the ATH0 the line remains active
If I use ATD<number> the modem makes a call
during the ring phase if I send ATH0 command the modem hangs up with NO CARRIER message</number>
With the second RING arriving after the ATH1 and before the OK, I'm thinking that there may not have been enough time allowed between the ATH1/OK and the sending of ATH0.
NCID sends AT, waits for OK, then sends ATH1, waits for OK, then waits 2 seconds for the phone system to notice before sending ATH0.
I wait 10sec befaore ath1 and ath0
I'm out of suggestions. Perhaps there is something wrong with your modem.
I wrote to the usr support...I hope to receive an answer
Hi Alessandro,
What is the model of your USR modem? And is it listed on this modem compatibility chart?
The model is USR805637 V.92
And it is listed on the page you send...but now I have to test the comand
they put in notes. I didn't know this page
Thanks
Alessandro
Il Mar 3 Dic 2019, 22:49 Todd Andrews tandrews@users.sourceforge.net ha
scritto:
No, Is still not working...may be there some incompatiblity with the line (GPIO modem)? It is strange that if I use atd to make a call from the modem I'm able to hang up with ath0
So I make some test and the problem is the line/modem....I'm not able to hang-up neither from the phone
So the problem is that the voip of my carrier is set to not hang up when I put down the phone and has a time-out of 60s. So everything is working from my side and now I'ìve a working ncid raspi.
Thanks to all
Alex
Hi Alessandro,
Glad you got it working and thanks for letting us know. In case someone else runs into this same issue, can you tell us the name of your carrier? Is the time-out something you're able to change (if so, can you provide specific instructions) or do you just have to live with it?
Hi,
sure!
Carrier: Fastweb IT
Time-out: 60sec based on experience and not officially confirmed, I'm not able to change it and is not configured in the modem they provide.
The official answer is: You have to live with it
Thanks