<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=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<!--[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 link=blue vlink=purple>
<div class=Section1>
<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 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 size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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"
title="mailto:SIP/${EXTEN}@216.229.127.60">SIP/${EXTEN}@216.229.127.60</a>)</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>###################################################################</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
<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>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
<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>
<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>
</body>
</html>