'How to properly close a pjmedia_transport element of an AudioStream?
I'm using pjsip pjproject and i want to establish 2 rtp streams connections customizable (in some field as ipaddress,port,codec,ecc) from the the user throught a web interface at runtime. Whenever the user edit some rtp stream, my backend application save the new data, tear down the old streams (closing the rtp e rtpc transport/socket) and then it will create the new streams selected. My actual results seem to indicate that pjmedia_transport_close(), that i used to close the pjmedia_transport associated to the stream, doesn't work cause at the creation of the new streams (if i mantain the same port for example) it log this error message:
[CRITICAL] create pjmedia1 uc transport udp failed: 120098 -> Address already in use
So i want to recreate rtp streams, with the same transport element, without error freeing the busied socket. Is there some another properly procedure to close the pjmedia_transport? I need to add some other lines code?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
