<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR><o:SmartTagType
name="place"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType
name="PlaceType"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType
name="PlaceName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><FONT color=#0000ff><A
href="http://bugs.digium.com/bug_view_page.php?bug_id=0003346"><FONT face=Arial
size=2>http://bugs.digium.com/bug_view_page.php?bug_id=0003346</FONT></A><FONT
face=Arial><FONT size=2> <SPAN class=191322218-04042005>should address this
issue, but there is not yet a patch with the implementation that was decided
upon yet.</SPAN></FONT></FONT></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> asterisk-dev-bounces@lists.digium.com
[mailto:asterisk-dev-bounces@lists.digium.com] <B>On Behalf Of </B>Clay
Reiche<BR><B>Sent:</B> Monday, April 04, 2005 1:57 PM<BR><B>To:</B>
asterisk-dev@lists.digium.com<BR><B>Subject:</B> [Asterisk-Dev] Codec not
negotiating<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">ok... I've trying to fix this for
days... I got very little response from the Users list. 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.</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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...</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Here is my
question:(finally...sorry:))<BR>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!</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CONFIG
FILES:</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sip.Conf:<BR>[general]<BR>context=default
; Default context for incoming
calls<BR>;recordhistory=yes
; Record SIP history by
default<BR>
; (see sip history / sip no
history)<BR>;realm=mydomain.tld
; Realm for digest
authentication<BR>
; defaults to
"asterisk"<BR>
; Realms MUST be globally unique according to RFC
3261<BR>
; Set this to your host name or domain
name<BR>port=5060
; <st1:place w:st="on"><st1:PlaceName w:st="on">UDP</st1:PlaceName>
<st1:PlaceType w:st="on">Port</st1:PlaceType></st1:place> to bind to (SIP
standard port is
5060)<BR>bindaddr=0.0.0.0
; IP address to bind to (0.0.0.0 binds to
all)<BR>srvlookup=no
; Enable DNS SRV lookups on outbound
calls<BR>
; Note: Asterisk only uses the first
host<BR>
; in SRV
records<BR>
; Disabling DNS SRV lookups disables
the<BR>
; ability to place SIP calls based on
domain<BR>
; names to some other SIP users on the Internet</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">;pedantic=yes
; Enable slow, pedantic checking for
Pingtel<BR>
; and multiline formatted headers for
strict<BR>
; SIP compatibility (defaults to
"no")<BR>;tos=184
; Set IP QoS to either a keyword or numeric
val<BR>;tos=lowdelay
;
lowdelay,throughput,reliability,mincost,none<BR>;maxexpirey=3600
; Max length of incoming registration we
allow<BR>;defaultexpirey=120
; Default length of incoming/outoing
registration<BR>;notifymimetype=text/plain ; Allow
overriding of mime type in MWI
NOTIFY<BR>;videosupport=yes
; Turn on support for SIP video</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">disallow=all
; First disallow all
codecs<BR>allow=g729<BR>allow=ulaw
; Allow codecs in order of
preference<BR>;allow=alaw<BR>;allow=g723.1<BR>;allow=ilbc
; Note: codec order is respected only in
[general]<BR>;musicclass=default
; Sets the default music on hold class for all SIP
calls<BR>
; This may also be set for individual
users/peers<BR>;language=en
; Default language setting for all
users/peers<BR>
; This may also be set for individual
users/peers<BR>;relaxdtmf=yes
; Relax dtmf
handling<BR>;rtptimeout=60
; Terminate call if 60 seconds of no RTP
activity<BR>
; when we're not on
hold<BR>;rtpholdtimeout=300
; Terminate call if 300 seconds of no RTP
activity<BR>
; when we're on hold (must be > rtptimeout)<BR>;trustrpid =
no
; If Remote-Party-ID should be
trusted<BR>;progressinband=no
; If we should generate in-band ringing always<BR>useragent=Abox
SS1.0 ; Allows
you to change the user agent
string<BR>;nat=no
; NAT
settings<BR>
; yes = Always ignore info and assume
NAT<BR>
; no = Use NAT mode only according to
RFC3581<BR>
; never = Never attempt NAT mode or RFC3581
support<BR>
; route = Assume NAT, don't send rport (work around more UNIDEN
bugs)<BR>;usereqphone=no</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[8138644418]<BR>type=friend<BR>username=8138644418<BR>secret=C34589Y<BR>host=dynamic<BR>nat=yes<BR>context=from-sip<BR>callerid=8138644418<BR>canreinvite=yes<BR>mailbox=8138644418<BR>accountcode=accxx_group<BR>disallow=all<BR>allow=g729<BR>allow=ulaw</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">######################################################################<BR>extensions.conf:<BR>[general]<BR>static=yes<BR>writeprotect=no</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[globals]</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[local]<BR>;<BR>; Master context for
local, toll-free, and iaxtel calls only<BR>;<BR>include => default<BR>include
=> parkedcalls<BR>include => iaxtel700<BR>include =>
iaxprovider<BR>include => from-sip</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[default]<BR>include =>
from-sip</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[from-sip]<BR>exten =>
_1NXXNXXXXXX,1,Dial(<A title=mailto:SIP/${EXTEN}@216.229.127.60
href="mailto:SIP/$%7bEXTEN%7d@216.229.127.60">SIP/${EXTEN}@216.229.127.60</A>)</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">exten =>
18138644418,4,Dial(IAX2/poseidon:olympus@72.21.12.4/8138644418@from-sip)<BR>exten
=> 18138644418,3,Wait(2)<BR>exten =>
18138644418,2,Dial(SIP/8138644418,20)<BR>exten =>
18138644418,1,SetCDRUserField(accxx_group)</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">###################################################################</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thank
you!<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Clay
Reiche<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P></DIV></BODY></HTML>