[SR-Users-ES] Problema con NAT y RTPPROXY

779 views
Skip to first unread message

David Candamil Santos

unread,
Nov 12, 2011, 3:23:18 PM11/12/11
to sr-us...@lists.sip-router.org
Hola, estoy utilizando kamailio 3.2.0 (x86_64/linux) y desde hace unos días estoy intentando comunicar un softphone desde el interior de una red con NAT con el exterior. La configuración es la siguiente:

Softphone (192.168.0.5) <--> Kamailio (192.168.0.3) <--> Router (192.168.0.1) <--> Softphone sobre smartphone

Todos los puertos del router están redireccionados a 192.168.0.3
Tengo instalado rtpproxy 1.2.1-1 con la siguiente configuración:

--------------------------/etc/defaults/rtpproxy--------------------------------
# The control socket.
#CONTROL_SOCK="unix:/var/run/rtpproxy/rtpproxy.sock"
# To listen on an UDP socket, uncomment this line:
CONTROL_SOCK=udp:127.0.0.1:22222

# Additional options that are passed to the daemon.
EXTRA_OPTS="-l candamil.dyndns.org"
----------------------------------------------------------------------------------------

y el funcionamiento es correcto. Este es el mensaje de salida del log de kamailio:

----------------------------------------------------------------------------------------------
Nov 12 20:09:13 condor kamailio[7001]: INFO: rtpproxy [rtpproxy.c:1415]: rtp proxy <udp:127.0.0.1:22222> found, support for it enabled
-----------------------------------------------------------------------------------------------


Tanto el softphone del interior de la red como el del exterior son linphone. La configuración del del interior de la red es la siguiente:

SIP identity: sip:10...@192.168.0.3
SIP proxy: sip:192.168.0.3
Indico conexión directa a internet.

En la del externo especifico como proxy y domain "candamil.dyndns.org", que es la dirección DNS que apunta a la IP de mi router.

En este caso, los síntomas son los siguientes:
La autentificación de ambos, tanto externo como interno, es correcta.
Al realizar una llamada en cualquiera de los dos sentidos, el softphone suena y la llamada se contesta y cuelga correctamente, pero no se transmite la señal de voz. En el log figura el siguiente mensaje:

----------------------------------------------------------------------------------------------
Nov 12 20:23:14 condor kamailio[6991]: ERROR: rtpproxy [rtpproxy.c:2260]: incorrect port 0 in reply from rtp proxy
----------------------------------------------------------------------------------------------


Ocurre lo mismo si en el interno indico que está tras NAT, con la ip del router, y que está tras NAT con un servidor STUN (stunserver.org). En los 3 casos, en el softphone externo, figura una llamada de 10...@192.168.0.3, mientras que en el interno, figura una llamada de 10...@candamil.dyndns.org.

Si cambio en el softphone interno el proxy a sip:candamil.dyndns.org, todo se vuelve a repetir.
Si lo que hago es cambiar la SIP identity a sip:10...@candamil.dyndns.org, al realizar una llamada desde interno a externo, el interno no llega a percatarse de que se respondió a la llamada, y aparece el siguiente error en el log:

----------------------------------------------------------------------------------------------------------
Nov 12 20:53:00 condor kamailio[7306]: ERROR: <core> [parser/parse_via.c:2600]: ERROR: parse_via: invalid port number <5060ranch=z9hG4bKc
50f.b4825246.0>
Nov 12 20:53:00 condor kamailio[7306]: ERROR: <core> [parser/parse_via.c:2629]: ERROR: parse_via on: <SIP/2.0/UDP 192.168.0.3:5060ranch=z
9hG4bKc50f.b4825246.0;received=87.223.138.84#015#012Via: SIP/2.0/UDP 87.223.138.84:5060;rport=5060;branch=z9hG4bK1021772993#015#012From: 
<sip:10...@candamil.dyndns.org>;tag=783852345#015#012To: <sip:10...@candamil.dyndns.org>#015#012Call-ID: 1644787160#015#012CSeq: 21 INVITE#
015#012User-Agent: Linphone/3.4.0 (eXosip2/unknown)#015#012Content-Length: 0#015#012#015#012>
------------------------------------------------------------------------------------------------------------

Por el contrario, haciendo una llamada desde el externo al interno, ocurre lo mismo que antes.

Por último, esta es la configuración relevante de kamailio:

-----------------------------------------kamailio.cfg----------------------------------------------------
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_NAT

####### Defined Values #########

# *** Value defines - IDs used later in config
#!ifdef WITH_MYSQL
# - database URL - used to connect to database server by modules such
#       as: auth_db, acc, usrloc, a.s.o.
#!define DBURL "mysql://openser:openserrw@localhost/openser"
#!endif
#!ifdef WITH_MULTIDOMAIN
# - the value for 'use_domain' parameters
#!define MULTIDOMAIN 1
#!else
#!define MULTIDOMAIN 0
#!endif

# - flags
#   FLT_ - per transaction (message) flags
# FLB_ - per branch flags
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define FLT_NATS 5

#!define FLB_NATB 6
#!define FLB_NATSIPPING 7

####### Global Parameters #########
/* uncomment the next line to disable the auto discovery of local aliases
   based on reverse DNS on IPs (default on) */
#auto_aliases=no

/* add local domain aliases */

/* port to listen to
 * - can be specified more than once if needed to listen on many ports */
port=5060

#!ifdef WITH_TLS
enable_tls=yes
#!endif

# life time of TCP connection when there is no traffic
# - a bit higher than registration expires to cope with UA behind NAT
tcp_connection_lifetime=3605

####### Custom Parameters #########

#!ifdef WITH_PSTN
# PSTN GW Routing
#
# - pstn.gw_ip: valid IP or hostname as string value, example:
# pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
#
# - by default is empty to avoid misrouting
pstn.gw_ip = "" desc "PSTN GW Address"
#!endif

####### Modules Section ########

#!ifdef WITH_MYSQL
loadmodule "db_mysql.so"
#!endif

#!ifdef WITH_AUTH
loadmodule "auth.so"
loadmodule "auth_db.so"

#!ifdef WITH_NAT
loadmodule "nathelper.so"
loadmodule "rtpproxy.so"
#!endif

# ----------------- setting module-specific parameters ---------------

