Playback & Background billing

Hello!
Im pretty new with Asterisk, and i was wondering if its normal to bill the playback and background commands, even when a call its not being answered.
The CDR’s even shows: duration = billsec, so…

Also, i have this on extensions.conf:

exten => number,priority,{Background || Playback}(sound)
exten => Dial(channel/${EXTEN})
exten => Hangup()

I’m missing something?
or maybe, a correct example could help
Best Regards :slight_smile:

As you didn’t specify no answer, the call is being answered. Most service providers will not accept early media.

2 Likes

@david551 Thank you for answering, but,should i put exten => Answer() before Playback(sound) ?

Unless you give the noanswer argument to Playback it will automatically answer the call for you.

1 Like

If you put answer you will be doing exactly what you dont want, just add the argument noanswe as @johnkiniston suggested, also you cant transmit early media to the outside world if you dont have a license

1 Like

@johnkiniston Thanks for replying, i added the noanswer parameter, and now the call is being billed as it should be, the thing is that i dont hear the sound included…

@ambiorixg12 Is there a way to transmit early media then? im trying to greet the caller {while/before} it starts dialing, and don’t bill it, maybe its not possible because i need a channel to reproduce media right? and thanks about the warning

Actually, thanks both of you for the fast answers!

Service providers don’t allow end user early media precisely because they don’t bill for it.

2 Likes

@david551 That’s right David, but still, i want to know how to correctly bill only the time answered by the called number (if it’s possible ofc), not when the channel opens media to execute the Playback sound.

Now im using the Playback cmd with the noanswer parameter before Dial, what happens is that, the channel Dials and bills correctly, but i dont hear any sound :frowning_face:

-> Playback/Background
-> Dial
-> Hangup

Thanks for your answer

Usually if a channel is answered you want to bill for it.

You could try resetting the CDR after you do your playback.

1 Like

You don’t hear sound because the provider is blocking the media as you are not paying for it.

You could try calling Progress(), though.

1 Like

Im doing local tests @david551 , ill try to understand how to use Progress() cmd

@johnkiniston i’ve already tried that, but, maybe in a incorrect way

As always, thanks for the fast answer guys

@david551
Thank you very much for the tip, i searched for Progress() cmd, and in the following page i found the correct usage of it:

At the end of the page, you can find some examples.
The correct usage of Early Media before “Dialing” a sip channel is:
exten => Progress() ;just like this
exten => {Playback|Background}(sound,{noanswer|n}) ;playback-noanswer, background-n parameters
exten => Dial(“your_parameters”)
Your cdr’s will be billed only when the called number answer!

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