HiAll! Some context: I installed and configured asterisk 18 and used an ATA HT813 to bridge to PSTN. Everything works fine. For project’s requirements, I need to recover callerid from incoming calls. I configured FXO and FXS ports in pjsip.conf:
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[1003]
type = endpoint
context = from-internal
disallow = all
allow = ulaw
auth = auth1003
aors = 1003
[1003]
type = aor
max_contacts = 1
[ata-fxo]
type = endpoint
context = from-pstn
disallow = all
allow = ulaw
auth = authata-fxo
aors = ata-fxo
[ata-fxo]
type = aor
max_contacts = 1
[authata-fxo]
type = auth
auth_type = userpass
password = S3cr3t0s12345
username = ata-fxo
Adjusting ATA to ring number to 1 it isn’t enough to read callerid, but answers incoming calls as waited. Experimenting, I got that 2 o 3 number rings is enough to read callerid from incoming calls! The fact is in a little time, ata-fxo lost its “hook” and can’t register, doesn’t answer, doesn’t work.
Does anyone have a suggestion to manage this issue to get callerid from pstn incoming calls in my asterisk 18? Thanks in advance.
Yes, the 813 does not “pass” the incoming calls as much as it answers the FXO port and forwards them. CallerID is sent between rings 1 and 2 usually; so you need to wait at least two rings before answering.
I’m not sure exactly what you mean by lost it’s hook…or which port is losing it. I do recall I had a number of issues getting mine to reliably work with my incoming phone line…but that was also technically just an FXS port on my fiber terminal. If you’re trying to do the same thing…because if you have a digital voice from your cable company you almost have to…then that can cause problems. It’s been about 4 years since I tried this and I don’t remember what settings I had to tweak; but there were a number of settings on the FXO port I adjusted that fixed it.
The way you and I probably want to do this…where it rings sip phones and then sends callerID when it happens…a modern solution that does that might be difficult to find. Most of that was the territory of DHADI cards.
HiAll! Some context: I installed and configured asterisk 18 and used an ATA HT813 to bridge to PSTN. Everything works fine. For project’s requirements, I need to recover callerid from incoming calls. I configured FXO and FXS ports in pjsip.conf:
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[1003]
type = endpoint
context = from-internal
disallow = all
allow = ulaw
auth = auth1003
aors = 1003
[1003]
type = aor
max_contacts = 1
[ata-fxo]
type = endpoint
context = from-pstn
disallow = all
allow = ulaw
auth = authata-fxo
aors = ata-fxo
[ata-fxo]
type = aor
max_contacts = 1
[authata-fxo]
type = auth
auth_type = userpass
password = S3cr3t0s12345
username = ata-fxo
Adjusting ATA to ring number to 1 it isn’t enough to read callerid, but answers incoming calls as waited. Experimenting, I got that 2 o 3 number rings is enough to read callerid from incoming calls! The fact is in a little time, ata-fxo lost its “hook” and can’t register, doesn’t answer, doesn’t work.
Does anyone have a suggestion to manage this issue to get callerid from pstn incoming calls in my asterisk 18? Thanks in advance.
I think the hardware you are using - the HT813 is sort of crappy and cheap. I use a Cisco 1760 router with a 4 port FXO card in it. Cisco initially released voice cards for their 2600 series of routers that were version 1 and did not support callerID but then years later with the benefit of experience, engineered version 2 cards which do support caller ID and those answer at the end of the first ring and are able to setup a SIP connection and send over caller ID.
Ebay is littered with these routers and cards, they are very cheap, here’s a representative sample:
As dewdude said, you will probably eventually be able to get it to work if you twiddle with it long enough, but I did want to dispel the myth that you must wait 2 rings to get caller ID - in reality you probably have to wait 2 rings for THIS device, but not for ALL devices.
Cisco over the years has released a plethora of devices that support FXO and FXS ports, that were released long before the current Cisco regime of “smart licensing” which requires perpetual payments to keep the devices working, and are now very cheap, used. Anything with a VIC2 is worth buying for these border conditions. (interfacing analog POTS either from the CO or going to a phone to SIP)
I don’t think the US caller ID system starts sending caller ID until after the first ring; you don’t want to send analogue data on top of a 50 volt ringing current. So, whilst one could dead reckon the end of caller ID transmission, waiting for the second ring is probably good idea. (In the UK, the call starts with a line reversals, and the whole caller ID sequence completes before ringing current is applied.)
If https://www.nxp.com/docs/en/application-note/AN1733.pdf is correct, the caller ID is valid no later than 200ms before the start of the second ring, although it may take additional time for the ATA to detect that second ring.
I suspect it has more to do with the speed of the CPU in the FXO device - the Cisco part is clearly able to finish processing the incoming caller ID and install it in the outgoing SIP connection packet fast enough to complete the SIP handshake to the PBX before the second ring comes - the HT813 isn’t. I know that the HT813 is a darling of people using antique phones because it’s one of the few TA that has an FXS and FXO port that has the hardware in it to support rotary dialing, which allows you to interconnect antique Strowgear switches and antique phones with rotary dials on them to modern VoIP systems, so because of that I’m probably causing a lot of people on this forum to start sharpening their knives, lol. But, I gave up protecting sacred cows some time ago. LOL
When I mention “… It losts it’s hook…“, I mean that extension firstly was registered then lose that registration and extension is no more available. Repeatedly, log messages fires the screen showing the extension nnnn@ipaddress is trying to register unsuccessfully. ATA is configured to number of rings = 2 and callerid available until extensions losts its registration. When number of rings = 1, extension register stays working, but no callerid available.