# ----- auth_db params -----
#!ifdef WITH_AUTH
modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "load_credentials", "")
modparam("auth_db", "use_domain", MULTIDOMAIN)


#!ifdef WITH_NAT
# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:22222")

# ----- nathelper params -----
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "sip:pin...@kamailio.org")

# params needed for NAT traversal in other modules
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)
#!endif

####### Routing Logic ########


# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
# - note: this is the same as route { ... }
request_route {

# per request initial checks
route(REQINIT);

# NAT detection
route(NATDETECT);

# handle requests within SIP dialogs
route(WITHINDLG);

### only initial requests (no To tag)

# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}

t_check_trans();

# authentication
route(AUTH);

# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE"))
record_route();

# account only INVITEs
if (is_method("INVITE"))
{
setflag(FLT_ACC); # do accounting
}

# dispatch requests to foreign domains
route(SIPOUT);

### requests for my local domains

# handle presence related requests
route(PRESENCE);

# handle registrations
route(REGISTRAR);

if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}

# dispatch destinations to PSTN
route(PSTN);

# user location service
route(LOCATION);

route(RELAY);
}


route[RELAY] {

# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|SUBSCRIBE")) {
t_on_branch("MANAGE_BRANCH");
t_on_reply("MANAGE_REPLY");
}
if (is_method("INVITE")) {
t_on_failure("MANAGE_FAILURE");
}

if (!t_relay()) {
sl_reply_error();
}
exit;
}

# Per SIP request initial checks
route[REQINIT] {
#!ifdef WITH_ANTIFLOOD
# flood dection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself)
{
if($sht(ipban=>$si)!=$null)
{
# ip is already blocked
xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");
exit;
}
if (!pike_check_req())
{
xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");
$sht(ipban=>$si) = 1;
exit;
}
}
#!endif

if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}

if(!sanity_check("1511", "7"))
{
xlog("Malformed SIP message from $si:$sp\n");
exit;
}
}

# Handle requests within SIP dialogs
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
if ( is_method("ACK") ) {
# ACK is forwarded statelessy
route(NATMANAGE);
}
route(RELAY);
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# no loose-route, but stateful ACK;
# must be an ACK after a 487
# or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ... ignore and discard
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
}

# Handle SIP registrations
route[REGISTRAR] {
if (is_method("REGISTER"))
{
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging 
setbflag(FLB_NATSIPPING);
}
if (!save("location"))
sl_reply_error();

exit;
}
}

# USER location service
route[LOCATION] {

#!ifdef WITH_SPEEDIAL
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$")
if(sd_lookup("speed_dial"))
route(SIPOUT);
#!endif

#!ifdef WITH_ALIASDB
# search in DB-based aliases
if(alias_db_lookup("dbaliases"))
route(SIPOUT);
#!endif

$avp(oexten) = $rU;
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}

# when routing via usrloc, log the missed calls also
if (is_method("INVITE"))
{
setflag(FLT_ACCMISSED);
}
}

# Presence server route
route[PRESENCE] {
if(!is_method("PUBLISH|SUBSCRIBE"))
return;

#!ifdef WITH_PRESENCE
if (!t_newtran())
{
sl_reply_error();
exit;
};

if(is_method("PUBLISH"))
{
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
handle_subscribe();
t_release();
}
exit;
#!endif
# if presence enabled, this part will not be executed
if (is_method("PUBLISH") || $rU==$null)
{
sl_send_reply("404", "Not here");
exit;
}
return;
}

# Authentication route
route[AUTH] {
#!ifdef WITH_AUTH
if (is_method("REGISTER"))
{
# authenticate the REGISTER requests (uncomment to enable auth)
if (!www_authorize("$td", "subscriber"))
{
www_challenge("$td", "0");
exit;
}

if ($au!=$tU)
{
sl_send_reply("403","Forbidden auth ID");
exit;
}
} else {

#!ifdef WITH_IPAUTH
if(allow_source_address())
{
# source IP allowed
return;
}
#!endif

# authenticate if from local subscriber
if (from_uri==myself)
{
if (!proxy_authorize("$fd", "subscriber")) {
proxy_challenge("$fd", "0");
exit;
}
if (is_method("PUBLISH"))
{
if ($au!=$fU || $au!=$tU) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
if ($au!=$rU) {
sl_send_reply("403","Forbidden R-URI");
exit;
}
#!ifdef WITH_MULTIDOMAIN
if ($fd!=$rd) {
sl_send_reply("403","Forbidden R-URI domain");
exit;
}
#!endif
} else {
if ($au!=$fU) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
}

consume_credentials();
# caller authenticated
} else {
# caller is not local subscriber, then check if it calls
# a local destination, otherwise deny, not an open relay here
if (!uri==myself)
{
sl_send_reply("403","Not relaying");
exit;
}
}
}
#!endif
return;
}

# Caller NAT detection route
route[NATDETECT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
fix_nated_contact();
}
setflag(FLT_NATS);
}
#!endif
return;
}

# RTPProxy control
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;

rtpproxy_manage();

if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
}
#!endif
return;
}

# Routing to foreign domains
route[SIPOUT] {
if (!uri==myself)
{
append_hf("P-hint: outbound\r\n");
route(RELAY);
}
}

# PSTN GW routing
route[PSTN] {
#!ifdef WITH_PSTN
# check if PSTN GW IP is defined
if (strempty($sel(cfg_get.pstn.gw_ip))) {
xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined\n");
return;
}

# route to PSTN dialed numbers starting with '+' or '00'
#     (international format)
# - update the condition to match your dialing rules for PSTN routing
if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$"))
return;

# only local users allowed to call
if(from_uri!=myself) {
sl_send_reply("403", "Not Allowed");
exit;
}

$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);

route(RELAY);
exit;
#!endif

return;
}

# XMLRPC routing
#!ifdef WITH_XMLRPC
route[XMLRPC] {
# allow XMLRPC from localhost
if ((method=="POST" || method=="GET")
&& (src_ip==127.0.0.1)) {
# close connection only for xmlrpclib user agents (there is a bug in
# xmlrpclib: it waits for EOF before interpreting the response).
if ($hdr(User-Agent) =~ "xmlrpclib")
set_reply_close();
set_reply_no_connect();
dispatch_rpc();
exit;
}
send_reply("403", "Forbidden");
exit;
}
#!endif

