I would like to return this old thread about dsm
B2B.otherBye/B2B.sendReinvite. According to dsm_syntax.txt:
B2B.sendReinvite(generate_sdp [, string extra_headers])
send a reinvite in caller leg (first leg), e.g. to
reconnect first leg after B2B.otherBye received.
generate_sdp can be 'true' or 'false'
(B2B.sendReinvite(true) recommended)
The problem is that B2B.otherBye() event has already already terminated
the whole call and it is too late to call B2B.sendReinvite() in
B2B.otherBye() transition.
In the test I have
transition "bye on other leg" conn - B2B.otherBye() / {
log(2, received bye from callee);
B2B.sendReinvite(true);
} -> thanks_for_calling;
and I get to syslog:
Feb 9 03:58:28 lohi sems[11512]: [#7f509b8f8700] [runEvent,
DSMStateEngine.cpp:668] DEBUG: >>>running 2 actions of transition 'bye on
other leg'
Feb 9 03:58:28 lohi sems[11512]: [#7f509b8f8700] [runactions,
DSMStateEngine.cpp:316] DEBUG: running 2 DSM action elements
Feb 9 03:58:28 lohi sems[11512]: [#7f509b8f8700] [runactions,
DSMStateEngine.cpp:321] DEBUG: executing 'log(2, received bye from callee)'
Feb 9 03:58:28 lohi sems[11512]: [#7f509b8f8700] [execute,
DSMCoreModule.cpp:624] INFO: FSM: 'received bye from callee'
Feb 9 03:58:28 lohi sems[11512]: [#7f509b8f8700] [runactions,
DSMStateEngine.cpp:321] DEBUG: executing 'B2B.sendReinvite(true)'
Feb 9 03:58:28 lohi sems[11512]: [#7f509b8f8700] [reinvite,
AmSipDialog.cpp:600] DEBUG: reinvite(): we are not connected
(status=Disconnecting). do nothing!
How to prevent B2B.otherBye() event from terminating the call? Is there
some magic missing from the above B2B.sendReinvite description?
It would be nice to get this solved before 1.7 is out. The whole test
diag is below.
-- Juha
----------------------------------------------------------------------------
import(mod_mysql);
import(mod_utils);
initial state START;
transition "sess start" START - sessionStart / {
log(2, Entering test);
playFile(/tmp/greeting.wav);
} -> lobby;
state lobby;
transition "bye in lobby recvd" lobby - hangup / stop(false) -> end;
state end;
transition "lobby to connect" lobby - noAudioTest / {
B2B.connectCallee("sip:[email protected]", "sip:[email protected]");
} -> waitconnect;
state waitconnect;
state conn;
transition "bye" (waitconnect, conn) - hangup / {
log(2, bye while connecting);
B2B.terminateOtherLeg();
stop(false);
} -> end;
transition "prov reply" waitconnect - B2B.otherReply(#code < 200) / {
log(2, received provisional reply);
} -> waitconnect;
transition "positive reply" waitconnect - B2B.otherReply(#code < 300) / {
log(2, received positive reply);
flushPlaylist();
disconnectMedia();
} -> conn;
transition "negative reply" waitconnect - B2B.otherReply() / {
log(2, received negative reply);
stop(false);
} -> end;
transition "bye on other leg" conn - B2B.otherBye() / {
log(2, received bye from callee);
B2B.sendReinvite(true);
} -> thanks_for_calling;
state thanks_for_calling enter {
info("==== entering thanks_for_calling");
playFile("/tmp/thanks_for_calling.wav");
};
transition "audio_ends" thanks_for_calling - noAudio / {
info("==== audio ends at thanks_for_calling");
stop(true);
} -> end;
transition "bye recvd" (START, end, thanks_for_calling) - hangup / {
log(2, keep checker happy);
stop(false);
} -> end;
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems