Musiconhold early media doesn"t work without incoming a


#1

Hi all,

I have some trouble with my Asterisk box (1.2.4) with early media on SIP channel:
The scenario is something like this:

  1. Call comes from my provider
  2. I find destination extension and route the call to it
  3. I want to play some message instead of just ringing to the caller (to my provider)
    (s,n,Dial(SIP/exten,timer,m(message))
  4. My Asterisks send INVITE to the callee, then send 183 Session progres with SDP to the caller (sip-proxy of my provider), starts MOH, but sends NO RTP streams till some RTP arrives!

And this big trouble! Due to telco laws there is strictly forbiden to telco providers to send me any audio BEFORE I answer the line. They could only listen to my session progress inband infos!

So I ended with no audio to the caller…

If I use “Playback(message,noanswer)”, the outgoing audio works well without incoming RTP stream.

So, do you have any suggestions? Some workaround? Or, is this a know bug of Asterisk?

Thanx.


#2

I hope i understand your problem, i am german :stuck_out_tongue:

From what i understand, simply add an ANSWER command:

Call comes in for lets say extension 220:

exten=>220,1,Answer
exten=>220,2,Background(acdc_hells_bells)
exten=>220,3,dial(johns_phone)
exten=>220,4,hangup
exten=>220,101,usual voicemail handling

Is this what you needed ?


#3

PS.:

THe most easiest way would be to create a QUEUE for this extension and you log into the queue.

That way every caller gets immediatly MOH while your phone rings.


#4

[quote=“RichardHH”]I hope i understand your problem, i am german :stuck_out_tongue:

From what i understand, simply add an ANSWER command:

Call comes in for lets say extension 220:

exten=>220,1,Answer
exten=>220,2,Background(acdc_hells_bells)
exten=>220,3,dial(johns_phone)
exten=>220,4,hangup
exten=>220,101,usual voicemail handling

Is this what you needed ?[/quote]

I’m sorry, but this is not what I want (and this is also strictly forbiden by law - at least in most Europe countries including Germany and my Czech republic too :-). If someone answers the call, the caller should pay for a call. And if it happens you should serve some valuable service to the caller and 183 Session Progress with InBand Info isnt that case…

kokoska.rokoska


#5

[quote=“RichardHH”]PS.:

THe most easiest way would be to create a QUEUE for this extension and you log into the queue.

That way every caller gets immediatly MOH while your phone rings.[/quote]

This should work for all my extensions (100+).
The purpose for using this is very simple - CallWaiting Indication.
You probably know this from GSM networks: If you call to somebody who is “on the phone” you hear something like “Person you are calling is speaking to someone else, you will be connected as soon as possible” instead of ringing. And I really need the same behaviour…

kokoska.rokoska

BTW: Many thanx for your response!


#6

Well, this is ABSOLETELY a case for queues.
It is your best friend, you even want to have babys with it :stuck_out_tongue:

Queues, lets say extension "100"
exten=>100,1, Answer
exten=>100,2, queue(lobby)
blablabla

thats all, the rest is done via queue.conf

What happens:
The call is answered.
The callee is listening to music (you define…)
Announcements periodically:
You are number 2 in ouir queue, the next available…blablabla
(you can customize them fully like every other soundfile)

The waiting calls are causing the “agents” (phones configured to be a member of the queue) to ring like every other incoming call is doing.

This is what you want, queues :smile:


#7

[quote=“RichardHH”]Well, this is ABSOLETELY a case for queues.
It is your best friend, you even want to have babys with it :stuck_out_tongue:

Queues, lets say extension "100"
exten=>100,1, Answer
exten=>100,2, queue(lobby)
blablabla

thats all, the rest is done via queue.conf

What happens:
The call is answered.
The callee is listening to music (you define…)
Announcements periodically:
You are number 2 in ouir queue, the next available…blablabla
(you can customize them fully like every other soundfile)

The waiting calls are causing the “agents” (phones configured to be a member of the queue) to ring like every other incoming call is doing.

This is what you want, queues :)[/quote]

At first: Thank you very much for your advice!

At second: I know Queues and I use them for some cases.

At third: I’m affraid queues woun’t solve my problem. Like I wrote before, I MUST NOT ANSWER THE LINE. It could be done only by final recipient.
The bug in MOH with Dial command I wrote about applies to Queus also. At least in older versions of Asterisk - I try it with current and let you know (developers from Digium told me it woun’t be fixed in 1.2.x, but may be they are wrong :-).
The workaround I’m looking for is how to send proper “fake RTP stream” to Asterisk to start MOH (with Dial or with Queues, its same for me) and stop the stream when some audio from the callee OR 200 OK arrives.

Once more thanx for your time!


#8

No problem bud, anytime.

