[OpenSIPS-Users] One Way Audio

Ross Beer ross_beer at hotmail.com
Thu Oct 22 13:32:14 CEST 2009


 <0016e640d47e2c8bcd047677c536 at google.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0


Hi Duane=2C
=20
Here is my config and SIP trace.
=20
There is one interesting thing in the SIP trace=2C that is the SDP codecs. =
I have G711u=2C G711a enabled on both asterisk and the softphone however X-=
Lite does not show G711u or G711a.
=20
Is there something in the config that would remove these?
=20
Thanks=2C
=20
Ross
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

# NOTE !! This config is EXPERIMENTAL !
#
# ----------- global configuration parameters ------------------------
debug=3D3         # debug level (cmd line: -dddddddddd)
fork=3Dyes
log_stderror=3Dyes # (cmd line: -E)
/* Uncomment these lines to enter debugging mode=20
fork=3Dno
log_stderror=3Dyes
*/
check_via=3Dno # (cmd. line: -v)
dns=3Dno           # (cmd. line: -r)
rev_dns=3Dno      # (cmd. line: -R)
listen=3Dudp:<IP ADDRESS>:5060
children=3D4
# ------------------ module loading ----------------------------------
#set module path
mpath=3D"/usr/local/lib64/opensips/modules/"
# Uncomment this if you want to use SQL database
loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "signaling.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "mediaproxy.so"
loadmodule "xlog.so"
loadmodule "dialog.so"
loadmodule "load_balancer.so"
loadmodule "mi_datagram.so"
# Uncomment this if you want digest authentication
# db_mysql.so must be loaded !
#loadmodule "auth.so"
#loadmodule "auth_db.so"
# !! Nathelper
loadmodule "nathelper.so"
# ----------------- setting module-specific parameters ---------------
# -- mi_fifo params --
modparam("mi_fifo"=2C "fifo_name"=2C "/tmp/opensips_fifo")
modparam("mi_datagram"=2C "socket_name"=2C "/tmp/opensips.sock")
modparam("mi_datagram"=2C "unix_socket_mode"=2C 0600)
modparam("mi_datagram"=2C "socket_timeout"=2C 2000)
# -- usrloc params --
modparam("usrloc"=2C "db_mode"=2C   0)
# Uncomment this if you want to use SQL database=20
# for persistent storage and comment the previous line
#modparam("usrloc"=2C "db_mode"=2C 2)
# -- auth params --
# Uncomment if you are using auth module
#modparam("auth_db"=2C "calculate_ha1"=2C yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config)=
=2C=20
# uncomment also the following parameter)
#modparam("auth_db"=2C "password_column"=2C "password")
# -- rr params --
# add value to =3Blr param to make some broken UAs happy
modparam("rr"=2C "enable_full_lr"=2C 1)
# !! Nathelper
modparam("usrloc"=2C"nat_bflag"=2C6)
modparam("nathelper"=2C"sipping_bflag"=2C8)
modparam("nathelper"=2C "ping_nated_only"=2C 1)   # Ping only clients behin=
d NAT
# -- MediaProxy --
modparam("mediaproxy"=2C "mediaproxy_socket"=2C "/var/run/mediaproxy/dispat=
cher.sock")
modparam("mediaproxy"=2C "mediaproxy_timeout"=2C 500)
modparam("dialog"=2C "dlg_flag"=2C 13)
modparam("dialog"=2C "db_mode"=2C 1)
modparam("dialog"=2C "db_url"=2C "<DB URL>")
modparam("load_balancer"=2C "db_url"=2C"<DB URL>")
# -------------------------  request routing logic -------------------
# main routing logic
route{
 # initial sanity checks -- messages with
 # max_forwards=3D=3D0=2C or excessively long requests
 if (!mf_process_maxfwd_header("10")) {
  sl_send_reply("483"=2C"Too Many Hops")=3B
  exit=3B
 }=3B
 if (msg:len>=3D  2048 ) {
  sl_send_reply("513"=2C "Message too big")=3B
  exit=3B
 }=3B
 # !! Nathelper
 # Special handling for NATed clients=3B first=2C NAT test is
 # executed: it looks for via!=3Dreceived and RFC1918 addresses
 # in Contact (may fail if line-folding is used)=3B also=2C
 # the received test should=2C if completed=2C should check all
 # vias for rpesence of received
 if (nat_uac_test("3"))=20
 {
  # Allow RR-ed requests=2C as these may indicate that
  # a NAT-enabled proxy takes care of it=3B unless it is
  # a REGISTER
  if (is_method("REGISTER") || !is_present_hf("Record-Route")) {
   log("LOG:Someone trying to register from private IP=2C rewriting\n")=3B
   # This will work only for user agents that support symmetric
   # communication. We tested quite many of them and majority is
   # smart enough to be symmetric. In some phones it takes a=20
   # configuration option. With Cisco 7960=2C it is called=20
   # NAT_Enable=3DYes=2C with kphone it is called "symmetric media" and=20
   # "symmetric signalling".
   # Rewrite contact with source IP of signalling
   fix_nated_contact()=3B
   if ( is_method("INVITE") ) {
    fix_nated_sdp("1")=3B # Add direction=3Dactive to SDP
   }=3B
   force_rport()=3B # Add rport parameter to topmost Via
   setbflag(6)=3B    # Mark as NATed
   # if you want sip nat pinging
   # setbflag(8)=3B
  }=3B
 }=3B
 # subsequent messages withing a dialog should take the
 # path determined by record-routing
 if (loose_route()) {
  # mark routing logic in request
  append_hf("P-hint: rr-enforced\r\n")=3B=20
  route(1)=3B
  exit=3B
 }=3B
 # we record-route all messages -- to make sure that
 # subsequent messages will go through our proxy=3B that's
 # particularly good if upstream and downstream entities
 # use different transport protocol
 if (!is_method("REGISTER"))
  record_route()=3B
 if (!uri=3D=3Dmyself) {
  # mark routing logic in request
  append_hf("P-hint: outbound\r\n")=3B=20
  route(1)=3B
  exit=3B
 }=3B
 # if the request is for other domain use UsrLoc
 # (in case=2C it does not work=2C use the following command
 # with proper names and addresses in it)
 if (uri=3D=3Dmyself)=20
 {
  if (is_method("REGISTER"))=20
  {
   # Uncomment this if you want to use digest authentication
   #if (!www_authorize("siphub.org"=2C "subscriber")) {
   # www_challenge("siphub.org"=2C "0")=3B
   # return=3B
   #}=3B
   save("location")=3B
   exit=3B
  }=3B
  # detect resources and do balancing
         #load_balance("1"=2C"pstn")=3B
  rewritehostport("<ASTERISK IP ADDDRESS>:5061")=3B
             =20
     # LB function returns negative if no suitable destination (for request=
ed resources) is found=2C
         # or if all destinations are full
         #if ($retcode<0)=20
  #{
             # sl_send_reply("500"=2C"Service full")=3B
              # exit=3B
         #}
  xlog("Selected destination is: $du\n")=3B
 }=3B
 append_hf("P-hint: usrloc applied\r\n")=3B=20
 route(1)=3B
}
route[1]=20
{
 # !! Nathelper
 if (uri=3D~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !searc=
h("^Route:")){
  sl_send_reply("479"=2C "We don't forward to private IP addresses")=3B
  exit=3B
 }=3B
 # if client or server know to be behind a NAT=2C enable relay
 if (isbflagset(6))=20
 {
  use_media_proxy()=3B
 }=3B
 # NAT processing of replies=3B apply to all transactions (for example=2C
 # re-INVITEs from public to private UA are hard to identify as
 # NATed at the moment of request processing)=3B look at replies
 t_on_reply("1")=3B
 # send it out now=3B use stateful forwarding as it works reliably
 # even for UDP2TCP
 if (!t_relay()) {
  sl_reply_error()=3B
 }=3B
}
# !! Nathelper
onreply_route[1] {
 # NATed transaction ?
 if (isbflagset(6) && status =3D~ "(183)|2[0-9][0-9]")=20
 {
  fix_nated_contact()=3B
  use_media_proxy()=3B
 # otherwise=2C is it a transaction behind a NAT and we did not
 # know at time of request processing ? (RFC1918 contacts)
 }
 else if (nat_uac_test("1"))=20
 {
  fix_nated_contact()=3B
 }=3B
}

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
SIP Trace:
=20
INVITE sip:160@<SERVER IP ADDRESS> SIP/2.0
Via: SIP/2.0/UDP <Local Router IP>:11136=3Bbranch=3Dz9hG4bK-d8754z-2a4a8a21=
23652244-1---d8754z-=3Brport
Max-Forwards: 69
Contact: <sip:10002*200@<Local Router IP>:11136>
To: "160"<sip:160@<SERVER IP ADDRESS>>
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 1 INVITE
Allow: INVITE=2C ACK=2C CANCEL=2C OPTIONS=2C BYE=2C REFER=2C NOTIFY=2C MESS=
AGE=2C SUBSCRIBE=2C INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1103k stamp 53621
Content-Length: 293
v=3D0
o=3D- 2 2 IN IP4 192.168.2.103
s=3DCounterPath X-Lite 3.0
c=3DIN IP4 <Local Router IP>
t=3D0 0
m=3Daudio 61626 RTP/AVP 0 97 98 8 3 101
a=3Dalt:1 1 : BURmkknh dEQXZi2N 192.168.2.103 61626
a=3Dfmtp:101 0-15
a=3Drtpmap:97 SPEEX/8000
a=3Drtpmap:98 iLBC/8000
a=3Drtpmap:101 telephone-event/8000
a=3Dsendrecv
---------------------------------------------------------------------------=
------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP <SERVER IP ADDRESS>=3Bbranch=3Dz9hG4bK5009.c81e91d1.0=3Bre=
ceived=3D<SERVER IP ADDRESS>
Via: SIP/2.0/UDP <Local Router IP>:11136=3Breceived=3D<Local Router IP>=3Bb=
ranch=3Dz9hG4bK-d8754z-2a4a8a2123652244-1---d8754z-=3Brport=3D11136
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
To: "160"<sip:160@<SERVER IP ADDRESS>>=3Btag=3Das7e3f057f
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 1 INVITE
User-Agent: VoiceHost PBX
Allow: INVITE=2C ACK=2C CANCEL=2C OPTIONS=2C BYE=2C REFER=2C SUBSCRIBE=2C N=
OTIFY=2C INFO
Supported: replaces=2C timer
WWW-Authenticate: Digest algorithm=3DMD5=2C realm=3D"<realm>"=2C nonce=3D"5=
27d26ba"
Content-Length: 0
---------------------------------------------------------------------------=
------
ACK sip:160@<SERVER IP ADDRESS> SIP/2.0
Via: SIP/2.0/UDP <Local Router IP>:11136=3Bbranch=3Dz9hG4bK-d8754z-2a4a8a21=
23652244-1---d8754z-=3Brport
To: "160"<sip:160@<SERVER IP ADDRESS>>=3Btag=3Das7e3f057f
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 1 ACK
Content-Length: 0
---------------------------------------------------------------------------=
------
INVITE sip:160@<SERVER IP ADDRESS> SIP/2.0
Via: SIP/2.0/UDP <Local Router IP>:11136=3Bbranch=3Dz9hG4bK-d8754z-400bb528=
311ceb4f-1---d8754z-=3Brport
Max-Forwards: 69
Contact: <sip:10002*200@<Local Router IP>:11136>
To: "160"<sip:160@<SERVER IP ADDRESS>>
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 2 INVITE
Allow: INVITE=2C ACK=2C CANCEL=2C OPTIONS=2C BYE=2C REFER=2C NOTIFY=2C MESS=
AGE=2C SUBSCRIBE=2C INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1103k stamp 53621
Authorization: Digest username=3D"10002*200"=2Crealm=3D"<realm>"=2Cnonce=3D=
"527d26ba"=2Curi=3D"sip:160@<SERVER IP ADDRESS>"=2Cresponse=3D"0c1fb3ad0714=
b2c9d42c2b0d846e6976"=2Calgorithm=3DMD5
Content-Length: 293
v=3D0
o=3D- 2 2 IN IP4 192.168.2.103
s=3DCounterPath X-Lite 3.0
c=3DIN IP4 <Local Router IP>
t=3D0 0
m=3Daudio 61626 RTP/AVP 0 97 98 8 3 101
a=3Dalt:1 1 : BURmkknh dEQXZi2N 192.168.2.103 61626
a=3Dfmtp:101 0-15
a=3Drtpmap:97 SPEEX/8000
a=3Drtpmap:98 iLBC/8000
a=3Drtpmap:101 telephone-event/8000
a=3Dsendrecv
---------------------------------------------------------------------------=
------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP <SERVER IP ADDRESS>=3Bbranch=3Dz9hG4bK2009.21cd86d1.0=3Bre=
ceived=3D<SERVER IP ADDRESS>
Via: SIP/2.0/UDP <Local Router IP>:11136=3Breceived=3D<Local Router IP>=3Bb=
ranch=3Dz9hG4bK-d8754z-400bb528311ceb4f-1---d8754z-=3Brport=3D11136
Record-Route: <sip:<SERVER IP ADDRESS>=3Blr=3Don=3Bftag=3D55478d15>
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
To: "160"<sip:160@<SERVER IP ADDRESS>>
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 2 INVITE
User-Agent: VoiceHost PBX
Allow: INVITE=2C ACK=2C CANCEL=2C OPTIONS=2C BYE=2C REFER=2C SUBSCRIBE=2C N=
OTIFY=2C INFO
Supported: replaces=2C timer
Contact: <sip:160@<SERVER IP ADDRESS>:5061>
Content-Length: 0
---------------------------------------------------------------------------=
------
SIP/2.0 200 OK
Via: SIP/2.0/UDP <SERVER IP ADDRESS>=3Bbranch=3Dz9hG4bK2009.21cd86d1.0=3Bre=
ceived=3D<SERVER IP ADDRESS>
Via: SIP/2.0/UDP <Local Router IP>:11136=3Breceived=3D<Local Router IP>=3Bb=
ranch=3Dz9hG4bK-d8754z-400bb528311ceb4f-1---d8754z-=3Brport=3D11136
Record-Route: <sip:<SERVER IP ADDRESS>=3Blr=3Don=3Bftag=3D55478d15>
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
To: "160"<sip:160@<SERVER IP ADDRESS>>=3Btag=3Das3ffcefc8
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 2 INVITE
User-Agent: VoiceHost PBX
Allow: INVITE=2C ACK=2C CANCEL=2C OPTIONS=2C BYE=2C REFER=2C SUBSCRIBE=2C N=
OTIFY=2C INFO
Supported: replaces=2C timer
Contact: <sip:160@<SERVER IP ADDRESS>:5061>
Content-Type: application/sdp
Content-Length: 315
v=3D0
o=3Droot 1716113176 1716113176 IN IP4 <SERVER IP ADDRESS>
s=3DAsterisk PBX 1.6.0.15
c=3DIN IP4 <SERVER IP ADDRESS>
t=3D0 0
m=3Daudio 43130 RTP/AVP 0 8 3 101
a=3Drtpmap:0 PCMU/8000
a=3Drtpmap:8 PCMA/8000
a=3Drtpmap:3 GSM/8000
a=3Drtpmap:101 telephone-event/8000
a=3Dfmtp:101 0-16
a=3DsilenceSupp:off - - - -
a=3Dptime:20
a=3Dsendrecv
---------------------------------------------------------------------------=
------
ACK sip:160@<SERVER IP ADDRESS>:5061 SIP/2.0
Via: SIP/2.0/UDP <Local Router IP>:11136=3Bbranch=3Dz9hG4bK-d8754z-9c78587e=
7422cc69-1---d8754z-=3Brport
Max-Forwards: 69
Route: <sip:<SERVER IP ADDRESS>=3Blr=3Bftag=3D55478d15>
Contact: <sip:10002*200@<Local Router IP>:11136>
To: "160"<sip:160@<SERVER IP ADDRESS>>=3Btag=3Das3ffcefc8
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 2 ACK
User-Agent: X-Lite release 1103k stamp 53621
Authorization: Digest username=3D"10002*200"=2Crealm=3D"<realm>"=2Cnonce=3D=
"527d26ba"=2Curi=3D"sip:160@<SERVER IP ADDRESS>"=2Cresponse=3D"0c1fb3ad0714=
b2c9d42c2b0d846e6976"=2Calgorithm=3DMD5
Content-Length: 0
---------------------------------------------------------------------------=
------
BYE sip:160@<SERVER IP ADDRESS>:5061 SIP/2.0
Via: SIP/2.0/UDP <Local Router IP>:11136=3Bbranch=3Dz9hG4bK-d8754z-cf23ec44=
e07da35f-1---d8754z-=3Brport
Max-Forwards: 69
Route: <sip:<SERVER IP ADDRESS>=3Blr=3Bftag=3D55478d15>
Contact: <sip:10002*200@<Local Router IP>:11136>
To: "160"<sip:160@<SERVER IP ADDRESS>>=3Btag=3Das3ffcefc8
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 3 BYE
User-Agent: X-Lite release 1103k stamp 53621
Authorization: Digest username=3D"10002*200"=2Crealm=3D"<realm>"=2Cnonce=3D=
"527d26ba"=2Curi=3D"sip:160@<SERVER IP ADDRESS>:5061"=2Cresponse=3D"a6cacf1=
77f87d78ea719af4150dfaab2"=2Calgorithm=3DMD5
Reason: SIP=3Bdescription=3D"User Hung Up"
Content-Length: 0
---------------------------------------------------------------------------=
------
SIP/2.0 200 OK
Via: SIP/2.0/UDP <SERVER IP ADDRESS>=3Bbranch=3Dz9hG4bK3009.020cf4b1.0=3Bre=
ceived=3D<SERVER IP ADDRESS>
Via: SIP/2.0/UDP <Local Router IP>:11136=3Breceived=3D<Local Router IP>=3Bb=
ranch=3Dz9hG4bK-d8754z-cf23ec44e07da35f-1---d8754z-=3Brport=3D11136
From: "Ross"<sip:10002*200@<SERVER IP ADDRESS>>=3Btag=3D55478d15
To: "160"<sip:160@<SERVER IP ADDRESS>>=3Btag=3Das3ffcefc8
Call-ID: MTM2ZjFkMzlmNTM3NTJlNmRjYTBlMzVhMzBhZDBmZDQ.
CSeq: 3 BYE
User-Agent: VoiceHost PBX
Allow: INVITE=2C ACK=2C CANCEL=2C OPTIONS=2C BYE=2C REFER=2C SUBSCRIBE=2C N=
OTIFY=2C INFO
Supported: replaces=2C timer
Content-Length: 0


  		 	   		 =20
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://www.microsoft.com/windows/buy/ =



More information about the Users mailing list