client.video.createCallType({
name: "<call type name>",
settings: {
geofencing: {
names: ["european_union"],
},
},
});
//override settings on call level
call.create({
data: {
created_by_id: "john",
settings_override: {
geofencing: {
names: ["european_union", "united_states"],
},
},
},
});
Geofencing
With geofencing, you can define which edge nodes are utilized for video calls within specific geo-fenced areas. You can set geofences to a call type or specify when creating a new call. Multiple geo-fences can be used at the same time.
At this present, you can only select from a predefined list of geofences:
Inclusion Geofences
Name | Description | Countries Included |
---|---|---|
european_union | The list of countries that are part of european union | Austria, Belgium, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden |
united_states | Only selects edges in US | United States |
canada | Only selects edges in Canada | Canada |
united_kingdom | Only selects edges in the United Kingdom | United Kingdom |
india | Only selects edges in India | India |
Exclusion Geofences
Name | Description | Countries Excluded |
---|---|---|
china_exclusion | Excludes edges running in mainland China (currently, Stream edge infrastructure does not have any edge in China) | China |
russia_exclusion | Excludes edges running in Russia | Russia |
belarus_exclusion | Excludes edges running in Belarus | Belarus |
iran_north_korea_syria_exclusion | Excludes edges running in Iran, North Korea and Syria | Iran, North Korea, Syria |
client.video.create_call_type(
name= '<call type name>',
settings= CallSettingsRequest(
geofencing= GeofenceSettingsRequest(
names= ['european_union'],
),
),
)
# override settings on call level
call.create(
data = CallRequest(
created_by_id= 'john',
settings_override= CallSettingsRequest(
geofencing= GeofenceSettingsRequest(
names= ['european_union', 'united_states'],
),
),
),
)
client.Video().CreateCallType(ctx, &getstream.CreateCallTypeRequest{
Name: "<call type name>",
Settings: &getstream.CallSettingsRequest{
Geofencing: &getstream.GeofenceSettingsRequest{
Names: []string{"european_union"},
},
},
})
// override settings on call level
call.GetOrCreate(ctx, &getstream.GetOrCreateCallRequest{
Data: &getstream.CallRequest{
CreatedByID: getstream.PtrTo("john"),
SettingsOverride: &getstream.CallSettingsRequest{
Geofencing: &getstream.GeofenceSettingsRequest{
Names: []string{"european_union", "united_states"},
},
},
},
})
curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>",
"settings": {
"geofencing": {
"names": ["european_union"]
}
}
}'
# override on call level
curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"data": {
"created_by_id": "john",
"settings_override": {
"geofencing": {
"names": ["european_union", "united_states"]
}
}
}
}'
Region Restrictions
With geofencing you can restrict the edges that are used in your calls based on their location. If you want to restrict access to calls for users in some regions, please reach out to our support team. This is currently possible but not configurable via API or Dashboard.
UAE
UAE has strict regulations on VOIP and only allows licensed companies to provide audio and video services for users connecting from UAE.
At the moment Stream is not licensed or exempt from these restrictions. To avoid breaching local regulation, all API calls originating from UAE trying to connect to calls are currently blocked.
Work is in progress for Stream video to be licensed. Feel free to reach out to our support if you want to know more about this or if your company is already authorized to provide VOIP services to UAE users.