File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,6 @@ export 'src/enum_helper.dart';
22export 'src/sip_message.dart' ;
33export 'src/sip_ua_helper.dart' ;
44export 'src/transport_type.dart' ;
5+ export 'src/uri.dart' ;
6+
7+
Original file line number Diff line number Diff line change @@ -307,6 +307,16 @@ class RTCSession extends EventManager implements Owner {
307307 _ua.contact! .outbound = true ;
308308 _contact = _ua.contact.toString ();
309309
310+ bool isFromUriOptionPresent = options['from_uri' ] != null ;
311+
312+ //set from_uri and from_display_name if present
313+ if (isFromUriOptionPresent) {
314+ requestParams['from_display_name' ] = options['from_display_name' ] ?? '' ;
315+ requestParams['from_uri' ] = URI .parse (options['from_uri' ]);
316+ extraHeaders
317+ .add ('P-Preferred-Identity: ${_ua .configuration .uri .toString ()}' );
318+ }
319+
310320 if (anonymous) {
311321 requestParams['from_display_name' ] = 'Anonymous' ;
312322 requestParams['from_uri' ] = URI ('sip' , 'anonymous' , 'anonymous.invalid' );
You can’t perform that action at this time.
0 commit comments