# route to voicemail server
route[TOVOICEMAIL] {
#!ifdef WITH_VOICEMAIL
if(!is_method("INVITE"))
return;

# check if VoiceMail server IP is defined
if (strempty($sel(cfg_get.voicemail.srv_ip))) {
xlog("SCRIPT: VoiceMail rotuing enabled but IP not defined\n");
return;
}
if($avp(oexten)==$null)
return;

$ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip)
+ $sel(cfg_get.voicemail.srv_port);
route(RELAY);
exit;
#!endif

return;
}

# manage outgoing branches
branch_route[MANAGE_BRANCH] {
xdbg("new branch [$T_branch_idx] to $ru\n");
route(NATMANAGE);
}

# manage incoming replies
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(status=~"[12][0-9][0-9]")
route(NATMANAGE);
}

# manage failure routing cases
failure_route[MANAGE_FAILURE] {
route(NATMANAGE);

if (t_is_canceled()) {
exit;
}

#!ifdef WITH_BLOCK3XX
# block call redirect based on 3xx replies.
if (t_check_status("3[0-9][0-9]")) {
t_reply("404","Not found");
exit;
}
#!endif

#!ifdef WITH_VOICEMAIL
# serial forking
# - route to voicemail on busy or no answer (timeout)
if (t_check_status("486|408")) {
route(TOVOICEMAIL);
exit;
}
#!endif
}
--------------------------------------------------------------------------------------------------------------



Espero que alguien pueda echarme una mano. Gracias.

Iñaki Baz Castillo

unread,
Nov 15, 2011, 5:22:55 AM11/15/11
to Lista de usuarios de SIP Router
2011/11/12 David Candamil Santos <cand...@gmail.com>:

> Softphone (192.168.0.5) <--> Kamailio (192.168.0.3) <--> Router
> (192.168.0.1) <--> Softphone sobre smartphone

Esto no va a funcionar salvo que hagas muchas ñapas, y ni con esas. Un
proxy SIP detrás de NAT intentando comunicarse con clientes fuera de
ese NAT.... imposible, tendrás mil problemas con el Record-Route, con
rtpproxy, etc.

--
Iñaki Baz Castillo
<i...@aliax.net>

_______________________________________________
SR-Users-ES mailing list
SR-Us...@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users-es

magnus...@gmail.com

unread,
Mar 23, 2012, 10:40:37 AM3/23/12
to Lista de usuarios de SIP Router
Buen dia, es con mucho gusto que despues de algunos meses de estudios pude configurar mi Opensips 1.6 com asterisk 1.6.2

Configure poara usar loadbalancer, y est andando a la perfecion

Tengo un unico problema, que es las llamadas entre usuarios.
Para poder llamar instale RTPPROXY en el mismo server del opensips, pero me esta saliendo un error en el log que no encontro que es.

ERROR:nathelper:fix_nated_contact_f: SCRIPT BUG - second attempt to change URI Contact


Preciso mucho configurar esto, con urgencia, asi que si alguien me quiere dar una mano mas profisional, podemos areglar un valor.

Saludos


Iñaki Baz Castillo

unread,
Mar 23, 2012, 11:33:31 AM3/23/12
to Lista de usuarios de SIP Router
El día 23 de marzo de 2012 15:40, magnus...@gmail.com
<magnus...@gmail.com> escribió:

> ERROR:nathelper:fix_nated_contact_f: SCRIPT BUG - second attempt to change
> URI Contact

Revisa tu script, estás llamando dos veces a la función fix_nated_contact().

Iñaki Baz Castillo

unread,
Mar 23, 2012, 11:46:14 AM3/23/12
to magnus...@gmail.com, Lista de usuarios de SIP Router
Hola, mejor de momento mantenemos el hilo en la lista. Más info abajo:


