Juha,

o Juha Heinanen on 04/10/2014 07:39 PM:
> i still haven't figured out if it is somehow possible to trigger
> sipReply event when sip reply is received from callee leg.  based on my
> test (below), sipReply event is only triggered when reply is received
> from caller leg.  as result, it is not possible to call dlg.getReplyBody
> and dlg.addReplyBodyPart functions on replies from callee leg.
> 
> any advice on this is highly appreciated.
you seem to use the normal dsm application and not the dsm as sbc call
control module.

See the attached change of the dsm sbc call control sample script.
Sample config is in doc/dsm/examples/sbc/sbc_test_app/howto.txt

Also note that I just fixed something in the multipart body handling,
so adding parts to an already existing SDP body (e.g. in 200 OK) works
now properly.

hth
Stefan

diff --git a/doc/dsm/examples/sbc/sbc_test_app/test_sbc.dsm b/doc/dsm/examples/sbc/sbc_test_app/test_sbc.dsm
index e34d627..5c4310b 100644
--- a/doc/dsm/examples/sbc/sbc_test_app/test_sbc.dsm
+++ b/doc/dsm/examples/sbc/sbc_test_app/test_sbc.dsm
@@ -24,6 +24,16 @@ transition "init event" START - start / {
 
 state RUN;
 
+transition "sip 180 recvd" RUN - B2B.otherReply(#sip_code==180); test(#trans_method=="INVITE") / {
+  logParams(3);
+  dlg.addReplyBodyPart("text/xml","<txt>yup. that's some xml.</txt>");
+} -> RUN;
+
+transition "sip 200 OK recvd" RUN - B2B.otherReply(#sip_code==200); test(#trans_method=="INVITE") / {
+  logParams(3);
+  dlg.addReplyBodyPart("text/xml","<txt>and that's more.</txt>");
+} -> RUN;
+
 transition "state changed" RUN - legStateChange / logParams(3) -> RUN;
 
 transition "timer hit" RUN - timer(#id == 1) / {
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to