[Serusers] help on mediaproxy with ser no sound
Greger V. Teigre
greger at teigre.com
Mon Jun 20 08:46:45 CEST 2005
LAN-WAN deployments can sometimes by tricky. A full ngrep trace of a call
setup (INVITE++) will be of help to understand what is happening.
g-)
peiyin wrote:
> Hi all,
>
> I'm having trouble configuring mediaproxy to work on my SER server.
> One phone is behind NAT and the other is using a public ip. Both are
> registered in SER.
>
> Calls from phone A (nat) to phone B(public) are successful whereby
> phone B will rings.However, no sound comes out from both side, also,
> when i hang up phone B, phone A doesn't produce any engaged tone.
> Calls from phone B to phone A also successful but i don't get any
> audio on either end.
>
> I'm storing all information in database.
>
> My config is as below (taken from example and modified):
>
> route{
> if (!mf_process_maxfwd_header("10")) {
> if (method!="ACK") {
> sl_send_reply("483", "Too many hops");
> };
> break;
> };
>
> if (msg:len >= max_len) {
> if (method!="ACK") {
> sl_send_reply("513", "Message too big");
> };
> break;
> };
>
>
> if(method=="INVITE" || method=="BYE") {
> setflag(1); #accounting
> }
>
> if (method=="REGISTER") {
> if (is_from_local()) {
> # Mark as NAT'ed
> if (client_nat_test("3")) {
> setflag(6);
> force_rport();
> fix_contact();
> };
>
> if (!www_authorize("my_ser_ip", "subscriber")) {
> www_challenge("my_ser_ip", "0");
> break;
> } else if (!check_to()) {
> sl_send_reply("403", "Username!=To not allowed");
> break;
> };
>
> if (!save("location")) {
> sl_reply_error();
> };
> } else {
> sl_send_reply("403", "This domain is not served here");
> };
>
> break;
> };
>
> if (method=="INVITE") {
> if (!(is_from_local() || is_uri_host_local())) {
> sl_send_reply("403", "Relaying is forbidden");
> break;
> };
> t_on_failure("1");
> } else if (method == "BYE" || method == "CANCEL") {
> end_media_session();
> };
>
> if (loose_route()) {
> if (method=="INVITE" || method=="ACK") {
> use_media_proxy();
> };
> # end media session for BYE and CANCEL is done above
> # before entering the loose route. no need to call it here
> t_relay();
> break;
> };
>
> # Force subsequent messages to pass trough this proxy
> if (method == "INVITE") {
> record_route();
> };
>
> if (client_nat_test("3") && !search("^Record-Route:")) {
> # Mark as NAT'ed
> force_rport();
> fix_contact();
> };
>
> if (method=="INVITE") {
> t_on_reply("1");
> };
>
> if (is_uri_host_local()) {
> if (!lookup("location")) {
> sl_send_reply("404", "User not found");
> break;
> };
> };
>
> if (method=="INVITE" || method=="ACK") {
> use_media_proxy();
> };
>
> if (!t_relay()) {
> if (method=="INVITE" || method=="ACK") {
> end_media_session();
> };
> sl_reply_error();
> };
> }
>
> failure_route[1] {
> end_media_session();
> }
>
> onreply_route[1] {
> if (status=~"(183)|(2[0-9][0-9])") {
> if (client_nat_test("1")) {
> fix_contact();
> };
> use_media_proxy();
> };
> }
>
>
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
More information about the sr-users
mailing list