[Kamailio-Users] [kamailio-users] Kamailio - Polycom Sound Point

Ramu contactramu at gmail.com
Thu Jan 7 06:32:04 CET 2010


Hi,

Your configuration looks fine.

Can you try with 2 X-Lite phones on different machines just to narrow down
the problem?

On Wed, Jan 6, 2010 at 4:29 PM, Chandrakant Solanki <
solanki.chandrakant at gmail.com> wrote:

> Hi
>
> Thanks for reply
>
> Here is kamailio.cfg file
>
> ================================================================================================
> listen = 192.168.94.30
> port = 5060
> mpath = "/lib/kamailio/modules"
> debug = 9
> fork = yes
> disable_tcp = no
> log_facility = LOG_LOCAL0
> log_stderror = no
> dns = no
> rev_dns = no
>
> loadmodule "usrloc.so"
> modparam("usrloc", "user_column", "username")
> modparam("usrloc", "domain_column", "domain")
> modparam("usrloc", "contact_column", "contact")
> modparam("usrloc", "expires_column", "expires")
> modparam("usrloc", "q_column", "q")
> modparam("usrloc", "callid_column", "callid")
> modparam("usrloc", "cseq_column", "cseq")
> modparam("usrloc", "methods_column", "methods")
> modparam("usrloc", "flags_column", "flags")
> modparam("usrloc", "user_agent_column", "user_agent")
> modparam("usrloc", "received_column", "received")
> modparam("usrloc", "socket_column", "socket")
> modparam("usrloc", "use_domain", 0)
> modparam("usrloc", "desc_time_order", 0)
> modparam("usrloc", "timer_interval", 60)
> modparam("usrloc", "db_url", "mysql://
> database:database at 192.168.90.12/openser")
> modparam("usrloc", "db_mode", 1)
> modparam("usrloc", "matching_mode", 0)
> modparam("usrloc", "cseq_delay", 20)
> modparam("usrloc", "nat_bflag", 6)
>
> loadmodule "pv.so"
>
> loadmodule "registrar.so"
> modparam("registrar", "default_expires", 3600)
> modparam("registrar", "min_expires", 60)
> modparam("registrar", "max_expires", 0)
> modparam("registrar", "default_q", 0)
> modparam("registrar", "append_branches", 1)
> modparam("registrar", "case_sensitive", 0)
> modparam("registrar", "received_param", "received")
> modparam("registrar", "max_contacts", 100)
> modparam("registrar", "retry_after", 0)
> modparam("registrar", "method_filtering", 0)
> modparam("registrar", "path_mode", 2)
> modparam("registrar", "path_use_received", 0)
> modparam("registrar", "received_avp", "$avp(i:801)")
>
> loadmodule "rr.so"
> modparam("rr", "enable_full_lr", 0)
> modparam("rr", "append_fromtag", 1)
> modparam("rr", "enable_double_rr", 1)
> modparam("rr", "add_username", 0)
>
> loadmodule "tm.so"
> modparam("tm", "fr_timer", 3)
> modparam("tm", "fr_inv_timer", 35)
> modparam("tm", "wt_timer", 5)
> modparam("tm", "delete_timer", 2)
> modparam("tm", "ruri_matching", 1)
> modparam("tm", "via1_matching", 1)
> modparam("tm", "unix_tx_timeout", 2)
> modparam("tm", "restart_fr_on_each_reply", 1)
> modparam("tm", "pass_provisional_replies", 0)
> modparam("tm", "fr_inv_timer_avp", "$avp(s:callee_fr_inv_timer)")
>
> loadmodule "xlog.so"
> modparam("xlog", "buf_size", 4096)
> modparam("xlog", "force_color", 0)
>
> loadmodule "mi_fifo.so"
> modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
>
> loadmodule "domain.so"
> modparam("domain", "db_url", "mysql://
> database:database at 192.168.90.12/openser")
> modparam("domain", "db_mode", 1)
> modparam("domain", "domain_table", "domain")
> modparam("domain", "domain_col", "domain")
>
> loadmodule "nathelper.so"
> modparam("nathelper", "natping_interval", 60)
> modparam("nathelper", "ping_nated_only", 1)
> modparam("nathelper", "sipping_method", "OPTIONS")
> modparam("nathelper", "received_avp", "$avp(i:801)")
>
> loadmodule "textops.so"
>
> loadmodule "sl.so"
> modparam("sl", "enable_stats", 1)
>
> loadmodule "maxfwd.so"
> modparam("maxfwd", "max_limit", 256)
>
> loadmodule "db_mysql.so"
> modparam("db_mysql", "ping_interval", 300)
> modparam("db_mysql", "auto_reconnect", 1)
>
> loadmodule "auth.so"
> modparam("auth", "nonce_expire", 300)
> modparam("auth", "rpid_suffix",
> ";party=calling;id-type=subscriber;screen=yes")
> modparam("auth", "rpid_avp", "$avp(s:rpid)")
>
> loadmodule "auth_db.so"
> modparam("auth_db", "db_url", "mysql://
> database:database at 192.168.90.12/openser")
> modparam("auth_db", "user_column", "username")
> modparam("auth_db", "domain_column", "domain")
> modparam("auth_db", "password_column", "password")
> modparam("auth_db", "password_column_2", "ha1b")
> modparam("auth_db", "calculate_ha1", 1)
> modparam("auth_db", "use_domain", 1)
> modparam("auth_db", "load_credentials", "$avp(s:caller_uuid)=uuid")
>
> loadmodule "uri_db.so"
> modparam("uri_db", "db_url", "mysql://
> database:database at 192.168.90.12/openser")
>
> loadmodule "avpops.so"
> modparam("avpops", "db_url", "mysql://
> database:database at 192.168.90.12/openser")
> modparam("avpops", "avp_table", "usr_preferences")
> modparam("avpops", "use_domain", 1)
> modparam("avpops", "uuid_column", "uuid")
> modparam("avpops", "username_column", "username")
> modparam("avpops", "domain_column", "domain")
> modparam("avpops", "attribute_column", "attribute")
> modparam("avpops", "value_column", "value")
> modparam("avpops", "type_column", "type")
>
> loadmodule "lcr.so"
> modparam("lcr", "db_url", "mysql://database:database@192.168.90.12/openser
> ")
> modparam("lcr", "gw_table", "gw")
> modparam("lcr", "gw_name_column", "gw_name")
> modparam("lcr", "ip_addr_column", "ip_addr")
> modparam("lcr", "port_column", "port")
> modparam("lcr", "uri_scheme_column", "uri_scheme")
> modparam("lcr", "transport_column", "transport")
> modparam("lcr", "grp_id_column", "grp_id")
> modparam("lcr", "lcr_table", "lcr")
> modparam("lcr", "strip_column", "strip")
> modparam("lcr", "prefix_column", "prefix")
> modparam("lcr", "from_uri_column", "from_uri")
> modparam("lcr", "priority_column", "priority")
> modparam("lcr", "flags_avp", "$avp(i:712)")
> modparam("lcr", "gw_uri_avp", "$avp(i:1400)")
> modparam("lcr", "ruri_user_avp", "$avp(i:1402)")
> modparam("lcr", "fr_inv_timer_avp", "$avp(s:fr_inv_timer_avp)")
> modparam("lcr", "fr_inv_timer", 90)
> modparam("lcr", "fr_inv_timer_next", 30)
> modparam("lcr", "rpid_avp", "$avp(s:rpid)")
>
> loadmodule "alias_db.so"
> modparam("alias_db", "db_url", "mysql://
> database:database at 192.168.90.12/openser")
> modparam("alias_db", "user_column", "username")
> modparam("alias_db", "domain_column", "domain")
> modparam("alias_db", "alias_user_column", "alias_username")
> modparam("alias_db", "alias_domain_column", "alias_domain")
> modparam("alias_db", "use_domain", 0)
>
> loadmodule "uac.so"
> modparam("uac", "rr_store_param", "vsf")
> modparam("uac", "from_restore_mode", "auto")
> modparam("uac", "from_passwd", "s1p:Wiz4rd!")
>
> loadmodule "acc.so"
> modparam("acc", "db_url", "mysql://database:database@192.168.90.12/openser
> ")
> modparam("acc", "db_flag", 1)
> modparam("acc", "db_missed_flag", 2)
> modparam("acc", "log_flag", 1)
> modparam("acc", "log_missed_flag", 2)
> modparam("acc", "log_extra",
> "src_user=$fU;src_domain=$fd;dst_user=$rU;dst_domain=$rd")
> modparam("acc", "db_extra",
> "src_user=$fU;src_domain=$fd;dst_user=$rU;dst_domain=$rd")
>
> loadmodule "mi_datagram.so"
> modparam("mi_datagram", "socket_name", "udp:127.0.0.1:8080" )
> modparam("mi_datagram", "children_count", 3 )
> modparam("mi_datagram", "unix_socket_mode", 0600 )
> modparam("mi_datagram", "unix_socket_group", "root" )
> modparam("mi_datagram", "unix_socket_user", "root" )
> modparam("mi_datagram", "socket_timeout", 2000 )
>
> loadmodule "mediaproxy.so"
> modparam("mediaproxy", "mediaproxy_socket",
> "/var/run/mediaproxy/dispatcher.sock")
> modparam("mediaproxy", "mediaproxy_timeout", 500)
> modparam("mediaproxy", "signaling_ip_avp", "$avp(s:nat_ip)")
> modparam("mediaproxy", "media_relay_avp", "$avp(s:media_relay)")
>
> loadmodule "nat_traversal.so"
> modparam("nat_traversal", "keepalive_interval", 90)
> modparam("nat_traversal", "keepalive_method", "OPTIONS")
> modparam("nat_traversal", "keepalive_from", "sip:keepalive at mydomain.com<sip%3Akeepalive at mydomain.com>
> ")
>
> route[0]
> {
>         xlog("L_DBG", "New Request - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>         force_rport();
>
>         if(msg:len > max_len)
>         {
>                 xlog("L_DBG", "Message too big - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>                 sl_send_reply("513", "Message Too Big");
>                 exit;
>         }
>         if (!mf_process_maxfwd_header("10"))
>         {
>                 xlog("L_DBG", "Too many hops - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>                 sl_send_reply("483", "Too Many Hops");
>                 exit;
>         }
>         if(!is_method("REGISTER"))
>         {
>                 if(nat_uac_test("19"))
>                 {
>                         record_route(";nat=yes");
>                 }
>                 else
>                 {
>                         record_route();
>                 }
>         }
>         if (is_method("SUBSCRIBE")) {
>                 # challenge/response
>                 if (!www_authorize("", "subscriber")) {
>                         www_challenge("", "0");
>                         exit;
>                 }
>                 exit;
>         }
>
>         if(is_method("CANCEL") || is_method("BYE"))
>         {
>                 end_media_session();
>         }
>         if(loose_route())
>         {
>                 if(nat_uac_test("19") || search("^Route:.*;nat=yes"))
>                 {
>                         fix_nated_contact();
>                         setbflag(6);
>                 }
>                 route(8);
>         }
>         if(is_method("REGISTER"))
>         {
>                 route(7);
>         }
>         if(is_method("INVITE"))
>         {
>                 use_media_proxy();
>                 route(9);
>         }
>         if(is_method("CANCEL") || is_method("ACK"))
>         {
>                 route(13);
>         }
>         route(14);
> }
>
> ########################################################################
> # Request route 'clear-usr-preferences-caller'
> ########################################################################
> route[1]
> {
>         xlog("L_DBG", "Clear caller preferences - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>         avp_delete("$avp(s:caller_cli)/g");
>         avp_delete("$avp(s:clir)/g");
> }
>
> ########################################################################
> # Request route 'clear-usr-preferences-callee'
> ########################################################################
> route[2]
> {
>         xlog("L_DBG", "Clear callee preferences - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>         avp_delete("$avp(s:callee_fr_inv_timer)/g");
>         avp_delete("$avp(s:cfu)/g");
>         avp_delete("$avp(s:cfc)/g");
> }
>
> ########################################################################
> # Request route 'usr-preferences-caller'
> ########################################################################
> route[3]
> {
>         route(1);
>         xlog("L_DBG", "Load caller preferences for uuid
> '$avp(s:caller_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>         # load caller avps
>         avp_db_load("$avp(s:caller_uuid)", "*");
>         avp_copy("$avp(s:cli)", "$avp(s:caller_cli)/d");
>         if(is_avp_set("$avp(s:clir)/n") && avp_check("$avp(s:clir)",
> "eq/i:1"))
>         {
>                 # mark for anonymization
>                 setflag(28);
>         }
> }
>
> ########################################################################
> # Request route 'usr-preferences-callee'
> ########################################################################
> route[4]
> {
>         xlog("L_DBG", "Load callee preferences for uuid
> '$avp(s:callee_uuid)' - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>         # load callee avps
>         avp_db_load("$avp(s:callee_uuid)", "*");
>         if(is_avp_set("$avp(s:cfu)/s"))
>         {
>                 xlog("L_DBG", "Call-forward-unconditional to '$avp(s:cfu)'
> found - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                 avp_delete("$avp(s:caller_uuid)/g");
>                 avp_copy("$avp(s:callee_uuid)", "$avp(s:caller_uuid)/d");
>                 avp_pushto("$ru", "$avp(s:cfu)");
>
>                 route(3);
>                 route(10);
>                 exit;
>         }
>         if(is_avp_set("$avp(s:ringtimeout)/n"))
>         {
>                 xlog("L_DBG", "Setting ring timeout to $avp(s:ringtimeout)
> secs - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                 avp_copy("$avp(s:ringtimeout)",
> "$avp(s:callee_fr_inv_timer)/d");
>         }
> }
>
> ########################################################################
> # Request route 'clir'
> ########################################################################
> route[5]
> {
>         if(isflagset(28) && !isflagset(27))
>         {
>                 setflag(27);
>
>                 xlog("L_DBG", "Anonymize caller - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>
> uac_replace_from("Anonymous","sip:anonymous at anonymous.invalid");
>                 if(is_present_hf("Privacy"))
>                 {
>                         remove_hf("Privacy");
>                 }
>                 append_hf("Privacy: id\r\n");
>         }
> }
>
> ########################################################################
> # Request route 'stop-rtp-proxy'
> ########################################################################
> route[6]
> {
>         if(isflagset(22))
>         {
>                 end_media_session();
>         }
> }
>
> ########################################################################
> # Request route 'base-route-register'
> ########################################################################
> route[7]
> {
>         sl_send_reply("100", "Trying");
>         if(!www_authorize("", "subscriber"))
>         {
>                 xlog("L_DBG", "Register authentication failed - M=$rm
> RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                 www_challenge("", "0");
>                 exit;
>         }
>         if(!check_to())
>         {
>
>                 xlog("L_DBG", "Spoofed To-URI detected - M=$rm RURI=$ru
> F=$fu T=$tu IP=$si ID=$ci\n");
>                 sl_send_reply("403", "Spoofed To-URI Detected");
>                 exit;
>         }
>         consume_credentials();
>         if(!search("^Contact:[ ]*\*") && nat_uac_test("19"))
>         {
>                 fix_nated_register();
>                 setbflag(6);
>         }
>
>         if(!save("location"))
>         {
>                 xlog("L_ERR", "Saving contact failed - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>                 sl_reply_error();
>                 exit;
>         }
>         xlog("L_DBG", "Registration successful - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>         exit;
> }
>
> ########################################################################
> # Request route 'base-outbound'
> ########################################################################
> route[8]
> {
>         if(is_present_hf("P-Asserted-Identity"))
>         {
>                 remove_hf("P-Asserted-Identity");
>         }
>         if(is_present_hf("Remote-Party-ID"))
>         {
>                 remove_hf("Remote-Party-ID");
>         }
>         if(is_avp_set("$avp(s:caller_cli)/s"))
>         {
>                 if(!isflagset(28))
>                 {
>                         xlog("L_DBG", "Set caller CLI '$avp(s:caller_cli)'
> - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                         append_hf("P-Asserted-Identity:
> <$avp(s:caller_cli)>\r\n");
>                 }
>         }
>
>         route(5);
>         if(isbflagset(6))
>         {
>                 if(!isflagset(22) && !search("^Content-Length:[ ]*0"))
>                 {
>                         setflag(22);
> #                       use_media_proxy();
>                 }
>                 t_on_reply("2");
>         }
>         else
>         {
>                 t_on_reply("1");
>         }
>         if(!isflagset(21))
>         {
>                 t_on_failure("2");
>         }
>         if(isflagset(29))
>         {
>                 append_branch();
>         }
>         if(is_present_hf("Proxy-Authorization"))
>         {
> #                consume_credentials();
>         }
>
>         xlog("L_DBG", "Request leaving server, D-URI='$du' - M=$rm RURI=$ru
> F=$fu T=$tu IP=$si ID=$ci\n");
>         # no 100 (we already sent it) and no DNS blacklisting
>         if(!t_relay("0x05"))
>         {
>                 sl_reply_error();
>                 if(is_method("INVITE") && isbflagset(6))
>                 {
>                         end_media_session();
>                 }
>         }
>         exit;
> }
>
> ########################################################################
> # Request route 'base-route-invite'
> ########################################################################
> route[9]
> {
>         sl_send_reply("100", "Trying");
>         if(from_gw())
>         {
>                 $avp(s:caller_uuid)="0";
>                 xlog("L_DBG", "Call from PSTN' - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>                 setflag(23);
>                 $avp(s:ringtimeout)=1000;
>
>                 route(3);
>                 if (nat_uac_test("3"))
>                 {
>                         xlog("L_DBG", "Inside NATed INVITE Processing\n");
>                         fix_nated_contact();
>
>                         fix_nated_sdp("3");
>
>                         t_on_reply("1");
>                 }
>                 else
>                 {
>                         t_on_reply("1");
>                 }
>
>                 if(nat_uac_test("19"))
>                 {
>                         setbflag(6);
>                 }
>
>                 route(51);
>         }
>         else
>         {
>                 if(!proxy_authorize("", "subscriber"))
>                 {
>                         xlog("L_DBG", "Proxy authentication failed - M=$rm
> RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                         proxy_challenge("", "0");
>                         exit;
>                 }
>                 if(!check_from())
>                 {
>                         xlog("L_DBG", "Spoofed From-URI detected - M=$rm
> RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                         sl_send_reply("403", "Spoofed From-URI Detected");
>                         exit;
>                 }
>
>                 route(3);
>                 if(nat_uac_test("19"))
>                 {
>                         fix_nated_contact();
>                         setbflag(6);
>                 }
>                 route(10);
>         }
> }
>
> ########################################################################
> # Request route 'invite-find-callee'
> ########################################################################
> route[10]
> {
>         if(alias_db_lookup("dbaliases"))
>         {
>                 xlog("L_DBG", "Callee was aliased - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>         }
>
>         route(2);
>         if(!is_domain_local("$rd"))
>         {
>                 setflag(20);
>                 $avp(s:callee_uuid) = "0";
>                 route(12);
>         }
>         avp_delete("$avp(s:callee_uuid)");
>         avp_db_query("select uuid from subscriber where username = '$rU'",
> "$avp(s:callee_uuid)");
>         if(is_avp_set("$avp(s:callee_uuid)/s"))
>         {
>                 xlog("L_DBG", "Callee is local, uuid='$avp(s:callee_uuid)'
> - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                 route(11);
>         }
>         else
>         {
>                 $avp(s:callee_uuid) = "0";
>                 xlog("L_DBG", "Callee is not local - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
> #
> #               *86 - sending user direct to access voicemail from sip
> client
> #
>                 if($rU=="*86")
>                 {
>                         route(12);
>                 }
>                 else
>                 {
>                         if($(rU{s.len})<=7)
>                         {
>                                 route(11);
>                         }
>                         else
>                         {
>                                 route(12);
>                         }
>                 }
>         }
>         exit;
> }
>
> ########################################################################
> # Request route 'invite-to-internal'
> ########################################################################
>
> route[11]
> {
>         route(4);
>
>
>         revert_uri();
>         seturi("sip:*89 at openser.org");
>
>         rewritehostport("voicemailserver.databasepbx.com:5060");
>         route(8);
>         exit;
> }
>
> ########################################################################
> # TEST ROUTE 51
> ########################################################################
> route[51]
> {
>         if(alias_db_lookup("dbaliases"))
>         {
>                 xlog("L_DBG", "Callee was aliased - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>         }
>
>         route(2);
>         if(!is_domain_local("$rd"))
>         {
>                 setflag(20);
>                 $avp(s:callee_uuid) = "0";
>                 route(12);
>         }
>         avp_delete("$avp(s:callee_uuid)");
>         avp_db_query("select uuid from subscriber where username = '$rU'",
> "$avp(s:callee_uuid)");
>         if(is_avp_set("$avp(s:callee_uuid)/s"))
>         {
>                 xlog("L_DBG", "Callee is local, uuid='$avp(s:callee_uuid)'
> - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                 route(52);
>         }
>         else
>         {
>                 $avp(s:callee_uuid) = "0";
>                 xlog("L_DBG", "Callee is not local - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>                 route(12);
>         }
>         exit;
> }
>
> ########################################################################
> #TEST 52
> ########################################################################
> route[52]
> {
>         route(4);
>         if(!lookup("location"))
>         {
>                 xlog("L_DBG", "Local user offline - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>                 sl_send_reply("404", "User Offline");
>         }
>         else
>         {
>                 xlog("L_DBG", "Local user online - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>                 avp_delete("$avp(s:callee_srcip)");
>                 avp_db_query("select received from location where username
> = '$rU'", "$avp(s:callee_srcip)");
>                 avp_printf("$avp(i:13)", "$(du{s.select,1,:})" );
>                 avp_printf("$avp(i:14)",
> "$(avp(s:callee_srcip){s.select,1,:})" );
>                 xlog("L_DBG", "source IP [$avp(i:13)] destination IP
> [$avp(i:14)]\n");
>                 if (avp_check("$avp(i:13)","eq/$avp(i:14)/i"))
>                 {
>                         xlog("L_INFO", "Detected Two Clients Behind the
> Same NAT - Disabling Mediaproxy");
>                         # Do not use mediaproxy as the clients seem to be
> behind the same NAT
>                         xlog("L_DBG", "source IP  is the same as
> destination IP \n");
>                         resetflag(2);
>                         resetflag(3);
>                 }
>                 avp_delete("$avp(i:13)/g");
>                 avp_delete("$avp(i:14)/g");
>                 route(8);
>         }
>         exit;
> }
>
> ########################################################################
> # Request route 'invite-to-external'
> ########################################################################
> route[12]
> {
>         if(isflagset(20))
>         {
>                 xlog("L_DBG", "Call to foreign domain - M=$rm RURI=$ru
> F=$fu T=$tu IP=$si ID=$ci\n");
>                 route(8);
>                 exit;
>         }
>         if(!isflagset(23))
>         {
>                 if(uri =~ "^sip:\*86 at .*")
>                 {
>                         xlog("L_DBG", "User accessing Voicemail - M=$rm
> RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                         rewritehostport("
> voicemailserver.databasepbx.com:5060");
>                         route(8);
>                 }
>                 # don't allow calls relaying from PSTN to PSTN, if not
> explicitely forwarded
>                 else if(uri =~ "^sip:[0-9]+@")
>                 {
>                         # only route numeric users to PSTN
>                         if(!load_gws())
>                         {
>                                 xlog("L_ERR", "Error loading PSTN gateways
> - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                                 sl_send_reply("503", "PSTN Termination
> Currently Unavailable");
>                                 exit;
>                         }
>                         if(!next_gw())
>                         {
>                                 xlog("L_ERR", "No PSTN gateways available -
> M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                                 sl_send_reply("503", "PSTN Termination
> Currently Unavailable");
>                                 exit;
>                         }
>                         setflag(21);
>                         t_on_failure("1");
>                         route(8);
>                 }
>         }
>
>         xlog("L_DBG", "Call to unknown user - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>         sl_send_reply("404", "User Not Found");
>         exit;
> }
>
> ########################################################################
> # Request route 'base-route-local'
> ########################################################################
> route[13]
> {
>         t_on_reply("1");
>         if(t_check_trans())
>         {
>                 xlog("L_DBG", "Request leaving server - M=$rm RURI=$ru
> F=$fu T=$tu IP=$si ID=$ci\n");
>         }
>         else
>         {
>                 xlog("L_DBG", "Dropping mis-routed request - M=$rm RURI=$ru
> F=$fu T=$tu IP=$si ID=$ci\n");
>                 exit;
>         }
>         if(!t_relay())
>         {
>                 sl_reply_error();
>         }
>         exit;
> }
>
>
> ########################################################################
> # Request route 'base-route-generic'
> ########################################################################
> route[14]
> {
>         xlog("L_DBG", "Method not supported - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>         sl_send_reply("501", "Method Not Supported Here");
>         exit;
> }
>
> ########################################################################
> # Request route 'base-filter-failover'
> ########################################################################
> route[15]
> {
>         if(!t_check_status("408|500|503"))
>         {
>                 xlog("L_DBG", "No failover routing needed for this response
> code - M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                 route(6);
>                 exit;
>         }
> }
>
>
> ########################################################################
> #Send the call out
> ########################################################################
>
> route[16]
> {
>         #send the call outward
>         if(method=="INVITE" && !isflagset(10))
>         {
>                 t_on_failure("2");
>         }
>
>         if (!t_relay())
>         {
>                 xlog("L_WARN", "ERROR: t_relay failed");
>                 sl_reply_error();
>         }
> }
>
> ########################################################################
> # Request route 'Voicemail and Asterisk for further processing'
> ########################################################################
> failure_route[3]
> {
>          if(!t_was_cancelled())
>          {
>                 revert_uri();
>                 rewritehostport("voicemailserver.databasepbx.com:5060");
>                 append_branch();
>                 #PREVENT SOME CRAZY VOICEMAIL LOOP
>                 xlog("L_DBG", "No Answer Sending the call to Voicemail  -
> M=$rm RURI=$ru F=$fu T=$tu IP=$si
> ID=$ci\n");
>                 setflag(10);
>                 route(8);
>         }
> }
>
> ########################################################################
> # Reply route 'base-standard-reply'
> ########################################################################
> onreply_route[1]
> {
>         xlog("L_DBG", "Reply - S=$rs D=$rr F=$fu T=$tu IP=$si ID=$ci\n");
>         if (nat_uac_test("1"))
>         {
>                 fix_nated_contact();
>         }
>         exit;
> }
>
> ########################################################################
> # Reply route 'base-nat-reply'
> ########################################################################
> onreply_route[2]
> {
>         xlog("L_DBG", "NAT-Reply - S=$rs D=$rr F=$fu T=$tu IP=$si
> ID=$ci\n");
>         if(nat_uac_test("1"))
>         {
>                 fix_nated_contact();
>                 xlog("L_DBG", "NAT-Reply==[Fix_nated_contact] - S=$rs D=$rr
> F=$fu T=$tu IP=$si ID=$ci\n");
>         }
>
>         if(isbflagset(6) && status=~"(180)|(183)|2[0-9][0-9]")
>         {
>                 if(!search("^Content-Length:[ ]*0"))
>                 {
>                         use_media_proxy();
>                         xlog("L_DBG", "NAT-Reply==[Force Rtp proxy] - S=$rs
> D=$rr F=$fu T=$tu IP=$si ID=$ci\n");
>                 }
>         }
>         exit;
> }
>
> ########################################################################
> # Failure route 'pstn-failover'
> ########################################################################
> failure_route[1]
> {
>         xlog("L_DBG", "Failure route for PSTN entered - M=$rm RURI=$ru
> F=$fu T=$tu IP=$si ID=$ci\n");
>         route(15);
>         if(!next_gw())
>         {
>                 xlog("L_ERR", "Failed to select next PSTN gateway - M=$rm
> RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                 route(6);
>                 exit;
>         }
>
>         t_on_failure("3");
>         route(8);
> }
>
> ########################################################################
> # Failure route 'base-standard-failure'
> ########################################################################
> failure_route[2]
> {
>         if(!t_was_cancelled())
>         {
>                 revert_uri();
>                 route(10);
>         }
>         if(t_check_status("422|481|487"))
>         {
>                 xlog("L_DBG", "Final reply - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>                 route(6);
>                 exit;
>         }
>
>         t_on_branch("1");
>         xlog("L_DBG", "Redirect from UAC intercepted - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>         route(10);
>         if($avp(s:cfc) != NULL)
>         {
>                 avp_pushto("$ru", "$avp(s:cfc)");
>                 setflag(29);
>                 append_branch();
>
>                 t_on_branch("1");
>                 xlog("L_DBG", "CFC detected - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>                 route(10);
>         }
>
>         route(15);
>         route(6);
> }
>
> ########################################################################
> # Branch route 'cfc-drop-local'
> ########################################################################
> branch_route[1]
> {
>         if(is_domain_local("$rd"))
>         {
>                 xlog("L_DBG", "Dropping local branch - M=$rm RURI=$ru F=$fu
> T=$tu IP=$si ID=$ci\n");
>                 drop();
>         }
> }
>
> ===============================================================================================
>
> MediaProxy's config.ini
>
> ;
> ; Configuration file for MediaProxy
> ;
>
> [Relay]
> relay_ip = 192.168.94.30
> dispatchers = 192.168.94.30
> port_range = 8000:20000
> log_level = DEBUG
> on_hold_timeout = 1800
> stream_timeout = 90
>
> [Dispatcher]
> socket = /var/run/mediaproxy/dispatcher.sock
> listen = 192.168.94.30
> listen_management = 192.168.94.30
> log_level = DEBUG
> management_use_tls = no
>
> [TLS]
> certs_path = tls
> verify_interval = 300
>
> [OpenSIPS]
> max_connections = 100
>
> Is there any problem in config file then please suggest me.  This
> configuration was running with other phone but not with *
> PolycomSoundPointIP-SPIP_600-UA/3.1.3.0439*.
>
>
> Thanks in advance
> --
> Regards,
>
> Chandrakant Solanki
>
> On Wed, Jan 6, 2010 at 3:38 PM, Ramu <contactramu at gmail.com> wrote:
>
>> Hi,
>>
>> You have to do NATing if the UAs are behind NAT when REGISTER and INVITE
>> packet comes to Kamailio.
>>
>> You have to call use_media_proxy() function for INVITE and 200 OK
>> messages.
>>
>> Please send your kamailio.cfg file to resolve the issues.
>>
>>
>> On Wed, Jan 6, 2010 at 11:12 AM, Chandrakant Solanki <
>> solanki.chandrakant at gmail.com> wrote:
>>
>>> Hello
>>>
>>> I have installed kamailio - 1.5.2 with MediaProxy.
>>>
>>> I registered 101 at domain.com and 102 at domain.com from *
>>> PolycomSoundPointIP-SPIP_600-UA/3.1.3.0439*.
>>>
>>> But when I look for location table into database, I show received field
>>> is NULL, while from other phone like X-Lite it shows some value in same
>>> field like sip:X.X.X.X:5061.
>>>
>>> When I call from 101 to 102 using *PolycomSoundPointIP *phone, The phone
>>> rings on the other extension but when I pick up no voice is heard, the
>>> caller phone keeps hearing the wait-for-other party.
>>>
>>> Is there any changes required into kamailio.cfg or not. ??
>>>
>>> Thanks in advance
>>>
>>> --
>>> Regards,
>>>
>>> Chandrakant Solanki
>>>
>>> _______________________________________________
>>> Kamailio (OpenSER) - Users mailing list
>>> Users at lists.kamailio.org
>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>> Thanks,
>> Ramu
>>
>
>


-- 
Ramu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20100107/617e1b85/attachment-0001.htm>


More information about the Users mailing list