[Asterisk-Users] Codec not negotiating
Alex Vishnev
avishnev at optonline.net
Fri Apr 1 15:14:35 MST 2005
Clay,
It looks like you have the order of the codecs in [general] section as g729,
then ulaw. Try reversing them and see if it helps. You may also view the
order in the friend section as well. If that works, you may have to setup 2
peers in sip.conf. one for faxing with ulaw, and one with voice with g729. I
know that's ugly, but it should work.
HTH
Alex
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Clay Reiche
Sent: Friday, April 01, 2005 3:26 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion;
asterisk-dev-bounces at lists.digium.com
Subject: [Asterisk-Users] Codec not negotiating
ok... I've trying to fix this for days... I have a sip device that registers
with my *. The sip device is ONLY set up to use ulaw. My asterisk server
sends ALL PSTN calls to a Sonus gateway/softswitch. When I place a PSTN
call, the sip device sends the INVITE with SDP and the ONLY codec option is
ulaw. Asterisk then turns around and sends an INVITE with SDP to the Sonus
gateway with ulaw as the first option and g729 as a second option. The Sonus
sees the TWO options and ALWAYS chooses g729. The codec negotiation fails
and the call never completes.
I understand that the TWO options are sent because I have no peer set up for
the Sonus in my sip.conf and it defaults to the [general] codec settings
which are ulaw and g729. However, MOST of my calls to the Sonus ARE using
g729, only a few need to use ulaw. (for faxing) So I can't restrict the
Sonus peer to only ulaw...
Here is my question:(finally...sorry:))
Can I force asterisk to send ONLY my prefered codec?(the first one in the
INVITE) or is this only fixed by pleading with the people who run the Sonus
sofswitch to stop ignoring my preferred codec? or is there some other
solution? Any suggestions would be very appreciated!
CONFIG FILES:
Sip.Conf:
[general]
context=default ; Default context for incoming calls
;recordhistory=yes ; Record SIP history by default
; (see sip history / sip no history)
;realm=mydomain.tld ; Realm for digest authentication
; defaults to "asterisk"
; Realms MUST be globally unique according
to RFC 3261
; Set this to your host name or domain name
port=5060 ; UDP Port to bind to (SIP standard port is
5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to
all)
srvlookup=no ; Enable DNS SRV lookups on outbound calls
; Note: Asterisk only uses the first host
; in SRV records
; Disabling DNS SRV lookups disables the
; ability to place SIP calls based on domain
; names to some other SIP users on the
Internet
;pedantic=yes ; Enable slow, pedantic checking for Pingtel
; and multiline formatted headers for strict
; SIP compatibility (defaults to "no")
;tos=184 ; Set IP QoS to either a keyword or numeric
val
;tos=lowdelay ;
lowdelay,throughput,reliability,mincost,none
;maxexpirey=3600 ; Max length of incoming registration we
allow
;defaultexpirey=120 ; Default length of incoming/outoing
registration
;notifymimetype=text/plain ; Allow overriding of mime type in MWI
NOTIFY
;videosupport=yes ; Turn on support for SIP video
disallow=all ; First disallow all codecs
allow=g729
allow=ulaw ; Allow codecs in order of preference
;allow=alaw
;allow=g723.1
;allow=ilbc ; Note: codec order is respected only in
[general]
;musicclass=default ; Sets the default music on hold class for
all SIP calls
; This may also be set for individual
users/peers
;language=en ; Default language setting for all
users/peers
; This may also be set for individual
users/peers
;relaxdtmf=yes ; Relax dtmf handling
;rtptimeout=60 ; Terminate call if 60 seconds of no RTP
activity
; when we're not on hold
;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP
activity
; when we're on hold (must be > rtptimeout)
;trustrpid = no ; If Remote-Party-ID should be trusted
;progressinband=no ; If we should generate in-band ringing
always
useragent=Abox SS1.0 ; Allows you to change the user agent string
;nat=no ; NAT settings
; yes = Always ignore info and assume NAT
; no = Use NAT mode only according to
RFC3581
; never = Never attempt NAT mode or RFC3581
support
; route = Assume NAT, don't send rport (work
around more UNIDEN bugs)
;usereqphone=no
[8138644418]
type=friend
username=8138644418
secret=C34589Y
host=dynamic
nat=yes
context=from-sip
callerid=8138644418
canreinvite=yes
mailbox=8138644418
accountcode=accxx_group
disallow=all
allow=g729
allow=ulaw
######################################################################
extensions.conf:
[general]
static=yes
writeprotect=no
[globals]
[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
include => default
include => parkedcalls
include => iaxtel700
include => iaxprovider
include => from-sip
[default]
include => from-sip
[from-sip]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@216.229.127.60
<mailto:SIP/$%7bEXTEN%7d at 216.229.127.60> )
exten =>
18138644418,4,Dial(IAX2/poseidon:olympus at 72.21.12.4/8138644418 at from-sip)
exten => 18138644418,3,Wait(2)
exten => 18138644418,2,Dial(SIP/8138644418,20)
exten => 18138644418,1,SetCDRUserField(accxx_group)
###################################################################
Thank you!
Clay Reiche
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050401/cd7d9007/attachment.htm
More information about the asterisk-users
mailing list