# Integrating a VIDEO RBT Service

**URL:** <https://community.asterisk.org/t/integrating-a-video-rbt-service/97292>\
**Category:** Asterisk Support\
**Created:** [June 11, 2023, 10:22am UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292 "2023-06-11T10:22:30Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ray716](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ray716](https://community.asterisk.org/u/ray716)\
**Post date:** [June 11, 2023, 10:22am UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/1 "2023-06-11T10:22:30Z")

</div>

I am currently working on involving video Ring Back Tone (RBT) in Asterisk. Although I am still relatively new to Asterisk, I have been assigned to this project and would greatly appreciate your expertise in helping me navigate through the implementation process.

To provide some context, the project involves the following functionality:

1. Caller A initiates a call to Caller B as a standard audio call.
2. Caller B is assigned a personalized video as their Ring Back Tone.
3. Caller A is able to watch the video until Caller B decides to answer the call.

After conducting some initial research on Asterisk and its support for video codecs, I have come to understand that Asterisk alone may not be capable of achieving this functionality. I attempted to integrate NGINX for video streaming purposes, but unfortunately, I did not achieve the desired outcome.

My primary objective in reaching out to you is to determine if implementing this feature is feasible using Asterisk, or if I should explore alternative approaches instead.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.asterisk.org/u/Pooh)\
**Post date:** [June 11, 2023, 10:57am UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/2 "2023-06-11T10:57:43Z")

</div>

> I am currently working on involving video Ring Back Tone (RBT) in Asterisk.

So, this sounds like a form of Early Media, but including video as well as (or  
instead of?) audio?

> 1. Caller A initiates a call to Caller B as a standard audio call.

Using what sort of equipment / client?

> 1. Caller B is assigned a personalized video as their Ring Back Tone.

What does “personalized video” mean (and what does the word “Tone” mean in  
this context)?

> 1. Caller A is able to watch the video until Caller B decides to answer the  
> call.

So, if Caller A is now expected to watch a video, why was the call originally  
placed as an audio call?

Also, where is this video stream coming from, if not from B?

Finally, what happens when B answers the call? Is this then a video call  
between A and B, or does it revert back to plain audio? If the latter, what  
was the purpose of the video?

> After conducting some initial research on Asterisk and its support for  
> video codecs, I have come to understand that Asterisk alone may not be  
> capable of achieving this functionality.

Asterisk is perfectly capable of supporting video calls, but it’s not clear to  
me where the source of the video stream is in this setup.

I wouldn’t be surprised if, with appropriate manipulation of the SDP, Asterisk  
can tell A to expect a video stream from X, but as I say, it’s not clear to me  
where X is.

Asterisk itself certainly will not generate a video stream for you - it can  
pass one through, but I won’t generate one.

> I attempted to integrate NGINX for video streaming purposes, but  
> unfortunately, I did not achieve the desired outcome.

It might help if you showed us (or at least explained in more detail) what you  
tried and whether the problem was with generating the video stream, or with  
getting Asterisk to forward it to A.

Antony.

---

<div class="post-metadata">

**Author:** ![ray716](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ray716](https://community.asterisk.org/u/ray716)\
**Post date:** [June 11, 2023, 11:11am UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/3 "2023-06-11T11:11:12Z")

</div>

Hi, Thanks for the reply.

Think of this project as a normal RBT service. When I initiate a call to someone, instead of hearing a tone (until they answer), I am being shown a video instead.

> So, this sounds like a form of Early Media, but including video as well as (or  
> instead of?) audio?

Yes, it includes audio and video as a way to entertain the caller until the call has been answered.

> Using what sort of equipment / client?

For the time being, I am using PortSIP for development. But the project will later on be integrated with a mobile operator and enable this feature with a mobile phone’s default dialer. (I understand that it might not work on all devices and it only works on LTE devices)

> What does “personalized video” mean (and what does the word “Tone” mean in  
> this context)?

A user can upload whatever video they prefer to our servers and set it as their default V-RBT to be played when someone is calling them.

> So, if Caller A is now expected to watch a video, why was the call originally  
> placed as an audio call?

Because in production, callers will be initiating the call with their default dialer and not with a custom mobile application.

> Also, where is this video stream coming from, if not from B?

This is the issue that i am trying to resolve. At first, I thought that asterisk would be fine with streaming video but after research found out that I need some other service to handle the streaming from which i went and tried with NGINX.

> Finally, what happens when B answers the call? Is this then a video call  
> between A and B, or does it revert back to plain audio? If the latter, what  
> was the purpose of the video?

The call gets answered and the video stops playing and it a normal audio call is set in place.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.asterisk.org/u/Pooh)\
**Post date:** [June 11, 2023, 11:46am UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/4 "2023-06-11T11:46:54Z")

