Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

WHISTLE-1569: convert to endpoint to json and filter undefined headers

  • Loading branch information...
commit 9556710392b7e0b6e509820c32f0956380a125ad 1 parent 2963ab4
@k-anderson k-anderson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 whistle_apps/apps/crossbar/src/modules/cb_clicktocall.erl
View
4 whistle_apps/apps/crossbar/src/modules/cb_clicktocall.erl
@@ -254,7 +254,7 @@ originate_call(Contact, JObj, AccountId) ->
Request = [{<<"Application-Name">>, <<"transfer">>}
,{<<"Application-Data">>, wh_json:from_list([{<<"Route">>, Contact}])}
,{<<"Msg-ID">>, MsgId}
- ,{<<"Endpoints">>, [Endpoint]}
+ ,{<<"Endpoints">>, [wh_json:from_list(Endpoint)]}
,{<<"Timeout">>, wh_json:get_value(<<"Timeout">>, JObj)}
,{<<"Ignore-Early-Media">>, wh_json:get_value(<<"Ignore-Early-Media">>, JObj)}
,{<<"Media">>, wh_json:get_value(<<"Media">>, JObj)}
@@ -273,7 +273,7 @@ originate_call(Contact, JObj, AccountId) ->
| wh_api:default_headers(Amqp, <<"resource">>, <<"originate_req">>, ?APP_NAME, ?APP_VERSION)
],
wh_amqp_mgr:register_return_handler(),
- wapi_resource:publish_originate_req(Request),
+ wapi_resource:publish_originate_req(props:filter_undefined(Request)),
lager:debug("published click to call request ~s", [MsgId]),
wait_for_originate(MsgId).
Please sign in to comment.
Something went wrong with that request. Please try again.