<html 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" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="cid:filelist.xml@01C536DE.46F295F0">
<link rel=Edit-Time-Data href="cid:editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Clay,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>It looks like you have the order of the <span
class=SpellE>codecs</span> in [general] section as g729, then <span
class=SpellE>ulaw</span>. 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 <span class=SpellE>sip.conf</span>. <span class=GramE>one</span>
for faxing with <span class=SpellE>ulaw</span>, and one with voice with g729. I
know that’s ugly, but it should work.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>HTH<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Alex<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Clay Reiche<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, April 01, 2005 3:26
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Asterisk Users Mailing List -
Non-Commercial Discussion; asterisk-dev-bounces@lists.digium.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Asterisk-Users] Codec
not negotiating</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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.</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>CONFIG FILES:</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>######################################################################<br>
extensions.conf:<br>
[general]<br>
static=yes<br>
writeprotect=no</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>[globals]</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>[default]<br>
include => from-sip</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>[from-sip]<br>
exten => _1NXXNXXXXXX,1,Dial(<a href="mailto:SIP/$%7bEXTEN%7d@216.229.127.60">SIP/${EXTEN}@216.229.127.60</a>)</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
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>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>###################################################################</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thank you!<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Clay Reiche<o:p></o:p></span></font></p>
</div>
</div>
</div>
</body>
</html>