[OpenSIPS-Users] Media Exchange API media_fork_to_uri

Răzvan Crainea razvan at opensips.org
Thu Feb 4 14:48:21 EST 2021


Hi, Eugene!

The idea is simple: a socket/listener represents an 
interface+protocol+port OpenSIPS listens on and is able to use.
In your initial tests, you were trying to send the call to a UDP 
endpoint, but you were only defining a TCP listener - hence the failure.

Please let us know *what* you are trying to achieve so we can guide you 
to the right documentation.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 2/2/21 9:08 PM, Eugene Christensen wrote:
> I believe I have made some headway on this today.  It appears that in my opensips.cfg, the line towards the top that is
> 
> socket=tcp:0.0.0.0:5060 AS 52.24.166.239:5060
> 
> is creating a listener for me (from your earlier question).
> 
> In the script where I call media_fork_to_uri, I've added the transport=tcp to the uri.  That seems to get me passed the issue and a call is now being sent to my other endpoint.
> 
> I'm not out of the woods but I'm a step closer.
> 
> Is there any documentation on the type of thing I'm trying to do?  I see the media_exchange module documentation but perhaps for a beginner to OpenSIPS and media_exchange, something more would be very useful.
> 
> Thank you.
> 
> Eugene
> 
> CONFIDENTIALITY NOTICE. This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential and proprietary information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify me by reply e-mail at echristensen at sorenson.com or by telephone at +1 (801) 287-9419, and destroy the original transmission and its attachments without reading them or saving them to disk.
> 
> -----Original Message-----
> From: Users <users-bounces at lists.opensips.org> On Behalf Of Eugene Christensen
> Sent: Tuesday, February 2, 2021 8:36 AM
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] Media Exchange API media_fork_to_uri
> 
> [EXTERNAL]
> 
> Hi Răzvan.
> 
> Thank you for looking at this with me.
> 
> Attached is my opensips.cfg file.
> 
> In addition to starting OpenSIPS, the only other thing I am doing is starting RTPProxy using the following command.  If there is more that I should be doing to configure listeners, I am unaware.
> 
> 	rtpproxy -u admin -s udp:127.0.0.1 12345 -l 172.31.6.99 -A 52.24.166.239
> 
> 
> I don't expect that rtpproxy and the configured addresses for it are having any bearing on this but I could be wrong.  I'll explain the addresses here and in the config file.
> 172.31.6.99 and 52.24.166.239 are the private and public addresses on the server running OpenSIPS and the rtpproxy (both on the same machine).
> 
> The 123.123.123.123 address in the config file in the media_fork_to_uri command has been altered for this thread.  The unaltered address is a public reachable address where I have a SIP device listening for an incoming SIP call, presumably from the OpenSIPS server when I run the media_fork_to_uri command.
> 
> Does this answer the question about the listeners or am I missing something that I need to do for listeners (or other)?
> 
> Please advise.
> 
> Thank you.
> 
> Eugene Christensen.
> 
> CONFIDENTIALITY NOTICE. This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential and proprietary information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify me by reply e-mail at echristensen at sorenson.com or by telephone at +1 (801) 287-9419, and destroy the original transmission and its attachments without reading them or saving them to disk.
> 
> -----Original Message-----
> From: Users <users-bounces at lists.opensips.org> On Behalf Of Razvan Crainea
> Sent: Tuesday, February 2, 2021 7:22 AM
> To: users at lists.opensips.org
> Subject: Re: [OpenSIPS-Users] Media Exchange API media_fork_to_uri
> 
> [EXTERNAL]
> 
> Hi, Eugene!
> 
> Could you give us a bit more information about the listeners (sockets) you are using?
> 
> Best regards,
> 
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
> 
> On 2/1/21 11:22 PM, Eugene Christensen wrote:
>> Hello,
>>
>> I’m trying to use the Media Exchange module and can’t seem to get it
>> to work as I wish.
>>
>> I’ve enabled RTPProxy and have that working to anchor media for a SIP
>> call with the OpenSIPS server.  In the script I have the following
>> code in the route section of the code:
>>
>>>>
>>           # account only INVITEs
>>
>>           if (is_method("INVITE")) {
>>
>>                   xlog("Received INVITE ... start dialog, rtpproxy and
>> then fork media\n");
>>
>>                   create_dialog();
>>
>>                   rtpproxy_engage();
>>
>>                   
>> media_fork_to_uri("sip:12223334444 at 123.123.123.123:5060", "caller");
>>
>>                   do_accounting("log");
>>
>>           }
>>
>>>>
>> I see the following errors:
>>
>> Jan 29 22:31:51 ip-172-31-6-99 /usr/local/sbin/opensips[17084]:
>> ERROR:media_exchange:uri2sock: no corresponding socket for af 2
>>
>> Jan 29 22:31:51 ip-172-31-6-99 /usr/local/sbin/opensips[17084]:
>> ERROR:media_exchange:media_fork_to_uri: could not find suitable socket
>> for originating traffic to sip:1222333444 at 123.123.123.123:5060
>> <sip:1222333444 at 123.123.123.123:5060>
>>
>> Any ideas what I am missing in my attempt?
>>
>> Is there a primer on the use of the media exchange module?
>> Specifically with this particular API?
>>
>> Thank you.
>>
>>
>> Eugene Christensen.
>>
>> *CONFIDENTIALITY NOTICE.*This e-mail transmission, and any documents,
>> files or previous e-mail messages attached to it, may contain
>> confidential and proprietary information. If you are not the intended
>> recipient, or a person responsible for delivering it to the intended
>> recipient, you are hereby notified that any disclosure, copying,
>> distribution or use of any of the information contained in or attached
>> to this message is STRICTLY PROHIBITED. If you have received this
>> transmission in error, please immediately notify me by reply e-mail at
>> echristensen at sorenson.com <mailto:echristensen at sorenson.com>or by
>> telephone at +1 (801) 287-9419, and destroy the original transmission
>> and its attachments without reading them or saving them to disk.
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 



More information about the Users mailing list