But if you dont want to answer the call first, you have almost NO chance.

See, as long as a call isnt answered, the call is held by the originating telco.

What happens?

Telco A get request from Jane to call John.
Telco dials John

Johns telco accepts the call and is routing it to Johns number.
Johns phone is sending back a state, like “im free, touch me baby”.

Johns telco is sending back to Janes telco “John wants Jane to be touchy” and is signaling this with the ringtone.

The call is passed to John when John lifts the receiver, NOT BEFORE.

So there is technically NO chance to inject music to the line, when you HAVE NO line… (no pickup=no established call).

Im sure you know that, just writing it for the case some1 reading this topic who doesnt know…

So, answer the line, put music on and ring your phone - the only way i can think of.


#9

[quote=“RichardHH”]No problem bud, anytime.

But if you dont want to answer the call first, you have almost NO chance.

See, as long as a call isnt answered, the call is held by the originating telco.

What happens?

Telco A get request from Jane to call John.
Telco dials John

Johns telco accepts the call and is routing it to Johns number.
Johns phone is sending back a state, like “im free, touch me baby”.

Johns telco is sending back to Janes telco “John wants Jane to be touchy” and is signaling this with the ringtone.

The call is passed to John when John lifts the receiver, NOT BEFORE.

So there is technically NO chance to inject music to the line, when you HAVE NO line… (no pickup=no established call).

Im sure you know that, just writing it for the case some1 reading this topic who doesnt know…

So, answer the line, put music on and ring your phone - the only way i can think of.[/quote]

I’m affraid you are wrong: I have a chance to pass audio to the caller BEFORE answering the line and I often use it! But Asterisk could do it only with Playback command not with MOH which is used in Dial and Quees…
If you want to try it call to my number and you hear some message without paying for it - let me know if you want and I send you this number by private message.

In SIP (and in SS7 also) the call flow is something like this:

  1. caller looking for the callee - the proxy helps find the route
  2. if callee is accesible, the caller send INVITE to the callee
  3. callee send provisional response to the caller:
    a. 180 Ringing
    b. 181 Call is beeing forwarded
    c. 182 Queed
    d. 183 Session progress with InBand info (early media - sound BEFORE answering the line)
    (180, 181 and 182 could be follewed by 183)
  4. callee send final response to the caller
    a. 200 OK (answer the line)
    b. 486 BUSY
    c. …
    There are some rules about Inband info mentioned above and everyone have to strictly accept them. (shorter the 3 minutes, can not replace the call etc.)

Thank you once more!


#10

Playback is injecting music into the established line, so technically the call is answered !

You can check it with a regular phone, you will read “connected” on its display the moment you hear music and you will find the call on your bill :laughing:

Buuuuuut…i am talking about ZAP! Ya ya…i know, thats my fault cuz im dreaming of ZAP channels already since 3 month…LOL

I think the point where i got you wrong is that you are talking about a plain SIP/SIP call ?


#11

[quote=“RichardHH”]Playback is injecting music into the established line, so technically the call is answered !
[/quote]
No, no, you are wrong. Playback could inject extablished line and also send session progress: Playback(message,noanswer)

No, no, you will see (at least on ISDN and GSM phones with good TelCo providers) “In progress” and nothing appears on your bill :slight_smile: Try it, if you don’t believe!

[quote=“RichardHH”]
Buuuuuut…i am talking about ZAP! Ya ya…i know, thats my fault cuz im dreaming of ZAP channels already since 3 month…LOL

I think the point where i got you wrong is that you are talking about a plain SIP/SIP call ?[/quote]
No, no. I’m talking abou ITU standards which every regular TelCo provider should implemet on SS7 (if you have some E1 with SS7 - not DSS1 - you know what I’m talking about) and good VoIP provider should implement it on SIP also and make TRANSPARENT translation SIP<->ISUP.
May be that ZAP channels (cards, drivers…) are broken in Asterisk and works in another way but this is how it should be.
The developers knows about this bug in MOH and advice me to please my provider to open (at least fake) RTP downstream to me and block trafic somewhere else. But my provider cant do it due to law…

Thanks for your time!


#12

You are right, im only using ISDN DSS1, not dabbling with SS7 so far.

But if i use playback without answering the line first, its not replacing the ring/call tone for the caller.

So this is telco dependend but SHOULD work normally you say ? With ISDN and DSS1 ?


#13

[quote=“RichardHH”]You are right, im only using ISDN DSS1, not dabbling with SS7 so far.

But if i use playback without answering the line first, its not replacing the ring/call tone for the caller.

So this is telco dependend but SHOULD work normally you say ? With ISDN and DSS1 ?[/quote]

