Early media not generated?

Hello!

I’m having a bit strange issue, looks kinda basic, but I’m really not getting what is going on.

Idea is I’m trying to “simulate” ringing sound with early media. Quite simple task resolves with the following

same => n,Progress()
same => n,Playtones(ring)

If I just add Wait(10) after this piece, on dialing to this extension I’m happily hearing 10 seconds of ring sounds. All seems ok.

But when I’m instead of just waiting starts dialing out, situation a bit changes. ring sounds are not generated any more and Asterisk “follows” the signalisation from the other side.

same => n,Progress()
same => n,Playtones(ring)
same => n,Dial(PJSIP/${EXTEN}@trunk)

Like this

Endpoint                                 Trunk
   |                    |                  |
   |                    |                  |
   +------INVITE------->|                  |
   |                    +-----INVITE------>|
   |<-------183---------+                  |
   |   ^                |<------100--------+
   |   | NO MEDIA FROM  |                  |
   |   |  ASTERISK      |                  |
   |   |                |                  |
   |   v  SILENCE       |<------180--------+
   |<-------183---------+                  |
   |                    |                  |
   |     SOUND STARTS   |                  |
   |                    |                  |
   |                    |                  |

Is there any way to say Asterisk generate ‘ring’ sounds while “waiting” for the info from the other side and only this - following upstream channel info?
If I’m adding R parameter to Dial(), I’m eliminating early media from trunk and this is not what I want.
For the moment I’ve replaced Progress -> Playtones with Ringing, but just curious, is it something by design or I’m missing something?

Asterisk 18.11.3

Thanks in advance!

That seems to conflict with the documentation:

R - Default: Indicate ringing to the calling party, even if the called party isn’t actually ringing. Allow interruption of the ringback if early media is received on the channel.

Can you confirm the silence is due to lack of RTP using ‘rtp set debug …’ commands on the Asterisk CLI ? Or is the RTP flowing with empty frames?

Thanks for answer, yes, I was a bit wrong about D option alone, which is basically the same as calling Ringing before Dial command.
Main problem is actually no early media generated by Asterisk in 100 - 180 gap received from trunk, if I call ProgressPlaytones sequence. More specific:

exten => s,1,Progress
 same => n,Playtones(ring)
 same => n,Wait(3)
 ; Here I do hear ringing for 3 seconds
 same => n,Dial(PJSIP/${EXTEN}@trunk,,D)
 ; Here, with D option or without it, I do not hear anything in 100 - 180 gap

Idea was to have something like 2-stage early-media with corresponding different sounds.

Thanks

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