Skip to content

Commit

Permalink
This closes #296
Browse files Browse the repository at this point in the history
  • Loading branch information
gvagenas committed Jun 14, 2015
1 parent fa76e11 commit e69641a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,17 @@ private ActorRef outbound(final Object message) throws ServletParseException {
SipURI to = null;
switch (request.type()) {
case CLIENT: {
from = outboundInterface("udp");
SipURI outboundIntf = outboundInterface("udp");
if (request.from() != null && request.from().contains("@")) {
// https://github.com/Mobicents/RestComm/issues/150 if it contains @ it means this is a sip uri and we allow
// to use it directly
from = (SipURI) sipFactory.createURI(request.from());
} else if (request.from() != null) {
from = sipFactory.createSipURI(request.from(), mediaExternalIp + ":" + outboundIntf.getPort());
} else {
from = outboundIntf;
}
// from = outboundInterface("udp");
final RegistrationsDao registrations = storage.getRegistrationsDao();
final Registration registration = registrations.getRegistration(request.to().replaceFirst("client:", ""));
if (registration != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ public static WebArchive createWebArchiveNoGw() {
archive.addAsWebInfResource("restcomm.script_dialTest", "data/hsql/restcomm.script");
archive.addAsWebResource("dial-number-entry.xml");
archive.addAsWebResource("dial-client-entry.xml");
archive.addAsWebResource("hello-play.xml");
logger.info("Packaged Test App");
return archive;
}
Expand Down

0 comments on commit e69641a

Please sign in to comment.