Replies: 1 comment
-
By the way, thanks for a very nice SIP/RTP implementation in python. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ref. pyVoIP version 1.6.8
According to RFC 4566 chapter 5.7 the parameter "c=" - connection data might be defined at session level as well as in the media description:
"A session description MUST contain either at least one "c=" field in
each media description or a single "c=" field at the session level.
It MAY contain a single session-level "c=" field and additional "c="
field(s) per media description, in which case the per-media values
override the session-level settings for the respective media."
However, pyVoIP seems to store all connection data descriptions in the request.body['c'] array, without any reference to the associated media description.
If the same connection data (e.g. same IPv4 address) is specified at session level and in the media description pyVpIP fails to setup the call.
In class VoIPCall audioPortsAdj is not equal to self.connections in this case.
class VoIPCall:
def init(if not (
:
(audioPortsAdj == self.connections or self.audioPorts == 0)
and (videoPortsAdj == self.connections or self.videoPorts == 0)
):
Example:
c [{'network_type': 'IN', 'address_type': 'IP4', 'address': '10.1.10.53', 'ttl': None, 'address_count': 1}, {'network_type': 'IN', 'address_type': 'IP4', 'address': '10.1.10.53', 'ttl': None, 'address_count': 1}]
self.calls[call_id] = VoIPCall(
m [{'type': 'audio', 'port': 4000, 'port_count': 1, 'protocol': <RTPProtocol.AVP: 'RTP/AVP'>, 'methods': ['96', '8', '0', '120'], 'attributes': {'96': {'rtpmap': {'id': '96', 'name': 'L16', 'frequency': '8000', 'encoding': None}}, '8': {'rtpmap': {'id': '8', 'name': 'PCMA', 'frequency': '8000', 'encoding': None}}, '0': {'rtpmap': {'id': '0', 'name': 'PCMU', 'frequency': '8000', 'encoding': None}}, '120': {'rtpmap': {'id': '120', 'name': 'telephone-event', 'frequency': '8000', 'encoding': None}, 'fmtp': {'id': '120', 'settings': ['0-16']}}}}]
The connection data must in some way or another be associated with the media data (request.body['m']) and the rtp client must be able to (only) use (bind) the connection data related to the actual media data.
Beta Was this translation helpful? Give feedback.
All reactions