Skip to content

Commit e678703

Browse files
committed
Handle SIP URI custom headers the same way as for client and number
This refer to RESTCOMM-1580
1 parent f6e322c commit e678703

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/CallsEndpoint.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ protected Response putCall(final String accountSid, final MultivaluedMap<String,
367367

368368
String customHeaders = getCustomHeaders(to);
369369

370-
if (customHeaders != null && !to.contains("@")) {
370+
if (customHeaders != null) {
371371
to = (customHeaders != null) ? to.substring(0, to.indexOf("?")) : to;
372372
data.remove(to);
373373
data.putSingle("To", to);
@@ -403,7 +403,7 @@ protected Response putCall(final String accountSid, final MultivaluedMap<String,
403403
try {
404404
if (to.contains("@")) {
405405
create = new CreateCall(from, to, username, password, true, timeout, CreateCallType.SIP,
406-
accountId, null, statusCallback, statusCallbackMethod, statusCallbackEvent, null);
406+
accountId, null, statusCallback, statusCallbackMethod, statusCallbackEvent, customHeaders);
407407
} else if (to.startsWith("client")) {
408408
create = new CreateCall(from, to, username, password, true, timeout, CreateCallType.CLIENT,
409409
accountId, null, statusCallback, statusCallbackMethod, statusCallbackEvent, customHeaders);

0 commit comments

Comments
 (0)