kevinc@uunet.uu.net (Kevin Collins) (12/23/90)
On 17 Dec 90 at 9:44:56 PST in message <15464@accuvax.nwu.edu>, tad@ssc.UUCP (Tad Cook) writes: [talking about a box that would accept digits to dial over an incoming line and dial those digits over an outgoing line.] > I heard that after awhile the box was modified to listen for ringback > and busy tone, and stayed on the line long enough to determine whether > or not to bill. This must have been a little tricky, because what > does it do if the called party answers before the first ring? For a universal two-wire analog trunk, one way to detect that type of "early answer" is to start a timer after the digits have been sent on the outgoing trunk and stop that timer when you get the first recognizable tone (ringback, busy, etc.). If the timer expires, then no tone was detected, so you can assume that the outgoing line was answered at the far end and answer the near end. What's important here is choosing the right value for the timer. If the timer's too short, it may expire before ringback has been detected, and you'll answer calls that are still ringing. If it's too long, whoever answered at the far end will get sick of waiting to hear a reply to their repeated "Hello"s and hang up. Note that this is all assuming that telco can't/won't supply battery reversal on answer. For E&M, T1, or ISDN Primary Rate Interface trunks, the above situation is not an issue since it is easily detected via the various signalling protocols. Disclaimer: I'm not trying to help anyone provide phone service in violation of any applicable tariffs/regulations/laws. Kevin Collins | Aspect Telecommunications USENET: ...uunet!aspect!kevinc | San Jose, CA Voice: +1 408 441 2489 | My opinions are mine alone.