El día 23 de marzo de 2012 16:41, magnus...@gmail.com
<magnus...@gmail.com> escribió:
> # -----------------------------------------------------------------
> # Handle Handle NAT
> # -----------------------------------------------------------------
>
> route[4]{


>
> force_rport();
> if (nat_uac_test("19")) {

> xlog("L_INFO", "NAT detected1");
> if (method=="REGISTER") {
> fix_nated_register();
> } else {
> fix_nated_contact();
> fix_nated_sdp("1");
> xlog("L_INFO", "NAT detected2");
> };
> setflag(5);
> return;
> };

No sólo hay que "corregir" el Contact en el INVITE sino que también en
las respuestas 180/183/200 que tengan SDP (on_reply_route y tal). Y lo
mismo a la hora de aplicar rtpproxy.

magnus...@gmail.com

unread,
Mar 23, 2012, 11:47:20 AM3/23/12
to Lista de usuarios de SIP Router
aca te paso los log de NAT

Mar 23 11:45:08 magnussolution /sbin/opensips[15435]: DBG:nathelper:check_content_type: type <application/sdp> found valid
 ] x-rtp-session-id:062600716E194B2B8C5A25E6FF91F35B: DBG:nathelper:force_rtp_proxy: Forcing body: [v=0
Mar 23 11:45:08 magnussolution /sbin/opensips[15435]: DBG:nathelper:force_rtp_proxy_body: proxy reply: 36944 127.0.0.1
Mar 23 11:45:08 magnussolution /sbin/opensips[15433]: DBG:core:forward_reply: found module nathelper, passing reply to it
  ontent-Length: 0am release 1003d stamp 30403MTVjMjJiMDM2MGY3NmRhMWY.K-d87543-25527a0d89017473-1--d87543-;rport=56886 428, rest: 71 msg= SIP/2.0 180 Ringing
Mar 23 11:45:12 magnussolution /sbin/opensips[15432]: DBG:core:forward_reply: found module nathelper, passing reply to it
 a=senmap:101 telephone-event/8000.168.1.10 63528 NOTIFY, MESSAGE, SUBSCRIBE, INFO27a0d89017473-1--d87543-;rport=56886 423, rest: 530 msg= SIP/2.0 200 OK
Mar 23 11:45:12 magnussolution /sbin/opensips[15433]: DBG:core:parse_msg:  uri:     <sip:2...@186.108.158.77;nat=yes>
 . ntent-Length: 0am release 1003d stamp 30403MTVjMjJiMDM2MGY3NmRhMWY.K-d87543-3a2fc63e4566560b-1--d87543-;rport=56886t=yes SIP/2.0
Mar 23 11:45:13 magnussolution /sbin/opensips[15432]: DBG:core:forward_reply: found module nathelper, passing reply to it
 a=senmap:101 telephone-event/8000.168.1.10 63528 NOTIFY, MESSAGE, SUBSCRIBE, INFO27a0d89017473-1--d87543-;rport=56886 423, rest: 530 msg= SIP/2.0 200 OK
Mar 23 11:45:13 magnussolution /sbin/opensips[15434]: DBG:core:parse_msg:  uri:     <sip:2...@186.108.158.77;nat=yes>
 . ntent-Length: 0am release 1003d stamp 30403MTVjMjJiMDM2MGY3NmRhMWY.K-d87543-3a2fc63e4566560b-1--d87543-;rport=56886t=yes SIP/2.0
Mar 23 11:45:19 magnussolution /sbin/opensips[15433]: DBG:core:parse_msg:  uri:     <sip:2...@186.108.158.77;nat=yes>
Mar 23 11:45:19 magnussolution /sbin/opensips[15432]: DBG:core:forward_reply: found module nathelper, passing reply to it
Mar 23 11:45:19 magnussolution /sbin/opensips[15434]: DBG:core:parse_msg:  uri:     <sip:2...@186.108.158.77;nat=yes>

magnus...@gmail.com

unread,
Mar 23, 2012, 12:14:31 PM3/23/12
to Lista de usuarios de SIP Router
Amigos, preciso ativar nathelper para llamadas entre usuarios, pero no hay forma, en este momento, ni error en el LOG, pero se queda sin audio en un lado.

Por favor, si alguien me quiere dar una mano, que sea nathelper o otra solución, estoy dispuesto a pagar, y después publicar la solución para todos que tengas el mismo problema


Saludos

magnus...@gmail.com

unread,
Mar 23, 2012, 3:21:13 PM3/23/12
to Lista de usuarios de SIP Router
Buenas tardes, active el LOG de rtpproxy:

cuando inicio opensips, sale:

Mar 23 15:17:41 rtpproxy[24560]: DBUG:handle_command: received command "30452_0 V"
Mar 23 15:17:41 rtpproxy[24560]: DBUG:doreply: sending reply "30452_0 20040107 "
Mar 23 15:17:41 rtpproxy[24560]: DBUG:handle_command: received command "30452_1 VF 20050322"
Mar 23 15:17:41 rtpproxy[24560]: DBUG:doreply: sending reply "30452_1 1 "
Mar 23 15:17:41 rtpproxy[24560]: DBUG:handle_command: received command "30452_2 VF 20071116"
Mar 23 15:17:41 rtpproxy[24560]: DBUG:doreply: sending reply "30452_2 1 "
Mar 23 15:17:41 rtpproxy[24560]: DBUG:handle_command: received command "30452_3 VF 20081102"
Mar 23 15:17:41 rtpproxy[24560]: DBUG:doreply: sending reply "30452_3 1 "


Cuando inicio una llamada entre usuarios sale:

Mar 23 15:19:51 rtpproxy[24560]: DBUG:handle_command: received command "30455_5 Uc0,101 0d5e07505f2e891fYTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY. 186.153.73.221 36378 77213d5e;1"
Mar 23 15:19:51 rtpproxy[24560]: INFO:handle_command: new session 0d5e07505f2e891fYTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY., tag 77213d5e;1 requested, type strong
Mar 23 15:19:51 rtpproxy[24560]: ERR:create_twinlistener: can't bind to the IPv4 port 39080: Cannot assign requested address
Mar 23 15:19:51 rtpproxy[24560]: ERR:handle_command: can't create listener
Mar 23 15:19:51 rtpproxy[24560]: DBUG:doreply: sending reply "30455_5 E10 "


Y la llamada se queda sin audio de un lado

saludos

magnus...@gmail.com

unread,
Mar 23, 2012, 4:16:58 PM3/23/12
to Lista de usuarios de SIP Router
instale el rtp proxy en otro servidor
en los LOGs de rtp ahora sale

Mar 23 17:09:22 id206222g rtpproxy[15666]: DBUG:handle_command: received command "9624_5 Uc0,101 603bba72006d127cYTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY. 186.153.73.221 62180 b7656927;1"
Mar 23 17:09:22 id206222g rtpproxy[15666]: INFO:handle_command: new session 603bba72006d127cYTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY., tag b7656927;1 requested, type strong
Mar 23 17:09:22 id206222g rtpproxy[15666]: INFO:handle_command: new session on a port 46004 created, tag b7656927;1
Mar 23 17:09:22 id206222g rtpproxy[15666]: INFO:handle_command: pre-filling caller's address with 186.153.73.221:62180
Mar 23 17:09:22 id206222g rtpproxy[15666]: DBUG:doreply: sending reply "9624_5 46004 187.49.226.42 "

PERO SIGUE SIN AUDIO EN UNA PUNTA.


Por favor dame una luz

envio mi configuracion, porque no se mas donde encontrar errores

----------------------------------------------------------------------------------------------------------------------------------------------------


####### Global Parameters #########

debug=3
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4


port=5060

listen=udp:65.254.63.212:5060


####### Modules Section ########

#set module path
mpath="/usr/local/lib/opensips/modules/"

loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "maxfwd.so"
loadmodule "avpops.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "rr.so"
loadmodule "acc.so"
loadmodule "domain.so"
loadmodule "load_balancer.so"
loadmodule "dialog.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
loadmodule "siptrace.so"
loadmodule "nathelper.so"
loadmodule "rtpproxy.so"



# ----------------- setting module-specific parameters ---------------
modparam("load_balancer", "db_url","mysql://opensips:prueba@localhost/opensips")


# ----- siptrace -----
modparam("siptrace", "db_url", "mysql://opensips:prueba@localhost/opensips")
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
#modparam("siptrace", "traced_user_avp", "$avp(123)")
#modparam("siptrace", "traced_user_avp", "$avp(user)")


# ----- rtpproxy -----
modparam("rtpproxy", "rtpproxy_sock","udp:187.49.226.42:7890")

# ----- dialog -----
#modparam("dialog", "dlg_flag", 13)
modparam("dialog", "db_mode", 1)
modparam("dialog", "db_url", "mysql://opensips:prueba@localhost/opensips")


# ----- nathelper -----
modparam("nathelper", "natping_interval", 10)
modparam("nathelper", "natping_processes", 3)
modparam("nathelper", "natping_socket", "localhost:5006")
modparam("nathelper", "received_avp", "$avp(42)")
modparam("nathelper", "force_socket", "localhost:33333")
modparam("nathelper", "sipping_from", "sip:pinger@localhost")
modparam("nathelper", "sipping_method", "INFO")

modparam("nathelper", "sipping_bflag", 7)


# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")


# ----- rr params -----
modparam("rr","enable_double_rr",1)
modparam("rr","append_fromtag",1)



# ----- usrloc params -----
/* uncomment the following lines if you want to enable DB persistency   for location entries */
modparam("usrloc", "db_mode",   2)
modparam("usrloc", "db_url","mysql://opensips:prueba@localhost/opensips")

# ----- uri params -----
#modparam("uri_db", "use_uri_table", 0)
#modparam("uri_db", "db_url", "mysql://opensips:prueba@localhost/opensips")



# ----- acc params -----
/* what sepcial events should be accounted ? */
modparam("acc", "early_media", 1)
modparam("acc", "report_cancels", 1)
/* by default ww do not adjust the direct of the sequential requests.
if you enable this parameter, be sure the enable "append_fromtag"
in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)
/* uncomment the following lines to enable DB accounting also */
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)



