Odd DTMF problem when receiving calls

Home » Asterisk Users » Odd DTMF problem when receiving calls
Asterisk Users 2 Comments

Hello,

I’ve been tinkering with Asterisk today for the fun of it, trying to set
up my own domain. I’ve got pretty much everything working, including a
DID number that connects to my extension.

However, I’m having a problem receiving calls from a particular peer,
specifically my office’s PBX, which allows dialing directly via SIP.
(So, just to clarify, the DID number is not involved in this problematic
scenario.)

The symptom is that my office PBX demands rfc2833 support, and will
immediately disconnect a call if the callee doesn’t support it. I’ve
tried resolving this a number of ways and the only way that actually
works is to create a peer definition in sip.conf for my office’s
external SIP IP address. Then calls from my office to my Asterisk
service work with no problems.

However, the peer section is bare:

[corp]
type=peer
host=corp.example.ip
port=5060
context=default

That’s it. That solves the problem. Copying *every setting* in
[global] has no effect. In other words, how I configure the peer
doesn’t appear to matter very much, only that it has a specific
configuration at all. This makes no sense to me.

I’ve attached sanitized SIP debug output, with the following replacements:

* corp.example.com and corp.example.ip refer to the SIP PBX at my
company. (corp.example.com may refer to either the IP or the domain
name, due to an oversight while I was sanitizing. This should not be
significant. corp.example.ip always refers to the IP.)

* asterisk.tld refers to the domain name for my Asterisk install.

* asterisk.ip refers to the IP address my Asterisk install binds to
(public and static).

* NUMBER is my phone number at the company.

* phone.nated.ip refers to the public, NATed IP address of the softphone
that is registered with Asterisk for my account.

* phone.private.ip refers to the private IP address of the softphone.
Note that I have nat=yes and directmedia=no for this device in sip.conf,
and calls from my DID number work as well as calls to sip:echo@iptel.org.

Looking at the SDP negotiation, and at the telephone-event capability in
particular, here is what I see happening:

1. Asterisk advertises telephone-event to my softphone.
2. My softphone advertises telephone-event to Asterisk.
3. Asterisk does not offer telephone-event to the company PBX.
4. The company PBX offers telephone-event to Asterisk.

After the ACK represented by step 4, the company PBX immediately issues
a BYE to Asterisk.

If the company PBX has a peer defined in my Asterisk sip.conf file,
Asterisk does offer telephone-event to the company PBX in step 3.

I’ve been up and down this issue for a few hours and I cannot for the
life of me determine why simply defining a peer causes Asterisk to offer
telephone-event. I have tried specifying dtmfmode=rfc2833 or
dtmfmode=auto in [global] and neither change has any effect. As I said
above, I’ve copied every configuration directive in [global] into the
peer definition for the company PBX, and calls still work.

So I’m at a loss to explain this. The problem does not seem to stem
from my configuration, but I’m not entirely sure what else could be the
problem… an Asterisk bug perhaps? I don’t want to jump to that
conclusion since this is my first day tinkering with the software.
Perhaps someone more knowledgeable can steer me in the right direction?

Thanks,

2 thoughts on - Odd DTMF problem when receiving calls

  • On Tue, Jan 10, 2012 at 6:00 PM, Christopher David Howie
    wrote:

    Wheee. You don’t say anything about what ‘company PBX’ is, so we just
    have to guess based on your description. Based on your description,
    your ‘company PBX’ requires that the endpoints it communicates be
    registered before-hand. Having a definition for the sip peer in
    asterisk makes asterisk continually register with the ‘company PBX’.

    So it is not necessarily your case that you think it is, that rfc2833
    is required, but rather that for ‘company PBX’, any sip endpoint must
    first be registered. Both asterisk and ‘company PBX’ probably support
    large numbers of possible DTMF or signaling possibilities, and it’s
    not surprising that you can get away with several possible values.

    If you do ‘sip show peers’, with and without the config in your
    sip.conf (use ; to comment it out and ‘sip reload’ to commit your
    changes), you should be able to verify that THIS is the real problem.

    And no, this is not an asterisk bug.

  • Thanks for the reply David, this clarifies a lot for me.

    The company’s PBX is ININ (Interactive Intelligence IC).

    I’m fairly certain that RFC2833 is required, as the client software
    clearly indicates that the connection was dropped due to lack of RFC2833
    support:

    17:53:23: Initializing
    17:53:23: Sent to user Chris.Howie
    17:53:23: Outbound Call: me@myserver.example.com
    17:53:23: Dialing
    17:53:26: Disconnected [RFC 2833 Required]

    It appears that, by registering, Asterisk is able to ascertain what
    capabilities the peer supports and wants, and so it knows to offer the
    telephone-event stream to incoming calls. Since the SIP dialog differs
    in how Asterisk responds to the incoming call (it offers telephone-event
    only when the peer is defined in sip.conf), this seems like the case to
    me. Does that seem reasonable, or am I missing a piece of the puzzle?

    If this is the case, how would I get Asterisk to offer telephone-event
    on incoming calls without having to register every ININ-based PBX that
    might call me? (This is more theoretical than practical, as I doubt
    that any ININ PBX is going to call me over SIP.)

    One of the things I discovered during testing is that if I remove the
    peer and issue “sip reload” then incoming calls are still accepted. I
    have to completely restart the Asterisk daemon to get it to forget about
    the peer definition.

    I suspected that it wasn’t, which is why I asked here first instead of
    using the bug tracker. 🙂