Michael Dyrna
2008-Jul-28 16:53 UTC
[asterisk-users] How to find out RTP UDP port of active calls
Hello list, I want to use Asterisk as a PBX connected to a public SIP service provider as "uplink". The environment where I want to deploy the solution makes it necessary to request (IP guaranteed quality of service) resources per active call. This is why I am looking for a way to interface a resource management software (not yet developed) with Asterisk so that 1. the software is informed whenever an external call is about to be established or ends (where polling Asterisk is an acceptable alternative if there is no notification mechanism) 2. the software knows the RTP traffic's negotiated UDP port in order to distinguish (every single) voice streams from other traffic. Is there an interface in Asterisk that fulfils these two requirements? To satisfy (1.) I found the event mechanism in the Asterisk Manager Interface. However as far as I understood the Manager Interface only gives me SIP peers' SIP UDP port numbers but no RTP UDP port numbers. (Right?) If there is no such interface, my idea was to intercept the SIP INVITE, OK and BYE messages with libpcap, parse the SDP payload and retrieve the required information that way, but I hope there is a more adequate solution. Thanks for any hints and comments Michael