Hi,

Thanks very much for this, that solved the double-m-line issue. Now I'm calling rtpengine_offer in a branch route.

One issue still remains; the call still gets connected to the called zoiper client, but it gets hung up right away. I traced this to be caused by a BYE message from Kamailio, which I think may be caused by the fact that the SDP returning to the chrome/websocket caller contains RTP/AVP profile, which it doesn't support. What I don't know is why this happens. 

I have a reply route: 

onreply_route[RTPPROXY_REPLY] {
        if (status =~ "18[03]") {
                # early media won't work so strip it out now to avoid problems
xlog("L_INFO","RTPPROXY_REPLY: Changing 18[03] to 180 Ringing and removing sdp body");
                change_reply_status(180, "Ringing");
                remove_body();
        } else if (status =~ "2[0-9][0-9]" && sdp_content()) {
xlog("L_INFO","Got status 2xx, calling rtpengine_answer with $avp(rtpproxy_answer_flags)");
                rtpengine_answer($avp(rtpproxy_answer_flags));
        }
}


I suspect there is a 200 OK message going from Kamailio to the ws client that has the RTP/AVP profile, as the Jssip library gets an error stating: "Failed to set remote answer sdp: Failed to push down transport description: Answerer must use either active or passive value for setup attribute."

Any idea on what's going wrong here? 


I'm not sure how to fix my config, maybe this log can help; this is printed to log as the called zoiper client answers the call:

Note: 
at 'Jul 22 19:36:36 u363id562 kamailio[27122]' I get the output from above route block
the next output at 'Jul 22 19:36:36 u363id562 rtpengine[16930]' is somewhat confusing to me, it still mentions RTP/AVP and later RTP/SAVPF.
Again here 1.1.1.1 is the public ip of my Kamailio & Asterisk machine and 2.2.2.2 is the ip behind which my clients reside.


