[asterisk-dev] Polarity Reversal Issue

Steve Davies davies147 at gmail.com
Tue Jun 9 12:09:03 CDT 2009


Hopefully the following makes sense.

I have an analogue line which has signalling working perfectly with
the exception of one small issue, and the solution may be completely
simple - I just need to check myself here.

The following is actually from Zaptel, but I believe this code is
virtually unchanged in Dahdi - Trunk looks logically equivalent.

- A call starts.
- Polarity reversal to REV happens, indicating CID
- CID is sent
- Call rings
- Call answers and proceeds
- Asterisk hangs up the call
- (At this point the Zap channel is handed over to the monitor)
- Hangup is signalled by polarity
- Monitor thread sees polarity change (to IDLE, but it ignores that)
- Monitor thread sets polarity to REV, and starts looking for CID.
- Channel times out, and line becomes available again.

The issue is that the Monitor thread shows the line as unavailable
while it is "handling" the polarity reversal which is should be
ignoring. Is there an obvious workaround for this? If the channel
structure survives after the call and is passed to the monitor thread,
then I assume I can just check for POLARITY_REV, and ignore the
post-hangup reversal?

Thoughts?
Many thanks,
Steve



More information about the asterisk-dev mailing list