[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-users
Subject:    Re: [SR-Users] core parsing of SIP message failed
From:       Daniel-Constantin Mierla <miconda () gmail ! com>
Date:       2022-03-24 12:59:29
Message-ID: a57a967d-ae52-6d57-4961-6f7983fea380 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Looks like the data received on sip port is not a sip message. Use a
traffic sniffer (tcpdump, wireshark, ngrep) to see what comes over the
network.

Cheers,
Daniel

On 22.03.22 19:13, Seyyed Soroosh Hosseinalipour wrote:
>
> ITNOA
>
>
>       Description
>
> I try to connect Kamailio and Freeswitch together, and initiate call
> from Zoiper5 soft phone through Kamailio
>
> My Kamailio config is below
>
> |#!ifdef ACCDB_COMMENT|
> |  ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';|
> |  ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';|
> |  ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default '';|
> |  ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';|
> |  ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';|
> |  ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';|
> |  ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL
> DEFAULT '';|
> |  ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT
> NULL DEFAULT '';|
> |  ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL
> default '';|
> |  ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL
> DEFAULT '';|
> |  ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL
> DEFAULT '';|
> |  ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT
> NULL DEFAULT '';|
> |#!endif|
> | |
> |####### Include Local Config If Exists #########|
> |import_file "kamailio-local.cfg"|
> | |
> |####### Defined Values #########|
> | |
> |# *** Value defines - IDs used later in config|
> |#!ifdef WITH_DEBUG|
> |#!define DBGLEVEL 3|
> |#!else|
> |#!define DBGLEVEL 2|
> |#!endif|
> | |
> |#!ifdef WITH_MYSQL|
> |# - database URL - used to connect to database server by modules such|
> |#       as: auth_db, acc, usrloc, a.s.o.|
> |#!trydef DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"|
> |#!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 #########|
> | |
> |/* LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR, ... */|
> |debug=DBGLEVEL|
> | |
> |/* set to 'yes' to print log messages to terminal or use '-E' cli
> option */|
> |log_stderror=yes|
> | |
> |memdbg=5|
> |memlog=5|
> | |
> |log_facility=LOG_LOCAL0|
> |log_prefix="{$mt $hdr(CSeq) $ci} "|
> | |
> |/* number of SIP routing processes for each UDP socket|
> |* - value inherited by tcp_children and sctp_children when not set
> explicitely */|
> |children=8|
> | |
> |/* uncomment the next line to disable TCP (default on) */|
> |disable_tcp=yes|
> | |
> |/* number of SIP routing processes for all TCP/TLS sockets */|
> |# tcp_children=8|
> | |
> |/* 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 - it can be set many times */|
> |# alias="sip.mydomain.com"|
> | |
> |/* listen sockets - if none set, Kamailio binds to all local IP addresses|
> |* - basic prototype (full prototype can be found in Wiki - Core
> Cookbook):|
> |*      listen=[proto]:[localip]:[lport] advertise [publicip]:[pport]|
> |* - it can be set many times to add more sockets to listen to */|
> |listen=udp:172.28.72.99:5060 advertise 172.28.72.99:5060|
> |#listen=tcp:172.28.72.99:5060|
> | |
> |/* 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|
> | |
> |/* upper limit for TCP connections (it includes the TLS connections) */|
> |tcp_max_connections=2048|
> | |
> |#!ifdef WITH_JSONRPC|
> |tcp_accept_no_cl=yes|
> |#!endif|
> | |
> |#!ifdef WITH_TLS|
> |enable_tls=no|
> | |
> |/* upper limit for TLS connections */|
> |tls_max_connections=2048|
> |#!endif|
> | |
> |/* set it to yes to enable sctp and load sctp.so module */|
> |enable_sctp=no|
> | |
> |####### Custom Parameters #########|
> | |
> |/* These parameters can be modified runtime via RPC interface|
> |* - see the documentation of 'cfg_rpc' module.|
> |*|
> |* Format: group.id = value 'desc' description|
> |* Access: $sel(cfg_get.group.id) or @cfg_get.group.id */|
> | |
> |#!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"|
> |pstn.gw_port = "" desc "PSTN GW Port"|
> |#!endif|
> | |
> |#!ifdef WITH_VOICEMAIL|
> |/* VoiceMail Routing on offline, busy or no answer|
> |*|
> |* - by default Voicemail server IP is empty to avoid misrouting */|
> |voicemail.srv_ip = "" desc "VoiceMail IP Address"|
> |voicemail.srv_port = "5060" desc "VoiceMail Port"|
> |#!endif|
> | |
> |####### Modules Section ########|
> | |
> |/* set paths to location of modules */|
> |# mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"|
> | |
> |#!ifdef WITH_MYSQL|
> |loadmodule "db_mysql.so"|
> |#!endif|
> | |
> |#!ifdef WITH_JSONRPC|
> |loadmodule "xhttp.so"|
> |#!endif|
> |loadmodule "jsonrpcs.so"|
> |loadmodule "kex.so"|
> |loadmodule "corex.so"|
> |loadmodule "tm.so"|
> |loadmodule "tmx.so"|
> |loadmodule "sl.so"|
> |loadmodule "rr.so"|
> |loadmodule "pv.so"|
> |loadmodule "maxfwd.so"|
> |loadmodule "usrloc.so"|
> |loadmodule "registrar.so"|
> |loadmodule "textops.so"|
> |loadmodule "textopsx.so"|
> |loadmodule "siputils.so"|
> |loadmodule "xlog.so"|
> |loadmodule "sanity.so"|
> |loadmodule "ctl.so"|
> |loadmodule "cfg_rpc.so"|
> |loadmodule "acc.so"|
> |loadmodule "counters.so"|
> | |
> |#!ifdef WITH_AUTH|
> |loadmodule "auth.so"|
> |loadmodule "auth_db.so"|
> |#!ifdef WITH_IPAUTH|
> |loadmodule "permissions.so"|
> |#!endif|
> |#!endif|
> | |
> |#!ifdef WITH_ALIASDB|
> |loadmodule "alias_db.so"|
> |#!endif|
> | |
> |#!ifdef WITH_SPEEDDIAL|
> |loadmodule "speeddial.so"|
> |#!endif|
> | |
> |#!ifdef WITH_MULTIDOMAIN|
> |loadmodule "domain.so"|
> |#!endif|
> | |
> |#!ifdef WITH_PRESENCE|
> |loadmodule "presence.so"|
> |loadmodule "presence_xml.so"|
> |#!endif|
> | |
> |#!ifdef WITH_NAT|
> |loadmodule "nathelper.so"|
> |#!ifdef WITH_RTPENGINE|
> |loadmodule "rtpengine.so"|
> |#!else|
> |loadmodule "rtpproxy.so"|
> |#!endif|
> |#!endif|
> | |
> |#!ifdef WITH_TLS|
> |loadmodule "tls.so"|
> |#!endif|
> | |
> |#!ifdef WITH_ANTIFLOOD|
> |loadmodule "htable.so"|
> |loadmodule "pike.so"|
> |#!endif|
> | |
> |#!ifdef WITH_DEBUG|
> |loadmodule "debugger.so"|
> |#!endif|
> | |
> |# ----------------- setting module-specific parameters ---------------|
> | |
> | |
> |# ----- jsonrpcs params -----|
> |modparam("jsonrpcs", "pretty_format", 1)|
> |/* set the path to RPC fifo control file */|
> |# modparam("jsonrpcs", "fifo_name", "/run/kamailio/kamailio_rpc.fifo")|
> |/* set the path to RPC unix socket control file */|
> |# modparam("jsonrpcs", "dgram_socket", "/run/kamailio/kamailio_rpc.sock")|
> |#!ifdef WITH_JSONRPC|
> |modparam("jsonrpcs", "transport", 7)|
> |#!endif|
> | |
> |# ----- ctl params -----|
> |/* set the path to RPC unix socket control file */|
> |# modparam("ctl", "binrpc", "unix:/run/kamailio/kamailio_ctl")|
> | |
> |# ----- sanity params -----|
> |modparam("sanity", "autodrop", 0)|
> | |
> |# ----- tm params -----|
> |# auto-discard branches from previous serial forking leg|
> |modparam("tm", "failure_reply_mode", 3)|
> |# default retransmission timeout: 30sec|
> |modparam("tm", "fr_timer", 30000)|
> |# default invite retransmission timeout after 1xx: 120sec|
> |modparam("tm", "fr_inv_timer", 120000)|
> | |
> |# ----- rr params -----|
> |# set next param to 1 to add value to ;lr param (helps with some UAs)|
> |modparam("rr", "enable_full_lr", 0)|
> |# do not append from tag to the RR (no need for this script)|
> |modparam("rr", "append_fromtag", 0)|
> | |
> |# ----- registrar params -----|
> |modparam("registrar", "method_filtering", 1)|
> |/* uncomment the next line to disable parallel forking via location */|
> |# modparam("registrar", "append_branches", 0)|
> |/* uncomment the next line not to allow more than 10 contacts per AOR */|
> |# modparam("registrar", "max_contacts", 10)|
> |/* max value for expires of registrations */|
> |modparam("registrar", "max_expires", 3600)|
> |/* set it to 1 to enable GRUU */|
> |modparam("registrar", "gruu_enabled", 0)|
> |/* set it to 0 to disable Path handling */|
> |modparam("registrar", "use_path", 1)|
> |/* save Path even if not listed in Supported header */|
> |modparam("registrar", "path_mode", 0)|
> | |
> |# ----- acc params -----|
> |/* what special events should be accounted ? */|
> |modparam("acc", "early_media", 0)|
> |modparam("acc", "report_ack", 0)|
> |modparam("acc", "report_cancels", 0)|
> |/* 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", "log_flag", FLT_ACC)|
> |modparam("acc", "log_missed_flag", FLT_ACCMISSED)|
> |modparam("acc", "log_extra",|
> |         "src_user=$fU;src_domain=$fd;src_ip=$si;"|
> |         "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")|
> |modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)|
> |/* enhanced DB accounting */|
> |#!ifdef WITH_ACCDB|
> |modparam("acc", "db_flag", FLT_ACC)|
> |modparam("acc", "db_missed_flag", FLT_ACCMISSED)|
> |modparam("acc", "db_url", DBURL)|
> |modparam("acc", "db_extra",|
> |         "src_user=$fU;src_domain=$fd;src_ip=$si;"|
> |         "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")|
> |#!endif|
> | |
> |# ----- usrloc params -----|
> |modparam("usrloc", "timer_interval", 60)|
> |modparam("usrloc", "timer_procs", 1)|
> |modparam("usrloc", "use_domain", MULTIDOMAIN)|
> |/* enable DB persistency for location entries */|
> |#!ifdef WITH_USRLOCDB|
> |modparam("usrloc", "db_url", DBURL)|
> |modparam("usrloc", "db_mode", 2)|
> |#!endif|
> | |
> |# ----- 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)|
> | |
> |# ----- permissions params -----|
> |#!ifdef WITH_IPAUTH|
> |modparam("permissions", "db_url", DBURL)|
> |modparam("permissions", "db_mode", 1)|
> |#!endif|
> | |
> |#!endif|
> | |
> |# ----- alias_db params -----|
> |#!ifdef WITH_ALIASDB|
> |modparam("alias_db", "db_url", DBURL)|
> |modparam("alias_db", "use_domain", MULTIDOMAIN)|
> |#!endif|
> | |
> |# ----- speeddial params -----|
> |#!ifdef WITH_SPEEDDIAL|
> |modparam("speeddial", "db_url", DBURL)|
> |modparam("speeddial", "use_domain", MULTIDOMAIN)|
> |#!endif|
> | |
> |# ----- domain params -----|
> |#!ifdef WITH_MULTIDOMAIN|
> |modparam("domain", "db_url", DBURL)|
> |/* register callback to match myself condition with domains list */|
> |modparam("domain", "register_myself", 1)|
> |#!endif|
> | |
> |#!ifdef WITH_PRESENCE|
> |# ----- presence params -----|
> |modparam("presence", "db_url", DBURL)|
> | |
> |# ----- presence_xml params -----|
> |modparam("presence_xml", "db_url", DBURL)|
> |modparam("presence_xml", "force_active", 1)|
> |#!endif|
> | |
> |#!ifdef WITH_NAT|
> |#!ifdef WITH_RTPENGINE|
> |# ----- rtpengine params -----|
> |modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223")|
> |#!else|
> |# ----- rtpproxy params -----|
> |modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")|
> |#!endif|
> |# ----- nathelper params -----|
> |modparam("nathelper", "natping_interval", 30)|
> |modparam("nathelper", "ping_nated_only", 1)|
> |modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)|
> |modparam("nathelper", "sipping_from", "sip:pinger@kamailio.org")|
> | |
> |# params needed for NAT traversal in other modules|
> |modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")|
> |modparam("usrloc", "nat_bflag", FLB_NATB)|
> |#!endif|
> | |
> |#!ifdef WITH_TLS|
> |# ----- tls params -----|
> |modparam("tls", "config", "/etc/kamailio/tls.cfg")|
> |#!endif|
> | |
> |#!ifdef WITH_ANTIFLOOD|
> |# ----- pike params -----|
> |modparam("pike", "sampling_time_unit", 2)|
> |modparam("pike", "reqs_density_per_unit", 16)|
> |modparam("pike", "remove_latency", 4)|
> | |
> |# ----- htable params -----|
> |/* ip ban htable with autoexpire after 5 minutes */|
> |modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")|
> |#!endif|
> | |
> |#!ifdef WITH_DEBUG|
> |# ----- debugger params -----|
> |modparam("debugger", "cfgtrace", 1)|
> |modparam("debugger", "log_level_name", "exec")|
> |#!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);|
> | |
> |         # CANCEL processing|
> |         if (is_method("CANCEL")) {|
> |                 if (t_check_trans()) {|
> |                          route(RELAY);|
> |                 }|
> |                 exit;|
> |         }|
> | |
> |         # handle retransmissions|
> |         if (!is_method("ACK")) {|
> |                 if(t_precheck_trans()) {|
> |                          t_check_trans();|
> |                          exit;|
> |                 }|
> |                 t_check_trans();|
> |         }|
> | |
> |         if (is_method("REGISTER")) {|
> |                 xdbg("request from
> gggggggggggggggggggggggggggggggggggggggggg - $rm from $fu
> (IP:$si:$sp)\n");|
> |        }|
> |         rewritehostport("172.28.69.52:5060");|
> | |
> |         # handle requests within SIP dialogs|
> |         # route(WITHINDLG);|
> | |
> |         ### only initial requests (no To tag)|
> | |
> |         # 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);|
> |}|
> | |
> |# Wrapper for relaying requests|
> |route[RELAY] {|
> | |
> |         # enable additional event routes for forwarded requests|
> |         # - serial forking, RTP relaying handling, a.s.o.|
> |         if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {|
> |                 if(!t_is_set("branch_route"))
> t_on_branch("MANAGE_BRANCH");|
> |         }|
> |         if (is_method("INVITE|SUBSCRIBE|UPDATE")) {|
> |                 if(!t_is_set("onreply_route"))
> t_on_reply("MANAGE_REPLY");|
> |         }|
> |         if (is_method("INVITE")) {|
> |                 if(!t_is_set("failure_route"))
> t_on_failure("MANAGE_FAILURE");|
> |         }|
> | |
> |         if (!t_relay()) {|
> |                 sl_reply_error();|
> |         }|
> |         exit;|
> |}|
> | |
> |# Per SIP request initial checks|
> |route[REQINIT] {|
> |         # no connect for sending replies|
> |         set_reply_no_connect();|
> |         # enforce symmetric signaling|
> |         # - send back replies to the source address of request|
> |         force_rport();|
> | |
> |#!ifdef WITH_ANTIFLOOD|
> |         # flood detection 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($ua =~
> "friendly|scanner|sipcli|sipvicious|VaxSIPUserAgent") {|
> |                 # silent drop for scanners - uncomment next line if
> want to reply|
> |                 # sl_send_reply("200", "OK");|
> |                 exit;|
> |         }|
> | |
> |         if (!mf_process_maxfwd_header("10")) {|
> |                 sl_send_reply("483","Too Many Hops");|
> |                 exit;|
> |         }|
> | |
> |         if(is_method("OPTIONS") && uri==myself && $rU==$null) {|
> |                 sl_send_reply("200","Keepalive");|
> |                 exit;|
> |         }|
> | |
> |         if(!sanity_check("17895", "7")) {|
> |                 xlog("Malformed SIP request from $si:$sp\n");|
> |                 exit;|
> |         }|
> |}|
> | |
> |# Handle requests within SIP dialogs|
> |route[WITHINDLG] {|
> |         if (!has_totag()) return;|
> | |
> |         # sequential request withing a dialog should|
> |         # take the path determined by record-routing|
> |         if (loose_route()) {|
> |                 route(DLGURI);|
> |                 if (is_method("BYE")) {|
> |                          setflag(FLT_ACC); # do accounting ...|
> |                          setflag(FLT_ACCFAILED); # ... even if the
> transaction fails|
> |                 } else if ( is_method("ACK") ) {|
> |                          # ACK is forwarded statelessly|
> |                          route(NATMANAGE);|
> |                 } else if ( is_method("NOTIFY") ) {|
> |                          # Add Record-Route for in-dialog NOTIFY as
> per RFC 6665.|
> |                          record_route();|
> |                 }|
> |                 route(RELAY);|
> |                 exit;|
> |         }|
> | |
> |         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|
> |                          route(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")) return;|
> | |
> |         if(isflagset(FLT_NATS)) {|
> |                 setbflag(FLB_NATB);|
> |#!ifdef WITH_NATSIPPING|
> |                 # do SIP NAT pinging|
> |                 setbflag(FLB_NATSIPPING);|
> |#!endif|
> |         }|
> |         if (!save("location")) {|
> |                 sl_reply_error();|
> |         }|
> |         exit;|
> |}|
> | |
> |# User location service|
> |route[LOCATION] {|
> | |
> |#!ifdef WITH_SPEEDDIAL|
> |         # 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);|
> |         }|
> | |
> |         route(RELAY);|
> |         exit;|
> |}|
> | |
> |# Presence server processing|
> |route[PRESENCE] {|
> |         if(!is_method("PUBLISH|SUBSCRIBE")) return;|
> | |
> |         if(is_method("SUBSCRIBE") && $hdr(Event)=="message-summary") {|
> |                 route(TOVOICEMAIL);|
> |                 # returns here if no voicemail server is configured|
> |                 sl_send_reply("404", "No voicemail service");|
> |                 exit;|
> |         }|
> | |
> |#!ifdef WITH_PRESENCE|
> |#!ifdef WITH_MSGREBUILD|
> |         # apply changes in case the request headers or body were
> modified|
> |         msg_apply_changes();|
> |#!endif|
> |         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;|
> |}|
> | |
> |# IP authorization and user authentication|
> |route[AUTH] {|
> |#!ifdef WITH_AUTH|
> | |
> |#!ifdef WITH_IPAUTH|
> |         if((!is_method("REGISTER")) && allow_source_address()) {|
> |                 # source IP allowed|
> |                 return;|
> |         }|
> |#!endif|
> | |
> |         if (is_method("REGISTER") || from_uri==myself) {|
> |                 # authenticate requests|
> |                 if (!auth_check("$fd", "subscriber", "1")) {|
> |                          auth_challenge("$fd", "0");|
> |                          exit;|
> |                 }|
> |                 # user authenticated - remove auth header|
> |                 if(!is_method("REGISTER|PUBLISH"))|
> |                          consume_credentials();|
> |         }|
> |         # if caller is not local subscriber, then check if it calls|
> |         # a local destination, otherwise deny, not an open relay here|
> |         if (from_uri!=myself && uri!=myself) {|
> |                 sl_send_reply("403","Not relaying");|
> |                 exit;|
> |         }|
> | |
> |#!else|
> | |
> |         # authentication not enabled - do not relay at all to
> foreign networks|
> |         if(uri!=myself) {|
> |                 sl_send_reply("403","Not relaying");|
> |                 exit;|
> |         }|
> | |
> |#!endif|
> |         return;|
> |}|
> | |
> |# Caller NAT detection|
> |route[NATDETECT] {|
> |#!ifdef WITH_NAT|
> |         if (nat_uac_test("19")) {|
> |                 if (is_method("REGISTER")) {|
> |                          fix_nated_register();|
> |                 } else {|
> |                          if(is_first_hop()) {|
> |                                   set_contact_alias();|
> |                          }|
> |                 }|
> |                 setflag(FLT_NATS);|
> |         }|
> |#!endif|
> |         return;|
> |}|
> | |
> |# RTPProxy control and signaling updates for NAT traversal|
> |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;|
> | |
> |#!ifdef WITH_RTPENGINE|
> |         if(nat_uac_test("8")) {|
> |                 rtpengine_manage("replace-origin
> replace-session-connection");|
> |         } else {|
> |                 rtpengine_manage("trust-address replace-origin
> replace-session-connection");|
> |         }|
> |#!else|
> |         if(nat_uac_test("8")) {|
> |                 rtpproxy_manage("co");|
> |         } else {|
> |                 rtpproxy_manage("cor");|
> |         }|
> |#!endif|
> | |
> |         if (is_request()) {|
> |                 if (!has_totag()) {|
> |                          if(t_is_branch_route()) {|
> |                                   add_rr_param(";nat=yes");|
> |                          }|
> |                 }|
> |         }|
> |         if (is_reply()) {|
> |                 if(isbflagset(FLB_NATB)) {|
> |                          if(is_first_hop())|
> |                                   set_contact_alias();|
> |                 }|
> |         }|
> | |
> |         if(isbflagset(FLB_NATB)) {|
> |                 # no connect message in a dialog involving NAT traversal|
> |                 if (is_request()) {|
> |                          if(has_totag()) {|
> |                                   set_forward_no_connect();|
> |                          }|
> |                 }|
> |         }|
> |#!endif|
> |         return;|
> |}|
> | |
> |# URI update for dialog requests|
> |route[DLGURI] {|
> |#!ifdef WITH_NAT|
> |         if(!isdsturiset()) {|
> |                 handle_ruri_alias();|
> |         }|
> |#!endif|
> |         return;|
> |}|
> | |
> |# Routing to foreign domains|
> |route[SIPOUT] {|
> |         if (uri==myself) return;|
> | |
> |         append_hf("P-Hint: outbound\r\n");|
> |         route(RELAY);|
> |         exit;|
> |}|
> | |
> |# 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 routing 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;|
> |         }|
> | |
> |         # normalize target number for pstn gateway|
> |         # - convert leading 00 to +|
> |         if (starts_with("$rU", "00")) {|
> |                 strip(2);|
> |                 prefix("+");|
> |         }|
> | |
> |         if (strempty($sel(cfg_get.pstn.gw_port))) {|
> |                 $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);|
> |         } else {|
> |                 $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip)
> + ":"|
> |                                            + $sel(cfg_get.pstn.gw_port);|
> |         }|
> | |
> |         route(RELAY);|
> |         exit;|
> |#!endif|
> | |
> |         return;|
> |}|
> | |
> |# JSONRPC over HTTP(S) routing|
> |#!ifdef WITH_JSONRPC|
> |event_route[xhttp:request] {|
> |         set_reply_close();|
> |         set_reply_no_connect();|
> |         if(src_ip!=127.0.0.1) {|
> |                 xhttp_reply("403", "Forbidden", "text/html",|
> |                                   "<html><body>Not allowed from
> $si</body></html>");|
> |                 exit;|
> |         }|
> |         if ($hu =~ "^/RPC") {|
> |                 jsonrpc_dispatch();|
> |                 exit;|
> |         }|
> | |
> |         xhttp_reply("200", "OK", "text/html",|
> |                                   "<html><body>Wrong URL
> $hu</body></html>");|
> |    exit;|
> |}|
> |#!endif|
> | |
> |# Routing to voicemail server|
> |route[TOVOICEMAIL] {|
> |#!ifdef WITH_VOICEMAIL|
> |         if(!is_method("INVITE|SUBSCRIBE")) return;|
> | |
> |         # check if VoiceMail server IP is defined|
> |         if (strempty($sel(cfg_get.voicemail.srv_ip))) {|
> |                 xlog("SCRIPT: VoiceMail routing enabled but IP not
> defined\n");|
> |                 return;|
> |         }|
> |         if(is_method("INVITE")) {|
> |                 if($avp(oexten)==$null) return;|
> | |
> |                 $ru = "sip:" + $avp(oexten) + "@" +
> $sel(cfg_get.voicemail.srv_ip)|
> |                                   + ":" +
> $sel(cfg_get.voicemail.srv_port);|
> |         } else {|
> |                 if($rU==$null) return;|
> | |
> |                 $ru = "sip:" + $rU + "@" +
> $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|
> |reply_route {|
> |         if(!sanity_check("17604", "6")) {|
> |                 xlog("Malformed SIP response from $si:$sp\n");|
> |                 drop;|
> |         }|
> |}|
> | |
> |# Manage incoming replies in transaction context|
> |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_BLOCK401407|
> |         # block call redirect based on 401, 407 replies.|
> |         if (t_check_status("401|407")) {|
> |                 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")) {|
> |                 $du = $null;|
> |                 route(TOVOICEMAIL);|
> |                 exit;|
> |         }|
> |#!endif|
> |}|
>
> As you can see I just one thing in |request_route|
>
> |request_route {|
> | |
> |         # per request initial checks|
> |         # route(REQINIT);|
> | |
> |         # NAT detection|
> |         #route(NATDETECT);|
> | |
> |         # CANCEL processing|
> |         if (is_method("CANCEL")) {|
> |                 if (t_check_trans()) {|
> |                          route(RELAY);|
> |                 }|
> |                 exit;|
> |         }|
> | |
> |         # handle retransmissions|
> |         if (!is_method("ACK")) {|
> |                 if(t_precheck_trans()) {|
> |                          t_check_trans();|
> |                          exit;|
> |                 }|
> |                 t_check_trans();|
> |         }|
> | |
> |         if (is_method("REGISTER")) {|
> |                 xdbg("request from
> gggggggggggggggggggggggggggggggggggggggggg - $rm from $fu
> (IP:$si:$sp)\n");|
> |        }|
> |         rewritehostport("172.28.69.52:5060");|
>
> The |172.28.69.52| is ip of my Freeswitch
>
> After I try to call from Zoiper5, I get below error in Kamailio log
> and Zoiper does not work.
>
> |4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
>
>
>       Troubleshooting
>
>
>         Reproduction
>
>   * pull official Kamailio docker image |kamailio/kamailio 5.4.6-buster|
>   * then run below command
>
> |docker run --net=host --name kamailio \|
> |       -v /home/ssoroosh/kamailio:/etc/kamailio \|
> |       kamailio/kamailio:5.4.6-buster|
>
>
>         Debugging Data
>
> I do not have any debug data
>
>
>         Log Messages
>
> |Listening on|
> |             udp: 172.28.72.99 [172.28.72.99]:5060 advertise
> 172.28.72.99:5060|
> |Aliases:|
> | |
> |0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import
> bind_ob - maybe module is not loaded|
> |0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available|
> |0(1) INFO: <core> [main.c:2919]: main(): processes (at least): 16 -
> shm size: 67108864 - pkg size: 8388608|
> |0(1) INFO: <core> [core/udp_server.c:154]:
> probe_max_receive_buffer(): SO_RCVBUF is initially 212992|
> |0(1) INFO: <core> [core/udp_server.c:206]:
> probe_max_receive_buffer(): SO_RCVBUF is finally 425984|
> |13(19) INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process():
> a new child 0/19|
> |15(21) INFO: ctl [io_listener.c:210]: io_listen_loop():
> io_listen_loop: using epoll_lt as the io watch method (auto detected)|
> |2(8) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |2(8) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |2(8) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||��||>|
> |2(8) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |4(10) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |4(10) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |1(7) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |1(7) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |1(7) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |1(7) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |3(9) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |3(9) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |3(9) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |3(9) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |5(11) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |5(11) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |8(14) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |8(14) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |8(14) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |8(14) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |1(7) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |1(7) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |1(7) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |1(7) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |5(11) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |5(11) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |4(10) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |4(10) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |5(11) INFO: <core> [core/parser/parse_fline.c:156]:
> parse_first_line(): ERROR:parse_first_line: method not followed by SP|
> |5(11) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 0)|
> |5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |6(12) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |6(12) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||��||>|
> |6(12) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |7(13) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |7(13) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |7(13) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |8(14) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |8(14) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |8(14) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |2(8) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |2(8) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |2(8) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |4(10) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |4(10) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |4(10) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |1(7) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |1(7) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |1(7) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |3(9) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |3(9) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |3(9) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |5(11) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |5(11) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |5(11) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |6(12) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |6(12) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |6(12) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
> |7(13) ERROR: <core> [core/parser/parse_fline.c:271]:
> parse_first_line(): parse_first_line: bad message (offset: 41)|
> |7(13) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg():
> ERROR: parse_msg: message=<||���||>|
> |7(13) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing
> of SIP message failed (172.28.64.1:51370/1)|
>
>
>         SIP Traffic
>
> My pcap is attached
> sip.zip <https://github.com/kamailio/kamailio/files/8326814/sip.zip>
>
>
>       Possible Solutions
>
> I have not any solution yet.
>
>
>       Additional Information
>
>   * *Kamailio Version* - output of |kamailio -v|
>
> |version: kamailio 5.4.6 (x86_64/linux)|
> |flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
> F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED|
> |ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE
> 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB|
> |poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.|
> |id: unknown|
> |compiled with gcc 8.3.0|
>
>   * *Operating System*:
>
> |Linux master 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC
> 2022 x86_64 GNU/Linux|
> | |
> |root@master:/home# lsb_release -a|
> |No LSB modules are available.|
> |Distributor ID: Debian|
> |Description:    Debian GNU/Linux 10 (buster)|
> |Release:        10|
> |Codename:       buster|
>
>  
>
> *How to resolve this?*
>
>  
>
> thanks
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
  March 28-31, 2022 (Europe Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Looks like the data received on sip port is not a sip message.
      Use a traffic sniffer (tcpdump, wireshark, ngrep) to see what
      comes over the network.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 22.03.22 19:13, Seyyed Soroosh
      Hosseinalipour wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DM6PR03MB4764F1510F2460588EEFF05D8F179@DM6PR03MB4764.namprd03.prod.outlook.com">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}@font-face
	{font-family:"Segoe UI";
	panose-1:2 11 5 2 4 2 4 2 2 3;}@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}h3
	{mso-style-priority:9;
	mso-style-link:"Heading 3 Char";
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:13.5pt;
	font-family:"Calibri",sans-serif;
	font-weight:bold;}h4
	{mso-style-priority:9;
	mso-style-link:"Heading 4 Char";
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Calibri",sans-serif;
	font-weight:bold;}a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}code
	{mso-style-priority:99;
	font-family:"Courier New";}pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	font-size:10.0pt;
	font-family:"Courier New";}span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}span.Heading3Char
	{mso-style-name:"Heading 3 Char";
	mso-style-priority:9;
	mso-style-link:"Heading 3";
	font-family:"Calibri",sans-serif;
	font-weight:bold;}span.Heading4Char
	{mso-style-name:"Heading 4 Char";
	mso-style-priority:9;
	mso-style-link:"Heading 4";
	font-family:"Calibri",sans-serif;
	font-weight:bold;}span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:"Courier New";}.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}div.WordSection1
	{page:WordSection1;}ol
	{margin-bottom:0in;}ul
	{margin-bottom:0in;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p style="margin-bottom:12.0pt;background:white"><span
            style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">ITNOA<o:p></o:p></span></p>
        <h3
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:14.0pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Description<o:p></o:p></span></h3>
        <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">I try to connect Kamailio
            and Freeswitch together, and initiate call from Zoiper5 soft
            phone through Kamailio<o:p></o:p></span></p>
        <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">My Kamailio config is
            below<o:p></o:p></span></p>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef ACCDB_COMMENT<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT \
'';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL \
DEFAULT '';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default \
'';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL \
DEFAULT '';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT \
'';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL \
DEFAULT '';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT \
NULL DEFAULT '';<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT \
NULL DEFAULT '';<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL \
default '';<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT \
NULL DEFAULT '';<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT \
NULL DEFAULT '';<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">  ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT \
NULL DEFAULT '';<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">####### Include Local Config If Exists \
#########<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">import_file "kamailio-local.cfg"<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">####### Defined Values #########<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># *** Value defines - IDs used later in \
config<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_DEBUG<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define DBGLEVEL 3<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!else<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define DBGLEVEL 2<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_MYSQL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># - database URL - used to connect to database server by modules \
such<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#       as: auth_db, acc, usrloc, \
a.s.o.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!trydef DBURL \
"mysql://kamailio:kamailiorw@localhost/kamailio"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_MULTIDOMAIN<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># - the value for 'use_domain' \
parameters<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define MULTIDOMAIN 1<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!else<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define MULTIDOMAIN 0<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># - flags<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#   FLT_ - per transaction (message) \
flags<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#        FLB_ - per branch flags<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define FLT_ACC 1<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define FLT_ACCMISSED 2<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define FLT_ACCFAILED 3<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define FLT_NATS 5<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define FLB_NATB 6<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!define FLB_NATSIPPING 7<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">####### Global Parameters #########<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR, ... \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">debug=DBGLEVEL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set to 'yes' to print log messages to terminal or use '-E' cli \
option */<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">log_stderror=yes<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">memdbg=5<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">memlog=5<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">log_facility=LOG_LOCAL0<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">log_prefix="{$mt $hdr(CSeq) $ci} "<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - value inherited by tcp_children and sctp_children when not \
set explicitely */<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">children=8<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* uncomment the next line to disable TCP (default on) \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">disable_tcp=yes<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* number of SIP routing processes for all TCP/TLS sockets \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># tcp_children=8<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* uncomment the next line to disable the auto discovery of local \
aliases<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * based on reverse DNS on IPs (default on) \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">auto_aliases=no<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* add local domain aliases - it can be set many times \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># alias="sip.mydomain.com"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* listen sockets - if none set, Kamailio binds to all local IP \
addresses<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - basic prototype (full prototype can be found in Wiki - Core \
Cookbook):<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> *      listen=[proto]:[localip]:[lport] advertise \
[publicip]:[pport]<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - it can be set many times to add more sockets to listen to \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">listen=<a class="moz-txt-link-freetext" \
href="udp:172.28.72.99:5060">udp:172.28.72.99:5060</a> advertise \
172.28.72.99:5060<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#listen=tcp:172.28.72.99:5060<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* life time of TCP connection when there is no \
traffic<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - a bit higher than registration expires to cope with UA behind \
NAT */<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">tcp_connection_lifetime=3605<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* upper limit for TCP connections (it includes the TLS \
connections) */<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">tcp_max_connections=2048<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_JSONRPC<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">tcp_accept_no_cl=yes<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_TLS<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">enable_tls=no<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* upper limit for TLS connections \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">tls_max_connections=2048<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set it to yes to enable sctp and load sctp.so module \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">enable_sctp=no<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">####### Custom Parameters #########<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* These parameters can be modified runtime via RPC \
interface<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - see the documentation of 'cfg_rpc' \
module.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> *<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * Format: group.id = value 'desc' \
description<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * Access: $sel(cfg_get.group.id) or @cfg_get.group.id \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_PSTN<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* PSTN GW Routing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> *<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - pstn.gw_ip: valid IP or hostname as string value, \
example:<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * pstn.gw_ip = "10.0.0.101" desc "My PSTN GW \
Address"<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> *<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - by default is empty to avoid misrouting \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">pstn.gw_ip = "" desc "PSTN GW \
Address"<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">pstn.gw_port = "" desc "PSTN GW \
Port"<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_VOICEMAIL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* VoiceMail Routing on offline, busy or no \
answer<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">voicemail.srv_ip = "" desc "VoiceMail IP \
Address"<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">voicemail.srv_port = "5060" desc "VoiceMail \
Port"<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">####### Modules Section ########<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set paths to location of modules \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># \
mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_MYSQL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "db_mysql.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_JSONRPC<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "xhttp.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "jsonrpcs.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "kex.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "corex.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "tm.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "tmx.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "sl.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "rr.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "pv.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "maxfwd.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "usrloc.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "registrar.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "textops.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "textopsx.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "siputils.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "xlog.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "sanity.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "ctl.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "cfg_rpc.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "acc.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "counters.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_AUTH<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "auth.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "auth_db.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_IPAUTH<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "permissions.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ALIASDB<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "alias_db.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_SPEEDDIAL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "speeddial.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_MULTIDOMAIN<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "domain.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_PRESENCE<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "presence.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "presence_xml.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_NAT<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "nathelper.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_RTPENGINE<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "rtpengine.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!else<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_TLS<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "tls.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ANTIFLOOD<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "htable.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "pike.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_DEBUG<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">loadmodule "debugger.so"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----------------- setting module-specific parameters \
---------------<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- jsonrpcs params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("jsonrpcs", "pretty_format", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set the path to RPC fifo control file \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># modparam("jsonrpcs", "fifo_name", \
"/run/kamailio/kamailio_rpc.fifo")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set the path to RPC unix socket control file \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># modparam("jsonrpcs", "dgram_socket", \
"/run/kamailio/kamailio_rpc.sock")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_JSONRPC<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("jsonrpcs", "transport", \
7)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- ctl params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set the path to RPC unix socket control file \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># modparam("ctl", "binrpc", \
"unix:/run/kamailio/kamailio_ctl")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- sanity params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("sanity", "autodrop", 0)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- tm params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># auto-discard branches from previous serial forking \
leg<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("tm", "failure_reply_mode", \
3)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># default retransmission timeout: \
30sec<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("tm", "fr_timer", 30000)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># default invite retransmission timeout after 1xx: \
120sec<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("tm", "fr_inv_timer", \
120000)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- rr params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># set next param to 1 to add value to ;lr param (helps with some \
UAs)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("rr", "enable_full_lr", 0)<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># do not append from tag to the RR (no need for this \
script)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("rr", "append_fromtag", 0)<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- registrar params -----<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("registrar", "method_filtering", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* uncomment the next line to disable parallel forking via \
location */<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># modparam("registrar", "append_branches", \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* uncomment the next line not to allow more than 10 contacts per \
AOR */<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># modparam("registrar", "max_contacts", \
10)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* max value for expires of registrations \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("registrar", "max_expires", \
3600)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set it to 1 to enable GRUU */<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("registrar", "gruu_enabled", \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* set it to 0 to disable Path handling \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("registrar", "use_path", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* save Path even if not listed in Supported header \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("registrar", "path_mode", \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- acc params -----<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "early_media", 0)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "report_ack", 0)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "report_cancels", \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* by default ww do not adjust the direct of the sequential \
requests.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * if you enable this parameter, be sure the enable \
"append_fromtag"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * in "rr" module */<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "detect_direction", \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* account triggers (flags) */<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "log_flag", \
FLT_ACC)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "log_missed_flag", \
FLT_ACCMISSED)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "log_extra",<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         \
"src_user=$fU;src_domain=$fd;src_ip=$si;"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         \
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "failed_transaction_flag", \
FLT_ACCFAILED)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* enhanced DB accounting */<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ACCDB<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "db_flag", FLT_ACC)<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "db_missed_flag", \
FLT_ACCMISSED)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "db_url", DBURL)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("acc", "db_extra",<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         \
"src_user=$fU;src_domain=$fd;src_ip=$si;"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         \
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- usrloc params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("usrloc", "timer_interval", \
60)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("usrloc", "timer_procs", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("usrloc", "use_domain", \
MULTIDOMAIN)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* enable DB persistency for location entries \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_USRLOCDB<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("usrloc", "db_url", DBURL)<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("usrloc", "db_mode", 2)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- auth_db params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_AUTH<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("auth_db", "db_url", \
DBURL)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("auth_db", "calculate_ha1", \
yes)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("auth_db", "password_column", \
"password")<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("auth_db", "load_credentials", \
"")<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("auth_db", "use_domain", \
MULTIDOMAIN)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- permissions params -----<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_IPAUTH<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("permissions", "db_url", \
DBURL)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("permissions", "db_mode", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- alias_db params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ALIASDB<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("alias_db", "db_url", \
DBURL)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("alias_db", "use_domain", \
MULTIDOMAIN)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- speeddial params -----<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_SPEEDDIAL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("speeddial", "db_url", \
DBURL)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("speeddial", "use_domain", \
MULTIDOMAIN)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- domain params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("domain", "db_url", DBURL)<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* register callback to match myself condition with domains list \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("domain", "register_myself", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_PRESENCE<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- presence params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("presence", "db_url", \
DBURL)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- presence_xml params -----<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("presence_xml", "db_url", \
DBURL)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("presence_xml", "force_active", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_NAT<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_RTPENGINE<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- rtpengine params -----<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("rtpengine", "rtpengine_sock", <a \
class="moz-txt-link-rfc2396E" \
href="udp:127.0.0.1:2223">"udp:127.0.0.1:2223"</a>)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!else<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- rtpproxy params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("rtpproxy", "rtpproxy_sock", <a \
class="moz-txt-link-rfc2396E" \
href="udp:127.0.0.1:7722">"udp:127.0.0.1:7722"</a>)<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- nathelper params -----<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("nathelper", "natping_interval", \
30)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("nathelper", "ping_nated_only", \
1)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("nathelper", "sipping_bflag", \
FLB_NATSIPPING)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("nathelper", "sipping_from", <a \
class="moz-txt-link-rfc2396E" \
href="sip:pinger@kamailio.org">"sip:pinger@kamailio.org"</a>)<o:p></o:p></span></code></pre>
  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># params needed for NAT traversal in other \
modules<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("nathelper|registrar", "received_avp", \
"$avp(RECEIVED)")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("usrloc", "nat_bflag", \
FLB_NATB)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_TLS<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- tls params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("tls", "config", \
"/etc/kamailio/tls.cfg")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ANTIFLOOD<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- pike params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("pike", "sampling_time_unit", \
2)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("pike", "reqs_density_per_unit", \
16)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("pike", "remove_latency", \
4)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- htable params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* ip ban htable with autoexpire after 5 minutes \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("htable", "htable", \
"ipban=&gt;size=8;autoexpire=300;")<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_DEBUG<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># ----- debugger params -----<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("debugger", "cfgtrace", 1)<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">modparam("debugger", "log_level_name", \
"exec")<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">####### Routing Logic ########<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">/* Main SIP request routing logic<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - processing of any incoming SIP request starts with this \
route<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> * - note: this is the same as route { ... } \
*/<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">request_route {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # per request initial \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # NAT detection<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #route(NATDETECT);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # CANCEL processing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("CANCEL")) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (t_check_trans()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # handle retransmissions<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!is_method("ACK")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(t_precheck_trans()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
t_check_trans();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_check_trans();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("REGISTER")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xdbg("request from \
gggggggggggggggggggggggggggggggggggggggggg - $rm from $fu \
(IP:$si:$sp)\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">        }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         \
rewritehostport("172.28.69.52:5060");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # handle requests within SIP \
dialogs<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # route(WITHINDLG);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         ### only initial requests (no To \
tag)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # authentication<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # route(AUTH);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # record routing for dialog forming requests (in case \
they are routed)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - remove preloaded route \
headers<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #remove_hf("Route");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #if (is_method("INVITE|SUBSCRIBE")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #        record_route();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # account only INVITEs<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #if (is_method("INVITE")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #        setflag(FLT_ACC); # do \
accounting<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # dispatch requests to foreign \
domains<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #route(SIPOUT);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         ### requests for my local \
domains<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # handle presence related \
requests<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #route(PRESENCE);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # handle registrations<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # route(REGISTRAR);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #if ($rU==$null) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #        # request with no Username in \
RURI<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #        sl_send_reply("484","Address \
Incomplete");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #        exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # dispatch destinations to \
PSTN<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #route(PSTN);<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # user location service<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #route(LOCATION);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Wrapper for relaying requests<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[RELAY] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # enable additional event routes for forwarded \
requests<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - serial forking, RTP relaying handling, \
a.s.o.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(!t_is_set("branch_route")) \
t_on_branch("MANAGE_BRANCH");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("INVITE|SUBSCRIBE|UPDATE")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(!t_is_set("onreply_route")) \
t_on_reply("MANAGE_REPLY");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("INVITE")) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(!t_is_set("failure_route")) \
t_on_failure("MANAGE_FAILURE");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!t_relay()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_reply_error();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Per SIP request initial checks<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[REQINIT] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # no connect for sending \
replies<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         set_reply_no_connect();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # enforce symmetric \
signaling<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - send back replies to the source address of \
request<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         force_rport();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ANTIFLOOD<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # flood detection from same IP and traffic ban for a \
while<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # be sure you exclude checking trusted peers, such as \
pstn gateways<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - local host excluded (e.g., loop to \
self)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(src_ip!=myself) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if($sht(ipban=&gt;$si)!=$null) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # ip is already \
blocked<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          xdbg("request from blocked IP - $rm from \
$fu (IP:$si:$sp)\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (!pike_check_req()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          xlog("L_ALERT","ALERT: pike blocking $rm \
from $fu (IP:$si:$sp)\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          $sht(ipban=&gt;$si) = \
1;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if($ua =~ \
"friendly|scanner|sipcli|sipvicious|VaxSIPUserAgent") \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # silent drop for scanners - uncomment next line \
if want to reply<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # sl_send_reply("200", \
"OK");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!mf_process_maxfwd_header("10")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_send_reply("483","Too Many \
Hops");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(is_method("OPTIONS") &amp;&amp; uri==myself &amp;&amp; \
$rU==$null) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
sl_send_reply("200","Keepalive");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(!sanity_check("17895", "7")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xlog("Malformed SIP request from \
$si:$sp\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Handle requests within SIP \
dialogs<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[WITHINDLG] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!has_totag()) return;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # sequential request withing a dialog \
should<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # take the path determined by \
record-routing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (loose_route()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 route(DLGURI);<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (is_method("BYE")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          setflag(FLT_ACC); # do accounting \
...<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          setflag(FLT_ACCFAILED); # ... even if \
the transaction fails<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 } else if ( is_method("ACK") ) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # ACK is forwarded \
statelessly<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
route(NATMANAGE);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 } else if ( is_method("NOTIFY") ) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # Add Record-Route for in-dialog NOTIFY \
as per RFC 6665.<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
record_route();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 route(RELAY);<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("SUBSCRIBE") &amp;&amp; uri == myself) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # in-dialog subscribe \
requests<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 route(PRESENCE);<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if ( is_method("ACK") ) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if ( t_check_trans() ) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # no loose-route, but stateful \
ACK;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # must be an ACK after a \
487<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # or e.g. 404 from upstream \
server<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 } else {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          # ACK without matching transaction ... \
ignore and discard<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         sl_send_reply("404","Not \
here");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Handle SIP registrations<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[REGISTRAR] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!is_method("REGISTER")) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(isflagset(FLT_NATS)) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
setbflag(FLB_NATB);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_NATSIPPING<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # do SIP NAT \
pinging<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
setbflag(FLB_NATSIPPING);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!save("location")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_reply_error();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># User location service<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[LOCATION] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_SPEEDDIAL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # search for short dialing - 2-digit \
extension<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if($rU=~"^[0-9][0-9]$") {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(sd_lookup("speed_dial")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
route(SIPOUT);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_ALIASDB<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # search in DB-based \
aliases<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(alias_db_lookup("dbaliases")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 route(SIPOUT);<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         $avp(oexten) = $rU;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!lookup("location")) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 $var(rc) = $rc;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
route(TOVOICEMAIL);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_newtran();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 switch ($var(rc)) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          case -1:<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          case -3:<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   send_reply("404", "Not \
Found");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
exit;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          case -2:<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   send_reply("405", "Method Not \
Allowed");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
exit;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # when routing via usrloc, log the missed calls \
also<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("INVITE")) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
setflag(FLT_ACCMISSED);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Presence server processing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[PRESENCE] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(!is_method("PUBLISH|SUBSCRIBE")) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(is_method("SUBSCRIBE") &amp;&amp; \
$hdr(Event)=="message-summary") {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
route(TOVOICEMAIL);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # returns here if no voicemail server is \
configured<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_send_reply("404", "No voicemail \
service");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_PRESENCE<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_MSGREBUILD<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # apply changes in case the request headers or body were \
modified<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         msg_apply_changes();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!t_newtran()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_reply_error();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(is_method("PUBLISH")) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 handle_publish();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_release();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         } else if(is_method("SUBSCRIBE")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
handle_subscribe();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_release();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # if presence enabled, this part will not be \
executed<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("PUBLISH") || $rU==$null) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_send_reply("404", "Not \
here");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># IP authorization and user \
authentication<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[AUTH] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_AUTH<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_IPAUTH<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if((!is_method("REGISTER")) &amp;&amp; \
allow_source_address()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # source IP \
allowed<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("REGISTER") || from_uri==myself) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # authenticate \
requests<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (!auth_check("$fd", "subscriber", "1")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          auth_challenge("$fd", \
"0");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # user authenticated - remove auth \
header<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
if(!is_method("REGISTER|PUBLISH"))<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
consume_credentials();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # if caller is not local subscriber, then check if it \
calls<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # a local destination, otherwise deny, not an open relay \
here<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (from_uri!=myself &amp;&amp; uri!=myself) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_send_reply("403","Not \
relaying");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!else<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # authentication not enabled - do not relay at all to \
foreign networks<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(uri!=myself) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_send_reply("403","Not \
relaying");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Caller NAT detection<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[NATDETECT] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_NAT<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (nat_uac_test("19")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (is_method("REGISTER")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
fix_nated_register();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 } else {<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
set_contact_alias();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 setflag(FLT_NATS);<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># RTPProxy control and signaling updates for NAT \
traversal<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[NATMANAGE] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_NAT<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_request()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(has_totag()) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          if(check_route_param("nat=yes")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
setbflag(FLB_NATB);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_RTPENGINE<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(nat_uac_test("8")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 rtpengine_manage("replace-origin \
replace-session-connection");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         } else {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 rtpengine_manage("trust-address replace-origin \
replace-session-connection");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!else<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(nat_uac_test("8")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
rtpproxy_manage("co");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         } else {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
rtpproxy_manage("cor");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_request()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (!has_totag()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          if(t_is_branch_route()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
add_rr_param(";nat=yes");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_reply()) {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(isbflagset(FLB_NATB)) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
if(is_first_hop())<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
set_contact_alias();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(isbflagset(FLB_NATB)) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 # no connect message in a dialog involving NAT \
traversal<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (is_request()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          if(has_totag()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   \
set_forward_no_connect();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># URI update for dialog requests<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[DLGURI] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_NAT<o:p></o:p></span></code></pre>  <pre \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
handle_ruri_alias();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Routing to foreign domains<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[SIPOUT] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (uri==myself) return;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         append_hf("P-Hint: \
outbound\r\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># PSTN GW routing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[PSTN] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_PSTN<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # check if PSTN GW IP is \
defined<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (strempty($sel(cfg_get.pstn.gw_ip))) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip \
not defined\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # route to PSTN dialed numbers starting with '+' or \
'00'<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #     (international \
format)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - update the condition to match your dialing rules for \
PSTN routing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$")) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # only local users allowed to \
call<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(from_uri!=myself) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 sl_send_reply("403", "Not \
Allowed");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # normalize target number for pstn \
gateway<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - convert leading 00 to \
+<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (starts_with("$rU", "00")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 strip(2);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 prefix("+");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (strempty($sel(cfg_get.pstn.gw_port))) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 $ru = "sip:" + $rU + "@" + \
$sel(cfg_get.pstn.gw_ip);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         } else {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 $ru = "sip:" + $rU + "@" + \
$sel(cfg_get.pstn.gw_ip) + ":"<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                            + \
$sel(cfg_get.pstn.gw_port);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># JSONRPC over HTTP(S) routing<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_JSONRPC<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">event_route[xhttp:request] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         set_reply_close();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         set_reply_no_connect();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(src_ip!=127.0.0.1) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xhttp_reply("403", "Forbidden", \
"text/html",<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   "&lt;html&gt;&lt;body&gt;Not \
allowed from $si&lt;/body&gt;&lt;/html&gt;");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if ($hu =~ "^/RPC") {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
jsonrpc_dispatch();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         xhttp_reply("200", "OK", \
"text/html",<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   "&lt;html&gt;&lt;body&gt;Wrong \
URL $hu&lt;/body&gt;&lt;/html&gt;");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">    exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Routing to voicemail server<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">route[TOVOICEMAIL] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_VOICEMAIL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(!is_method("INVITE|SUBSCRIBE")) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # check if VoiceMail server IP is \
defined<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (strempty($sel(cfg_get.voicemail.srv_ip))) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xlog("SCRIPT: VoiceMail routing enabled but IP \
not defined\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(is_method("INVITE")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if($avp(oexten)==$null) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 $ru = "sip:" + $avp(oexten) + "@" + \
$sel(cfg_get.voicemail.srv_ip)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   + ":" + \
$sel(cfg_get.voicemail.srv_port);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         } else {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if($rU==$null) \
return;<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 $ru = "sip:" + $rU + "@" + \
$sel(cfg_get.voicemail.srv_ip)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                                   + ":" + \
$sel(cfg_get.voicemail.srv_port);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         return;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Manage outgoing branches<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">branch_route[MANAGE_BRANCH] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         xdbg("new branch [$T_branch_idx] to \
$ru\n");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         route(NATMANAGE);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Manage incoming replies<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">reply_route {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(!sanity_check("17604", "6")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xlog("Malformed SIP response from \
$si:$sp\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 drop;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Manage incoming replies in transaction \
context<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">onreply_route[MANAGE_REPLY] {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         xdbg("incoming reply\n");<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if(status=~"[12][0-9][0-9]") \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 route(NATMANAGE);<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"># Manage failure routing cases<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">failure_route[MANAGE_FAILURE] {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (t_is_canceled()) exit;<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_BLOCK3XX<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # block call redirect based on 3xx \
replies.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (t_check_status("3[0-9][0-9]")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_reply("404","Not \
found");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_BLOCK401407<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # block call redirect based on 401, 407 \
replies.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (t_check_status("401|407")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_reply("404","Not \
found");<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!ifdef WITH_VOICEMAIL<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # serial forking<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # - route to voicemail on busy or no answer \
(timeout)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (t_check_status("486|408")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 $du = $null;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 \
route(TOVOICEMAIL);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">#!endif<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">}<o:p></o:p></span></code></pre>  <p \
style="margin:0in;background:white;box-sizing:  border-box;font-variant-ligatures: \
normal;font-variant-caps:  normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">As you can see I just one
            thing in </span><code><span
              style="font-size:9.0pt;font-family:Consolas;color:#24292F">request_route</span></code><span
  style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F"><o:p></o:p></span></p>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">request_route {<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # per request initial \
checks<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # route(REQINIT);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # NAT detection<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         #route(NATDETECT);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # CANCEL processing<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("CANCEL")) {<o:p></o:p></span></code></pre> \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if (t_check_trans()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
route(RELAY);<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 exit;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         # handle retransmissions<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (!is_method("ACK")) {<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 if(t_precheck_trans()) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          \
t_check_trans();<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                          exit;<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 t_check_trans();<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         if (is_method("REGISTER")) \
{<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">                 xdbg("request from \
gggggggggggggggggggggggggggggggggggggggggg - $rm from $fu \
(IP:$si:$sp)\n");<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">        }<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">         \
rewritehostport("172.28.69.52:5060");<o:p></o:p></span></code></pre>  <p \
style="margin:0in;background:white;box-sizing:  border-box;font-variant-ligatures: \
normal;font-variant-caps:  normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">The </span><code><span
              style="font-size:9.0pt;font-family:Consolas;color:#24292F">172.28.69.52</span></code><span
  style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F"> is ip of my \
Freeswitch<o:p></o:p></span></p>  <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">After I try to call from
            Zoiper5, I get below error in Kamailio log and Zoiper does
            not work.<o:p></o:p></span></p>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <h3
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:14.0pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Troubleshooting<o:p></o:p></span></h3>
        <h4
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Reproduction<o:p></o:p></span></h4>
        <ul type="disc">
          <li class="MsoNormal"
style="color:#24292F;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1
            level1 lfo1;background:white;box-sizing: border-box">
            <span style="font-size:10.5pt;font-family:&quot;Segoe
              UI&quot;,sans-serif">pull official Kamailio docker image \
                </span><code><span
                style="font-size:9.0pt;font-family:Consolas">kamailio/kamailio
                5.4.6-buster</span></code><span
              style="font-size:10.5pt;font-family:&quot;Segoe
              UI&quot;,sans-serif"><o:p></o:p></span></li>
          <li class="MsoNormal"
style="color:#24292F;margin-top:3.0pt;mso-margin-bottom-alt:auto;mso-list:l1
            level1 lfo1;background:white;box-sizing: border-box">
            <span style="font-size:10.5pt;font-family:&quot;Segoe
              UI&quot;,sans-serif">then run below command<o:p></o:p></span></li>
        </ul>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">docker run --net=host --name kamailio \
\<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">       -v /home/ssoroosh/kamailio:/etc/kamailio \
\<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">       \
kamailio/kamailio:5.4.6-buster<o:p></o:p></span></code></pre>  <h4
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Debugging Data<o:p></o:p></span></h4>
        <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">I do not have any debug
            data<o:p></o:p></span></p>
        <h4
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Log Messages<o:p></o:p></span></h4>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Listening on<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">             udp: 172.28.72.99 [172.28.72.99]:5060 advertise \
172.28.72.99:5060<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Aliases:<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to \
import bind_ob - maybe module is not loaded<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not \
available<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 0(1) INFO: &lt;core&gt; [main.c:2919]: main(): processes (at \
least): 16 - shm size: 67108864 - pkg size: 8388608<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 0(1) INFO: &lt;core&gt; [core/udp_server.c:154]: \
probe_max_receive_buffer(): SO_RCVBUF is initially \
212992<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 0(1) INFO: &lt;core&gt; [core/udp_server.c:206]: \
probe_max_receive_buffer(): SO_RCVBUF is finally \
425984<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">13(19) INFO: jsonrpcs [jsonrpcs_sock.c:443]: \
jsonrpc_dgram_process(): a new child 0/19<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">15(21) INFO: ctl [io_listener.c:210]: io_listen_loop(): \
io_listen_loop: using epoll_lt as the io watch method (auto \
detected)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">��</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) INFO: &lt;core&gt; [core/parser/parse_fline.c:156]: \
parse_first_line(): ERROR:parse_first_line: method not followed by \
SP<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
0)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 6(12) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 6(12) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">��</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 6(12) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 7(13) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 7(13) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 7(13) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 8(14) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 2(8) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 4(10) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 1(7) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 3(9) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 5(11) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 6(12) ERROR: &lt;core&gt; [core/parser/parse_fline.c:271]: \
parse_first_line(): parse_first_line: bad message (offset: \
41)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 6(12) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 6(12) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
        <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 7(13) ERROR: &lt;core&gt; [core/parser/msg_parser.c:681]: \
parse_msg(): ERROR: parse_msg: message=&lt;</span></code><code><span \
style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,sans-serif;color:#24292F;border:none \
windowtext 1.0pt;padding:0in">���</span></code><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">&gt;<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"> 7(13) ERROR: &lt;core&gt; [core/receive.c:310]: receive_msg(): \
core parsing of SIP message failed \
(172.28.64.1:51370/1)<o:p></o:p></span></code></pre>  <h4
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">SIP Traffic<o:p></o:p></span></h4>
        <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">My pcap is attached<br>
            <a
              href="https://github.com/kamailio/kamailio/files/8326814/sip.zip"
              moz-do-not-send="true">sip.zip</a><o:p></o:p></span></p>
        <h3
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:14.0pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Possible \
Solutions<o:p></o:p></span></h3>  <p
style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:10.5pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">I have not any solution
            yet.<o:p></o:p></span></p>
        <h3
style="mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;background:white;box-sizing:
  border-box;font-variant-ligatures: normal;font-variant-caps:
          normal;orphans: 2;text-align:start;widows:
          2;-webkit-text-stroke-width: 0px;text-decoration-thickness:
          initial;text-decoration-style: initial;text-decoration-color:
          initial;word-spacing:0px">
          <span style="font-size:14.0pt;font-family:&quot;Segoe
            UI&quot;,sans-serif;color:#24292F">Additional \
Information<o:p></o:p></span></h3>  <ul type="disc">
          <li class="MsoNormal"
style="color:#24292F;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l2
            level1 lfo2;background:white;box-sizing: border-box">
            <strong><span
                style="font-size:10.5pt;font-family:&quot;Segoe
                UI&quot;,sans-serif">Kamailio Version</span></strong><span
              style="font-size:10.5pt;font-family:&quot;Segoe
              UI&quot;,sans-serif"> - output of </span><code><span
                style="font-size:9.0pt;font-family:Consolas">kamailio \
-v</span></code><span  style="font-size:10.5pt;font-family:&quot;Segoe
              UI&quot;,sans-serif"><o:p></o:p></span></li>
        </ul>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">version: kamailio 5.4.6 \
(x86_64/linux)<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, \
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, \
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, \
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, \
TLS_PTHREAD_MUTEX_SHARED<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, \
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE \
8MB<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">poll method support: poll, epoll_lt, epoll_et, sigio_rt, \
select.<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">id: unknown<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">compiled with gcc 8.3.0<o:p></o:p></span></code></pre>  <ul \
type="disc">  <li class="MsoNormal"
style="color:#24292F;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0
            level1 lfo3;background:white;box-sizing: border-box">
            <strong><span
                style="font-size:10.5pt;font-family:&quot;Segoe
                UI&quot;,sans-serif">Operating System</span></strong><span
              style="font-size:10.5pt;font-family:&quot;Segoe
              UI&quot;,sans-serif">:<o:p></o:p></span></li>
        </ul>
        <pre style="background:white;box-sizing: border-box;overflow-wrap: \
normal;background-color:var(--color-canvas-subtle);border-radius: \
6px;overflow:auto"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Linux master 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 \
UTC 2022 x86_64 GNU/Linux<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in"><o:p> </o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">root@master:/home# lsb_release -a<o:p></o:p></span></code></pre>  \
<pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">No LSB modules are available.<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Distributor ID: Debian<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Description:    Debian GNU/Linux 10 \
(buster)<o:p></o:p></span></code></pre>  <pre style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Release:        10<o:p></o:p></span></code></pre>  <pre \
style="background:white"><code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F;border:none windowtext \
1.0pt;padding:0in">Codename:       buster</span></code><span \
style="font-size:9.0pt;font-family:Consolas;color:#24292F"><o:p></o:p></span></pre>  \
<p class="MsoNormal"><o:p> </o:p></p>  <p class="MsoNormal"><b>How to resolve \
this?</b><o:p></o:p></p>  <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">thanks<o:p></o:p></p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" \
wrap="">__________________________________________________________ Kamailio - Users \
                Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" \
                href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
                
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <a class="moz-txt-link-freetext" \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
 </pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" \
href="http://www.asipto.com">www.asipto.com</a> <a class="moz-txt-link-abbreviated" \
href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a \
class="moz-txt-link-abbreviated" \
href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a> Kamailio \
Advanced Training - Online  March 28-31, 2022 (Europe Timezone)
  * <a class="moz-txt-link-freetext" \
href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic