<div dir="ltr">Hi, <div><br></div><div>After a long break while concentrating on other parts of my system I'll get back to this problem. My system has changed a bit since the last setup, although it's mostly the same: CentOS 6.5, Kamailio on <a href="http://1.1.1.1:5060">1.1.1.1:5060</a> and newly added Asterisk on <a href="http://1.1.1.1:5070">1.1.1.1:5070</a>. I use realtime integration, which seems to work nicely. I'm able to call from a zoiper client to another while signaling goes through Asterisk via dispatcher module functions. </div>
<div><br></div><div>I fixed my kamailio script, there was a copy paste error which caused all my rtp profiles to be rtp/savpf, silly old me for making this mistake! Now my script looks like this: </div><div><br></div><div>
<div>if ( (t_check_status("488") || t_check_status("415")) && sdp_content() ) {</div><div><span class="" style="white-space:pre">               </span>if ( sdp_get_line_startswith("$avp(mline)", "m=") ) {</div>
<div><span class="" style="white-space:pre">                            </span>if ($avp(mline) =~ "SAVPF") {</div><div><span class="" style="white-space:pre">                                            </span>$avp(rtpproxy_offer_flags) = "rtcp-mux-demux force trust-address replace-origin replace-session-connection ICE=remove RTP/AVP";</div>
<div><span class="" style="white-space:pre">                                            </span>$avp(rtpproxy_answer_flags) = "rtcp-mux-demux force trust-address replace-origin replace-session-connection ICE=force RTP/SAVPF";</div><div><span class="" style="white-space:pre">                                </span>} else {</div>
<div><span class="" style="white-space:pre">                                            </span>$avp(rtpproxy_offer_flags) = "rtcp-mux-demux force trust-address replace-origin replace-session-connection ICE=force RTP/SAVPF";</div><div><span class="" style="white-space:pre">                                         </span>$avp(rtpproxy_answer_flags) = "rtcp-mux-demux force trust-address replace-origin replace-session-connection ICE=remove RTP/AVP";</div>
<div><br></div><div><span class="" style="white-space:pre">                           </span>}</div><div><span class="" style="white-space:pre">          </span>}</div><div><span class="" style="white-space:pre">          </span>append_branch();</div><div><span class="" style="white-space:pre">           </span>rtpengine_offer($avp(rtpproxy_offer_flags));</div>
<div><span class="" style="white-space:pre">            </span>t_on_reply("RTPPROXY_REPLY");</div><div><span class="" style="white-space:pre">            </span>route(RELAY);</div><div>}</div></div><div><br></div><div>So right now my goal is to enable a call from a client using rtp/savpf to a client using rtp/avp. The other variations of the example I can work out later. </div>
<div><br></div><div>Now I'm getting somewhat similar results as in the beginning of this thread, although, I am having progress as well. I'm not sure if adding Asterisk to the mix (sip.conf has avpf=yes) will make life more difficult but here goes:</div>
<div><br></div><div>I'll try to make a call from a ws client 660 to a zoiper client 771. Call is established, and stays on for 2 seconds, then gets a hang up, which originates from Asterisk, not from either client. What is strange is the sdp descriptions:</div>
<div><br></div><div>1. SDP of the first INVITE from Kamailio to Asterisk:</div><div><div><span class="" style="white-space:pre">    </span>v=0</div><div><span class="" style="white-space:pre">        </span>o=- 850613716980436580 2 IN IP4 127.0.0.1</div>
<div><span class="" style="white-space:pre">    </span>s=-</div><div><span class="" style="white-space:pre">        </span>t=0 0</div><div><span class="" style="white-space:pre">      </span>a=group:BUNDLE audio</div><div><span class="" style="white-space:pre">       </span>a=msid-semantic: WMS mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5</div>
<div><span class="" style="white-space:pre">    </span>m=audio 30000 RTP/SAVPF 111 103 104 0 8 106 105 13 126</div><div><span class="" style="white-space:pre">     </span>c=IN IP4 1.1.1.1</div><div><span class="" style="white-space:pre">   </span>a=candidate:3350409123 1 udp 2122260223 192.168.0.101 62137 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:3350409123 2 udp 2122260223 192.168.0.101 62137 typ host generation 0</div><div><span class="" style="white-space:pre">  </span>a=candidate:2999745851 1 udp 2122194687 192.168.56.1 62138 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:2999745851 2 udp 2122194687 192.168.56.1 62138 typ host generation 0</div><div><span class="" style="white-space:pre">   </span>a=candidate:2301678419 1 tcp 1518280447 192.168.0.101 0 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:2301678419 2 tcp 1518280447 192.168.0.101 0 typ host generation 0</div><div><span class="" style="white-space:pre">      </span>a=candidate:4233069003 1 tcp 1518214911 192.168.56.1 0 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:4233069003 2 tcp 1518214911 192.168.56.1 0 typ host generation 0</div><div><span class="" style="white-space:pre">       </span>a=candidate:1190865175 1 udp 1686052607 2.2.2.2 62137 typ srflx raddr 192.168.0.101 rport 62137 generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:1190865175 2 udp 1686052607 2.2.2.2 62137 typ srflx raddr 192.168.0.101 rport 62137 generation 0</div><div><span class="" style="white-space:pre">       </span>a=ice-ufrag:SDg+Zdks514ojBXF</div>
<div><span class="" style="white-space:pre">    </span>a=ice-pwd:cPXTIk0phlMcfZql32v0np1o</div><div><span class="" style="white-space:pre"> </span>a=ice-options:google-ice</div><div><span class="" style="white-space:pre">   </span>a=fingerprint:sha-256 03:48:83:8A:E5:CF:28:C5:28:43:8B:F2:3A:AF:0A:ED:6D:E7:63:EE:87:14:43:0B:61:C5:4F:BB:9F:96:90:AA</div>
<div><span class="" style="white-space:pre">    </span>a=setup:actpass</div><div><span class="" style="white-space:pre">    </span>a=mid:audio</div><div><span class="" style="white-space:pre">        </span>a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level</div>
<div><span class="" style="white-space:pre">    </span>a=extmap:3 <a href="http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time">http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time</a></div><div><span class="" style="white-space:pre">       </span>a=rtpmap:111 opus/48000/2</div>
<div><span class="" style="white-space:pre">    </span>a=fmtp:111 minptime=10</div><div><span class="" style="white-space:pre">     </span>a=rtpmap:103 ISAC/16000</div><div><span class="" style="white-space:pre">    </span>a=rtpmap:104 ISAC/32000</div>
<div><span class="" style="white-space:pre">    </span>a=rtpmap:0 PCMU/8000</div><div><span class="" style="white-space:pre">       </span>a=rtpmap:8 PCMA/8000</div><div><span class="" style="white-space:pre">       </span>a=rtpmap:106 CN/32000</div>
<div><span class="" style="white-space:pre">    </span>a=rtpmap:105 CN/16000</div><div><span class="" style="white-space:pre">      </span>a=rtpmap:13 CN/8000</div><div><span class="" style="white-space:pre">        </span>a=rtpmap:126 telephone-event/8000</div>
<div><span class="" style="white-space:pre">    </span>a=maxptime:60</div><div><span class="" style="white-space:pre">      </span>a=ssrc:2490449596 cname:UahzO270elyCvXw6</div><div><span class="" style="white-space:pre">   </span>a=ssrc:2490449596 msid:mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5 898b170f-4f16-416c-b128-c7f48cebc525</div>
<div><span class="" style="white-space:pre">    </span>a=ssrc:2490449596 mslabel:mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5</div><div><span class="" style="white-space:pre">     </span>a=ssrc:2490449596 label:898b170f-4f16-416c-b128-c7f48cebc525</div>
<div><span class="" style="white-space:pre">    </span>a=sendrecv</div><div><span class="" style="white-space:pre"> </span>a=rtcp:30001</div><div><span class="" style="white-space:pre">       </span>a=rtcp-mux</div><div><span class="" style="white-space:pre"> </span>a=candidate:kSo5RG6Arv7JfiXg 1 UDP 1518214655 1.1.1.1 30000 typ host</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:kSo5RG6Arv7JfiXg 2 UDP 1518214654 1.1.1.1 30001 typ host</div></div><div><br></div><div>2. Asterisk responds 488 Not acceptable here</div><div><br></div><div>
3. Second INVITE from Kamailio contains this SDP:</div><div><br></div><div><div><span class="" style="white-space:pre">   </span>v=0</div><div><span class="" style="white-space:pre">        </span>o=- 850613716980436580 2 IN IP4 1.1.1.1</div>
<div><span class="" style="white-space:pre">    </span>s=-</div><div><span class="" style="white-space:pre">        </span>t=0 0</div><div><span class="" style="white-space:pre">      </span>a=msid-semantic: WMS mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5</div>
<div><span class="" style="white-space:pre">    </span>m=audio 30004 RTP/AVP 111 103 104 0 8 106 105 13 126</div><div><span class="" style="white-space:pre">       </span>c=IN IP4 1.1.1.1</div><div><span class="" style="white-space:pre">   </span>a=rtpmap:111 opus/48000/2</div>
<div><span class="" style="white-space:pre">    </span>a=fmtp:111 minptime=10</div><div><span class="" style="white-space:pre">     </span>a=rtpmap:103 ISAC/16000</div><div><span class="" style="white-space:pre">    </span>a=rtpmap:104 ISAC/32000</div>
<div><span class="" style="white-space:pre">    </span>a=rtpmap:0 PCMU/8000</div><div><span class="" style="white-space:pre">       </span>a=rtpmap:8 PCMA/8000</div><div><span class="" style="white-space:pre">       </span>a=rtpmap:106 CN/32000</div>
<div><span class="" style="white-space:pre">    </span>a=rtpmap:105 CN/16000</div><div><span class="" style="white-space:pre">      </span>a=rtpmap:13 CN/8000</div><div><span class="" style="white-space:pre">        </span>a=rtpmap:126 telephone-event/8000</div>
<div><span class="" style="white-space:pre">    </span>a=maxptime:60</div><div><span class="" style="white-space:pre">      </span>a=ssrc:2490449596 cname:UahzO270elyCvXw6</div><div><span class="" style="white-space:pre">   </span>a=ssrc:2490449596 msid:mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5 898b170f-4f16-416c-b128-c7f48cebc525</div>
<div><span class="" style="white-space:pre">    </span>a=ssrc:2490449596 mslabel:mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5</div><div><span class="" style="white-space:pre">     </span>a=ssrc:2490449596 label:898b170f-4f16-416c-b128-c7f48cebc525</div>
<div><span class="" style="white-space:pre">    </span>a=sendrecv</div><div><span class="" style="white-space:pre"> </span>a=rtcp:30005</div><div><span class="" style="white-space:pre">       </span>v=0</div><div><span class="" style="white-space:pre">        </span>o=- 850613716980436580 2 IN IP4 127.0.0.1</div>
<div><span class="" style="white-space:pre">    </span>s=-</div><div><span class="" style="white-space:pre">        </span>t=0 0</div><div><span class="" style="white-space:pre">      </span>a=group:BUNDLE audio</div><div><span class="" style="white-space:pre">       </span>a=msid-semantic: WMS mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5</div>
<div><span class="" style="white-space:pre">    </span>m=audio 30004 RTP/AVP 111 103 104 0 8 106 105 13 126</div><div><span class="" style="white-space:pre">       </span>c=IN IP4 1.1.1.1</div><div><span class="" style="white-space:pre">   </span>a=candidate:3350409123 1 udp 2122260223 192.168.0.101 62137 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:3350409123 2 udp 2122260223 192.168.0.101 62137 typ host generation 0</div><div><span class="" style="white-space:pre">  </span>a=candidate:2999745851 1 udp 2122194687 192.168.56.1 62138 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:2999745851 2 udp 2122194687 192.168.56.1 62138 typ host generation 0</div><div><span class="" style="white-space:pre">   </span>a=candidate:2301678419 1 tcp 1518280447 192.168.0.101 0 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:2301678419 2 tcp 1518280447 192.168.0.101 0 typ host generation 0</div><div><span class="" style="white-space:pre">      </span>a=candidate:4233069003 1 tcp 1518214911 192.168.56.1 0 typ host generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:4233069003 2 tcp 1518214911 192.168.56.1 0 typ host generation 0</div><div><span class="" style="white-space:pre">       </span>a=candidate:1190865175 1 udp 1686052607 2.2.2.2 62137 typ srflx raddr 192.168.0.101 rport 62137 generation 0</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:1190865175 2 udp 1686052607 2.2.2.2 62137 typ srflx raddr 192.168.0.101 rport 62137 generation 0</div><div><span class="" style="white-space:pre">       </span>a=ice-ufrag:SDg+Zdks514ojBXF</div>
<div><span class="" style="white-space:pre">    </span>a=ice-pwd:cPXTIk0phlMcfZql32v0np1o</div><div><span class="" style="white-space:pre"> </span>a=ice-options:google-ice</div><div><span class="" style="white-space:pre">   </span>a=fingerprint:sha-256 03:48:83:8A:E5:CF:28:C5:28:43:8B:F2:3A:AF:0A:ED:6D:E7:63:EE:87:14:43:0B:61:C5:4F:BB:9F:96:90:AA</div>
<div><span class="" style="white-space:pre">    </span>a=setup:actpass</div><div><span class="" style="white-space:pre">    </span>a=mid:audio</div><div><span class="" style="white-space:pre">        </span>a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level</div>
<div><span class="" style="white-space:pre">    </span>a=extmap:3 <a href="http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time">http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time</a></div><div><span class="" style="white-space:pre">       </span>a=rtpmap:111 opus/48000/2</div>
<div><span class="" style="white-space:pre">    </span>a=fmtp:111 minptime=10</div><div><span class="" style="white-space:pre">     </span>a=rtpmap:103 ISAC/16000</div><div><span class="" style="white-space:pre">    </span>a=rtpmap:104 ISAC/32000</div>
<div><span class="" style="white-space:pre">    </span>a=rtpmap:0 PCMU/8000</div><div><span class="" style="white-space:pre">       </span>a=rtpmap:8 PCMA/8000</div><div><span class="" style="white-space:pre">       </span>a=rtpmap:106 CN/32000</div>
<div><span class="" style="white-space:pre">    </span>a=rtpmap:105 CN/16000</div><div><span class="" style="white-space:pre">      </span>a=rtpmap:13 CN/8000</div><div><span class="" style="white-space:pre">        </span>a=rtpmap:126 telephone-event/8000</div>
<div><span class="" style="white-space:pre">    </span>a=maxptime:60</div><div><span class="" style="white-space:pre">      </span>a=ssrc:2490449596 cname:UahzO270elyCvXw6</div><div><span class="" style="white-space:pre">   </span>a=ssrc:2490449596 msid:mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5 898b170f-4f16-416c-b128-c7f48cebc525</div>
<div><span class="" style="white-space:pre">    </span>a=ssrc:2490449596 mslabel:mvFMRRQODtH8zKqo5IOQHzRQw1f5U9QKuRP5</div><div><span class="" style="white-space:pre">     </span>a=ssrc:2490449596 label:898b170f-4f16-416c-b128-c7f48cebc525</div>
<div><span class="" style="white-space:pre">    </span>a=sendrecv</div><div><span class="" style="white-space:pre"> </span>a=rtcp:30005</div><div><span class="" style="white-space:pre">       </span>a=rtcp-mux</div><div><span class="" style="white-space:pre"> </span>a=candidate:kSo5RG6Arv7JfiXg 1 UDP 1518214655 1.1.1.1 30004 typ host</div>
<div><span class="" style="white-space:pre">    </span>a=candidate:kSo5RG6Arv7JfiXg 2 UDP 1518214654 1.1.1.1 30005 typ host</div></div><div><br></div><div>There may be something off in my Asterisk configs since it's Asterisk that responds 488, but see how Kamailio responds, SDP contains 2 similar m= lines. Is there something I might be doing wrong in configuring rtpengine? The INVITE going to the called client has nice clean rtp with RTP/AVP profile. </div>
<div><br></div><div>I installed the latest rtpengine today. One thing I noticed the command rtpengine --version output is undefined. Just a minor thing but good to know.</div><div><br></div><div>Thank you for all your wonderful effort so far! Please let me know if you need any logs or traces and I'll provide them asap.</div>
<div><br></div><div>cheers,</div><div>Olli</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-21 17:18 GMT+03:00 Richard Fuchs <span dir="ltr"><<a href="mailto:rfuchs@sipwise.com" target="_blank">rfuchs@sipwise.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 04/12/14 09:31, Olli Heiskanen wrote:<br>
> Hello,<br>
><br>
> I'm probably still doing something wrong, I still get 488 from the<br>
> grandstream. Also zoiper refuses the call with 415 Unsupported Media Type.<br>
><br>
> According to the module description I tried to change my config to this:<br>
> Btw, thanks for enabling verbose flags, those are more readable when<br>
> working on the config file.<br>
><br>
> if ( t_check_status("488") && sdp_content() ) {<br>
>   if ( sdp_get_line_startswith("$avp(mline)", "m=") ) {<br>
>     if ($avp(mline) =~ "SAVPF") {<br>
>       $avp(rtpproxy_offer_flags) = "rtcp-mux-demux force trust-address<br>
> replace-origin replace-session-connection ICE=force RTP/SAVPF";<br>
>       $avp(rtpproxy_answer_flags) = "rtcp-mux-demux force trust-address<br>
> replace-origin replace-session-connection ICE=remove RTP/SAVPF";<br>
>     } else {<br>
>       $avp(rtpproxy_offer_flags) = "rtcp-mux-demux force trust-address<br>
> replace-origin replace-session-connection ICE=remove RTP/SAVPF";<br>
>       $avp(rtpproxy_answer_flags) = "rtcp-mux-demux force trust-address<br>
> replace-origin replace-session-connection ICE=force RTP/SAVPF";<br>
>     }<br>
>   }<br>
> }<br>
><br>
<br>
</div>I see that you're trying to talk RTP/SAVPF in all cases. Is this what<br>
you want? Or do you want to bridge between RTP/AVP and /SAVPF? Assuming<br>
that the granstream doesn't support SRTP, you should replace the first<br>
and the last occurrences in this snippet with "RTP/AVP".<br>
<div class=""><br>
><br>
> Below is the output from tail -f /var/log/messages when trying to call<br>
> from wsclient to gsclient<br>
> (are there any debug options etc to enable full logs being written to<br>
> syslog to help get the whole data out?)<br>
<br>
</div>It's not rtpengine which is cutting off the log lines, it's probably the<br>
syslog daemon handling them. On my system I have rsyslogd and it's<br>
handling very long log lines quite nicely.<br>
<div class=""><br>
><br>
> I tried using -s0 option when using ngrep but the sdp still gets cut off<br>
> for some reason, that didn't help much... Although I think there are<br>
> full sdp when I write the output to a pcap file. I wonder if there's a<br>
> trick to force full packets onto ngrep output without writing to file?<br>
<br>
</div>I believe ngrep works on a per-packet basis only, which fails as soon as<br>
the UDP packets get fragmented. I have more luck using wireshark as it<br>
reassembles fragments.<br>
<br>
cheers<br>
<br>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>