@@ -796,7 +796,7 @@ static void dlg_sequential_reply(struct cell* t, int type, struct tmcb_params* p
796
796
}
797
797
798
798
static mi_response_t * mi_send_sequential (struct dlg_cell * dlg , int sleg ,
799
- str * method , str * body , str * ct , int challenge , struct mi_handler * async_hdl )
799
+ str * method , str * body , str * headers , str * ct , int challenge , struct mi_handler * async_hdl )
800
800
{
801
801
struct dlg_sequential_param * param ;
802
802
int dleg = other_leg (dlg , sleg );
@@ -817,7 +817,7 @@ static mi_response_t *mi_send_sequential(struct dlg_cell *dlg, int sleg,
817
817
param -> method .s = (char * )(param + 1 );
818
818
memcpy (param -> method .s , method -> s , method -> len );
819
819
820
- if (!dlg_get_leg_hdrs (dlg , sleg , dleg , ct , NULL , & extra_headers )) {
820
+ if (!dlg_get_leg_hdrs (dlg , sleg , dleg , ct , headers , & extra_headers )) {
821
821
LM_ERR ("No more pkg for extra headers \n" );
822
822
shm_free (param );
823
823
return init_mi_error (500 , MI_SSTR ("Internal Error" ));
@@ -953,6 +953,7 @@ mi_response_t *mi_send_sequential_dlg(const mi_params_t *params,
953
953
str callid ;
954
954
str body ;
955
955
str ct ;
956
+ str headers ;
956
957
int leg , challenge , body_mode ;
957
958
958
959
if (get_mi_string_param (params , "callid" , & callid .s , & callid .len ) < 0 )
@@ -966,6 +967,11 @@ mi_response_t *mi_send_sequential_dlg(const mi_params_t *params,
966
967
method .len = 6 ;
967
968
}
968
969
970
+ if (try_get_mi_string_param (params , "headers" , & headers .s , & headers .len ) < 0 ) {
971
+ headers .s = "" ;
972
+ headers .len = 0 ;
973
+ }
974
+
969
975
if ((body_mode = mi_parse_body_mode (params , & ct , & body )) < 0 )
970
976
return init_mi_error (400 , MI_SSTR ("Invalid body mode" ));
971
977
@@ -998,7 +1004,7 @@ mi_response_t *mi_send_sequential_dlg(const mi_params_t *params,
998
1004
content = NULL ;
999
1005
1000
1006
return mi_send_sequential (dlg , leg , & method ,
1001
- (body_mode == 0 ?NULL :& body ), content , challenge , async_hdl );
1007
+ (body_mode == 0 ?NULL :& body ), & headers , content , challenge , async_hdl );
1002
1008
}
1003
1009
1004
1010
struct dlg_indialog_req_param {
0 commit comments