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:e...@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,

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.
<--- SIP read from UDP:corp.example.com:5060 --->
INVITE sip:1...@asterisk.tld:5060 SIP/2.0
To: <sip:1...@asterisk.tld:5060>
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bKba6f9d45e934097b67461af5f
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 1 INVITE
Contact: <sip:num...@corp.example.com:5060>
Max-Forwards: 70
x-inin-crn: 2088742465;loc=%3cRegionDefaultLocation%3e
Supported: join, replaces
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, PRACK, REFER, SUBSCRIBE
Accept: application/sdp
Accept-Encoding: identity
Content-Length: 0


<------------->
--- (15 headers 0 lines) ---
Sending to corp.example.com : 5060 (NAT)
Using INVITE request as basis request - 1cc376aba0701c847ad96d075c4cc...@corp.example.com
No matching peer for 'NUMBER' from 'corp.example.com:5060'
Looking for 1000 in default (domain asterisk.tld)
list_route: hop: <sip:num...@corp.example.com:5060>

<--- Transmitting (NAT) to corp.example.com:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bKba6f9d45e934097b67461af5f;received=corp.example.com
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
To: <sip:1...@asterisk.tld:5060>
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:1...@asterisk.ip>
Content-Length: 0


<------------>
Audio is at asterisk.ip port 50646
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to phone.nated.ip:38284:
INVITE sip:chris_ph...@phone.nated.ip:38284;ob SIP/2.0
Via: SIP/2.0/UDP asterisk.ip:5060;branch=z9hG4bK0c2f6bb1;rport
Max-Forwards: 70
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.nated.ip:38284;ob>
Contact: <sip:num...@asterisk.ip>
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.9-2+squeeze4
Date: Tue, 10 Jan 2012 22:01:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 292

v=0
o=root 110726824 110726824 IN IP4 asterisk.ip
s=Asterisk PBX 1.6.2.9-2+squeeze4
c=IN IP4 asterisk.ip
t=0 0
m=audio 50646 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---

<--- SIP read from UDP:phone.nated.ip:38284 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP asterisk.ip:5060;rport=5060;received=asterisk.ip;branch=z9hG4bK0c2f6bb1
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.private.ip;ob>
CSeq: 102 INVITE
Content-Length:  0


<------------->
--- (7 headers 0 lines) ---

<--- SIP read from UDP:phone.nated.ip:38284 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP asterisk.ip:5060;rport=5060;received=asterisk.ip;branch=z9hG4bK0c2f6bb1
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.private.ip;ob>;tag=9316088d3bcd446e8c6155fc44dd60b0
CSeq: 102 INVITE
Contact: <sip:phone.nated.ip:38284>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length:  0


<------------->
--- (9 headers 0 lines) ---

<--- Transmitting (NAT) to corp.example.com:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bKba6f9d45e934097b67461af5f;received=corp.example.com
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
To: <sip:1...@asterisk.tld:5060>;tag=as49c0593e
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:1...@asterisk.ip>
Content-Length: 0


<------------>

<--- SIP read from UDP:phone.nated.ip:38284 --->


<------------->

<--- SIP read from UDP:phone.nated.ip:38284 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asterisk.ip:5060;rport=5060;received=asterisk.ip;branch=z9hG4bK0c2f6bb1
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.private.ip;ob>;tag=9316088d3bcd446e8c6155fc44dd60b0
CSeq: 102 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Contact: <sip:phone.nated.ip:38284>
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   272

v=0
o=- 3535203672 3535203673 IN IP4 phone.nated.ip
s=pjmedia
c=IN IP4 phone.nated.ip
t=0 0
a=X-nat:0
m=audio 39692 RTP/AVP 0 96
c=IN IP4 phone.nated.ip
a=rtcp:40013 IN IP4 phone.private.ip
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15

<------------->
--- (11 headers 13 lines) ---
Found RTP audio format 0
Found RTP audio format 96
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 96
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x4 (ulaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port phone.nated.ip:39692
list_route: hop: <sip:phone.nated.ip:38284>
set_destination: Parsing <sip:phone.nated.ip:38284> for address/port to send to
set_destination: set destination to phone.nated.ip, port 38284
Transmitting (NAT) to phone.nated.ip:38284:
ACK sip:phone.nated.ip:38284 SIP/2.0
Via: SIP/2.0/UDP asterisk.ip:5060;branch=z9hG4bK3197ed3b;rport
Max-Forwards: 70
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.nated.ip:38284;ob>;tag=9316088d3bcd446e8c6155fc44dd60b0
Contact: <sip:num...@asterisk.ip>
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.9-2+squeeze4
Content-Length: 0


---
Audio is at asterisk.ip port 50330
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP

<--- Reliably Transmitting (NAT) to corp.example.com:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bKba6f9d45e934097b67461af5f;received=corp.example.com
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
To: <sip:1...@asterisk.tld:5060>;tag=as49c0593e
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:1...@asterisk.ip>
Content-Type: application/sdp
Content-Length: 236

v=0
o=root 332043567 332043567 IN IP4 asterisk.ip
s=Asterisk PBX 1.6.2.9-2+squeeze4
c=IN IP4 asterisk.ip
t=0 0
m=audio 50330 RTP/AVP 3 0 8
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=ptime:20
a=sendrecv

<------------>

<--- SIP read from UDP:corp.example.com:5060 --->
ACK sip:1...@asterisk.ip SIP/2.0
To: <sip:1...@asterisk.tld:5060>;tag=as49c0593e
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 1 ACK
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bKdc9d109e3af4ad6761bf0b599
Max-Forwards: 70
x-inin-crn: 2088742465
Supported: join, replaces
Content-Type: application/sdp
Content-Length: 194

v=0
o=ININ 1112266235 1112266237 IN IP4 corp.example.ip
s=Interaction
c=IN IP4 0.0.0.0
t=0 0
m=audio 0 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<------------->
--- (12 headers 9 lines) ---
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x4 (ulaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer doesn't provide audio

<--- SIP read from UDP:corp.example.com:5060 --->
BYE sip:1...@asterisk.ip SIP/2.0
To: <sip:1...@asterisk.tld:5060>;tag=as49c0593e
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 2 BYE
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bK1d54c94e4fd318c2ef376d9cf
Max-Forwards: 70
x-inin-crn: 2088742465
Supported: join, replaces
Content-Length: 0


<------------->
--- (11 headers 0 lines) ---
Sending to corp.example.com : 5060 (NAT)

<--- Transmitting (NAT) to corp.example.com:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP corp.example.com:5060;branch=z9hG4bK1d54c94e4fd318c2ef376d9cf;received=corp.example.com
From: "Chris Howie" <sip:num...@corp.example.com>;tag=2958469
To: <sip:1...@asterisk.tld:5060>;tag=as49c0593e
Call-ID: 1cc376aba0701c847ad96d075c4cc...@corp.example.com
CSeq: 2 BYE
Server: Asterisk PBX 1.6.2.9-2+squeeze4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '32443a5b7895802350436ef27ad9b...@asterisk.tld' in 6400 ms (Method: INVITE)
set_destination: Parsing <sip:phone.nated.ip:38284> for address/port to send to
set_destination: set destination to phone.nated.ip, port 38284
Reliably Transmitting (NAT) to phone.nated.ip:38284:
BYE sip:phone.nated.ip:38284 SIP/2.0
Via: SIP/2.0/UDP asterisk.ip:5060;branch=z9hG4bK4b209864;rport
Max-Forwards: 70
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.nated.ip:38284;ob>;tag=9316088d3bcd446e8c6155fc44dd60b0
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
CSeq: 103 BYE
User-Agent: Asterisk PBX 1.6.2.9-2+squeeze4
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


---

<--- SIP read from UDP:phone.nated.ip:38284 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP asterisk.ip:5060;rport=5060;received=asterisk.ip;branch=z9hG4bK4b209864
Call-ID: 32443a5b7895802350436ef27ad9b...@asterisk.tld
From: "Chris Howie" <sip:num...@asterisk.tld>;tag=as75559e6d
To: <sip:chris_ph...@phone.private.ip;ob>;tag=9316088d3bcd446e8c6155fc44dd60b0
CSeq: 103 BYE
Content-Length:  0


<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '1cc376aba0701c847ad96d075c4cc...@corp.example.com' Method: BYE
Really destroying SIP dialog '32443a5b7895802350436ef27ad9b...@asterisk.tld' Method: INVITE
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to