Skip to content

Commit

Permalink
Merge branch 'ccProductization' into issue1104
Browse files Browse the repository at this point in the history
* ccProductization:
  fixed cnf ep issue
  Update instance-id on registration update This close #1487
  • Loading branch information
Maria Farooq committed Oct 16, 2016
2 parents 467d677 + ec16182 commit 7b37ef5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</delete>

<update id="updateRegistration" parameterType="map">
UPDATE restcomm_registrations SET ttl=#{ttl}, date_expires=#{date_expires}, date_updated=#{date_updated} WHERE address_of_record=#{address_of_record} AND
UPDATE restcomm_registrations SET ttl=#{ttl}, date_expires=#{date_expires}, date_updated=#{date_updated}, instanceid=#{instanceid} WHERE address_of_record=#{address_of_record} AND
display_name=#{display_name} AND location=#{location} AND user_agent=#{user_agent};
</update>
</mapper>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</delete>

<update id="updateRegistration" parameterType="map">
UPDATE "restcomm_registrations" SET "ttl"=#{ttl}, "date_expires"=#{date_expires}, "date_updated"=#{date_updated} WHERE "address_of_record"=#{address_of_record} AND
UPDATE "restcomm_registrations" SET "ttl"=#{ttl}, "date_expires"=#{date_expires}, "date_updated"=#{date_updated}, "instanceid"=#{instanceid} WHERE "address_of_record"=#{address_of_record} AND
"display_name"=#{display_name} AND "location"=#{location} AND "user_agent"=#{user_agent};
</update>
</mapper>
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void onGetMediaGateway(GetMediaGateway message, ActorRef self, ActorRef
sender.tell(new MediaResourceBrokerResponse<ActorRef>(localMediaGateway), self);
}else{
final Sid conferenceSid = addConferenceDetailRecord(conferenceName, callSid);
sender.tell(new MediaResourceBrokerResponse<MediaGatewayForConference>(new MediaGatewayForConference(conferenceSid, localMediaGateway)), self);
sender.tell(new MediaResourceBrokerResponse<MediaGatewayForConference>(new MediaGatewayForConference(conferenceSid, localMediaGateway, null)), self);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public final class MmsConferenceController extends MediaServerController {
private final ActorRef mrb;
private String conferenceName;
private Sid conferenceSid;
private String conferenceEndpointIdName;

private ConnectionMode connectionMode;

Expand Down Expand Up @@ -264,6 +265,7 @@ private void onMediaResourceBrokerResponse(MediaResourceBrokerResponse<?> messag
MediaGatewayForConference mgc = (MediaGatewayForConference) message.get();
mediaGateway = mgc.mediaGateway();
this.conferenceSid = mgc.conferenceSid();
this.conferenceEndpointIdName = mgc.masterConfernceEndpointIdName();
fsm.transition(message, acquiringMediaSession);
}else if(is(acquiringCnfMediaResourceController)){
conferenceMediaResourceController = (ActorRef) message.get();
Expand Down Expand Up @@ -453,8 +455,6 @@ public AcquiringMediaGateway(final ActorRef source) {
public void execute(final Object message) throws Exception {
CreateMediaSession createMediaSession = (CreateMediaSession) message;
String conferenceName = createMediaSession.conferenceName();
//TODO: temporary log
logger.info( "MMSConferenceController: GetMediaGatewayFromMRB: conferenceName = " + conferenceName );
mrb.tell(new GetMediaGateway(createMediaSession.callSid(), conferenceName, null), self());
}
}
Expand Down Expand Up @@ -492,7 +492,7 @@ public AcquiringEndpoint(final ActorRef source) {

@Override
public void execute(final Object message) throws Exception {
mediaGateway.tell(new CreateConferenceEndpoint(mediaSession), super.source);
mediaGateway.tell(new CreateConferenceEndpoint(mediaSession, conferenceEndpointIdName), super.source);
}
}

Expand Down

0 comments on commit 7b37ef5

Please sign in to comment.