Na configuração abaixo OpenSIPS não trata o tráfego de áudio/RTP, este é passado diretamente para o servidor Asterisk/A2Billing.
O código a seguir é o todo OpenSIPS.cfg, depois quero adicionar o artigo todo após testado completamente.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
route{ if (!mf_process_maxfwd_header("10") && $retcode==-1) { sl_send_reply("483","Too Many Hops"); exit; } if (has_totag()) { if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails } else if (is_method("INVITE")) { record_route(); } route(RELAY); } else { if ( is_method("ACK") ) { if ( t_check_trans() ) { t_relay(); exit; } else { exit; } } sl_send_reply("404","Not here"); } exit; } if (is_method("CANCEL")) { if (t_check_trans()) t_relay(); exit; } else if (!is_method("INVITE")) { send_reply("405","Method Not Allowed"); xlog("$rm FAILED: $si / $ct / $fu\n"); exit; } if ($rU==NULL) { sl_send_reply("484","Address Incomplete"); exit; } |