Dual dial tone created

Hi, Im running Asterisk 13.18.4. I have this issue that when I dial a number I get both dial tone that was generated by Asterisk and also dial tone from my operator. This is a line from extensions.conf

Dial(SIP/${DIAL_EXTEN}@sip0,gT)

If I change it to:

Dial(SIP/${DIAL_EXTEN}@sip0,rgT)

Then Asterisk will no longer generate ring tone, but then issue instead is that early media stops working :frowning:

Does anybody have another suggestion how to solve this issue?

Change your service provider.

Can you confirm that DIAL_EXTENSION is the full number and not just the external access code.

Note that, for SIP, on the A side (although you haven’t actually said that is the case), the initial dialtone will come from the phone, not from Asterisk. It will be generated before Asterisk is even aware that you are making a call.

Why is this a problem, even if it is strange for the provider to generate dialtone.

Asterisk 13 is no longer supported. Asterisk 13.18.4 is even older. chan_sip is, effectively no longer supported., However, this seems to be provider behaviour.

There is nothing in the SIP protocol that would allow Asterisk to distinguish between dialtone, as early media, and any other early media.

Hi,

I should not say that I know that the provider gives the dial tone as I don’t know for sure. Perhaps both are generated from Asterisk/phone.

Anyways. This is how is looks from CLI when making outgoing call:

Dial(“BRCM/4/12”, “SIP/0401234567@sip0,gT”)

I can also clarify one other call case. If I dial a number that is not in use or mobile number that is not attached to network the operator will send early media message. I get this early media message, but I also get dial tone (played simultaneously). I have log on with same account using MicroSIP and then there is only early media message, no additional dial tone. This rules out the possibility that dial tone is provided by operator. So that was incorrect information from me.

Asterisk is definitely not going to mix dialtone with early media. I’d suggest the phone

Is the dialplan in the phone correct? Does SIP protocol logging show any number incomplete responses sent to the phone?

Hi,

The unit im using is Genexis EG400 (https://genexis.eu/content/uploads/2020/10/EG400-Datasheet-V2.5-EN.pdf). So the phone is analogue and there is SIP-to-analogue conversion made in Genexis unit. I don’t really understand where Asterisk stops and SIP-to-analogue conversion begins. Any tip?

Which is why it was important to say what signalling was being used on the phone side.

The data sheet doesn’t include the word “asterisk”, so I can’t tell if it includes Asterisk.

BRCM is not a standard Asterisk device technology name, so we are talking about third party hardware and third party drivers. BRCM probably stands for Broadcom, a major supplier of mobile phone chip sets, which also ties in with the fact that this is ARM based. Unfortunately, Broadcom tend to only provide full details under NDA, which can limit the ability to fully use their products in an open source environment.

You need to take this back to the vendor.

The last time I encountered this driver, the thread died off after suggesting contacting the vendor:

I think the relevant conversion is Asterisk internal to analogue, i.e the channel driver interface to the BRCM channel driver. Asterisk is a back to back user agent, and converts from the incoming technology to its internal signalling then back to the outgoing technology. The BRCM driver will not know about the SIP side.

I can’t find anything beyond the quick start guide for this. However, normal Asterisk channel drivers tend to have settings documented in their configuration files, so look for something like /etc/asterisk/brcm.conf or /etc/asterisk/chan_brcm.conf.

However, for drivers using specialist local hardware, there may be additional configuration files, elsewhere.

In any case, they may not have provided the commented out hints normally provided.

Looking further, they do seem to have open sourced the asterisk channel driver, although it also looks like they may have made other changes to Asterisk, which means only they can really support it.

You should look at these settings, and maybe try variations:

The output of the CLI command “brcm show status” might also be informative.

I think I got some progress. If I check in file etc/asterisk/brcm.conf I can find these settings:

[brcm4]
;language=|LANGUAGE|
callerid=4444
autodial=
autodial_timeoutmsec=60000
dialtone_timeoutmsec=20000
context=sip0
context_direct=sip0-direct
dialtone_extension_hint_context=brcm_dialtone
dialtone_extension_hint=brcm4
callwaiting=0
clir=0
dtmfrelay=rfc2833
;|ALLOW|

When printing status from CLI (brcm show status) I can find same information.

Pvt nr: 4
Line id             : 4
Pvt next ptr        : 0x4d2600
DTMF buffer         :
Default context     : sip0
Direct context      : sip0-direct
Ringsignal          : on
Dialout msecs       : 2000
Autodial extension  :
Autodial msecs      : 60000
Dialt. timeout msecs: 20000
Ast JitterBuf impl  : adaptive
Ast JitterBuf max   : 500
Call waiting        : off
CLIR                : off
Dialtone            : on
Subchannel: 0
  Connection id       : 22
  Owner               : 0
  Channel state       : CALLENDED
  Connection init     : 0
  Codec used          : alaw
  RTP sequence number : 10252
  RTP SSRC            : 927071074
  RTP timestamp       : 1640320
  CW Timer id         : -1
  CW Rejected         : 0
  R4 Hangup Timer id  : -1
  Conference initiator: 0
  Onhold Hangup Timer id: -1
Subchannel: 1
  Connection id       : -1
  Owner               : 0
  Channel state       : ONHOOK
  Connection init     : 0
  Codec used          : none set
  RTP sequence number : 0
  RTP SSRC            : 0
  RTP timestamp       : 0
  CW Timer id         : -1
  CW Rejected         : 0
  R4 Hangup Timer id  : -1
  Conference initiator: 0
  Onhold Hangup Timer id: -1

So I can change values in brcm.conf, then reload brcm and it work. I changed ringsignal to “off” and then analogue phone did not ring on incoming call. It would be nice to test set ringtone to “off” to see how that would affect the call, but there is no such setting in brcm.conf…

Unfortunately, although not unsurprisingly, the documentation has lots of holes. There are values and whole options that are not in the sample brcm.conf file :frowning: It looks like the dialtone option, in the sample, isn’t implemented in the code.

I’m confused, though, about ringback tone options. I thought you were talking about dialtone.

Ringback tone is generated by the asterisk core for this driver:

so, if you really wanted to suppress it, you would change indications.conf, to turn it into silence, but I can’t think of a sensible reason for doing that.

It looks like the code will turn off dialtone when it receives a ringback indication. A normal switch would turn it off on receiving the first digit. I haven’t looked deeply enough to see if it should do that too. It does look like it tries to do this, but there may get things wrong in a way that requires a much more detailed reading of the code.

(The code is rejecting the AST_CONTROL_RINGBACK, but still allowing it to have side effects. This makes the asterisk core assume it didn’t work, so the asterisk core generates ringback tone for it.)

I assume you are using DTMF, as things could get confused if it thought it has seen a hook flash; loop disconnect digits aren’t that different from hook flashes, especially in the UK.

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