[OpenSIPS-Users] Trouble getting mediaproxy to work (dialog module)

slophoo dan.hislop at gipscorp.com
Mon Mar 23 22:08:26 CET 2009


Thank you, your advice helped a lot.  You were right, the processes were all hanging around and when i killed them and got a fresh start, things started up much better.  
<br><br>&gt;The doc and the example show you that you have to call this for an INVITE 
<br>&gt;when there is no to_tag, but in your script you call it only when you 
<br>&gt;have a to_tag.
<br><br>I now have engage_media_proxy in a place which should be hit only when there is no totag (please confirm this?):
<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if (has_totag()) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # sequential request withing a dialog should
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # take the path determined by record-routing
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (loose_route()) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (is_method(&quot;BYE&quot;)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setflag(1); # do accounting ...
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setflag(3); # ... even if the transaction fails
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route(1);
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* uncomment the following lines if you want to enable presence */
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ##if (is_method(&quot;SUBSCRIBE&quot;) && $rd == &quot;your.server.ip.address&quot;) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ## &nbsp; &nbsp; &nbsp;# in-dialog subscribe requests
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ## &nbsp; &nbsp; &nbsp;route(2);
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ## &nbsp; &nbsp; &nbsp;exit;
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ##}
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; engage_media_proxy();
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( is_method(&quot;ACK&quot;) ) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( t_check_trans() ) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_relay();
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # ACK without matching transaction ... ignore and discard.\n&quot;);
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_send_reply(&quot;404&quot;,&quot;Not here&quot;);
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;
<br>&nbsp; &nbsp; &nbsp; &nbsp; }
<br><br><br>&gt;report back if you still see the problem with the syslog entries.
<br><br>When I place a call from one NATTED device to another NATTED Device, I think it's trying to use mediaproxy but something is timing out... (and my SIP SDP does not tell the caller anything about the proxy address). &nbsp;why might this be? &nbsp;see following trace out:
<br><br><br>root at sfsip:/etc/init.d#
<br>root at sfsip:/etc/init.d# okMar 23 14:35:54 [5579] ERROR:mediaproxy:send_command: did timeout waiting for an answer
<br>new branch at sip:4045 at 99.184.200.204:36258;rinstance=1dce88fb7efc7370
<br>incoming reply
<br>incoming reply
<br>Mar 23 14:36:03 [5582] ERROR:mediaproxy:send_command: did timeout waiting for an answer
<br>ACC: transaction answered: timestamp=1237844163;method=INVITE;from_tag=00071725;to_tag=0051f46b;call_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
<br>incoming reply
<br>incoming reply
<br>Mar 23 14:36:05 [5580] ERROR:mediaproxy:send_command: did timeout waiting for an answer
<br>incoming reply
<br>Mar 23 14:36:07 [5579] ERROR:mediaproxy:send_command: did timeout waiting for an answer
<br>ACC: transaction answered: timestamp=1237844274;method=BYE;from_tag=00071725;to_tag=0051f46b;call_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
<br><br><br><br>By the way, my opensips and mediaproxy are on the same box, with only one (private IP) NIC, sitting behind a firewall 1:1 NAT, so in the mediaproxy config.ini i have dispatchers and listen, listen_management listed with the private IP (since i believe opensips itself needs to connect to this IP), and relay_ip as the public (since i believe clients will connect to this)
-- 
View this message in context: http://n2.nabble.com/Trouble-getting-mediaproxy-to-work-%28dialog-module%29-tp2506005p2523472.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.




More information about the Users mailing list