Yes this is TelCo dependant and I’m not sure if it could be done with ISDN and DSS1(IMHO yes), but:

  1. May be your TelCo is not capable (or don’t want to be) of accepting InBand Info from end customers (juridical problem defense).
  2. May be some transit or terminating TelCo is not capable (or don’t want to be) of transmitting InBand Info (mostly cheap SIP providers).
  3. I mean that you really need to have some Agreement between you and your TelCo about signalization and about content of your InBand Infos and other “nonstandard” features…
  4. on SIP it is possible and if you have some SIP provider with SS7 connectivity you can do it including proper signalization to PSTN (aka SIP<->ISUP)

Have a nice day!


#14

Here in the US, some cellphone providers are letting you customize the ringing the people here when they call you. But, I think this is using the playback as you mentioned you already doing.

I haven’t experimenting with that (only have an analog line at the moment that isn’t capable of that).

But, at any rate, it is possible. Since you already know that playback will work, I’m guessing that playback won’t work for your situation.

I think I read someone else about this, and the only method that would work was playback. Could be wrong though. That’s happened a lot recently :smile:


#15

[quote=“kokoska.rokoska”][quote=“RichardHH”]You are right, im only using ISDN DSS1, not dabbling with SS7 so far.

But if i use playback without answering the line first, its not replacing the ring/call tone for the caller.

So this is telco dependend but SHOULD work normally you say ? With ISDN and DSS1 ?[/quote]

Yes this is TelCo dependant and I’m not sure if it could be done with ISDN and DSS1(IMHO yes), but:

  1. May be your TelCo is not capable (or don’t want to be) of accepting InBand Info from end customers (juridical problem defense).
  2. May be some transit or terminating TelCo is not capable (or don’t want to be) of transmitting InBand Info (mostly cheap SIP providers).
  3. I mean that you really need to have some Agreement between you and your TelCo about signalization and about content of your InBand Infos and other “nonstandard” features…
  4. on SIP it is possible and if you have some SIP provider with SS7 connectivity you can do it including proper signalization to PSTN (aka SIP<->ISUP)

Have a nice day![/quote]

Heya kokoska.rokoska !

Sweet, i just tried it and our telco is supporting it !
My mistake was PLAYBACK instead of the |m option.

I just changed a testextension here:
exten => …37,1,Dial(Sip/37,20|m)

And the ringtone for external callers changed to music…hmmm…thats neat… :bulb:


#16

[quote=“RichardHH”][quote=“kokoska.rokoska”][quote=“RichardHH”]You are right, im only using ISDN DSS1, not dabbling with SS7 so far.

But if i use playback without answering the line first, its not replacing the ring/call tone for the caller.

So this is telco dependend but SHOULD work normally you say ? With ISDN and DSS1 ?[/quote]

Yes this is TelCo dependant and I’m not sure if it could be done with ISDN and DSS1(IMHO yes), but:

  1. May be your TelCo is not capable (or don’t want to be) of accepting InBand Info from end customers (juridical problem defense).
  2. May be some transit or terminating TelCo is not capable (or don’t want to be) of transmitting InBand Info (mostly cheap SIP providers).
  3. I mean that you really need to have some Agreement between you and your TelCo about signalization and about content of your InBand Infos and other “nonstandard” features…
  4. on SIP it is possible and if you have some SIP provider with SS7 connectivity you can do it including proper signalization to PSTN (aka SIP<->ISUP)

Have a nice day![/quote]

Heya kokoska.rokoska !

Sweet, i just tried it and our telco is supporting it !
My mistake was PLAYBACK instead of the |m option.

I just changed a testextension here:
exten => …37,1,Dial(Sip/37,20|m)

And the ringtone for external callers changed to music…hmmm…thats neat… :idea:[/quote]

Nice to hear it works for you!
I hope that Playback with “noanswer” would work too (and also be useful :-). On SIP it works fine…

for first call:
exten => …37,1,Dial(Sip/37,20|r)
for second:
exten => …37,1,Dial(Sip/37,20|m(busy))
for third and other:
exten => …37,1,Goto(s-BUSY)
and than:
exten => …37,2,Goto(s-${DIALSTATUS})

exten => s-BUSY,1,Playback(user-busy,noanswer)
exten => s-BUSY,2,Hangup

exten => s-CHANUNAVAIL,1,Playback(user-unavailable,noanswer)
exten => s-CHANUNAVAIL,2,Hangup

exten => s-NOANSWER,1,Playback(user-not-answered,noanswer)
exten => s-NOANSWER,2,Hangup

This is simplification and a wrote it just for pointing what is Session progress with InBand info for :slight_smile: I hope everyone can catch it…

Have a nice Easter!

kokoska.rokoska

BTW: Any idea how to send fake RTP stream to Asterisk? k.k.