</div>

> > So, this sounds like a form of Early Media, but including video as well  
> > as (or instead of?) audio?
> 
> Yes, it includes audio and video as a way to entertain the caller until the  
> call has been answered.

In that case, assuming the equipment being used by A is capable of supporting  
video, you “merely” need to get the source of the video inserted into the SDP  
which Asterisk sends to A. I’ve no idea whether Asterisk’s standard early  
media function includes video support, but if you’re prepared to fiddle with  
the source code, given that Asterisk supports early media, and also supports  
video, I wouldn’t expect it to be too hard to add this feature if it’s not  
already there.

[How to get video preview?](https://community.asterisk.org/t/how-to-get-video-preview/92485) may help if  
you didn’t find it already.

> For the time being, I am using PortSIP for development. But the project  
> will later on be integrated with a mobile operator and enable this feature  
> with a mobile phone’s default dialer. (I understand that it might not work  
> on all devices and it only works on LTE devices)

You’ve gone way beyond my understanding of what a mobile phone (using standard  
calling, and not some extra app such as WhatsApp etc) could achieve.

> A user can upload whatever video they prefer to our servers and set it as  
> their default V-RBT to be played when someone is calling them.

Sounds quite undesirable for the caller, in my opinion. If I make a phone  
call, I want to talk to the person I’m calling. I don’t want to get some  
video played at me, which is presumably either advertising the services of the  
company the callee works for, or showing me what the callee’s cat has done  
recently.

> Because in production, callers will be initiating the call with their  
> default dialer and not with a custom mobile application.

I don’t know where in the world you are, and which mobile operator/s you’re  
dealing with, but do you really have a service where you can place a standard  
call using the native dialler on your mobile phone, and get video?

I’ve never heard of this being possible.

Antony.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [June 11, 2023, 12:26pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/5 "2023-06-11T12:26:28Z")

</div>

> [@Pooh](#):
>
> In that case, assuming the equipment being used by A is capable of supporting  
> video, you “merely” need to get the source of the video inserted into the SDP  
> which Asterisk sends to A.

I read it as Asterisk looks up the called number and plays back a recording, not that this is early media from B.

Dial does not support video early media.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.asterisk.org/u/Pooh)\
**Post date:** [June 11, 2023, 12:50pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/6 "2023-06-11T12:50:44Z")

</div>

I agree, but how would you implement “play back a recording to A, until B  
answers, and then bridge B to A”?

I’m still intrigued by the idea that a mobile phone on a standard network can  
support a video call in its native dialler. Have _you_ (david551) come across  
this anywhere?

Antony.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [June 11, 2023, 1:47pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/7 "2023-06-11T13:47:52Z")

</div>

As far as I know speech, short message and facsimile are the only teleservices supported by any mobile network as telephony, and video is only ever supported over their data services. However, I missed anything the OP said about using basic mobile phone services. [GSM 02.03 Version 5.1](https://www.etsi.org/deliver/etsi_gts/02/0203/05.01.00_60/gsmts_0203v050100p.pdf)

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.asterisk.org/u/Pooh)\
**Post date:** [June 11, 2023, 2:07pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/8 "2023-06-11T14:07:52Z")

</div>

Thanks - that matches my understanding of what mobile network operators  
support.

The comment from the OP which made me ask this was “in production, callers  
will be initiating the call with their default dialer and not with a custom  
mobile application.”

Admittedly the OP also said “the project will later on be integrated with a  
mobile operator and enable this feature with a mobile phone’s default dialer”  
however I wasn’t quite sure how literally to interpret that, suggesting that  
some mobile network operator might start to support video via the native  
dialler…

Antony.

---

<div class="post-metadata">

**Author:** ![ray716](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ray716](https://community.asterisk.org/u/ray716)\
**Post date:** [June 11, 2023, 7:02pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/9 "2023-06-11T19:02:48Z")

</div>

> suggesting that some mobile network operator might start to support video via the native  
> dialler

Please refer to this youtube video: [https://www.youtube.com/watch?v=GRNzVGRU9Z8](https://www.youtube.com/watch?v=GRNzVGRU9Z8)

It explains the project I was assigned to as it is exactly what I want to do.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.asterisk.org/u/Pooh)\
**Post date:** [June 11, 2023, 8:48pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/10 "2023-06-11T20:48:37Z")

</div>

“[Solutie Huawei Video RBT\* - YouTube](https://www.youtube.com/watch?v=GRNzVGRU9Z8)”

Having watched that, I can only say that every single example is something  
that I would really not want as a caller.

That entire presentation seems to be focused from the point of view either of  
the network provider (who stands to gain revenue from providing such a service  
whether the recipient wants it or not) or the content provider (who sees it as  
a marketing opportunity, which is more or less the same as “whether the  
recipient wants it or not”).

How much market research has been done to find out whether _callers_ want this  
sort of thing?

If someone is not available to take my call, I want either:

a) a busy tone (simple, audio, “beep… beep… beep”, that’s it)

b) an announcement “this person can’t take your call, please try later”

c) voicemail “hi, thanks for calling… leave a message… beep…”

