When i make a call(click to call), I can't hear early media?

OS : CentOS 7 + Asterisk 16 + chan_pjsip (not chan_sip)

  • first Agent, next Customer
    when I make a call by click to call, I can hear early media like this

  • first Customer, next Agent
    if i change order of dial, in this case, asterisk can’t get a early media

How can i solve this ?

I got new hint - Asterisk 16 ManagerAction_Originate - Asterisk Project - Asterisk Project Wiki

Originate command has a new property - “EarlyMedia”
I make a call using AMI (Originate command with “EarlyMedia”)

if i execute Originate command,
where caller(Customer) is answer the call, Asterisk use a “Context” of Originate

i set EarlyMedia: true, Codecs: ulaw,alaw at Originate Command.
when receiver(Customer) is NOT answer the call, asterisk just a receive a SIP 183, But Asterisk use a “Context” of Originate.

1 - Looks like your dialplan answers agent call before place call to pstn and generate fake ringtone backward. Disable Answer and Ring to be sure you aren’t with same problem when place call from asterisk.

2 - Have you enabled direct media? Try disable it.

The OP might not have a dailplan. There is a lot of missing information, including anything that would answer that question.

Firstly click to call is an abstraction on top of Asterisk, so we need to see how you have implemented that abstraction.

Secondly, looking at the code, EarlyMedia only works if you also specify Async.

Also, wireshark messages sequence diagrams rarely contain enough detail to solve problems; we normally need the full protocol trace, e.g “pjsip set logger on”, from Asterisk, together with verbose level 5, error, warning an notice logging, taken from the full log, after it has been enabled.

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