Play cause code playback from called channel generated by other operators in external calls

Hi there,

I’m using Asterisk 16, and ARI

How to use sound come with called channel as playback?

I don’t want to use
playback = channel.playWithId(playbackId=self.playback_id,media=media)
to be set as playback so how can I get external calls playback sounds generated by other operators ? or Is this even possible?

Sorry for bad English

Asterisk 16 no longer receives mainstream support.

Are you talking about early media?

This depends on the channel technology and what lies between you and Asterisk. For SIP, you need to issue the Progress operation before early media will be passed through. I’ve not used ARI, so I don’t know how to do that with ARI.

If the caller isn’t directly communicating by Asterisk, but using some paid service. it is quite likely that they will block early media, as they don’t get paid for it.

Thanks david551
yes, I’m talking about media that come from other operators when for example cause code is 17 and called endpoint is busy, I be able to hear media related to this cause code sent from endpoint operator.
what do you mean by using progress operation before early media? should I change extensions.conf or other configuration files

This is my extensions.conf for external calls :

[OutboundCall]
exten => _+X.,1,NoOp(“OutboundCall …”)
same => n,Set(ENDPOINT=${SIP_HEADER(X-Endpoint)})
same => n,Set(FAXOPT(gateway)=yes)
same => n,Stasis(switchmanager,incoming,${EXTEN},unknown,unknown,none)
same => n,Hangup()

Call the Progress() application, before you do anything that generates early media.

Thanks david for answering

I changed extensions.conf to this :

[OutboundCall]
exten => _+X.,1,answer()
exten => _+X.,n,progress()
exten => _+X.,n,NoOp(“OutboundCall …”)
;same => n,1,Progress()
same => n,Set(ENDPOINT=${SIP_HEADER(X-Endpoint)})
same => n,Set(FAXOPT(gateway)=yes)
same => n,Stasis(switchmanager,incoming,${EXTEN},unknown,unknown,none)
same => n,Hangup()

and removed part of the code related to playing playback but it still not working. Is this the only thing that I should add at a higher level(ari) or Is there any parameters I should pass with progress app

If you call Answer, the A side is no longer in early media.

I don’t know enough about ARI to take this any further.

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