Anything involving video is just irritating, a waste of my bandwidth, and not  
in the least bit productive to the call I was trying to make.

It’s even worse than the companies who intersperse Music on Hold (which can be  
bad enough itself for callers) with promotional announcements about all the  
wonderful things they want to sell, when all the caller wants to hear is a  
person answering “hello, how can I help you?”

If I want to watch kittens, I’ll look them up on Youtube. If I want a company  
promotional message, I’ll visit the website. If I want to know where you are  
and what you’re doing, I’m probably already using WhatApp (or something  
similar) and I know about it without calling you. If I want to talk to you, I  
don’t want a video unless it’s you answering my call and giving me a surprise  
that video works over GSM now.

Maybe you’ll find a way of doing this with Asterisk, but I can only say as a  
phone user that I hope it doesn’t become mainstream.

Antony.

---

<div class="post-metadata">

**Author:** ![TheMark](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/themark/32/4771_2.png) [@TheMark](https://community.asterisk.org/u/TheMark)\
**Post date:** [June 12, 2023, 5:40pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/11 "2023-06-12T17:40:28Z")

</div>

and I would prefeer

d) SIP response code 4XX

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [June 12, 2023, 8:04pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/12 "2023-06-12T20:04:31Z")

</div>

Did you mean 1XX? Or are you say that the caller is defective in trying to call someone that would offer them a video “Ring Back Tone”? 4xx is (calling) client error.

---

<div class="post-metadata">

**Author:** ![bkervaski](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/bkervaski/32/4091_2.png) [@bkervaski](https://community.asterisk.org/u/bkervaski)\
**Post date:** [June 12, 2023, 9:32pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/13 "2023-06-12T21:32:10Z")

</div>

If the op controls the client software/app, it would be trivial to do outside of asterisk, i.e., when a SIP call is initiated, just play a pre-recorded video from a web service based on the phone number/extension dialed or perhaps even a SIP header or response code, and then just replace that video with the video from asterisk once the call is answered, etc. The possibilities are endless with this approach.

---

<div class="post-metadata">

**Author:** ![TheMark](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/themark/32/4771_2.png) [@TheMark](https://community.asterisk.org/u/TheMark)\
**Post date:** [June 13, 2023, 5:26pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/14 "2023-06-13T17:26:01Z")

</div>

well any [1-6]XX  
but I realy hate providers that will do an 183 “the user is busy please try later, repeat, repeat”  
and not just send me a 4XX  
as that make it hard to track down problem calls

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 13, 2023, 5:26pm UTC](https://community.asterisk.org/t/integrating-a-video-rbt-service/97292/15 "2023-07-13T17:26:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
