Hello,
o Saúl Ibarra [06/15/09 16:37]:
Hi again Stefan,
First of all, thank you very much for your help :)
I can see the SDP is being parsed and SEMS is answering with 200OK, so
I think I'm doing some king of mistake :(
it turns out that there was some more missing steps specific for B2B
with relayed INVITE, which previously were not done in DSM (this is an
area which could definitely have some API improvement). Please bear with
it - in these scenarios it has not been used very much.
Let's see if I understood well:
I think almost so, yes. Just with one difference:
In this scenario, sessionStart event is run also immediately when the
INVITE is received, just after invite event. So you'd have to change the
script to go from runsession state (see attached). This is somewhat
counterintuitive, but the event you are probably looking for (the event
when the B2B session is started) you are catching with the "Positive
reply" transition.
Stefan
--
Stefan Sayer
VoIP Services
[email protected]
www.iptego.com
IPTEGO GmbH
Wittenbergplatz 1
10789 Berlin
Germany
Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
import(mod_dlg);
initial state START
enter {
set(reply_request="0");
set(connect_session="0");
logVars(1);
};
transition "on INVITE" START - invite / log(1, "to runinvite") -> runinvite;
transition "on Session Start" START - sessionStart / log(1, "to runsession") ->
runsession;
state runinvite
enter {
dlg.reply(100, "Trying");
dlg.connectCalleeRelayed("sip:[email protected]",
"sip:[email protected]");
};
transition "Let's wait" runinvite - -> waitconnect;
state waitconnect;
state runsession;
transition "BYE while waiting" runsession - hangup / {
log(1, "bye while connecting");
B2B.terminateOtherLeg();
stop(false);
} -> END;
transition "Provisional reply" runsession - B2B.otherReply(#code < 200) / {
log(1, "received provisional reply")
log(1, #code)
log(1, #reason)
} -> runsession;
transition "Positive reply" runsession - B2B.otherReply(#code < 300) / {
log(1, "received positive reply")
log(1, #code)
log(1, #reason)
} -> conn;
transition "Negative reply" runsession - B2B.otherReply() / {
log(1, "received negative reply")
log(1, #code)
log(1, #reason)
stop(true)
} -> END;
state conn enter {
log(1, "in connected state");
};
transition "BYE on leg A" conn - hangup / B2B.terminateOtherLeg(); stop(false)
-> END;
transition "BYE on leg B" conn - B2B.otherBye() / stop(true) -> END;
state END;
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems