Trunk config issue

I have been pulling my hair out over this and I’m hoping you guys can help me out here. I’m running and asteriskNOW(1.4.24) and I am having trouble setting up a bandwidth.com trunk.

Short and quick story, incoming calls are rejected with SIP/2.0 488 Not acceptable here. Further investigation shows that it’s because of no codecs being negotiated…

Capabilities: us - 0x4 (ulaw), peer - audio=0x0 (nothing)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x0 (nothing)

even further digging shows the reason I think is why…

U 2009/07/24 16:38:49.154284 216.82.224.202:5060 -> 74.212.247.35:5060
INVITE sip:[email protected]:5060;transport=udp SIP/2.0.
Record-Route: sip:216.82.224.202;lr;ftag=VPSF506071629460.
Record-Route: sip:4.79.212.229;lr;ftag=VPSF506071629460.
Via: SIP/2.0/UDP 216.82.224.202;branch=z9hG4bK5164.282095b2.0.
Via: SIP/2.0/UDP 4.79.212.229;branch=z9hG4bK5164.e6a2a422.0.
Via: SIP/2.0/UDP 4.68.250.148:5060;branch=z9hG4bK506071629460-1246333601365.
From: Anonymous sip:[email protected];isup-oli=61;tag=VPSF506071629460.
To: sip:[email protected]:5060.
Call-ID: [email protected].
CSeq: 1 INVITE.
Contact: sip:[email protected]:5060;transport=udp.
Max-Forwards: 67.
Content-Type: application/sdp.
Content-Length: 175.
Remote-Party-ID: sip:[email protected];party=calling;screen=yes;privac y=full.
.
v=0.
o=- 1248453529 1248453530 IN IP4 209.247.21.235.
s=-.
c=IN IP4 209.247.21.235.
t=0 0.
m=audio 60502 RTP/AVP 0 18 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.

Note the after the “m=audio” field the lack of “a=rtpmap” (i know it’s technically optional)
It’s because of this I believe asterisk is not accurately determining available codecs. (ie. asterisk uses the ‘a=rtpmap’ fields to determine codecs not the ‘m=audio’ field even though the information is in both)

So I have 2 questions… first am i correct in diagnosing the problem? and second is there a way to update asterisk to use the ‘m=audio’ field for negotiation?

Thanks

Zech Sloan

post your trunk configuration here and it will be easier to help you. It should be very easy to configure Bandwidth.com trunks.

  • Philippe

Outbound Dial Prefix: +

USER DETAILS
[BW-SIP-A]
canreinvite=no
dtmfmode=rfc2833
host=216.82.224.202
outboundproxy=216.82.224.202
progressinbound=yes
qualify=300
type=peer
disallow=all
allow=ulaw

PEER DETAILS
[from-bandwidth-A]
context=from-trunk
type=peer
port=5060
insecure=invite,port
host=216.82.224.202
fromdomain=216.82.224.202
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
qualify=300

Thanks!

Try this: (direct from a working system):
Dial Rules:

1+NXXNXXXXXX

Outgoing Settings
Trunk Name BW-SIP-A

type=peer
port=5060
nat=yes
insecure=very
host=216.82.224.202
dtmfmode=auto
disallow=all
allow=ulaw
qualify=yes ;or your preferred value
context=from-pstn

Incoming Settings
USER Context: from-bandwidth-a
USER Details

type=user
port=5060
nat=yes
insecure=very
host=216.82.224.202
dtmfmode=auto
context=from-pstn
canreinvite=no
disallow=all
allow=ulaw

You really don’t need port=5060 or nat=yes but that’s in the working file so just copied it as is. Also, in 1.4, you really should not even need the USER context. See if that helps as a starting point.

Thanks again for the prompt reply. That config changed nothing all sip debugs etc are exactly the same.

Any other ideas?

Oh and on a side note, customer service at bandwidth says that they never send ‘a=rtpmap’ fields for any audio codec, ulaw or g729a. Does this sound correct to you? They say we should be able to negotiate codecs strictly off of the ‘m=audio’ field.

I don’t know off hand. But if that is not working, it sure sounds like something odd is interfering. What do you have for a firewall/router and does it have any type of SIP ALG or proxy on it?

btw - do you have any global sip settings that may be problematic, print out:

sip show settings

and see what is there.

I have a watchguard firebox x core. I’ve setup up the firewall for sip start to finish 3-4 times in fear that I have forgotten something… but on the other hand I already have 2 trunks setup with ipcomms… took all of 2 min. to get those working completely. But this is coming up on a week, so I can’t figure it out.

I can’t find in ANY situation where people have had provider NOT give the:
‘a=rtpmap:0 pcmu/8000’
or
’a=rtpmap:18 g729/8000’

Is this normal/acceptable? Or am I freaking out over something that is a standard thing?

k, seeing as I’m new… is there any good way to get that file off the linux box so I can post it for you… typing all this up is really killing me…

:slight_smile:

Thanks again!

PatriotBob,

when you say it’s a WatchGuard all the alarm bells go off. I have seen nothing but issues with WatchGuards.

I am not saying that is your problem, but it makes me immediately suspicious given my experience. I know of resellers who have forced their clients to get a different Firewall because of Watchguard problems.

As far as getting the settings, it is better to just type the ‘sip show settings’ and paste it here, so there is no ambiguity, vs. trying to dig it out of the config files.

Global Settings:

Sip Port: 5060
Bindaddress: 0.0.0.0
Videosupport: No
AutoCreatePeer: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Promsic. redir: No
SIP domain support: No
Call to non-local dom.: Yes
URI user is phone no: No
Our auth realm asterisk
Realm. auth: No
Always auth rejects: No
Call limit peers only: Yes
Direct RTP setup: No
User Agent: Asterisk PBX
MWI checking interval: 10 secs
Reg. contect: (not set)
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Call Events: Off
IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
T38 fax pt UDPTL: No
RFC2833 Compenstation: No
SIP realtime: Disabled

Global Signalling Settings:

Codecs: 0x4(ulaw)
Codec Order: ulaw:20
T1 minimum: 100
Relax DTMF: No
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 0 (Disabled)
RTP Hold Timeout: 0 (Disabled)
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: Yes
Pedantic SIP support: No
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Notify ringing state: Yes
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-FramingL No

Default Settings:

Context: from-sip-external
Nat: Always
DTMF: rfc2833
Qualify: 0
Use ClientCode: No
Progress inband: Never
Language: (Defaults to English)
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97

There… :slight_smile:
Not that my fingers are sore from the typing… I’ll call up bandwidth and tell them to move my asterisk’s IP address, and I’ll move it to a public IP (I have 6 IP’s might as well use them )

Thanks again!

One approach … use a second PC (workstation), login to the asterisk+freePBX A+F PC via any ssh terminal client (google putty). Any ssh client will allow each of, copy/cut, and/or session logging to file, and/or file transfer, to/from the workstation PC and the A+F PC.

Then you can paste or upload to the freePBX forum via the browser session.

/S