I am trying to write a program that makes a SIP connection to a PBX and asks the PBX to dial out on a PSTN line. Once someone answers, the program plays a message to the person phoned to let them know about a problem they need to fix. I'd like to make the program work with as many PBXs as possible.
My problem is that I don't want the PBX to respond "200 OK" to the INVITE until the PSTN line has actually been picked up. In other words, the SIP call status should be based on the PSTN call status. I'm not worried about "180 Ringing" state as it is difficult to detect ringing on the PSTN, but "200 OK" must wait for the voltage drop that indicates a connection on the PSTN. The reason I need this is that otherwise, the program starts playing the message about what needs fixing while the PSTN phone is still ringing. Also, the program can never tell whether a call was received by someone or not. So it doesn't know whether to go further with the call tree. Is there a standard way in SIP to accomplish this? Is there anything my program can do to instruct a SIP-enabled PBX to make the SIP state mirror the PSTN state the call is gatewayed to? Or is there something it can watch for in its communications with the PBX that is independent of the SIP call status, but will let it know when the PSTN line goes to a connected state? If there is no standard way to accomplish this, then does anyone know which PBXs can be configured to act this way? A generic solution would be best, but if need be I'll deal with the most popular PBXs individually. My guess is that PBXs which advertise that they can act as both a SIP Proxy and a SIP Gateway are the ones that have the potential to deal with call state in this way, but I'm finding it hard to find information on the subject. I am really struggling to get a handle on how to deliver this functionality. Any help is greatly appreciated, even if it is just search terms I should be targeting for researching this. _______________________________________________ Sip-implementors mailing list [email protected] https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
