if (gateway.split(",").length > 2) {
dialsuffix = gateway.split(",")[2];
}
session = new JavaSession(
"{ignore_early_media=true, Cid=" + Callid + "}"
+ dialstring + Caller + dialsuffix);
if (session.ready()) {
Query = "Update Call_history set Gateway_id="
+ Gatewayid + " where id=" + Callid;