Jul 22 19:36:36 u363id562 kamailio[27121]: NOTICE: acc [acc.c:315]: acc_log_request(): ACC: transaction answered: timestamp=1406043396;method=INVITE;from_tag=as7d3db027;to_tag=696faf28;call_id=5c066eb83cb7a0e144248fc344ead8d1@testers.com;code=200;reason=OK;src_user=771;src_domain=testers.com;src_ip=1.1.1.1;dst_ouser=771;dst_user=771;dst_domain=2.2.2.2
Jul 22 19:36:36 u363id562 kamailio[27123]: INFO: <script>: WITHINDLG: hooked to MANAGE_UA_FAILURE route
Jul 22 19:36:36 u363id562 kamailio[27122]: INFO: <script>: RTPPROXY_REPLY: status 2xx, calling rtpengine_answer with rtcp-mux-demux trust-address replace-origin replace-session-connection ICE=force RTP/SAVPF
Jul 22 19:36:36 u363id562 rtpengine[16930]: Got valid command from 127.0.0.1:32955: answer - { "sdp": "v=0#015#012o=root 1988031334 1988031334 IN IP4 1.1.1.1#015#012s=Asterisk PBX 11.10.2#015#012c=IN IP4 1.1.1.1#015#012t=0 0#015#012m=audio 16560 RTP/AVP 0 8 126#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:126 telephone-event/8000#015#012a=fmtp:126 0-16#015#012a=ptime:20#015#012a=ice-ufrag:4e7625e7134e85a032af6b6a68090b1d#015#012a=ice-pwd:78db4d825604911059fa381667e9ec4c#015#012a=candidate:H5bdd423d 1 UDP 2130706431 1.1.1.1 16560 typ host#015#012a=candidate:H5bdd423d 2 UDP 2130706430 1.1.1.1 16561 typ host#015#012a=sendrecv#015#012", "ICE": "force", "flags": [ "trust-address" ], "replace": [ "origin", "session-connection" ], "transport-protocol": "RTP/SAVPF", "rtcp-mux": [ "demux" ], "call-id": "35hkg7ct44fpndrs0gjt", "received-from": [ "IP4", "1.1.1.1" ], "from-tag": "ulaa4af3s4", "to-tag": "as6bed69a3", "command": "answer" }
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] Returning to SIP proxy: d3:sdp535:v=0#015#012o=root 1988031334 1988031334 IN IP4 1.1.1.1#015#012s=Asterisk PBX 11.10.2#015#012c=IN IP4 1.1.1.1#015#012t=0 0#015#012a=ice-lite#015#012m=audio 30150 RTP/SAVPF 0 8 126#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:126 telephone-event/8000#015#012a=fmtp:126 0-16#015#012a=ptime:20#015#012a=sendrecv#015#012a=rtcp:30150#015#012a=rtcp-mux#015#012a=setup:actpass#015#012a=fingerprint:sha-1 60:14:ED:9B:C6:80:D2:00:F9:90:46:E9:26:CF:AB:D7:23:03:B5:11#015#012a=ice-ufrag:12gFxwCc#015#012a=ice-pwd:YWrFa0E6PgUMIDoFQzZSaCRbE5O9#015#012a=candidate:aPQVJN7QRnK926OO 1 UDP 2130706431 1.1.1.1 30150 typ host#015#0126:result2:oke
Jul 22 19:36:36 u363id562 kamailio[27122]: NOTICE: acc [acc.c:315]: acc_log_request(): ACC: transaction answered: timestamp=1406043396;method=INVITE;from_tag=ulaa4af3s4;to_tag=as6bed69a3;call_id=35hkg7ct44fpndrs0gjt;code=200;reason=OK;src_user=660;src_domain=testers.com;src_ip=2.2.2.2;dst_ouser=771;dst_user=771;dst_domain=testers.com
Jul 22 19:36:36 u363id562 kamailio[27151]: INFO: <script>: WITHINDLG: hooked to MANAGE_UA_FAILURE route
Jul 22 19:36:36 u363id562 kamailio[27151]: INFO: <script>: WITHINDLG: hooked to MANAGE_UA_FAILURE route
Jul 22 19:36:36 u363id562 rtpengine[16930]: Got valid command from 127.0.0.1:39090: delete - { "call-id": "35hkg7ct44fpndrs0gjt", "received-from": [ "IP4", "2.2.2.2" ], "from-tag": "ulaa4af3s4", "command": "delete" }
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] Deleting full call
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] Final packet stats:
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] --- Tag 'as6bed69a3', created 0:05 ago, in dialogue with 'ulaa4af3s4'
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] ------ Media #1, port 30150 <>    2.2.2.2:56050, 0 p, 0 b, 0 e
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] --- Tag 'ulaa4af3s4', created 0:05 ago, in dialogue with 'as6bed69a3'
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] ------ Media #1, port 30148 <>    1.1.1.1:16560, 0 p, 0 b, 0 e
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] ------ Media #1, port 30149 <>    1.1.1.1:16561 (RTCP), 0 p, 0 b, 0 e
Jul 22 19:36:36 u363id562 rtpengine[16930]: [35hkg7ct44fpndrs0gjt] Returning to SIP proxy: d7:createdi1406043391e11:last signali1406043396e4:tagsd10:ulaa4af3s4d3:tag10:ulaa4af3s47:createdi1406043391e16:in dialogue with10:as6bed69a36:mediasld5:indexi1e4:type5:audio8:protocol7:RTP/AVP7:streamsld10:local porti30148e8:endpointd6:family4:IPv47:address12:1.1.1.14:porti16560ee19:advertised endpointd6:family4:IPv47:address12:1.1.1.14:porti16560ee11:last packeti1406043391e5:flagsl3:RTP6:fillede5:statsd7:packetsi0e5:bytesi0e6:errorsi0eeed10:local porti30149e8:endpointd6:family4:IPv47:address12:1.1.1.14:porti16561ee19:advertised endpointd6:family4:IPv47:address12:1.1.1.14:porti16561ee11:last packeti1406043391e5:flagsl4:RTCP6:fillede5:statsd7:packetsi0e5:bytesi0e6:errorsi0eeee5:flagsl11:initialized3:ICEeeee10:as6bed69a3d3:tag10:as6bed69a37:createdi1406043391e16:in dialogue with10:ulaa4af3s46:mediasld5:indexi1e4:type5:audio8:protocol9:RTP/SAVPF7:streamsld10:local porti30150e8:endpointd6:family4:IPv47:address12:2.2.2.24:porti56050ee19:advertised endpointd6:family4:IPv47:address12:2.2.2.24:porti56050ee11:last packeti1406043391e5:flagsl3:RTP4:RTCP6:fillede5:statsd7:packetsi0e5:bytesi0e6:errorsi0eeed10:local porti30151e8:endpointd6:family4:IPv67:address2:::4:porti0ee19:advertised endpointd6:family4:IPv67:address2:::4:porti0ee11:last packeti1406043391e5:flagsl4:RTCP13:fallback RTCP6:fillede5:statsd7:packetsi0e5:bytesi0e6:errorsi0eeee5:flagsl11:initialized8:rtcp-mux9:DTLS-SRTP3:ICEeeeee6:totalsd3:RTPd7:packetsi0e5:bytesi0e6:errorsi0ee4:RTCPd7:packetsi0e5:bytesi0e6:errorsi0eee6:result2:oke
Jul 22 19:36:36 u363id562 kamailio[27124]: NOTICE: acc [acc.c:315]: acc_log_request(): ACC: transaction answered: timestamp=1406043396;method=BYE;from_tag=ulaa4af3s4;to_tag=as6bed69a3;call_id=35hkg7ct44fpndrs0gjt;code=200;reason=OK;src_user=660;src_domain=testers.com;src_ip=2.2.2.2;dst_ouser=771;dst_user=771;dst_domain=1.1.1.1
Jul 22 19:36:36 u363id562 kamailio[27121]: INFO: <script>: WITHINDLG: hooked to MANAGE_UA_FAILURE route
Jul 22 19:36:36 u363id562 kamailio[27122]: NOTICE: acc [acc.c:315]: acc_log_request(): ACC: transaction answered: timestamp=1406043396;method=BYE;from_tag=as7d3db027;to_tag=696faf28;call_id=5c066eb83cb7a0e144248fc344ead8d1@testers.com;code=200;reason=OK;src_user=771;src_domain=testers.com;src_ip=1.1.1.1;dst_ouser=771;dst_user=771;dst_domain=2.2.2.2



cheers,
Olli




2014-07-21 16:38 GMT+03:00 Richard Fuchs <rfuchs@sipwise.com>:
On 20/07/14 01:15 PM, Olli Heiskanen wrote:
Hi,
...

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.

This looks a lot like the issue discussed here:

http://lists.sip-router.org/pipermail/sr-dev/2014-July/024507.html

The solution was:

http://lists.sip-router.org/pipermail/sr-dev/2014-July/024519.html


cheers

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users