# ----- auth_db params -----
/* uncomment the following lines if you want to enable the DB basedauthentication */

modparam("auth_db", "password_column", "password")
modparam("auth_db", "password_column_2", "ha1b")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "db_url","mysql://opensips:prueba@localhost/opensips")

modparam("auth_db", "load_credentials", "")
modparam("auth_db", "skip_version_check", 1)

# ----- alias_db params -----
/* uncomment the following lines if you want to enable the DB based   aliases */
#modparam("alias_db", "db_url","mysql://opensips:prueba@localhost/opensips")

# ----- domain params -----
/* uncomment the following lines to enable multi-domain detectionsupport */
modparam("domain", "db_url","mysql://opensips:prueba@localhost/opensips")
modparam("domain", "db_mode", 1)   # Use caching


# ----- multi-module params -----
/* uncomment the following line if you want to enable multi-domain supportin the modules (dafault off) */
modparam("auth_db|usrloc|uri", "use_domain", 1)



####### Routing Logic ########

route {
    $avp(s : user) = $fu; #for sip_trace
    # -----------------------------------------------------------------
    # Sanity Check Section
    # -----------------------------------------------------------------
    if (!mf_process_maxfwd_header("256")) {
        if (method != "ACK") {

            sl_send_reply("483", "Too Many Hops");
        }
        return;
    }
    if (msg:len > max_len) {
        if (method != "ACK") {
            sl_send_reply("513", "Message Overflow");
        }
        return;
    }

    if (status == "482") { #loop detection
        xlog("L_ERR", "Webur: $mi $rm $fu -> $ru status 482 Loop Detected\n");
        return;
    }

    if (!mf_process_maxfwd_header("3")) {
        sl_send_reply("483", "looping");
        exit;
    }

    if (!has_totag()) {
        # initial request

    } else {
        # sequential request -> obey Route indication
        loose_route();
        t_relay();
        exit;
    }

    # -----------------------------------------------------------------
    # Call Type Processing Section
    # -----------------------------------------------------------------

    if (method == "INVITE") {
        route(3);
        return;
    } else
        if (method == "ACK") {
            route(9);
            return;
        } else
            if (method == "BYE" || method == "CANCEL") {
                route(5);
                return;
            } else
                if (method == "REGISTER" || method == "MESSAGE") {
                    route(1);
                    return;
                } else
                    if (method == "PUBLISH" || method == "SUBSCRIBE") {

                        return;
                    } else
                        if (method == "NOTIFY") {
                            sl_send_reply("200", "Understood");
                            return;
                        } else
                            if (method == "OPTIONS") {
                                sl_send_reply("200", "Got it");
                                return;
                            }
}


route[1] {

    # -----------------------------------------------------------------
    # Register
    # -----------------------------------------------------------------

    if (is_method("REGISTER")) {
        route(4);
        if (isflagset(5)) {
            record_route(";nat=yes");
        } else {
            record_route();
        }


        if (!www_authorize("", "a2billing")) {
            www_challenge("", "0");
        }
        # auth done -> send it to registrar
        consume_credentials();
        $du = "sip:65.254.63.212:5060";
        save("location");
        t_relay();
        exit;
    }
}

