<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 10, 2014 at 2:33 PM, Justin Killen <span dir="ltr"><<a href="mailto:jkillen@allamericanasphalt.com" target="_blank">jkillen@allamericanasphalt.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div link="blue" vlink="blue" lang="EN-US">
<div>
<div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;padding:0in 0in 0in 4pt">
<div>
<div>
<div><div><div class="h5">
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:12pt">On Thu, Jul 10, 2014 at 12:36 PM, Justin Killen <<a href="mailto:jkillen@allamericanasphalt.com" target="_blank">jkillen@allamericanasphalt.com</a>>
wrote:<u></u><u></u></span></font></p>
<div link="blue" vlink="blue">
<div>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Okay, that makes sense. So then, how does the
answer()’d status affect that? From my (admittedly limited)
experience, it seems that playing in-band tones only works if the call has been
answered?</span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Here’s the setup I’m using, maybe it will help if I
give an example of what I’m trying to figure out:</span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Phone A <-sip-> asterisk site A <-PRI-> PTSN
<-PRI-> asterisk site B</span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">If then I have a dialplan at site B for the dialed DID that looks
like this:</span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Playtone(busy)</span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Busy(20)</span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">And given that I’m using default in-band tones, what is the
expected resulting sound coming out of Phone A?</span></font><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:12pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><font face="Times New Roman" size="3"><span style="font-size:12pt">Inband tones before
answering is known as early media. After answering<br>
it is just a normal audio path that the tones would go over.<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><font face="Times New Roman" size="3"><span style="font-size:12pt">Asterisk B in the above
situation before answering with the shown dialplan<br>
snippet, the Playtone() would effectively be a NoOp because nothing is shown<br>
that would open a path for early media. (The Progress() application
should be<br>
done first to open the path.) Then the Busy() would cause
chan_dahdi/sig_pri<br>
to send a PROGRESS message toward Asterisk A if needed to open the media<br>
path and start its own busy tones. From Asterisk B to Phone A there are<br>
several things that could block the early media. The telco network,<br>
Asterisk A configuration, and Phone A itself.<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:12pt">You may need to investigate these options on Asterisk A from sip.conf.sample:<br>
;prematuremedia=no
; Some ISDN links send empty media frames before <br>
; the call is in ringing or progress state. The SIP <br>
; channel will then send 183 indicating early media<br>
; which will be empty - thus users get no ring signal.<br>
; Setting this to "yes" will stop any media before we have<br>
; call progress (meaning the SIP channel will not send 183 Session<br>
; Progress for early media). Default is "yes". Also make sure that<br>
; the SIP peer is configured with progressinband=never. <br>
;<br>
; In order for "noanswer" applications to work, you need to run<br>
; the progress() application in the priority before the app.<br>
<br>
;progressinband=never
; If we should generate in-band ringing always<br>
; use 'never' to never use in-band signalling, even in cases<br>
; where some buggy devices might not render it<br>
; Valid values: yes, no, never Default: never<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:12pt"><u></u> <u></u></span></font></p>
</div>
</div></div><div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:12pt">Richard<font color="navy"><span style="color:navy"><u></u><u></u></span></font></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Okay, so given the default dahdi config
value of sending tones in-band, busy() will send an in-band busy tone. If
the call hasn’t been answer()’d yet, and if we have previously
established an early media path via progress(), then the busy tone will be sent
in-band via early media.<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">What happens if progress() has not been
called? Will the call to busy() recognize that we haven’t answer()’d
the call and automatically attempt to establish an early media path? If
not, what would be the downside of doing so?</span></font></p></div></div></div></div></div></div></div></blockquote><div><br></div><div>chan_dahdi/sig_pri will recognize that Progress() has not happened yet and<br>open the early media path itself. I was just pointing out that the Playtones()<br>
</div><div>in that dialplan snipet was effectively a NoOp because nothing before it<br>opened the media path. Another reason it is a NoOp is chan_dahdi/sig_pri<br></div><div>starts its own busy tones.<br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="blue" lang="EN-US"><div><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;padding:0in 0in 0in 4pt">
<div><div><div><div><p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">It seems like for busy() to work properly,
we must either:<u></u><u></u></span></font></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><span>A)<font face="Times New Roman" size="1"><span style="font:7pt "Times New Roman""> </span></font></span></span></font><u></u><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Answer() the channel earlier in the dialplan, to allow the tones to
be played in-band<u></u><u></u></span></font></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><span>B)<font face="Times New Roman" size="1"><span style="font:7pt "Times New Roman""> </span></font></span></span></font><u></u><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Progress() the channel earlier in the dialplan, to allow the tones
to be played as early media<u></u><u></u></span></font></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><span>C)<font face="Times New Roman" size="1"><span style="font:7pt "Times New Roman""> </span></font></span></span></font><u></u><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Change the dahdi config to send signals out-of-band (on a
side-note, why isn’t this the default? Is it broken in a lot of
telcos?)</span></font></p></div></div></div></div></div></div></div></blockquote><div><br></div><div>For your case just do C. It is really better for trunks anyway.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div link="blue" vlink="blue" lang="EN-US"><div><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;padding:0in 0in 0in 4pt">
<div><div><div><div><p class="MsoNormal" style="margin-left:0.5in"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">Looking at option B - what (if any) side
effects / disadvantages are there to calling progress() on every inbound call?</span></font></p></div></div></div></div></div></div></div></blockquote><div><br></div><div>Calling Progress() without following it with something that generates media<br>
is not a good thing. SIP phones in particular will have problems because<br></div><div>you may not hear a ringing tone as many phones will ignore the "180 Ringing"<br></div><div>message because it has already seen a "183 Progress" message.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="blue" lang="EN-US"><div><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;padding:0in 0in 0in 4pt">
<div><div><div><div><p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">The behavior I see now is that Phone A
rings for about 20 seconds and then times out locally. Meanwhile on site
B I can see that it ran busy(), but the signal never got back to A. When
I change the dialplan to use hangup(17) instead of busy(20), I get a busy tone
on Phone A immediately. How then does the PROGRESS message sent by busy()
differ from the output sent via hangup(17)? </span></font></p></div></div></div></div></div></div></div></blockquote><div><br></div><div>Since you have shown no logs I cannot say why you don't hear the busy tones.<br>
It could very well be that the phone itself is not letting any early media through<br></div><div>and insists on generating any tones itself.<br></div><div><br></div><div>Anyway, you have a solution. Just set priindication=outofband in chan_dahdi.conf.<br>
</div><div><br></div><div>Richard</div></div></div></div>