after an interrupt, i resumed the task of modifying the body of 200 ok
reply using dsm script.

the script should operate in relay mode, i.e., it should not answer
incoming invite from caller before it gets 200 ok from callee.  this
kind of simple script seems to work as desired:

--------------------------------------------------------------------
import(mod_dlg);

initial state START
  enter {
    set($connect_session=0);
    set($reply_request=0);
    set($enable_reply_events="true");
};

transition "got invite" START - invite / {
  dlg.reply(100, Trying);
  sets(b_leg_r_uri="sip:@user@@domain");
  dlg.connectCalleeRelayed($b_leg_r_uri, $b_leg_r_uri);
} -> START;
--------------------------------------------------------------------

the problem comes when i try to add reply handling to it.  as a starter,
i added this reply transition:

transition "SIP reply" START - sipReply / {
  log(2, "got sip reply");
} -> START;

and test call produced nothing to syslog.  when i replaced it with this:

transition "SIP reply" START - B2B.otherReply(#code==200) / {
  log(2, "got 200 ok reply from callee");
} -> START;

i got to syslog:

Mar 23 10:48:58 siika sems[8025]: [#7f4f8a399700] [execute, 
DSMCoreModule.cpp:569] INFO: FSM:  'got 200 ok reply from callee'

that does not help, however, because reply functions dlg.getReplyBody
and dlg.addReplyBodyPart only work in sipReply event, which is not
executed by the above script.

question: is it somehow possible to trigger sipReply event when invite
is relayed by dlg.connectCalleeRelayed() function?

-- juha
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to