route[3] {
    # -----------------------------------------------------------------
    # Handle Calls
    # -----------------------------------------------------------------
    xlog("L_INFO", "Place Holder");
    if (!has_totag()) {
        if (is_method("INVITE")) {
            trace_dialog();
        } else {
            sip_trace();
        }
    }

    if (loose_route()) {
        if (!has_totag()) {
            xlog("L_INFO", "Initial loose-routing rejected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
            sl_send_reply("403", "Initial Loose-Routing Rejected");
            exit;
        }
        if (is_method("INVITE")) {

            route(5);
        }

        append_hf("P-hint: rr-enforced\r\n");
        route(6);
    }

    # NAT detection
    route(4);
    record_route();

    if ($rU =~ "^[0-9]{3}$") {
        lookup("location");
        route(8);
        t_on_failure("1");
        exit;
    }


    route(10);
    return;

}


# -----------------------------------------------------------------
# Handle Handle NAT
# -----------------------------------------------------------------

route[4] {
    if (is_method("INVITE") && has_totag()) {
        engage_rtp_proxy();
    }
    force_rport();
    if (1) {

        if (nat_uac_test("19")) {
            xlog("L_INFO", "NAT detected1");
            if (method == "REGISTER") {

                fix_nated_register();
            } else {
                fix_nated_contact();
                fix_nated_sdp("1");


                xlog("L_INFO", "NAT detected2");
            }
            ;
            setflag(5);
            return;
        }

    }
}

# -----------------------------------------------------------------
# Gotta Go
# -----------------------------------------------------------------

route[5] {
    if (is_method("BYE|CANCEL")) {
        unforce_rtp_proxy();
    } else
        if (is_method("INVITE")) {
            if (has_body("application/sdp"))
                rtpproxy_offer("foc");
            t_on_failure("3");
        } else
            if (is_method("ASK")) {
                if (has_body("application/sdp"))
                    rtpproxy_answer("foc");
                t_on_failure("3");
            }
    t_on_reply("3");

}

# -----------------------------------------------------------------
# Handle Handle NAT
# -----------------------------------------------------------------
route[6] {
    if (subst_uri('/(sip:.*);nat=yes/\1/')) {
        setbflag(0);
    }
    xlog("L_INFO", "NAT detected");
    if (isflagset(5) || isbflagset(0)) {
        route(5);
        if (!t_relay()) {
            sl_reply_error();
        }
    }
}

# -----------------------------------------------------------------
# Gotta Go
# -----------------------------------------------------------------
route[7] {
    if (is_method("BYE|CANCEL")) {
        unforce_rtp_proxy();
        drop();
    } else
        if (is_method("INVITE")) {
            if (has_body("application/sdp"))
                rtpproxy_offer("foc");
            t_on_failure("3");
        } else
            if (is_method("ASK")) {
                if (has_body("application/sdp"))
                    rtpproxy_answer("foc");
                t_on_failure("3");
            }
    t_on_reply("3");
    exit;
}

route[8] {
    # -----------------------------------------------------------------
    # Extenstion Calls
    # -----------------------------------------------------------------
    force_rport();
    #fix_nated_contact();

    if (has_body("application/sdp")) {
        rtpproxy_offer("foc");
        xlog("L_INFO", "NAT detected");
        t_on_failure("3");
    } else
        if (is_method("ASK")) {
            if (has_body("application/sdp"))
                fix_nated_sdp("1"); # Add direction=active to SDP
            rtpproxy_answer("foc");
            xlog("L_INFO", "NAT detected");

        }
    t_on_reply("3");

    if (!t_relay()) {
        sl_reply_error();

        # Error detection
        route(13);
        xlog("L_INFO", "Sent out From OPenSips");

        exit;
    }

}


# -----------------------------------------------------------------
# Media Start
# -----------------------------------------------------------------


route[9] {


    setflag(4);
    force_rport();
    force_tcp_alias();
    rtpproxy_answer();


    return;


}


# -----------------------------------------------------------------
# Load Balance  -detect resources
# -----------------------------------------------------------------


route[10] {


    load_balance("1", "pstn");

    route(11);


    return;
}


# -----------------------------------------------------------------
# Load Balance  - Send It out
# -----------------------------------------------------------------


route[11] {

    # LB function returns negative if no suitable destination (for requested resources) is found,
    # or if all destinations are full
    if ($retcode < 0) {
        sl_send_reply("500", "Service full");
        exit;
    }
    xlog("Selected Load Balance destination is: $du\n");

    # send it out
    route(4);

    if (!t_relay()) {
        sl_reply_error();
        # ERROR detection
        route(13);
    }
    return;
}

route[13] {

# -----------------------------------------------------------------
# Debuging info
# -----------------------------------------------------------------
return;

}


# -----------------------------------------------------------------
# Handle Handle NAT
# -----------------------------------------------------------------


branch_route[2] {
    xlog("L_INFO: new branch at $ru\n");

}

# -----------------------------------------------------------------
# Handle Handle NAT
# -----------------------------------------------------------------

onreply_route[2] {
    xlog("L_INFO: incoming reply\n");
    force_rport();
    if (status =~ "(183)|(2[0-9][0-9][0-9])" && has_body("application/sdp")) {
        if (nat_uac_test("19")) {
            log("L_INFO: Hem detectat NAT");
            setbflag(2); # flag for NAT
            # fix_nated_contact();
            fix_nated_sdp("11");
            rtpproxy_answer();

        }
       
    }
    ;
}

onreply_route[3] {
    #    sip_trace();
    if ((isflagset(5) || isbflagset(0)) && status =~ "(183)|(2[0-9][0-9][0-9])" && has_body("application/sdp")) {
        rtpproxy_answer();
    }
    if (!subst_uri('/(sip:.*);nat=yes/\1/')) {
        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
    }
    if (isbflagset(0)) {
        #fix_nated_contact();
    }
    exit;
}


failure_route[1] {
    if (t_was_cancelled()) {
        exit;
    }

    # if the failure code is "408 - timeout" or "486 - busy",
    # forward the calls to voicemail recording

    if (t_check_status("486|408")) {
        # ASTERISK HOOK - BEGIN
        # First revert the RURI to get the original user in RURI
        # Then add the VM recording prefix to the RURI
        # forward to the call to Asterisk (replace below with real IP and port)
        load_balance("1", "vm");
        prefix("*");
        rewritehostport("default");
        route(11);

        # ASTERISK HOOK - END
        exit;
    }
}


failure_route[3] {
    #    sip_trace();
    if (isbflagset(0) || isflagset(5)) {
        unforce_rtp_proxy();
    }
}

----------------------------------------------------------------------------------------------------------------------------------------------------

magnus...@gmail.com

unread,
Mar 23, 2012, 4:37:38 PM3/23/12
to Lista de usuarios de SIP Router
capture una llamada para que vean, el porque no sale audio en una punta

Ip: opensips 65.254.63.212
IP rtpproxy: 187.49.226.42:7890

Softphone detras de NAT username 200
 ip local 192.168.1.10
 ip externo 169.254.2.2

Softphone detras de NAT username 100
 ip local 10.0.0.6
 ip externo 186.108.158.77




interface: any
filter: (ip) and ( port 5060 )
#

U +0.654116 186.153.73.221:4086 -> 65.254.63.212:5060
INVITE sip:2...@65.254.63.212 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.6:4086;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 327
 
v=0
o=- 4 2 IN IP4 10.0.0.6
s=<CounterPath eyeBeam 1.5>
c=IN IP4 10.0.0.6
t=0 0
m=audio 39678 RTP/AVP 0 101
a=alt:1 2 : AqEpbj55 sCuGvu60 10.0.0.6 39678
a=alt:2 1 : z5YK8q2Q UysIvUR8 192.168.56.1 39678
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:214E56659FFD4AE682FB1889CBB31873

#
U +0.354213 65.254.63.212:5060 -> 186.153.73.221:4086
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
To: "200"<sip:2...@65.254.63.212>
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Server: OpenSIPS (1.7.1-notls (i386/linux))
Content-Length: 0
 

#
U +0.000078 65.254.63.212:5060 -> 186.108.158.77:5060
INVITE sip:2...@186.108.158.77 SIP/2.0
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.0
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Max-Forwards: 68
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 375
 
v=0
o=- 4 2 IN IP4 187.49.226.42
s=<CounterPath eyeBeam 1.5>
c=IN IP4 187.49.226.42
t=0 0
m=audio 63104 RTP/AVP 0 101
a=alt:1 2 : AqEpbj55 sCuGvu60 10.0.0.6 39678
a=alt:2 1 : z5YK8q2Q UysIvUR8 192.168.56.1 39678
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:214E56659FFD4AE682FB1889CBB31873
a=direction:active
a=nortpproxy:yes

#
U +0.424255 186.108.158.77:5060 -> 65.254.63.212:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.0
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77>
user-agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.147201 65.254.63.212:5060 -> 186.108.158.77:5060
INVITE sip:2...@186.108.158.77 SIP/2.0
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.0
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Max-Forwards: 68
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 375
 
v=0
o=- 4 2 IN IP4 187.49.226.42
s=<CounterPath eyeBeam 1.5>
c=IN IP4 187.49.226.42
t=0 0
m=audio 63104 RTP/AVP 0 101
a=alt:1 2 : AqEpbj55 sCuGvu60 10.0.0.6 39678
a=alt:2 1 : z5YK8q2Q UysIvUR8 192.168.56.1 39678
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:214E56659FFD4AE682FB1889CBB31873
a=direction:active
a=nortpproxy:yes

#
U +0.009869 65.254.63.212:5060 -> 186.153.73.221:4086
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77;nat=yes>
user-agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.205136 186.108.158.77:5060 -> 65.254.63.212:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.0
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77>
user-agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.008972 127.0.0.1:5006 -> 186.108.158.77:5060
   
#
U +0.139050 65.254.63.212:5060 -> 186.153.73.221:4086
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77;nat=yes>
user-agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.572475 186.108.158.77:5060 -> 65.254.63.212:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.0
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77>
user-agent: eyeBeam release 1003d stamp 30403
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length:   341
 
v=0
o=- 6 2 IN IP4 186.108.158.77
s=<CounterPath eyeBeam 1.5>
c=IN IP4 186.108.158.77
t=0 0
m=audio 7070 RTP/AVP 0 101
a=alt:1 2 : Yj+jJSnW IqMcmuRC 169.254.2.2 19918
a=alt:2 1 : kEm0KOWl K+u3YqEZ 192.168.1.10 19918
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:39DF10E70314440CB461F9D522BBFE91

#
U +0.444857 65.254.63.212:5060 -> 186.153.73.221:4086
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77;nat=yes>
user-agent: eyeBeam release 1003d stamp 30403
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length:   341
 
v=0
o=- 6 2 IN IP4 186.108.158.77
s=<CounterPath eyeBeam 1.5>
c=IN IP4 186.108.158.77
t=0 0
m=audio 7070 RTP/AVP 0 101
a=alt:1 2 : Yj+jJSnW IqMcmuRC 169.254.2.2 19918
a=alt:2 1 : kEm0KOWl K+u3YqEZ 192.168.1.10 19918
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:39DF10E70314440CB461F9D522BBFE91

#
U +0.159370 186.108.158.77:5060 -> 65.254.63.212:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.0
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77>
user-agent: eyeBeam release 1003d stamp 30403
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length:   341
 
v=0
o=- 6 2 IN IP4 186.108.158.77
s=<CounterPath eyeBeam 1.5>
c=IN IP4 186.108.158.77
t=0 0
m=audio 7070 RTP/AVP 0 101
a=alt:1 2 : Yj+jJSnW IqMcmuRC 169.254.2.2 19918
a=alt:2 1 : kEm0KOWl K+u3YqEZ 192.168.1.10 19918
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:39DF10E70314440CB461F9D522BBFE91

#
U +0.148913 65.254.63.212:5060 -> 186.153.73.221:4086
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-8e5e4c4855533978-1--d87543-;rport=4086
Record-Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
From: <sip:1...@65.254.63.212>;tag=13131a74
To: "200" <sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 INVITE
Contact: <sip:2...@186.108.158.77;nat=yes>
user-agent: eyeBeam release 1003d stamp 30403
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length:   341
 
v=0
o=- 6 2 IN IP4 186.108.158.77
s=<CounterPath eyeBeam 1.5>
c=IN IP4 186.108.158.77
t=0 0
m=audio 7070 RTP/AVP 0 101
a=alt:1 2 : Yj+jJSnW IqMcmuRC 169.254.2.2 19918
a=alt:2 1 : kEm0KOWl K+u3YqEZ 192.168.1.10 19918
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=x-rtp-session-id:39DF10E70314440CB461F9D522BBFE91

#
U +0.215380 186.153.73.221:4086 -> 65.254.63.212:5060
ACK sip:2...@186.108.158.77;nat=yes SIP/2.0
Via: SIP/2.0/UDP 10.0.0.6:4086;branch=z9hG4bK-d87543-e92bbe58f7272f47-1--d87543-;rport
Max-Forwards: 70
Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>;tag=8817fc27
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 ACK
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.111030 186.153.73.221:4086 -> 65.254.63.212:5060
ACK sip:2...@186.108.158.77;nat=yes SIP/2.0
Via: SIP/2.0/UDP 10.0.0.6:4086;branch=z9hG4bK-d87543-e92bbe58f7272f47-1--d87543-;rport
Max-Forwards: 70
Route: <sip:65.254.63.212;lr;ftag=13131a74;did=219.967f6f63>
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>;tag=8817fc27
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 ACK
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.148825 65.254.63.212:5060 -> 186.108.158.77:5060
ACK sip:2...@186.108.158.77;nat=yes SIP/2.0
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.2
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-e92bbe58f7272f47-1--d87543-;rport=4086
Max-Forwards: 68
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>;tag=8817fc27
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 ACK
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.191076 65.254.63.212:5060 -> 186.108.158.77:5060
ACK sip:2...@186.108.158.77;nat=yes SIP/2.0
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bKb499.504607e1.2
Via: SIP/2.0/UDP 10.0.0.6:4086;received=186.153.73.221;branch=z9hG4bK-d87543-e92bbe58f7272f47-1--d87543-;rport=4086
Max-Forwards: 68
Contact: <sip:1...@186.153.73.221:4086>
To: "200"<sip:2...@65.254.63.212>;tag=8817fc27
From: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 1 ACK
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.624489 186.108.158.77:5060 -> 65.254.63.212:5060
BYE sip:1...@186.153.73.221:4086 SIP/2.0
Via: SIP/2.0/UDP 186.108.158.77:5060;branch=z9hG4bKbbfa4883a9462c099af2c311ba98a2dc
Via: SIP/2.0/UDP 192.168.1.10:6896;branch=z9hG4bK-d87543-496b7c27a978a805-1--d87543-;rport
From: "200" <sip:2...@65.254.63.212>;tag=8817fc27
To: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 2 BYE
Contact: <sip:2...@186.108.158.77>
max-forwards: 69
user-agent: eyeBeam release 1003d stamp 30403
reason: SIP;description="User Hung Up"
Content-Length: 0
 

#
U +0.000198 65.254.63.212:5060 -> 186.153.73.221:4086
BYE sip:1...@186.153.73.221:4086 SIP/2.0
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bK8499.c2039a56.0
Via: SIP/2.0/UDP 186.108.158.77:5060;branch=z9hG4bKbbfa4883a9462c099af2c311ba98a2dc
Via: SIP/2.0/UDP 192.168.1.10:6896;branch=z9hG4bK-d87543-496b7c27a978a805-1--d87543-;rport
From: "200" <sip:2...@65.254.63.212>;tag=8817fc27
To: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 2 BYE
Contact: <sip:2...@186.108.158.77>
max-forwards: 67
user-agent: eyeBeam release 1003d stamp 30403
reason: SIP;description="User Hung Up"
Content-Length: 0
 

#
U +0.304045 186.153.73.221:4086 -> 65.254.63.212:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 65.254.63.212;branch=z9hG4bK8499.c2039a56.0
Via: SIP/2.0/UDP 186.108.158.77:5060;branch=z9hG4bKbbfa4883a9462c099af2c311ba98a2dc
Via: SIP/2.0/UDP 192.168.1.10:6896;branch=z9hG4bK-d87543-496b7c27a978a805-1--d87543-;rport
Contact: <sip:1...@186.153.73.221:4086>
To: <sip:1...@65.254.63.212>;tag=13131a74
From: "200"<sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 2 BYE
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.000076 65.254.63.212:5060 -> 186.108.158.77:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 186.108.158.77:5060;branch=z9hG4bKbbfa4883a9462c099af2c311ba98a2dc
Via: SIP/2.0/UDP 192.168.1.10:6896;branch=z9hG4bK-d87543-496b7c27a978a805-1--d87543-;rport
Contact: <sip:1...@186.153.73.221:4086>
To: <sip:1...@65.254.63.212>;tag=13131a74
From: "200"<sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 2 BYE
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 

#
U +0.190587 186.108.158.77:5060 -> 65.254.63.212:5060
BYE sip:1...@186.153.73.221:4086 SIP/2.0
Via: SIP/2.0/UDP 186.108.158.77:5060;branch=z9hG4bKbbfa4883a9462c099af2c311ba98a2dc
Via: SIP/2.0/UDP 192.168.1.10:6896;branch=z9hG4bK-d87543-496b7c27a978a805-1--d87543-;rport
From: "200" <sip:2...@65.254.63.212>;tag=8817fc27
To: <sip:1...@65.254.63.212>;tag=13131a74
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 2 BYE
Contact: <sip:2...@186.108.158.77>
max-forwards: 69
user-agent: eyeBeam release 1003d stamp 30403
reason: SIP;description="User Hung Up"
Content-Length: 0
 

#
U +0.000081 65.254.63.212:5060 -> 186.108.158.77:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 186.108.158.77:5060;branch=z9hG4bKbbfa4883a9462c099af2c311ba98a2dc
Via: SIP/2.0/UDP 192.168.1.10:6896;branch=z9hG4bK-d87543-496b7c27a978a805-1--d87543-;rport
Contact: <sip:1...@186.153.73.221:4086>
To: <sip:1...@65.254.63.212>;tag=13131a74
From: "200"<sip:2...@65.254.63.212>;tag=8817fc27
Call-ID: 5a3a41680c6e5457YTg1Mzc4Y2NiOTJiNjcyMTVjMjJiMDM2MGY3NmRhMWY.
CSeq: 2 BYE
User-Agent: eyeBeam release 1003d stamp 30403
Content-Length: 0
 


magnus...@gmail.com

unread,
Mar 26, 2012, 1:23:50 PM3/26/12
to Lista de usuarios de SIP Router
Por fin, pude hacer andar las llamadas entre usuarios usando rtpproxy y nathelper

Pero falta ahora la question de DID.

Recibo los DID en el servidor Asterisk 190.61.200.40 y lo reenvio para el opensips 65.254.63.412

[did]
exten=_X.,1,dial(SIP/${EXTEN}@65.254.63.412)
exten=_X.,n,Hangup()


SIP.CONF

[didww]
type=friend
host=189.32.8.235
context=did
allow=g729
canreinvite = no


Cuando llamo al DID, la llamada se queda sin audio, en los dos lados


magnus...@gmail.com

unread,
Mar 26, 2012, 5:06:37 PM3/26/12
to Lista de usuarios de SIP Router
Ahora estoy tratando de activar el rtprpxy para las llamadas enviadas a load_balancer para asterisk
esta pasando algo raro, la llamada conecta y el audio anda perfecto hasta 3 segundos, y despues para el audio

que puede ser?



saludos



Iñaki Baz Castillo wrote:
Reply all
Reply to author
Forward
0 new messages