# Combining two policy scripts for adaptive composition - Teams meeting + Scheduled meeting

**URL:** <https://community.pexip.com/t/combining-two-policy-scripts-for-adaptive-composition-teams-meeting-scheduled-meeting/128>\
**Category:** Policy Profiles\
**Created:** [September 13, 2022, 9:40pm UTC](https://community.pexip.com/t/combining-two-policy-scripts-for-adaptive-composition-teams-meeting-scheduled-meeting/128 "2022-09-13T21:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anders](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Anders](https://community.pexip.com/u/Anders)\
**Post date:** [September 13, 2022, 9:40pm UTC](https://community.pexip.com/t/combining-two-policy-scripts-for-adaptive-composition-teams-meeting-scheduled-meeting/128/1 "2022-09-13T21:40:17Z")

</div>

In [docs.pexip.com](http://docs.pexip.com) you can find the policy script for enabling adaptive composition in Teams meetings.  
From my local Pexip guy I got a script for enabling this for scheduled meetings.  
So I combined the two and here is the result. Works like a charm.  
**Note:** All scheduled meetings are using the prefix 66

```auto
{
  {% if service_config and service_config.service_type == "gateway" and service_config.called_device_type == "teams_conference" or service_config.service_type == "conference" and (call_info.local_alias.startswith("h323:66") or call_info.local_alias.startswith("sip:66") or call_info.local_alias.startswith("66")) %}
    "action" : "continue",
    "result" : {{service_config|pex_update({"enable_overlay_text": true, "view":"five_mains_seven_pips"})|pex_to_json}}
  {% elif service_config %}
    "action" : "continue",
    "result" : {{service_config|pex_to_json}}
  {% else %}
    "action" : "reject",
    "result" : {}
  {% endif %}

```

Would you want this for only scheduled meetings simply remove this section from the above code

```auto
service_config and service_config.service_type == "gateway" and service_config.called_device_type == "teams_conference" or

```
