Hi!

Acc to the docs 
https://opensips.org/docs/modules/3.5.x/siprec.html#func_siprec_start_recording 
the INVITE to the SRS should start on connect 200 OK. 
But it starts as soon as a SDP body is replied in the recorded call. E.g. in 
the 183/SDP or 180/SDP.

Is this intensionally and the documentation is wrong?
Can this be tweaked somehow to start on 200 OK?

Unfortunately our SRS cannot handle the call that early since it hasn’t got all 
information to record the call at that moment.
Gladly the SIPREC Modul does another INVITE on 200 OK if the first one got 
rejected - but I’m afraid that leads to some race conditions in some scenarios.

I’m using 3.5.5. Script is straight forward:

                create_dialog();
                $siprec(group) = "webrtc-loop-out";
                $rtp_relay_ctx(callid) = "srs-o-"+$ci;
                route(do_rec);

route[do_rec] {
        # https://www.opensips.org/Documentation/Tutorials-SIPREC-2-4

# is not sent to „subscribe answer" anyway
#       $rtp_relay(flags) = "callid="+$ci+" allow-transcoding asymmetric";
#       $rtp_relay_peer(flags) = "callid="+$ci+" allow-transcoding asymmetric";

# is not sent to „subscribe answer" anyway
#       $rtp_relay_ctx(flags) = "allow-transcoding asymmetric";
#       $rtp_relay_ctx(flags) = "template=siprec"; # flags "siprec" only in 
subscribe request, not in subscribe answer
        rtp_relay_engage("rtpengine");

        # 
https://opensips.org/docs/modules/3.6.x/siprec.html#func_siprec_start_recording
        $siprec(headers) = "X-Call-ID: "+$ci+"\r\n";

        $xml(caller_xml) = "<nameID></nameID>";
        $xml(caller_xml/nameID.attr/aor) = $fU+"@"+$fd"; # Communi5 does not 
want any sip:, nor ports
        if ($(fn{s.len})) $xml(caller_xml/nameID) = "<name>"+$fn+"</name>";
        $siprec(caller) = $xml(caller_xml/nameID);

        $xml(callee_xml) = "<nameID></nameID>";
        $xml(callee_xml/nameID.attr/aor) = $tU+"@"+$td"; # Communi5 does not 
want any sip:, nor ports
        #$xml(callee_xml/nameID) = "<name></name>";
        $siprec(callee) = $xml(callee_xml/nameID);

        $siprec(from_uri) = $fu;
        $siprec(to_uri) = $tu;

        
siprec_start_recording("sip:opensips-srs@192.168.48.161:5060;x-system=$(ru{uri.param,x-system}),
 sip:opensips-srs@192.168.48.162:5060;x-system=$(ru{uri.param,x-system})");
}


br
Walter

P.S:: tried 3.6.0-beta, too. But 3.6.0 crashes on BYE and other situations, yet.
P.P.S.: 3.6.0 got events. Can I do something in those event_routes? This is not 
clearly documented.
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to