URI Playback as Early Media?

Is URI Media Playback usable as early media? (URI playback being described at: Asterisk 14 Project - URI Media Playback - Asterisk Project - Asterisk Project Wiki )

Specifically, I have a doorbell IP camera that doesn’t support early media. I’d like to configure the dialplan to always use URI Media Playback to send the MJPEG or H264 stream from the camera’s HTTP server as early media when a call is placed from the IP camera.

Also, would URI Media Playback work as early media when ringing a call group? I know normal early media will not…

If the doorbell/camera’s extension is 500, something like:

exten => 500,1,Progress()
exten => 500,n,Playback(http://mycamera.local/feed/path?format=h264)

It won’t work for a stream. It downloads the file and then plays it. It also wouldn’t work if you’re calling something, because two things can’t happen on a channel at once. You can’t do a Playback at the same time as doing a Dial, except through some functionality of Dial in certain cases (like the announce option).

1 Like

Ah, bummer. It sounded like if I set a no-cache header then it would stream instead of trying to download and cache it.

Any other ideas on how to force early media for a device (the doorbell camera) that doesn’t directly support early media?

You are outside of what is supported, there is nothing inherently to do such a thing built in.

you could use Answer()
is pjsip.conf for the Doorphone ad a


and then in the context add a

same => n,ExecIf(${EXISTS(${EarlyMediaNotSupportet})}?Answer())

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