<div dir="ltr">my config looks like this:<div><br></div><div><div>#!KAMAILIO</div><div> </div><div># Dipak 01/23/2014 - Added FreeSWITCH server forwarding, User auth and additional debug prints</div><div>#!define WITH_MYSQL</div>
<div>#!define WITH_AUTH</div><div>#!define WITH_USRLOCDB</div><div>#!define WITH_FREESWITCH</div><div>#!define WITH_NAT</div><div>#!define WITH_DEBUG</div><div>#!define WITH_CFGSAMPLES</div><div>#!define WITH_WEBSOCKETS</div>
<div>#!define WITH_TLS</div><div> </div><div>#!substdef "!MY_IP_ADDR!10.1.128.11!g"</div><div>#!substdef "!MY_DOMAIN!10.1.128.11!g"</div><div>#!substdef "!MY_WS_PORT!4232!g"</div><div>#!substdef "!MY_WSS_PORT!4233!g"</div>
<div>#!substdef "!MY_WS_ADDR!tcp:MY_IP_ADDR:MY_WS_PORT!g"</div><div>#!substdef "!MY_WSS_ADDR!tls:MY_IP_ADDR:MY_WSS_PORT!g"</div><div><br></div><div>#</div><div># Kamailio (OpenSER) SIP Server v3.3 - default configuration script</div>
<div>#     - web: <a href="http://www.kamailio.org">http://www.kamailio.org</a></div><div>#     - git: <a href="http://sip-router.org">http://sip-router.org</a></div><div>#</div><div># Direct your questions about this file to: <<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>></div>
<div>#</div><div># Refer to the Core CookBook at <a href="http://www.kamailio.org/dokuwiki/doku.php">http://www.kamailio.org/dokuwiki/doku.php</a></div><div># for an explanation of possible statements, functions and parameters.</div>
<div>#</div><div># Several features can be enabled using '#!define WITH_FEATURE' directives:</div><div>#</div><div># *** To run in debug mode: </div><div>#     - define WITH_DEBUG</div><div>#</div><div># *** To enable mysql: </div>
<div>#     - define WITH_MYSQL</div><div>#</div><div># *** To enable authentication execute:</div><div>#     - enable mysql</div><div>#     - define WITH_AUTH</div><div>#     - add users using 'kamctl'</div><div>#</div>
<div># *** To enable IP authentication execute:</div><div>#     - enable mysql</div><div>#     - enable authentication</div><div>#     - define WITH_IPAUTH</div><div>#     - add IP addresses with group id '1' to 'address' table</div>
<div>#</div><div># *** To enable persistent user location execute:</div><div>#     - enable mysql</div><div>#     - define WITH_USRLOCDB</div><div>#</div><div># *** To enable presence server execute:</div><div>#     - enable mysql</div>
<div>#     - define WITH_PRESENCE</div><div>#</div><div># *** To enable nat traversal execute:</div><div>#     - define WITH_NAT</div><div>#     - install RTPProxy: <a href="http://www.rtpproxy.org">http://www.rtpproxy.org</a></div>
<div>#     - start RTPProxy:</div><div>#        rtpproxy -l _your_public_ip_ -s udp:localhost:7722</div><div>#</div><div># *** To enable PSTN gateway routing execute:</div><div>#     - define WITH_PSTN</div><div>#     - set the value of pstn.gw_ip</div>
<div>#     - check route[PSTN] for regexp routing condition</div><div>#</div><div># *** To enable database aliases lookup execute:</div><div>#     - enable mysql</div><div>#     - define WITH_ALIASDB</div><div>#</div><div>
# *** To enable speed dial lookup execute:</div><div>#     - enable mysql</div><div>#     - define WITH_SPEEDDIAL</div><div>#</div><div># *** To enable multi-domain support execute:</div><div>#     - enable mysql</div><div>
#     - define WITH_MULTIDOMAIN</div><div>#</div><div># *** To enable TLS support execute:</div><div>#     - adjust CFGDIR/tls.cfg as needed</div><div>#     - define WITH_TLS</div><div>#</div><div># *** To enable XMLRPC support execute:</div>
<div>#     - define WITH_XMLRPC</div><div>#     - adjust route[XMLRPC] for access policy</div><div>#</div><div># *** To enable anti-flood detection execute:</div><div>#     - adjust pike and htable=>ipban settings as needed (default is</div>
<div>#       block if more than 16 requests in 2 seconds and ban for 300 seconds)</div><div>#     - define WITH_ANTIFLOOD</div><div>#</div><div># *** To block 3XX redirect replies execute:</div><div>#     - define WITH_BLOCK3XX</div>
<div>#</div><div># *** To enable VoiceMail routing execute:</div><div>#     - define WITH_VOICEMAIL</div><div>#     - set the value of voicemail.srv_ip</div><div>#     - adjust the value of voicemail.srv_port</div><div>#</div>
<div># *** To enhance accounting execute:</div><div>#     - enable mysql</div><div>#     - define WITH_ACCDB</div><div>#     - add following columns to database</div><div>#!ifdef ACCDB_COMMENT</div><div>  ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';</div>
<div>  ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';</div><div>  ALTER TABLE acc ADD COLUMN src_ip varchar(64) NOT NULL default '';</div><div>  ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';</div>
<div>  ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';</div><div>  ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';</div><div>  ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';</div>
<div>  ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';</div><div>  ALTER TABLE missed_calls ADD COLUMN src_ip varchar(64) NOT NULL default '';</div><div>  ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';</div>
<div>  ALTER TABLE missed_calls ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';</div><div>  ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';</div><div>#!endif</div><div>
 </div><div>####### Defined Values #########</div><div> </div><div># *** Value defines - IDs used later in config</div><div>#!ifdef WITH_MYSQL</div><div># - database URL - used to connect to database server by modules such</div>
<div>#       as: auth_db, acc, usrloc, a.s.o.</div><div>#<span class="" style="white-space:pre">    </span>-define DBURL "mysql://openser:openserrw@localhost/openser"</div><div>#!define DBURL "mysql://mysql:123456@localhost/kamailio"</div>
<div>#!endif</div><div>#!ifdef WITH_MULTIDOMAIN</div><div># - the value for 'use_domain' parameters</div><div>#!define MULTIDOMAIN 1</div><div>#!else</div><div>#!define MULTIDOMAIN 0</div><div>#!endif</div><div> </div>
<div># - flags</div><div>#   FLT_ - per transaction (message) flags</div><div>#<span class="" style="white-space:pre">  </span>FLB_ - per branch flags</div><div>#!define FLT_ACC 1</div><div>#!define FLT_ACCMISSED 2</div><div>
#!define FLT_ACCFAILED 3</div><div>#!define FLT_NATS 5</div><div> </div><div>#!define FLB_NATB 6</div><div>#!define FLB_NATSIPPING 7</div><div> </div><div>####### Global Parameters #########</div><div> </div><div>#!ifdef WITH_DEBUG</div>
<div>debug=4</div><div>log_stderror=yes</div><div>#!else</div><div>debug=2</div><div>log_stderror=no</div><div>#!endif</div><div> </div><div>memdbg=5</div><div>memlog=5</div><div> </div><div>log_facility=LOG_LOCAL0</div><div>
 </div><div>fork=yes</div><div>children=4</div><div> </div><div>/* uncomment the next line to disable TCP (default on) */</div><div>#disable_tcp=yes</div><div> </div><div>/* uncomment the next line to disable the auto discovery of local aliases</div>
<div>   based on reverse DNS on IPs (default on) */</div><div>#auto_aliases=no</div><div> </div><div>/* add local domain aliases */</div><div>#alias="<a href="http://sip.mydomain.com">sip.mydomain.com</a>"</div>
<div> </div><div>/* uncomment and configure the following line if you want Kamailio to </div><div>   bind on a specific interface/port/proto (default bind on all available) */</div><div>#listen=udp:<a href="http://10.0.0.10:5060">10.0.0.10:5060</a></div>
<div> </div><div>/* port to listen to</div><div> * - can be specified more than once if needed to listen on many ports */</div><div>#port=5060</div><div>listen=udp:<public ip>:5060</div><div>listen=tcp:<public ip>:5060</div>
<div>listen=tls:<public ip>:5061</div><div>listen=udp:<a href="http://10.1.128.11:5060">10.1.128.11:5060</a></div><div>listen=tcp:<a href="http://10.1.128.11:5060">10.1.128.11:5060</a></div><div>#!ifdef WITH_WEBSOCKETS</div>
<div>listen=MY_WS_ADDR</div><div>#!ifdef WITH_TLS</div><div><span class="" style="white-space:pre">     </span>listen=MY_WSS_ADDR</div><div>#!endif</div><div>#!endif</div><div> </div><div><br></div><div>mhomed=1</div><div> </div>
<div>#!ifdef WITH_TLS</div><div>enable_tls=yes</div><div>#!endif</div><div> </div><div># life time of TCP connection when there is no traffic</div><div># - a bit higher than registration expires to cope with UA behind NAT</div>
<div>tcp_connection_lifetime=3605</div><div><br></div><div>tcp_accept_no_cl=yes</div><div>tcp_rd_buf_size=16384</div><div> </div><div>#syn_branch=0</div><div><br></div><div>####### Custom Parameters #########</div><div> </div>
<div># These parameters can be modified runtime via RPC interface</div><div># - see the documentation of 'cfg_rpc' module.</div><div>#</div><div># Format: <a href="http://group.id">group.id</a> = value 'desc' description</div>
<div># Access: $sel(<a href="http://cfg_get.group.id">cfg_get.group.id</a>) or @<a href="http://cfg_get.group.id">cfg_get.group.id</a></div><div>#</div><div> </div><div>#!ifdef WITH_PSTN</div><div># PSTN GW Routing</div><div>
#</div><div># - pstn.gw_ip: valid IP or hostname as string value, example:</div><div># pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"</div><div>#</div><div># - by default is empty to avoid misrouting</div>
<div>pstn.gw_ip = "" desc "PSTN GW Address"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_VOICEMAIL</div><div># VoiceMail Routing on offline, busy or no answer</div><div>#</div><div># - by default Voicemail server IP is empty to avoid misrouting</div>
<div>voicemail.srv_ip = "" desc "VoiceMail IP Address"</div><div>voicemail.srv_port = "5060" desc "VoiceMail Port"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_FREESWITCH</div>
<div>freeswitch.bindip = "10.1.128.34" desc "FreeSWITCH IP Address, to be changed to DN to be resolved by DNSSRV for load distribution"</div><div>freeswitch.bindport = "5060" desc "FreeSWITCH Port"</div>
<div>kamailio.bindip = "10.1.128.11" desc "Kamailio Internal SIP Address"</div><div>kamailio.bindport = "5060" desc "Kamailio Internal SIP listen Port"</div><div>kamailio.pubbindip = "<public ip>" desc "Kamailio External SIP Address"</div>
<div>kamailio.pubbindport = "5060" desc "Kamailio External SIP listen Port"</div><div>#!endif</div><div> </div><div>####### Modules Section ########</div><div> </div><div># set paths to location of modules (to sources or installation folders)</div>
<div>#!ifdef WITH_SRCPATH</div><div>#mpath="modules_k:modules"</div><div>mpath="modules"</div><div>#!else</div><div>mpath="/usr/lib64/kamailio/modules/"</div><div>#!endif</div><div> </div><div>
#!ifdef WITH_MYSQL</div><div>loadmodule "db_mysql.so"</div><div>#!endif</div><div> </div><div>loadmodule "mi_fifo.so"</div><div>loadmodule "kex.so"</div><div>loadmodule "tm.so"</div>
<div>loadmodule "tmx.so"</div><div>loadmodule "sl.so"</div><div>loadmodule "rr.so"</div><div>loadmodule "pv.so"</div><div>loadmodule "maxfwd.so"</div><div>loadmodule "usrloc.so"</div>
<div>loadmodule "registrar.so"</div><div>loadmodule "textops.so"</div><div>loadmodule "siputils.so"</div><div>loadmodule "xlog.so"</div><div>loadmodule "sanity.so"</div><div>
loadmodule "ctl.so"</div><div>loadmodule "cfg_rpc.so"</div><div>loadmodule "mi_rpc.so"</div><div>loadmodule "acc.so"</div><div> </div><div>#!ifdef WITH_AUTH</div><div>loadmodule "auth.so"</div>
<div>loadmodule "auth_db.so"</div><div>#!ifdef WITH_IPAUTH</div><div>loadmodule "permissions.so"</div><div>#!endif</div><div>#!endif</div><div> </div><div>#!ifdef WITH_ALIASDB</div><div>loadmodule "alias_db.so"</div>
<div>#!endif</div><div> </div><div>#!ifdef WITH_SPEEDDIAL</div><div>loadmodule "speeddial.so"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_MULTIDOMAIN</div><div>loadmodule "domain.so"</div><div>
#!endif</div><div> </div><div>#!ifdef WITH_PRESENCE</div><div>loadmodule "presence.so"</div><div>loadmodule "presence_xml.so"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_NAT</div><div>loadmodule "nathelper.so"</div>
<div>loadmodule "rtpproxy.so"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_TLS</div><div>loadmodule "tls.so"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_ANTIFLOOD</div><div>loadmodule "htable.so"</div>
<div>loadmodule "pike.so"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_XMLRPC</div><div>loadmodule "xmlrpc.so"</div><div>#!endif</div><div> </div><div>#!ifdef WITH_DEBUG</div><div>loadmodule "debugger.so"</div>
<div>#!endif</div><div> </div><div>#!ifdef WITH_FREESWITCH</div><div>loadmodule "uac.so"</div><div><br></div><div>#loadmodule "ipops.so"</div><div>#loadmodule "sqlops.so"</div><div>#modparam("sqlops","sqlcon","ca=>mysql://mysql:XXXXXX@localhost/kamailio")</div>
<div>#!endif</div><div><br></div><div>#!ifdef WITH_WEBSOCKETS</div><div>loadmodule "xhttp.so"</div><div>loadmodule "websocket.so"</div><div>#!ifdef WITH_NAT</div><div>#loadmodule "nathelper.so"</div>
<div>#!endif</div><div>#!endif</div><div><br></div><div># ----------------- setting module-specific parameters ---------------</div><div> </div><div> </div><div># ----- mi_fifo params -----</div><div>modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")</div>
<div> </div><div> </div><div># ----- tm params -----</div><div># auto-discard branches from previous serial forking leg</div><div>modparam("tm", "failure_reply_mode", 3)</div><div># default retransmission timeout: 30sec</div>
<div>modparam("tm", "fr_timer", 30000)</div><div># default invite retransmission timeout after 1xx: 120sec</div><div>modparam("tm", "fr_inv_timer", 120000)</div><div> </div><div> </div>
<div># ----- rr params -----</div><div># add value to ;lr param to cope with most of the UAs</div><div>modparam("rr", "enable_full_lr", 1)</div><div># do not append from tag to the RR (no need for this script)</div>
<div>#!ifdef WITH_FREESWITCH</div><div>modparam("rr", "append_fromtag", 1)</div><div>#!else</div><div>modparam("rr", "append_fromtag", 0)</div><div>#!endif</div><div> </div><div> </div>
<div># ----- registrar params -----</div><div>modparam("registrar", "method_filtering", 1)</div><div>/* uncomment the next line to disable parallel forking via location */</div><div># modparam("registrar", "append_branches", 0)</div>
<div>/* uncomment the next line not to allow more than 10 contacts per AOR */</div><div>#modparam("registrar", "max_contacts", 10)</div><div># max value for expires of registrations</div><div>modparam("registrar", "max_expires", 3600)</div>
<div># set it to 1 to enable GRUU</div><div>modparam("registrar", "gruu_enabled", 0)</div><div> </div><div> </div><div># ----- acc params -----</div><div>/* what special events should be accounted ? */</div>
<div>modparam("acc", "early_media", 0)</div><div>modparam("acc", "report_ack", 0)</div><div>modparam("acc", "report_cancels", 0)</div><div>/* by default ww do not adjust the direct of the sequential requests.</div>
<div>   if you enable this parameter, be sure the enable "append_fromtag"</div><div>   in "rr" module */</div><div>modparam("acc", "detect_direction", 0)</div><div>/* account triggers (flags) */</div>
<div>modparam("acc", "log_flag", FLT_ACC)</div><div>modparam("acc", "log_missed_flag", FLT_ACCMISSED)</div><div>modparam("acc", "log_extra", </div><div><span class="" style="white-space:pre"> </span>"src_user=$fU;src_domain=$fd;src_ip=$si;"</div>
<div><span class="" style="white-space:pre">    </span>"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")</div><div>modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)</div><div>/* enhanced DB accounting */</div>
<div>#!ifdef WITH_ACCDB</div><div>modparam("acc", "db_flag", FLT_ACC)</div><div>modparam("acc", "db_missed_flag", FLT_ACCMISSED)</div><div>modparam("acc", "db_url", DBURL)</div>
<div>modparam("acc", "db_extra",</div><div><span class="" style="white-space:pre">      </span>"src_user=$fU;src_domain=$fd;src_ip=$si;"</div><div><span class="" style="white-space:pre">        </span>"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")</div>
<div>#!endif</div><div> </div><div> </div><div># ----- usrloc params -----</div><div>/* enable DB persistency for location entries */</div><div>#!ifdef WITH_USRLOCDB</div><div>modparam("usrloc", "db_url", DBURL)</div>
<div>modparam("usrloc", "db_mode", 2)</div><div>modparam("usrloc", "use_domain", MULTIDOMAIN)</div><div>#!endif</div><div> </div><div> </div><div># ----- auth_db params -----</div><div>
#!ifdef WITH_AUTH</div><div>modparam("auth_db", "db_url", DBURL)</div><div>modparam("auth_db", "calculate_ha1", yes)</div><div>modparam("auth_db", "password_column", "password")</div>
<div>modparam("auth_db", "load_credentials", "")</div><div>modparam("auth_db", "use_domain", MULTIDOMAIN)</div><div> </div><div># ----- permissions params -----</div><div>
#!ifdef WITH_IPAUTH</div><div>modparam("permissions", "db_url", DBURL)</div><div>modparam("permissions", "db_mode", 1)</div><div>#!endif</div><div> </div><div>#!endif</div><div> </div>
<div> </div><div># ----- alias_db params -----</div><div>#!ifdef WITH_ALIASDB</div><div>modparam("alias_db", "db_url", DBURL)</div><div>modparam("alias_db", "use_domain", MULTIDOMAIN)</div>
<div>#!endif</div><div> </div><div> </div><div># ----- speedial params -----</div><div>#!ifdef WITH_SPEEDDIAL</div><div>modparam("speeddial", "db_url", DBURL)</div><div>modparam("speeddial", "use_domain", MULTIDOMAIN)</div>
<div>#!endif</div><div> </div><div> </div><div># ----- domain params -----</div><div>#!ifdef WITH_MULTIDOMAIN</div><div>modparam("domain", "db_url", DBURL)</div><div># register callback to match myself condition with domains list</div>
<div>modparam("domain", "register_myself", 1)</div><div>#!endif</div><div> </div><div> </div><div>#!ifdef WITH_PRESENCE</div><div># ----- presence params -----</div><div>modparam("presence", "db_url", DBURL)</div>
<div> </div><div># ----- presence_xml params -----</div><div>modparam("presence_xml", "db_url", DBURL)</div><div>modparam("presence_xml", "force_active", 1)</div><div>#!endif</div><div>
 </div><div> </div><div>#!ifdef WITH_NAT</div><div># ----- rtpproxy params -----</div><div>modparam("rtpproxy", "rtpproxy_sock", "udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a>")</div>
<div> </div><div># ----- nathelper params -----</div><div>modparam("nathelper", "natping_interval", 30)</div><div>modparam("nathelper", "ping_nated_only", 1)</div><div>modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)</div>
<div>modparam("nathelper", "sipping_from", "<a href="mailto:sip%3Apinger@kamailio.org">sip:pinger@kamailio.org</a>")</div><div> </div><div># params needed for NAT traversal in other modules</div>
<div>modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")</div><div>modparam("usrloc", "nat_bflag", FLB_NATB)</div><div>#!endif</div><div> </div><div> </div><div>
#!ifdef WITH_TLS</div><div># ----- tls params -----</div><div>modparam("tls", "config", "/etc/kamailio/tls.cfg")</div><div>#!endif</div><div> </div><div>#!ifdef WITH_ANTIFLOOD</div><div># ----- pike params -----</div>
<div>modparam("pike", "sampling_time_unit", 2)</div><div>modparam("pike", "reqs_density_per_unit", 16)</div><div>modparam("pike", "remove_latency", 4)</div><div>
 </div><div># ----- htable params -----</div><div># ip ban htable with autoexpire after 5 minutes</div><div>modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")</div><div>#!endif</div>
<div> </div><div>#!ifdef WITH_XMLRPC</div><div># ----- xmlrpc params -----</div><div>modparam("xmlrpc", "route", "XMLRPC");</div><div>modparam("xmlrpc", "url_match", "^/RPC")</div>
<div>#!endif</div><div> </div><div>#!ifdef WITH_DEBUG</div><div># ----- debugger params -----</div><div>modparam("debugger", "cfgtrace", 1)</div><div>#!endif</div><div> </div><div>####### Routing Logic ########</div>
<div> </div><div> </div><div># Main SIP request routing logic</div><div># - processing of any incoming SIP request starts with this route</div><div># - note: this is the same as route { ... }</div><div>request_route {</div>
<div> </div><div><span class="" style="white-space:pre">    </span># per request initial checks</div><div><span class="" style="white-space:pre">       </span>route(REQINIT);</div><div> </div><div>#!ifdef WITH_WEBSOCKETS</div><div>
<span class="" style="white-space:pre">       </span>if (nat_uac_test(64)) {</div><div><span class="" style="white-space:pre">            </span># Do NAT traversal stuff for requests from a WebSocket</div><div><span class="" style="white-space:pre">             </span># connection - even if it is not behind a NAT!</div>
<div><span class="" style="white-space:pre">            </span># This won't be needed in the future if Kamailio and the</div><div><span class="" style="white-space:pre">               </span># WebSocket client support Outbound and Path.</div>
<div><span class="" style="white-space:pre">            </span>xlog("L_INFO", "Websockets NAT detection!!!\n");</div><div><span class="" style="white-space:pre">               </span>force_rport();</div><div><span class="" style="white-space:pre">             </span>if (is_method("REGISTER")) {</div>
<div><span class="" style="white-space:pre">                    </span>fix_nated_register();</div><div><span class="" style="white-space:pre">              </span>} else {</div><div><span class="" style="white-space:pre">                   </span>if (!add_contact_alias()) {</div>
<div><span class="" style="white-space:pre">                            </span>xlog("L_ERR", "Error aliasing contact <$ct>\n");</div><div><span class="" style="white-space:pre">                         </span>sl_send_reply("400", "Bad Request");</div>
<div><span class="" style="white-space:pre">                            </span>exit;</div><div><span class="" style="white-space:pre">                      </span>}</div><div><span class="" style="white-space:pre">          </span>}</div><div><span class="" style="white-space:pre">  </span>}</div>
<div>#!endif</div><div><br></div><div><span class="" style="white-space:pre">     </span># NAT detection</div><div><span class="" style="white-space:pre">    </span>route(NATDETECT);</div><div> </div><div><span class="" style="white-space:pre">  </span># CANCEL processing</div>
<div><span class="" style="white-space:pre">    </span>if (is_method("CANCEL"))</div><div><span class="" style="white-space:pre"> </span>{</div><div><span class="" style="white-space:pre">          </span>if (t_check_trans())</div>
<div><span class="" style="white-space:pre">                    </span>t_relay();</div><div><span class="" style="white-space:pre">         </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span># handle requests within SIP dialogs</div>
<div><span class="" style="white-space:pre">    </span>route(WITHINDLG);</div><div> </div><div><span class="" style="white-space:pre">  </span>### only initial requests (no To tag)</div><div> </div><div><span class="" style="white-space:pre">      </span>t_check_trans();</div>
<div> </div><div><span class="" style="white-space:pre">    </span># authentication</div><div><span class="" style="white-space:pre">   </span>route(AUTH);</div><div> </div><div><span class="" style="white-space:pre">       </span># record routing for dialog forming requests (in case they are routed)</div>
<div><span class="" style="white-space:pre">    </span># - remove preloaded route headers</div><div><span class="" style="white-space:pre"> </span>remove_hf("Route");</div><div><span class="" style="white-space:pre">      </span>if (is_method("INVITE|SUBSCRIBE"))</div>
<div><span class="" style="white-space:pre">            </span>record_route();</div><div> </div><div><span class="" style="white-space:pre">    </span># account only INVITEs</div><div><span class="" style="white-space:pre">     </span>if (is_method("INVITE"))</div>
<div><span class="" style="white-space:pre">    </span>{</div><div><span class="" style="white-space:pre">          </span>setflag(FLT_ACC); # do accounting</div><div><span class="" style="white-space:pre">  </span>}</div><div> </div>
<div><span class="" style="white-space:pre">    </span># dispatch requests to foreign domains</div><div><span class="" style="white-space:pre">     </span>route(SIPOUT);</div><div> </div><div><span class="" style="white-space:pre">     </span>### requests for my local domains</div>
<div> </div><div><span class="" style="white-space:pre">    </span># handle presence related requests</div><div><span class="" style="white-space:pre"> </span>route(PRESENCE);</div><div> </div><div><span class="" style="white-space:pre">   </span># handle registrations</div>
<div><span class="" style="white-space:pre">    </span>route(REGISTRAR);</div><div> </div><div><span class="" style="white-space:pre">  </span>if ($rU==$null)</div><div><span class="" style="white-space:pre">    </span>{</div><div>
<span class="" style="white-space:pre">               </span># request with no Username in RURI</div><div><span class="" style="white-space:pre">         </span>sl_send_reply("484","Address Incomplete");</div><div><span class="" style="white-space:pre">             </span>exit;</div>
<div><span class="" style="white-space:pre">    </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span># dispatch destinations to PSTN</div><div><span class="" style="white-space:pre">    </span>route(PSTN);</div>
<div> </div><div><span class="" style="white-space:pre">    </span>#!ifdef WITH_FREESWITCH</div><div><span class="" style="white-space:pre">    </span># save callee ID</div><div><span class="" style="white-space:pre">   </span>$avp(callee) = $rU;</div>
<div><span class="" style="white-space:pre">    </span>route(FSDISPATCH);</div><div><span class="" style="white-space:pre"> </span>#!endif</div><div> </div><div><span class="" style="white-space:pre">    </span># user location service</div>
<div><span class="" style="white-space:pre">    </span>route(LOCATION);</div><div> </div><div><span class="" style="white-space:pre">   </span>route(RELAY);</div><div>}</div><div> </div><div> </div><div>route[RELAY] {</div><div>
 </div><div><span class="" style="white-space:pre">       </span># enable additional event routes for forwarded requests</div><div><span class="" style="white-space:pre">    </span># - serial forking, RTP relaying handling, a.s.o.</div>
<div>#!ifdef WITH_CFGSAMPLES</div><div><span class="" style="white-space:pre">      </span>if (is_method("INVITE|SUBSCRIBE")) {</div><div><span class="" style="white-space:pre">             </span>t_on_branch("MANAGE_BRANCH");</div>
<div><span class="" style="white-space:pre">            </span>t_on_reply("MANAGE_REPLY");</div><div><span class="" style="white-space:pre">      </span>}</div><div><span class="" style="white-space:pre">  </span>if (is_method("INVITE")) {</div>
<div><span class="" style="white-space:pre">            </span>t_on_failure("MANAGE_FAILURE");</div><div><span class="" style="white-space:pre">  </span>}</div><div>#!endif</div><div><span class="" style="white-space:pre">    </span>if (!t_relay()) {</div>
<div><span class="" style="white-space:pre">            </span>sl_reply_error();</div><div><span class="" style="white-space:pre">  </span>}</div><div><span class="" style="white-space:pre">  </span>exit;</div><div>}</div><div> </div>
<div># Per SIP request initial checks</div><div>route[REQINIT] {</div><div>#!ifdef WITH_ANTIFLOOD</div><div><span class="" style="white-space:pre"> </span># flood dection from same IP and traffic ban for a while</div><div>
<span class="" style="white-space:pre">       </span># be sure you exclude checking trusted peers, such as pstn gateways</div><div><span class="" style="white-space:pre">        </span># - local host excluded (e.g., loop to self)</div>
<div><span class="" style="white-space:pre">    </span>if(src_ip!=myself)</div><div><span class="" style="white-space:pre"> </span>{</div><div><span class="" style="white-space:pre">          </span>if($sht(ipban=>$si)!=$null)</div>
<div><span class="" style="white-space:pre">            </span>{</div><div><span class="" style="white-space:pre">                  </span># ip is already blocked</div><div><span class="" style="white-space:pre">                    </span>xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");</div>
<div><span class="" style="white-space:pre">                    </span>exit;</div><div><span class="" style="white-space:pre">              </span>}</div><div><span class="" style="white-space:pre">          </span>if (!pike_check_req())</div><div><span class="" style="white-space:pre">             </span>{</div>
<div><span class="" style="white-space:pre">                    </span>xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");</div><div><span class="" style="white-space:pre">                    </span>$sht(ipban=>$si) = 1;</div>
<div><span class="" style="white-space:pre">                    </span>exit;</div><div><span class="" style="white-space:pre">              </span>}</div><div><span class="" style="white-space:pre">  </span>}</div><div>#!endif</div><div> </div><div><span class="" style="white-space:pre">    </span>if (!mf_process_maxfwd_header("10")) {</div>
<div><span class="" style="white-space:pre">            </span>sl_send_reply("483","Too Many Hops");</div><div><span class="" style="white-space:pre">          </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div>
<div> </div><div><span class="" style="white-space:pre">    </span>if(!sanity_check("1511", "7"))</div><div><span class="" style="white-space:pre"> </span>{</div><div><span class="" style="white-space:pre">          </span>xlog("Malformed SIP message from $si:$sp\n");</div>
<div><span class="" style="white-space:pre">            </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div><div>}</div><div> </div><div># Handle requests within SIP dialogs</div><div>route[WITHINDLG] {</div>
<div><span class="" style="white-space:pre">    </span>if (has_totag()) {</div><div><span class="" style="white-space:pre">         </span># sequential request withing a dialog should</div><div><span class="" style="white-space:pre">               </span># take the path determined by record-routing</div>
<div><span class="" style="white-space:pre">            </span>if (loose_route()) {</div><div>#!ifdef WITH_WEBSOCKETS</div><div><span class="" style="white-space:pre">         </span>xlog("L_INFO", "Websockets handling ruri in WITHINDLG!!!\n");</div>
<div><span class="" style="white-space:pre">                    </span>if ($du == "") {</div><div><span class="" style="white-space:pre">                         </span>if (!handle_ruri_alias()) {</div><div><span class="" style="white-space:pre">                                        </span>xlog("L_ERR", "Bad alias <$ru>\n");</div>
<div><span class="" style="white-space:pre">                                    </span>sl_send_reply("400", "Bad Request");</div><div><span class="" style="white-space:pre">                                   </span>exit;</div><div><span class="" style="white-space:pre">                              </span>}</div>
<div><span class="" style="white-space:pre">                    </span>}</div><div>#!endif</div><div><span class="" style="white-space:pre">                    </span>route(DLGURI);</div><div><span class="" style="white-space:pre">                     </span>if (is_method("BYE")) {</div>
<div><span class="" style="white-space:pre">                            </span>setflag(FLT_ACC); # do accounting ...</div><div><span class="" style="white-space:pre">                              </span>setflag(FLT_ACCFAILED); # ... even if the transaction fails</div><div>
<span class="" style="white-space:pre">                       </span>}</div><div><span class="" style="white-space:pre">                  </span>else if ( is_method("ACK") ) {</div><div><span class="" style="white-space:pre">                           </span># ACK is forwarded statelessy</div>
<div><span class="" style="white-space:pre">                            </span>route(NATMANAGE);</div><div><span class="" style="white-space:pre">                  </span>}</div><div><span class="" style="white-space:pre">                  </span>else if ( is_method("NOTIFY") ) {</div>
<div><span class="" style="white-space:pre">                            </span># Add Record-Route for in-dialog NOTIFY as per RFC 6665.</div><div><span class="" style="white-space:pre">                           </span>record_route();</div><div><span class="" style="white-space:pre">                    </span>}</div>
<div><span class="" style="white-space:pre">                    </span>route(RELAY);</div><div><span class="" style="white-space:pre">              </span>} else {</div><div><span class="" style="white-space:pre">                   </span>if (is_method("SUBSCRIBE") && uri == myself) {</div>
<div><span class="" style="white-space:pre">                            </span># in-dialog subscribe requests</div><div><span class="" style="white-space:pre">                             </span>route(PRESENCE);</div><div><span class="" style="white-space:pre">                           </span>exit;</div>
<div><span class="" style="white-space:pre">                    </span>}</div><div><span class="" style="white-space:pre">                  </span>if ( is_method("ACK") ) {</div><div><span class="" style="white-space:pre">                                </span>if ( t_check_trans() ) {</div>
<div><span class="" style="white-space:pre">                                    </span># no loose-route, but stateful ACK;</div><div><span class="" style="white-space:pre">                                        </span># must be an ACK after a 487</div><div><span class="" style="white-space:pre">                                       </span># or e.g. 404 from upstream server</div>
<div><span class="" style="white-space:pre">                                    </span>t_relay();</div><div><span class="" style="white-space:pre">                                 </span>exit;</div><div><span class="" style="white-space:pre">                              </span>} else {</div><div><span class="" style="white-space:pre">                                   </span># ACK without matching transaction ... ignore and discard</div>
<div><span class="" style="white-space:pre">                                    </span>exit;</div><div><span class="" style="white-space:pre">                              </span>}</div><div><span class="" style="white-space:pre">                  </span>}</div><div><span class="" style="white-space:pre">                  </span>sl_send_reply("404","Not here");</div>
<div><span class="" style="white-space:pre">            </span>}</div><div><span class="" style="white-space:pre">          </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div><div>}</div><div> </div><div># Handle SIP registrations</div>
<div>route[REGISTRAR] {</div><div><span class="" style="white-space:pre">   </span>if (is_method("REGISTER"))</div><div><span class="" style="white-space:pre">       </span>{</div><div><span class="" style="white-space:pre">          </span>if(isflagset(FLT_NATS))</div>
<div><span class="" style="white-space:pre">            </span>{</div><div><span class="" style="white-space:pre">                  </span>setbflag(FLB_NATB);</div><div><span class="" style="white-space:pre">                        </span># uncomment next line to do SIP NAT pinging </div>
<div><span class="" style="white-space:pre">                    </span>## setbflag(FLB_NATSIPPING);</div><div><span class="" style="white-space:pre">               </span>}</div><div><span class="" style="white-space:pre">          </span>if (!save("location"))</div>
<div><span class="" style="white-space:pre">                    </span>sl_reply_error();</div><div> </div><div>#!ifdef WITH_FREESWITCH</div><div><span class="" style="white-space:pre">            </span>route(FSREGFWD);</div><div>#!endif</div><div>
<span class="" style="white-space:pre">               </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div><div>}</div><div> </div><div># USER location service</div><div>route[LOCATION] {</div><div> </div><div>
#!ifdef WITH_SPEEDIAL</div><div><span class="" style="white-space:pre">   </span># search for short dialing - 2-digit extension</div><div><span class="" style="white-space:pre">     </span>if($rU=~"^[0-9][0-9]$")</div>
<div><span class="" style="white-space:pre">            </span>if(sd_lookup("speed_dial"))</div><div><span class="" style="white-space:pre">                      </span>route(SIPOUT);</div><div>#!endif</div><div> </div><div>#!ifdef WITH_ALIASDB</div>
<div><span class="" style="white-space:pre">    </span># search in DB-based aliases</div><div><span class="" style="white-space:pre">       </span>if(alias_db_lookup("dbaliases"))</div><div><span class="" style="white-space:pre">         </span>route(SIPOUT);</div>
<div>#!endif</div><div> </div><div><span class="" style="white-space:pre">      </span>$avp(oexten) = $rU;</div><div><span class="" style="white-space:pre">        </span>if (!lookup("location")) {</div><div><span class="" style="white-space:pre">               </span>$var(rc) = $rc;</div>
<div><span class="" style="white-space:pre">            </span>route(TOVOICEMAIL);</div><div><span class="" style="white-space:pre">                </span>t_newtran();</div><div><span class="" style="white-space:pre">               </span>switch ($var(rc)) {</div>
<div><span class="" style="white-space:pre">                    </span>case -1:</div><div><span class="" style="white-space:pre">                   </span>case -3:</div><div><span class="" style="white-space:pre">                           </span>send_reply("404", "Not Found");</div>
<div><span class="" style="white-space:pre">                            </span>exit;</div><div><span class="" style="white-space:pre">                      </span>case -2:</div><div><span class="" style="white-space:pre">                           </span>send_reply("405", "Method Not Allowed");</div>
<div><span class="" style="white-space:pre">                            </span>exit;</div><div><span class="" style="white-space:pre">              </span>}</div><div><span class="" style="white-space:pre">  </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span># when routing via usrloc, log the missed calls also</div>
<div><span class="" style="white-space:pre">    </span>if (is_method("INVITE"))</div><div><span class="" style="white-space:pre"> </span>{</div><div><span class="" style="white-space:pre">          </span>setflag(FLT_ACCMISSED);</div>
<div><span class="" style="white-space:pre">    </span>}</div><div>}</div><div> </div><div># Presence server route</div><div>route[PRESENCE] {</div><div><span class="" style="white-space:pre">    </span>if(!is_method("PUBLISH|SUBSCRIBE"))</div>
<div><span class="" style="white-space:pre">            </span>return;</div><div> </div><div>#!ifdef WITH_PRESENCE</div><div><span class="" style="white-space:pre">        </span>if (!t_newtran())</div><div><span class="" style="white-space:pre">  </span>{</div>
<div><span class="" style="white-space:pre">            </span>sl_reply_error();</div><div><span class="" style="white-space:pre">          </span>exit;</div><div><span class="" style="white-space:pre">      </span>};</div><div> </div><div><span class="" style="white-space:pre"> </span>if(is_method("PUBLISH"))</div>
<div><span class="" style="white-space:pre">    </span>{</div><div><span class="" style="white-space:pre">          </span>handle_publish();</div><div><span class="" style="white-space:pre">          </span>t_release();</div><div><span class="" style="white-space:pre">       </span>}</div>
<div><span class="" style="white-space:pre">    </span>else</div><div><span class="" style="white-space:pre">       </span>if( is_method("SUBSCRIBE"))</div><div><span class="" style="white-space:pre">      </span>{</div><div>
<span class="" style="white-space:pre">               </span>handle_subscribe();</div><div><span class="" style="white-space:pre">                </span>t_release();</div><div><span class="" style="white-space:pre">       </span>}</div><div><span class="" style="white-space:pre">  </span>exit;</div>
<div>#!endif</div><div> </div><div><span class="" style="white-space:pre">      </span># if presence enabled, this part will not be executed</div><div><span class="" style="white-space:pre">      </span>if (is_method("PUBLISH") || $rU==$null)</div>
<div><span class="" style="white-space:pre">    </span>{</div><div><span class="" style="white-space:pre">          </span>sl_send_reply("404", "Not here");</div><div><span class="" style="white-space:pre">              </span>exit;</div>
<div><span class="" style="white-space:pre">    </span>}</div><div><span class="" style="white-space:pre">  </span>return;</div><div>}</div><div> </div><div># Authentication route</div><div>route[AUTH] {</div><div>#!ifdef WITH_AUTH</div>
<div> </div><div>#!ifdef WITH_IPAUTH</div><div><span class="" style="white-space:pre">  </span>if((!is_method("REGISTER")) && allow_source_address())</div><div><span class="" style="white-space:pre">   </span>{</div>
<div><span class="" style="white-space:pre">            </span># source IP allowed</div><div><span class="" style="white-space:pre">                </span>return;</div><div><span class="" style="white-space:pre">    </span>}</div><div>#!endif</div>
<div> </div><div>#!ifdef WITH_FREESWITCH</div><div><span class="" style="white-space:pre">      </span>if(route(FSINBOUND))</div><div><span class="" style="white-space:pre">               </span>return;</div><div>#!endif</div><div> </div><div>
<span class="" style="white-space:pre">       </span>if (is_method("REGISTER") || from_uri==myself)</div><div><span class="" style="white-space:pre">   </span>{</div><div><span class="" style="white-space:pre">          </span># authenticate requests</div>
<div><span class="" style="white-space:pre">            </span>if (!auth_check("$fd", "subscriber", "1")) {</div><div><span class="" style="white-space:pre">                 </span>auth_challenge("$fd", "0");</div>
<div><span class="" style="white-space:pre">                    </span>exit;</div><div><span class="" style="white-space:pre">              </span>}</div><div><span class="" style="white-space:pre">          </span># user authenticated - remove auth header</div>
<div><span class="" style="white-space:pre">            </span>if(!is_method("REGISTER|PUBLISH"))</div><div><span class="" style="white-space:pre">                       </span>consume_credentials();</div><div><span class="" style="white-space:pre">     </span>}</div>
<div><span class="" style="white-space:pre">    </span># if caller is not local subscriber, then check if it calls</div><div><span class="" style="white-space:pre">        </span># a local destination, otherwise deny, not an open relay here</div>
<div><span class="" style="white-space:pre">    </span>xlog("L_INFO", "REGISTER REceived from from_uri\n");#+", for "+uri+", at "+myself+"...\n");</div><div><span class="" style="white-space:pre">      </span>if (from_uri!=myself && uri!=myself)</div>
<div><span class="" style="white-space:pre">    </span>{</div><div><span class="" style="white-space:pre">          </span>sl_send_reply("403","Not relaying");</div><div><span class="" style="white-space:pre">           </span>exit;</div>
<div><span class="" style="white-space:pre">    </span>}</div><div> </div><div>#!endif</div><div><span class="" style="white-space:pre">    </span>return;</div><div>}</div><div> </div><div># Caller NAT detection route</div><div>
route[NATDETECT] {</div><div>#!ifdef WITH_NAT</div><div><span class="" style="white-space:pre">       </span>force_rport();</div><div><span class="" style="white-space:pre">     </span>xlog("L_INFO", "In NATDETECT!!!\n");</div>
<div><span class="" style="white-space:pre">    </span>#We are SBC, receiving from Public UAC and passing it to FS to Private LAN - so, removing the nat test</div><div><span class="" style="white-space:pre">     </span>#if (nat_uac_test("19")) {</div>
<div><span class="" style="white-space:pre">            </span>if (is_method("REGISTER")) {</div><div><span class="" style="white-space:pre">                     </span>fix_nated_register();</div><div><span class="" style="white-space:pre">              </span>} else {</div>
<div><span class="" style="white-space:pre">                    </span>remove_hf("Contact");</div><div><span class="" style="white-space:pre">                    </span>if(route(FSINBOUND)) {</div><div><span class="" style="white-space:pre">                             </span>xlog("L_INFO", "From FS --->\n");</div>
<div><span class="" style="white-space:pre">                            </span>$var(contact_uri) = $fU + "@" + $sel(cfg_get.kamailio.pubbindip) + ":" + $sel(cfg_get.kamailio.pubbindport);</div><div><span class="" style="white-space:pre">                           </span>xlog("L_INFO", "Replacing Contact $ct with $var(contact_uri)...\n");</div>
<div><span class="" style="white-space:pre">                            </span>#add_contact_alias();</div><div><span class="" style="white-space:pre">                              </span>#fix_nated_contact();</div><div><span class="" style="white-space:pre">                              </span>insert_hf("Contact: <sip:$var(contact_uri)>\r\n", "Contact");</div>
<div><span class="" style="white-space:pre">                            </span>xlog("L_INFO", "Removing Route header!!!\n");</div><div><span class="" style="white-space:pre">                          </span>remove_hf("Route");</div><div>
<span class="" style="white-space:pre">                       </span>}</div><div><span class="" style="white-space:pre">                  </span>else {</div><div><span class="" style="white-space:pre">                             </span>xlog("L_INFO", "<--- To FS\n");</div>
<div><span class="" style="white-space:pre">                            </span>$var(contact_uri) = $fU + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport);</div><div><span class="" style="white-space:pre">                         </span>xlog("L_INFO", "Replacing Contact $ct with $var(contact_uri)...\n");</div>
<div><span class="" style="white-space:pre">                            </span>insert_hf("Contact: <sip:$var(contact_uri)>\r\n", "Contact");</div><div><span class="" style="white-space:pre">                    </span>}</div><div><span class="" style="white-space:pre">          </span>}</div>
<div><span class="" style="white-space:pre">            </span>setflag(FLT_NATS);</div><div><span class="" style="white-space:pre"> </span>#}</div><div>#!endif</div><div><span class="" style="white-space:pre">   </span>return;</div><div>
}</div><div> </div><div># RTPProxy control</div><div>route[NATMANAGE] {</div><div>#!ifdef WITH_NAT</div><div><span class="" style="white-space:pre">      </span>xlog("L_INFO", "In NATMANAGE!!!\n");</div><div>
<span class="" style="white-space:pre">       </span>#if (is_request()) {</div><div><span class="" style="white-space:pre">               </span>if(has_totag()) {</div><div><span class="" style="white-space:pre">                  </span>if(check_route_param("nat=yes")) {</div>
<div><span class="" style="white-space:pre">                            </span>setbflag(FLB_NATB);</div><div><span class="" style="white-space:pre">                        </span>}</div><div><span class="" style="white-space:pre">          </span>}</div><div><span class="" style="white-space:pre">  </span>#}</div>
<div><span class="" style="white-space:pre">    </span>if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))</div><div><span class="" style="white-space:pre">                </span>return;</div><div> </div><div><span class="" style="white-space:pre">    </span>if(route(FSINBOUND)) {</div>
<div><span class="" style="white-space:pre">            </span>xlog("L_INFO", "Call is going to public domain. Engaging RTPProxy\n");</div><div><span class="" style="white-space:pre">         </span>rtpproxy_manage("rwei");</div>
<div><span class="" style="white-space:pre">    </span>}</div><div><span class="" style="white-space:pre">  </span>else {</div><div><span class="" style="white-space:pre">             </span>xlog("L_INFO", "Call is going to private IPv4 Media Server. Engaging RTPProxy\n");</div>
<div><span class="" style="white-space:pre">            </span>rtpproxy_manage("rwie");</div><div><span class="" style="white-space:pre"> </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span>if (is_request()) {</div>
<div><span class="" style="white-space:pre">            </span>if (!has_totag()) {</div><div><span class="" style="white-space:pre">                        </span>add_rr_param(";nat=yes");</div><div><span class="" style="white-space:pre">                </span>}</div>
<div><span class="" style="white-space:pre">    </span>}</div><div><span class="" style="white-space:pre">  </span>if (is_reply()) {</div><div><span class="" style="white-space:pre">          </span>xlog("L_INFO", "Reply handling, Contact header shows -> $ct!!!\n");</div>
<div><span class="" style="white-space:pre">            </span>remove_hf("Contact");</div><div><span class="" style="white-space:pre">            </span>if(route(FSINBOUND)) {</div><div><span class="" style="white-space:pre">                     </span>xlog("L_INFO", "From FS --->\n");</div>
<div><span class="" style="white-space:pre">                    </span>#$var(contact_uri) = $(ct{tobody.user}) + "@" + $(ct{tobody.host});</div><div><span class="" style="white-space:pre">                      </span>$var(contact_uri) = $fU + "@" + $sel(cfg_get.kamailio.pubbindip) + ":" + $sel(cfg_get.kamailio.pubbindport);</div>
<div><span class="" style="white-space:pre">                    </span>xlog("L_INFO", "Replacing with $var(contact_uri)...\n");</div><div><span class="" style="white-space:pre">                       </span>insert_hf("Contact: <sip:$var(contact_uri)>\r\n", "Contact");</div>
<div><span class="" style="white-space:pre">                    </span>xlog("L_INFO", "Removing Route header!!!\n");</div><div><span class="" style="white-space:pre">                  </span>remove_hf("Route");</div><div><span class="" style="white-space:pre">              </span>}</div>
<div><span class="" style="white-space:pre">            </span>else {</div><div><span class="" style="white-space:pre">                     </span>xlog("L_INFO", "<--- To FS\n");</div><div><span class="" style="white-space:pre">                     </span>$var(contact_uri) = $fU + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport);</div>
<div><span class="" style="white-space:pre">                    </span>xlog("L_INFO", "Replacing with $var(contact_uri)...\n");</div><div><span class="" style="white-space:pre">                       </span>insert_hf("Contact: <sip:$var(contact_uri)>\r\n", "Contact");</div>
<div><span class="" style="white-space:pre">            </span>}</div><div><span class="" style="white-space:pre">          </span>if(isbflagset(FLB_NATB)) {</div><div><span class="" style="white-space:pre">                 </span>add_contact_alias();</div>
<div><span class="" style="white-space:pre">            </span>}</div><div><span class="" style="white-space:pre">  </span>}</div><div>#!endif</div><div><span class="" style="white-space:pre">    </span>return;</div><div>}</div><div> </div>
<div># URI update for dialog requests</div><div>route[DLGURI] {</div><div>#!ifdef WITH_NAT</div><div><span class="" style="white-space:pre">        </span>if(!isdsturiset()) {</div><div><span class="" style="white-space:pre">               </span>handle_ruri_alias();</div>
<div><span class="" style="white-space:pre">    </span>}</div><div>#!endif</div><div><span class="" style="white-space:pre">    </span>return;</div><div>}</div><div> </div><div># Routing to foreign domains</div><div>route[SIPOUT] {</div>
<div><span class="" style="white-space:pre">    </span>if (!uri==myself)</div><div><span class="" style="white-space:pre">  </span>{</div><div><span class="" style="white-space:pre">          </span>append_hf("P-hint: outbound\r\n");</div>
<div><span class="" style="white-space:pre">            </span>route(RELAY);</div><div><span class="" style="white-space:pre">      </span>}</div><div>}</div><div> </div><div># PSTN GW routing</div><div>route[PSTN] {</div><div>#!ifdef WITH_PSTN</div>
<div><span class="" style="white-space:pre">    </span># check if PSTN GW IP is defined</div><div><span class="" style="white-space:pre">   </span>if (strempty($sel(cfg_get.pstn.gw_ip))) {</div><div><span class="" style="white-space:pre">          </span>xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined\n");</div>
<div><span class="" style="white-space:pre">            </span>return;</div><div><span class="" style="white-space:pre">    </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span># route to PSTN dialed numbers starting with '+' or '00'</div>
<div><span class="" style="white-space:pre">    </span>#     (international format)</div><div><span class="" style="white-space:pre">       </span># - update the condition to match your dialing rules for PSTN routing</div><div><span class="" style="white-space:pre">      </span>if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$"))</div>
<div><span class="" style="white-space:pre">            </span>return;</div><div> </div><div><span class="" style="white-space:pre">    </span># only local users allowed to call</div><div><span class="" style="white-space:pre"> </span>if(from_uri!=myself) {</div>
<div><span class="" style="white-space:pre">            </span>sl_send_reply("403", "Not Allowed");</div><div><span class="" style="white-space:pre">           </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div>
<div> </div><div><span class="" style="white-space:pre">    </span>$ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);</div><div> </div><div><span class="" style="white-space:pre">   </span>route(RELAY);</div>
<div><span class="" style="white-space:pre">    </span>exit;</div><div>#!endif</div><div> </div><div><span class="" style="white-space:pre">        </span>return;</div><div>}</div><div> </div><div># XMLRPC routing</div><div>#!ifdef WITH_XMLRPC</div>
<div>route[XMLRPC] {</div><div><span class="" style="white-space:pre">      </span># allow XMLRPC from localhost</div><div><span class="" style="white-space:pre">      </span>if ((method=="POST" || method=="GET")</div>
<div><span class="" style="white-space:pre">                    </span>&& (src_ip==127.0.0.1)) {</div><div><span class="" style="white-space:pre">          </span># close connection only for xmlrpclib user agents (there is a bug in</div><div>
<span class="" style="white-space:pre">               </span># xmlrpclib: it waits for EOF before interpreting the response).</div><div><span class="" style="white-space:pre">           </span>if ($hdr(User-Agent) =~ "xmlrpclib")</div>
<div><span class="" style="white-space:pre">                    </span>set_reply_close();</div><div><span class="" style="white-space:pre">         </span>set_reply_no_connect();</div><div><span class="" style="white-space:pre">            </span>dispatch_rpc();</div>
<div><span class="" style="white-space:pre">            </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div><div><span class="" style="white-space:pre">  </span>send_reply("403", "Forbidden");</div>
<div><span class="" style="white-space:pre">    </span>exit;</div><div>}</div><div>#!endif</div><div> </div><div># route to voicemail server</div><div>route[TOVOICEMAIL] {</div><div>#!ifdef WITH_VOICEMAIL</div><div><span class="" style="white-space:pre">      </span>if(!is_method("INVITE"))</div>
<div><span class="" style="white-space:pre">            </span>return;</div><div> </div><div><span class="" style="white-space:pre">    </span># check if VoiceMail server IP is defined</div><div><span class="" style="white-space:pre">  </span>if (strempty($sel(cfg_get.voicemail.srv_ip))) {</div>
<div><span class="" style="white-space:pre">            </span>xlog("SCRIPT: VoiceMail rotuing enabled but IP not defined\n");</div><div><span class="" style="white-space:pre">          </span>return;</div><div><span class="" style="white-space:pre">    </span>}</div>
<div><span class="" style="white-space:pre">    </span>if($avp(oexten)==$null)</div><div><span class="" style="white-space:pre">            </span>return;</div><div> </div><div><span class="" style="white-space:pre">    </span>$ru = "sip:" + $avp(oexten) + "@" + $sel(cfg_get.voicemail.srv_ip)</div>
<div><span class="" style="white-space:pre">                            </span>+ ":" + $sel(cfg_get.voicemail.srv_port);</div><div><span class="" style="white-space:pre">        </span>route(RELAY);</div><div><span class="" style="white-space:pre">      </span>exit;</div>
<div>#!endif</div><div> </div><div><span class="" style="white-space:pre">      </span>return;</div><div>}</div><div> </div><div>#!ifdef WITH_FREESWITCH</div><div># FreeSWITCH routing blocks</div><div>route[FSINBOUND] {</div><div>
<span class="" style="white-space:pre">       </span>if($si== $sel(cfg_get.freeswitch.bindip)</div><div><span class="" style="white-space:pre">                   </span>&& $sp==$sel(cfg_get.freeswitch.bindport))</div><div><span class="" style="white-space:pre">         </span>return 1;</div>
<div><span class="" style="white-space:pre">    </span>return -1;</div><div>}</div><div> </div><div># Forward REGISTER to FreeSWITCH</div><div>route[FSREGFWD] {</div><div><span class="" style="white-space:pre">  </span>if(!is_method("REGISTER"))</div>
<div><span class="" style="white-space:pre">    </span>{</div><div><span class="" style="white-space:pre">          </span>return;</div><div><span class="" style="white-space:pre">    </span>}</div><div><span class="" style="white-space:pre">  </span>$var(rip) = $sel(cfg_get.freeswitch.bindip);</div>
<div><span class="" style="white-space:pre">    </span>$uac_req(method) = "REGISTER";</div><div><span class="" style="white-space:pre">   </span>$uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.freeswitch.bindport);</div>
<div><span class="" style="white-space:pre">    </span>$uac_req(furi)="sip:" + $au + "@" + $var(rip);</div><div><span class="" style="white-space:pre"> </span>$uac_req(turi)="sip:" + $au + "@" + $var(rip);</div>
<div><span class="" style="white-space:pre">    </span>$uac_req(hdrs)="Contact: <sip:" + $au + "@"</div><div><span class="" style="white-space:pre">                         </span>+ $sel(cfg_get.kamailio.bindip)</div><div>
<span class="" style="white-space:pre">                               </span>+ ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n";</div><div><span class="" style="white-space:pre">  </span>if($sel(contact.expires) != $null)</div>
<div><span class="" style="white-space:pre">            </span>$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n";</div><div><span class="" style="white-space:pre"> </span>else</div><div>
<span class="" style="white-space:pre">               </span>$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n";</div><div><span class="" style="white-space:pre"> </span>uac_req_send();</div><div>
}</div><div><br></div><div>route[FSDISPATCH] {</div><div><span class="" style="white-space:pre">    </span>if(!is_method("INVITE"))</div><div><span class="" style="white-space:pre">         </span>return;</div><div><span class="" style="white-space:pre">    </span>if(route(FSINBOUND))</div>
<div><span class="" style="white-space:pre">            </span>return;</div><div> </div><div><span class="" style="white-space:pre">    </span># dial number selection</div><div><span class="" style="white-space:pre">    </span>switch($rU) {</div>
<div><span class="" style="white-space:pre">            </span>case /"^41$":</div><div><span class="" style="white-space:pre">                    </span># 41 - voicebox menu</div><div><span class="" style="white-space:pre">                       </span># allow only authenticated users</div>
<div><span class="" style="white-space:pre">                    </span>if($au==$null)</div><div><span class="" style="white-space:pre">                     </span>{</div><div><span class="" style="white-space:pre">                          </span>sl_send_reply("403", "Not allowed");</div>
<div><span class="" style="white-space:pre">                            </span>exit;</div><div><span class="" style="white-space:pre">                      </span>}</div><div><span class="" style="white-space:pre">                  </span>$rU = "vm-" + $au;</div><div><span class="" style="white-space:pre">               </span>break;</div>
<div><span class="" style="white-space:pre">            </span>case /"^441[0-9][0-9]$":</div><div><span class="" style="white-space:pre">                 </span># starting with 44 folowed by 1XY - direct call to voice box</div><div><span class="" style="white-space:pre">                       </span>strip(2);</div>
<div><span class="" style="white-space:pre">                    </span>route(FSVBOX);</div><div><span class="" style="white-space:pre">             </span>break;</div><div><span class="" style="white-space:pre">             </span>case /"^433[01][0-9][0-9]$":</div>
<div><span class="" style="white-space:pre">                    </span># starting with 433 folowed by (0|1)XY - conference</div><div><span class="" style="white-space:pre">                        </span>strip(2);</div><div><span class="" style="white-space:pre">          </span>break;</div>
<div><span class="" style="white-space:pre">            </span>case /"^45[0-9]+$":</div><div><span class="" style="white-space:pre">                      </span>strip(2);</div><div><span class="" style="white-space:pre">          </span>break;</div>
<div><span class="" style="white-space:pre">            </span>default:</div><div><span class="" style="white-space:pre">                   </span># offline - send to voicebox</div><div><span class="" style="white-space:pre">                       </span>#Dipak 01/27/2014 Commemted the following block, FS to handle VMBox</div>
<div><span class="" style="white-space:pre">                    </span>#!ifdef NOT_COMMENTED_OUT</div><div><span class="" style="white-space:pre">                  </span>if (!registered("location"))</div><div><span class="" style="white-space:pre">                     </span>{</div>
<div><span class="" style="white-space:pre">                            </span>route(FSVBOX);</div><div><span class="" style="white-space:pre">                             </span>exit;</div><div><span class="" style="white-space:pre">                      </span>}</div><div><span class="" style="white-space:pre">                  </span>#!endif</div>
<div><span class="" style="white-space:pre">                    </span># online - do bridging</div><div><span class="" style="white-space:pre">                     </span>#Dipak 01/27/2014 Commemted the following, not needed</div><div><span class="" style="white-space:pre">                      </span>#prefix("kb-");</div>
<div><span class="" style="white-space:pre">                    </span>if(is_method("INVITE"))</div><div><span class="" style="white-space:pre">                  </span>{</div><div><span class="" style="white-space:pre">                          </span># in case of failure - re-route to FreeSWITCH VoiceMail</div>
<div><span class="" style="white-space:pre">                            </span>t_on_failure("FAIL_FSVBOX");</div><div><span class="" style="white-space:pre">                     </span>}</div><div><span class="" style="white-space:pre">  </span>}</div><div>
<span class="" style="white-space:pre">       </span>route(FSRELAY);</div><div><span class="" style="white-space:pre">    </span>exit;</div><div>}</div><div> </div><div>route[FSVBOX] {</div><div><span class="" style="white-space:pre">        </span>if(!($rU=~"^1[0-9][0-9]+$"))</div>
<div><span class="" style="white-space:pre">            </span>return;</div><div><span class="" style="white-space:pre">    </span>prefix("vb-");</div><div><span class="" style="white-space:pre">   </span>route(FSRELAY);</div>
<div>}</div><div> </div><div># Send to FreeSWITCH</div><div>route[FSRELAY] {</div><div><span class="" style="white-space:pre">  </span>$du = "sip:" + $sel(cfg_get.freeswitch.bindip) + ":"</div><div><span class="" style="white-space:pre">                   </span>+ $sel(cfg_get.freeswitch.bindport);</div>
<div><span class="" style="white-space:pre">    </span>route(RELAY);</div><div><span class="" style="white-space:pre">      </span>exit;</div><div>}</div><div><br></div><div>#!endif</div><div> </div><div> </div><div># manage outgoing branches</div>
<div>branch_route[MANAGE_BRANCH] {</div><div><span class="" style="white-space:pre">        </span>xdbg("new branch [$T_branch_idx] to $ru\n");</div><div><span class="" style="white-space:pre">     </span>route(NATMANAGE);</div>
<div>}</div><div> </div><div># manage incoming replies</div><div>onreply_route[MANAGE_REPLY] {</div><div><span class="" style="white-space:pre">        </span>xdbg("incoming reply\n");</div><div><span class="" style="white-space:pre">        </span>if(status=~"[12][0-9][0-9]")</div>
<div><span class="" style="white-space:pre">            </span>route(NATMANAGE);</div><div>}</div><div> </div><div># manage failure routing cases</div><div>failure_route[MANAGE_FAILURE] {</div><div><span class="" style="white-space:pre">       </span>route(NATMANAGE);</div>
<div> </div><div><span class="" style="white-space:pre">    </span>if (t_is_canceled()) {</div><div><span class="" style="white-space:pre">             </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div><div> </div>
<div>#!ifdef WITH_BLOCK3XX</div><div><span class="" style="white-space:pre">        </span># block call redirect based on 3xx replies.</div><div><span class="" style="white-space:pre">        </span>if (t_check_status("3[0-9][0-9]")) {</div>
<div><span class="" style="white-space:pre">            </span>t_reply("404","Not found");</div><div><span class="" style="white-space:pre">            </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div>
<div>#!endif</div><div> </div><div>#!ifdef WITH_VOICEMAIL</div><div><span class="" style="white-space:pre"> </span># serial forking</div><div><span class="" style="white-space:pre">   </span># - route to voicemail on busy or no answer (timeout)</div>
<div><span class="" style="white-space:pre">    </span>if (t_check_status("486|408")) {</div><div><span class="" style="white-space:pre">         </span>route(TOVOICEMAIL);</div><div><span class="" style="white-space:pre">                </span>exit;</div>
<div><span class="" style="white-space:pre">    </span>}</div><div>#!endif</div><div>}</div><div> </div><div>#!ifdef WITH_FREESWITCH</div><div>failure_route[FAIL_FSVBOX] {</div><div>#!ifdef WITH_NAT</div><div><span class="" style="white-space:pre">    </span>if (is_method("INVITE")</div>
<div><span class="" style="white-space:pre">                    </span>&& (isbflagset(FLB_NATB) || isflagset(FLT_NATS))) {</div><div><span class="" style="white-space:pre">                </span>unforce_rtp_proxy();</div><div><span class="" style="white-space:pre">       </span>}</div>
<div>#!endif</div><div> </div><div><span class="" style="white-space:pre">      </span>if (t_is_canceled()) {</div><div><span class="" style="white-space:pre">             </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div>
<div> </div><div><span class="" style="white-space:pre">    </span>if (t_check_status("486|408")) {</div><div><span class="" style="white-space:pre">         </span># re-route to FreeSWITCH VoiceMail</div><div><span class="" style="white-space:pre">         </span>$rU = $avp(callee);</div>
<div><span class="" style="white-space:pre">            </span>route(FSVBOX);</div><div><span class="" style="white-space:pre">     </span>}</div><div>}</div><div>#!endif</div><div><br></div><div>#!ifdef WITH_WEBSOCKETS</div><div>onreply_route {</div>
<div><span class="" style="white-space:pre">    </span>if ((($Rp == MY_WS_PORT || $Rp == MY_WSS_PORT)</div><div><span class="" style="white-space:pre">             </span>&& !(proto == WS || proto == WSS))) {</div><div># || $Rp == MY_MSRP_PORT) {</div>
<div><span class="" style="white-space:pre">            </span>xlog("L_WARN", "SIP response received on websocket $Rp\n");</div><div><span class="" style="white-space:pre">            </span>drop;</div><div><span class="" style="white-space:pre">              </span>exit;</div>
<div><span class="" style="white-space:pre">    </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span>if (nat_uac_test(64)) {</div><div><span class="" style="white-space:pre">            </span># Do NAT traversal stuff for replies to a WebSocket connection</div>
<div><span class="" style="white-space:pre">            </span># - even if it is not behind a NAT!</div><div><span class="" style="white-space:pre">                </span># This won't be needed in the future if Kamailio and the</div><div><span class="" style="white-space:pre">               </span># WebSocket client support Outbound and Path.</div>
<div><span class="" style="white-space:pre">            </span>add_contact_alias();</div><div><span class="" style="white-space:pre">       </span>}</div><div>}</div><div><br></div><div>event_route[xhttp:request] {</div><div><span class="" style="white-space:pre">      </span>set_reply_close();</div>
<div><span class="" style="white-space:pre">    </span>set_reply_no_connect();</div><div><span class="" style="white-space:pre">    </span></div><div><span class="" style="white-space:pre">   </span>if ($Rp != MY_WS_PORT</div><div>
#!ifdef WITH_TLS</div><div><span class="" style="white-space:pre">        </span>    && $Rp != MY_WSS_PORT</div><div>#!endif</div><div><span class="" style="white-space:pre">    </span>) {</div><div><span class="" style="white-space:pre">                </span>xlog("L_WARN", "HTTP request received on $Rp\n");</div>
<div><span class="" style="white-space:pre">            </span>xhttp_reply("403", "Forbidden", "", "");</div><div><span class="" style="white-space:pre">           </span>exit;</div><div><span class="" style="white-space:pre">      </span>}</div>
<div> </div><div><span class="" style="white-space:pre">    </span>xlog("L_DBG", "HTTP Request Received\n");</div><div> </div><div><span class="" style="white-space:pre">      </span>if ($hdr(Upgrade)=~"websocket"</div>
<div><span class="" style="white-space:pre">                    </span>&& $hdr(Connection)=~"Upgrade"</div><div><span class="" style="white-space:pre">                   </span>&& $rm=~"GET") {</div><div> </div><div><span class="" style="white-space:pre">         </span># Validate Host - make sure the client is using the correct</div>
<div><span class="" style="white-space:pre">            </span># alias for WebSockets</div><div><span class="" style="white-space:pre">             </span>if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) {</div><div><span class="" style="white-space:pre">                    </span>xlog("L_WARN", "Bad host $hdr(Host)\n");</div>
<div><span class="" style="white-space:pre">                    </span>xhttp_reply("403", "Forbidden", "", "");</div><div><span class="" style="white-space:pre">                   </span>exit;</div><div><span class="" style="white-space:pre">              </span>}</div>
<div> </div><div><span class="" style="white-space:pre">            </span># Optional... validate Origin - make sure the client is from an</div><div><span class="" style="white-space:pre">            </span># authorised website.  For example,</div>
<div><span class="" style="white-space:pre">            </span>#</div><div><span class="" style="white-space:pre">          </span># if ($hdr(Origin) != "<a href="http://communicator.MY_DOMAIN">http://communicator.MY_DOMAIN</a>"</div>
<div><span class="" style="white-space:pre">            </span>#     && $hdr(Origin) != "<a href="https://communicator.MY_DOMAIN">https://communicator.MY_DOMAIN</a>") {</div><div><span class="" style="white-space:pre">          </span>#<span class="" style="white-space:pre"> </span>xlog("L_WARN", "Unauthorised client $hdr(Origin)\n");</div>
<div><span class="" style="white-space:pre">            </span>#<span class="" style="white-space:pre"> </span>xhttp_reply("403", "Forbidden", "", "");</div><div><span class="" style="white-space:pre">           </span>#<span class="" style="white-space:pre"> </span>exit;</div>
<div><span class="" style="white-space:pre">            </span># }</div><div> </div><div><span class="" style="white-space:pre">                </span># Optional... perform HTTP authentication</div><div> </div><div><span class="" style="white-space:pre">          </span># ws_handle_handshake() exits (no further configuration file</div>
<div><span class="" style="white-space:pre">            </span># processing of the request) when complete.</div><div><span class="" style="white-space:pre">                </span>if (ws_handle_handshake())</div><div><span class="" style="white-space:pre">         </span>{</div>
<div><span class="" style="white-space:pre">                    </span># Optional... cache some information about the</div><div><span class="" style="white-space:pre">                     </span># successful connection</div><div><span class="" style="white-space:pre">                    </span>exit;</div>
<div><span class="" style="white-space:pre">            </span>}</div><div><span class="" style="white-space:pre">  </span>}</div><div> </div><div><span class="" style="white-space:pre">  </span>xhttp_reply("404", "Not Found", "", "");</div>
<div>}</div><div> </div><div>event_route[websocket:closed] {</div><div><span class="" style="white-space:pre">      </span>xlog("L_INFO", "WebSocket connection from $si:$sp has closed\n");</div><div>}</div>
<div>#!endif</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 10:56 AM, *sm1Ly <span dir="ltr"><<a href="mailto:st.uzver@gmail.com" target="_blank">st.uzver@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I got really modify my config, and now it looks like: <a href="http://pastebin.com/0M7938Mm" target="_blank">http://pastebin.com/0M7938Mm</a><div>
<br></div><div>but now I got loopback problems. kamailio just asking itself.</div>
<div>ngrep -d lo port 5060 talks me:</div><div><br></div><div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div>
<div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;branch=z9hG4bKc2bb.e627f45ee16a4b45ca99321b3bc8832c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.328c8c23df8e916010525f7f786cbc49.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060</div>

<div>  ;branch=z9hG4bKc2bb.b8ec8f173657be182ad714f59d37d4a8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.7bec0e7c4a5962e90811bf082f0e6635.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6bbb824e92f328ce4053167b2e2c596a.0..V</div>

<div>  ia: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6f732fece1d8956bf5b075118b3dcb2f.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf4e758c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2</div>

<div>  bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 1</div>

<div>  94.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a</div>

<div>  7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rpor</div>

<div>  t=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988</div>

<div>  c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x</div>

<div>  86_64/linux))..Content-Length: 0....                                                                                                                                                                                                                       </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.328c8c23df8e916010525f7f786cbc49.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b8ec8f173657be182ad714f59d37d4a8.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.7bec0e7c4a5962e90811bf082f0e6635.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6bbb824e92f328ce4053167b2e2c596a.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6f732fece1d8956bf5b075118b</div>

<div>  3dcb2f.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf4e758c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SI</div>

<div>  P/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01d</div>

<div>  cad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190</div>

<div>  .8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <sip:1001</div>

<div>  @<a href="http://194.190.8.171" target="_blank">194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                  </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b8ec8f173657be182ad714f59d37d4a8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.7bec0e7c4a5962e90811bf082f0e6635.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.6bbb824e92f328ce4053167b2e2c596a.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6f732fece1d8956bf5b075118b3dcb2f.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf</div>

<div>  4e758c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SI</div>

<div>  P/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946</div>

<div>  cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168</div>

<div>  .1.119:5060;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757D</div>

<div>  AE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                                                                                   </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.7bec0e7c4a5962e90811bf082f0e6635.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6bbb824e92f328ce4053167b2e2c596a.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.6f732fece1d8956bf5b075118b3dcb2f.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf4e758c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c</div>

<div>  09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SI</div>

<div>  P/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0ea</div>

<div>  f0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..Fro</div>

<div>  m: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length</div>

<div>  : 0....                                                                                                                                                                                                                                                    </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6bbb824e92f328ce4053167b2e2c596a.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6f732fece1d8956bf5b075118b3dcb2f.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf4e758c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b</div>

<div>  43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SI</div>

<div>  P/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d</div>

<div>  28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba4655</div>

<div>  7f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                          </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.6f732fece1d8956bf5b075118b3dcb2f.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf4e758c.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0</div>

<div>  c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SI</div>

<div>  P/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branc</div>

<div>  h=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE</div>

<div>  ..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                                                                                                                           </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b4ab8b8de819be6fff9203bfdf4e758c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e</div>

<div>  520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SI</div>

<div>  P/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=12744772</div>

<div>  58..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                 </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.977524b1111849dd2cd8020d4c09090c.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf7</div>

<div>  3e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SI</div>

<div>  P/2.0/UDP 192.168.1.119:5060;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558</div>

<div>  B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                                                                  </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.cb7d178bf3fdb6596399beaf5b43e66d.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c</div>

<div>  7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14df</div>

<div>  b;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux)</div>

<div>  )..Content-Length: 0....                                                                                                                                                                                                                                   </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.bd5d0e524121d2fd121fa6e8f0c69cbf.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66</div>

<div>  b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branc</div>

<div>  h=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5a</div>

<div>  ea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                         </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.98352f1121cb37b6feb7814a0e520e4e.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173</div>

<div>  b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77</div>

<div>  .37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: <a href="mailto:00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119" target="_blank">00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119</a>..</div>

<div>  CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                                                                                                          </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.b670b117fb4d3a40912cb25cf73e9e32.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc28</div>

<div>  04cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8." target="_blank">sip:1001@194.190.8.</a></div>

<div>  171>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.ac9e718c5fd57a7f73adc7761c7ba31b.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d</div>

<div>  2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call</div>

<div>  -ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                                                 </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.01dcad6cb7e8257bcbe8ad7b66b7b095.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be3</div>

<div>  11988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1</div>

<div>  .1 (x86_64/linux))..Content-Length: 0....                                                                                                                                                                                                                  </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.946cc81be473148e1a6dc5a173b2cfb1.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171</div>

<div>  ;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <sip:1001@194.1</div>

<div>  90.8.171>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                        </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.0eaf0b545ac8239ad5e105fc2804cae8.0..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119</div>

<div>  :5060;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DF</div>

<div>  B@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0....                                                                                                                                                         </div>

<div>#</div><div>U <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> -> <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a></div><div>  SIP/2.0 483 Too Many Hops..Via: SIP/2.0/UDP 194.190.8.171;rport=5060;branch=z9hG4bKc2bb.c1d28c8a5ba1eeda8f8b296f6d2232e8.0..Via: SIP/2.0/UDP 192.168.1.119:5060;received=77.37.241.151;branch=z9hG4bK00c46d3a558be311988c4757dae14dfb;rport=5060..From: <si</div>

<div>  <a href="mailto:p%3A1001@194.190.8.171" target="_blank">p:1001@194.190.8.171</a>>;tag=1274477258..To: <<a href="mailto:sip%3A1001@194.190.8.171" target="_blank">sip:1001@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.2793..Call-ID: 00C46D3A-558B-E311-988A-4757DAE14DFB@192.168.1.119..CSeq: 2 SUBSCRIBE..Server: kamailio (4.1.1 (x86_64/linux))..Content-Length: 0...</div>

<div>  .      </div></div><div><br></div><div><br></div><div>and how looks dump</div><div><br></div><div>1. from sip device to kamailio</div><div><div>[root@kamaz sm1ly]# tcpdump -nn -i eth0 host <a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a> -v</div>
<div>
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes</div><div>19:54:51.205942 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 421)</div><div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 393</div>

<div>        REGISTER sip:194.190.8.171 SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div><div>        CSeq: 5569 REGISTER</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bKe5bd1a6ceba7f0a0f4e7487cb17ca365353236;rport</div><div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div>

<div>        Expires: 0</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.210060 IP (tos 0x10, ttl 64, id 35861, offset 0, flags [none], proto UDP (17), length 603)</div><div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 575</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bKe5bd1a6ceba7f0a0f4e7487cb17ca365353236;rport=57288</div>
<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as518dbea9</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5569 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="31daf0f8"</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.257552 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 586)</div>

<div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 558</div><div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5570 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bK440337c23337c9913220fd825f4d9ded353236;rport</div><div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div>

<div>        Expires: 0</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="31daf0f8",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="2b0222b07da7af1c3b72c2eb36241f5f",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.261209 IP (tos 0x10, ttl 64, id 35862, offset 0, flags [none], proto UDP (17), length 603)</div><div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 575</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bK440337c23337c9913220fd825f4d9ded353236;rport=57288</div>
<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0716dea5</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5570 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2f70c759"</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.290458 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 586)</div>

<div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 558</div><div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5571 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bK30fe030eee49e2eb50c619074c0f057b353236;rport</div><div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div>

<div>        Expires: 0</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="2f70c759",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="9eb7d157cfd0d8e8575b59c94c5f82f6",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.295285 IP (tos 0x10, ttl 64, id 35863, offset 0, flags [none], proto UDP (17), length 566)</div><div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 538</div>

<div>        SIP/2.0 200 OK</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bK30fe030eee49e2eb50c619074c0f057b353236;rport=57288</div>
<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0716dea5</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5571 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        Expires: 0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.314824 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 473)</div>

<div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 445</div><div>        REGISTER sip:194.190.8.171 SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2404 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bKdeb946998664720c2c93538625cc649e353236;rport</div><div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div>

<div>        Expires: 3600</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.319697 IP (tos 0x10, ttl 64, id 35864, offset 0, flags [none], proto UDP (17), length 602)</div><div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 574</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bKdeb946998664720c2c93538625cc649e353236;rport=57288</div>
<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0bba2324</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2404 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="023deb34"</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.344080 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 638)</div>

<div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 610</div><div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2405 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bK60a6798f72024444a9870698b766a04c353236;rport</div><div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div>

<div>        Expires: 3600</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="023deb34",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="7fa5be98c7c0c395ed41f9e7da095629",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.350423 IP (tos 0x10, ttl 64, id 35865, offset 0, flags [none], proto UDP (17), length 602)</div><div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 574</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bK60a6798f72024444a9870698b766a04c353236;rport=57288</div>
<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as065abeba</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2405 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="26886c3d"</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.370976 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 638)</div>

<div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 610</div><div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2406 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bKf4d831e0612e1074bf49397d92907c80353236;rport</div><div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div>

<div>        Expires: 3600</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="26886c3d",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="cc17aae74d45f06e4712aa66b08e68df",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.380962 IP (tos 0x10, ttl 64, id 35866, offset 0, flags [none], proto UDP (17), length 636)</div><div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 608</div>

<div>        SIP/2.0 200 OK</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=<a href="tel:77.37.241.151" value="+17737241151" target="_blank">77.37.241.151</a>;branch=z9hG4bKf4d831e0612e1074bf49397d92907c80353236;rport=57288</div>
<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as065abeba</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2406 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        Expires: 3600</div><div>        Contact: <sip:1002@192.168.1.103:57288;transport=udp>;expires=3600</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Content-Length: 0</div><div><br>

</div><div><br></div><div>19:54:51.406160 IP (tos 0x0, ttl 57, id 0, offset 0, flags [DF], proto UDP (17), length 395)</div><div>    77.37.241.151.57288 > 194.190.8.171.5060: SIP, length: 367</div><div>        OPTIONS sip:194.190.8.171 SIP/2.0</div>

<div>        Call-ID: <a href="mailto:28b382a24bc3e426f030593cec5f852a@192.168.1.103" target="_blank">28b382a24bc3e426f030593cec5f852a@192.168.1.103</a></div><div>        CSeq: 1287 OPTIONS</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=<a href="tel:3866552602" value="+13866552602" target="_blank">3866552602</a></div>

<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bK9bddae72a5ccaf0df80be00ba2882dfd353236;rport</div>

<div>        Max-Forwards: 70</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.407799 IP (tos 0x10, ttl 64, id 35867, offset 0, flags [none], proto UDP (17), length 458)</div>

<div>    194.190.8.171.5060 > 77.37.241.151.57288: SIP, length: 430</div><div>        SIP/2.0 484 Address Incomplete</div><div>        Call-ID: <a href="mailto:28b382a24bc3e426f030593cec5f852a@192.168.1.103" target="_blank">28b382a24bc3e426f030593cec5f852a@192.168.1.103</a></div>

<div>        CSeq: 1287 OPTIONS</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=<a href="tel:3866552602" value="+13866552602" target="_blank">3866552602</a></div>
<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=c5aea4efd01978ba46557f38f3d08cfc.5162</div>
<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;branch=z9hG4bK9bddae72a5ccaf0df80be00ba2882dfd353236;rport=57288;received=77.37.241.151</div><div>        Server: kamailio (4.1.1 (x86_64/linux))</div><div>        Content-Length: 0</div>

</div><div><br></div><div>2. from kamailio to asterisk.</div><div><div>[root@kamaz sm1ly]#  tcpdump -nn -i eth1 host 50.0.0.10 -v and port 5060</div><div>tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes</div>

<div>19:54:41.906391 IP (tos 0x0, ttl 64, id 5618, offset 0, flags [none], proto UDP (17), length 597)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:34713;transport=udp SIP/2.0</div>

<div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport</div><div>        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div>

<div>        To: <sip:1002@192.168.1.103:34713;transport=udp></div><div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:41 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:42.906385 IP (tos 0x0, ttl 64, id 5619, offset 0, flags [none], proto UDP (17), length 597)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:34713;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport</div><div>

        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div><div>        To: <sip:1002@192.168.1.103:34713;transport=udp></div>

<div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:41 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:43.906565 IP (tos 0x0, ttl 64, id 5620, offset 0, flags [none], proto UDP (17), length 597)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:34713;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport</div><div>

        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div><div>        To: <sip:1002@192.168.1.103:34713;transport=udp></div>

<div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:41 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:44.904726 IP (tos 0x10, ttl 64, id 34743, offset 0, flags [none], proto UDP (17), length 413)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 385</div><div>        SIP/2.0 408 Request Timeout</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport=5060</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div>

<div>        To: <sip:1002@192.168.1.103:34713;transport=udp>;tag=6f6209fafb0c4bc816e1e7aa854ee2dd-8578</div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        Server: kamailio (4.1.1 (x86_64/linux))</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.207422 IP (tos 0x10, ttl 64, id 34744, offset 0, flags [none], proto UDP (17), length 531)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 503</div><div>        REGISTER sip:194.190.8.171 SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5569 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bKd8a1.094de0504827adb22c7b874f77dfd698.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKe5bd1a6ceba7f0a0f4e7487cb17ca365353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div><div>        Expires: 0</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.209052 IP (tos 0x0, ttl 64, id 5621, offset 0, flags [none], proto UDP (17), length 713)</div>

<div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 685</div><div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bKd8a1.094de0504827adb22c7b874f77dfd698.0;received=50.0.0.1;rport=5060</div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKe5bd1a6ceba7f0a0f4e7487cb17ca365353236;rport=57288</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div>

<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as518dbea9</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5569 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="31daf0f8"</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.258759 IP (tos 0x10, ttl 64, id 34745, offset 0, flags [none], proto UDP (17), length 696)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 668</div><div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5570 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK56b1.d46d0ab6448c5edd99f24aa7ba8a2881.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK440337c23337c9913220fd825f4d9ded353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div><div>        Expires: 0</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="31daf0f8",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="2b0222b07da7af1c3b72c2eb36241f5f",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.259902 IP (tos 0x0, ttl 64, id 5622, offset 0, flags [none], proto UDP (17), length 713)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 685</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK56b1.d46d0ab6448c5edd99f24aa7ba8a2881.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK440337c23337c9913220fd825f4d9ded353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0716dea5</div>

<div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div><div>        CSeq: 5570 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2f70c759"</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.292190 IP (tos 0x10, ttl 64, id 34746, offset 0, flags [none], proto UDP (17), length 696)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 668</div>

<div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5571 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK66b1.0173e2524e6deda0f27b83591a62730f.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK30fe030eee49e2eb50c619074c0f057b353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div><div>        Expires: 0</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="2f70c759",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="9eb7d157cfd0d8e8575b59c94c5f82f6",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.293302 IP (tos 0x0, ttl 64, id 5623, offset 0, flags [none], proto UDP (17), length 676)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 648</div>

<div>        SIP/2.0 200 OK</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK66b1.0173e2524e6deda0f27b83591a62730f.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK30fe030eee49e2eb50c619074c0f057b353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0716dea5</div>

<div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div><div>        CSeq: 5571 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        Expires: 0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.317242 IP (tos 0x10, ttl 64, id 34747, offset 0, flags [none], proto UDP (17), length 583)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 555</div>

<div>        REGISTER sip:194.190.8.171 SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div><div>        CSeq: 2404 REGISTER</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK2624.44980ae0ad3ba5026d6f044c24770539.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKdeb946998664720c2c93538625cc649e353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Expires: 3600</div><div>        Content-Length: 0</div>

<div><br></div><div><br></div><div>19:54:51.318123 IP (tos 0x0, ttl 64, id 5624, offset 0, flags [none], proto UDP (17), length 712)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 684</div><div>        SIP/2.0 401 Unauthorized</div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK2624.44980ae0ad3ba5026d6f044c24770539.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKdeb946998664720c2c93538625cc649e353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0bba2324</div>

<div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div><div>        CSeq: 2404 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="023deb34"</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.346522 IP (tos 0x10, ttl 64, id 34748, offset 0, flags [none], proto UDP (17), length 748)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 720</div>

<div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2405 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK3624.173cef757dc8f7da8b864ee1ab1bfe50.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK60a6798f72024444a9870698b766a04c353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Expires: 3600</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="023deb34",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="7fa5be98c7c0c395ed41f9e7da095629",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.348056 IP (tos 0x0, ttl 64, id 5625, offset 0, flags [none], proto UDP (17), length 712)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 684</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK3624.173cef757dc8f7da8b864ee1ab1bfe50.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK60a6798f72024444a9870698b766a04c353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as065abeba</div>

<div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div><div>        CSeq: 2405 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="26886c3d"</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.373298 IP (tos 0x10, ttl 64, id 34749, offset 0, flags [none], proto UDP (17), length 748)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 720</div>

<div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2406 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK0624.82ac15efd62f203c1b009e3ab3c711bc.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKf4d831e0612e1074bf49397d92907c80353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Expires: 3600</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="26886c3d",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="cc17aae74d45f06e4712aa66b08e68df",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.374893 IP (tos 0x0, ttl 64, id 5626, offset 0, flags [none], proto UDP (17), length 597)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div>

<div>        OPTIONS sip:1002@192.168.1.103:57288;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport</div><div>        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div>

<div>        To: <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.374906 IP (tos 0x0, ttl 64, id 5627, offset 0, flags [none], proto UDP (17), length 746)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 718</div><div>        SIP/2.0 200 OK</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK0624.82ac15efd62f203c1b009e3ab3c711bc.0;received=50.0.0.1;rport=5060</div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKf4d831e0612e1074bf49397d92907c80353236;rport=57288</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div>

<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as065abeba</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2406 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        Expires: 3600</div><div>        Contact: <sip:1002@192.168.1.103:57288;transport=udp>;expires=3600</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Content-Length: 0</div><div><br>

</div><div><br></div><div>19:54:52.375165 IP (tos 0x0, ttl 64, id 5628, offset 0, flags [none], proto UDP (17), length 597)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:57288;transport=udp SIP/2.0</div>

<div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport</div><div>        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div>

<div>        To: <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:53.375333 IP (tos 0x0, ttl 64, id 5629, offset 0, flags [none], proto UDP (17), length 597)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:57288;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport</div><div>

        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div><div>        To: <sip:1002@192.168.1.103:57288;transport=udp></div>

<div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:54.342025 IP (tos 0x10, ttl 64, id 34750, offset 0, flags [none], proto UDP (17), length 413)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 385</div><div>        SIP/2.0 408 Request Timeout</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport=5060</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div>

<div>        To: <sip:1002@192.168.1.103:57288;transport=udp>;tag=6f6209fafb0c4bc816e1e7aa854ee2dd-1f6e</div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        Server: kamailio (4.1.1 (x86_64/linux))</div><div>        Content-Length: 0</div></div><div><br></div><div>3. on asterisk to kamailio</div><div><div>[root@astkamaz sm1ly]# tcpdump -nn -i eth0 -v host 50.0.0.1 and port 5060</div>

<div>tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes</div><div>19:54:41.906401 IP (tos 0x0, ttl 64, id 5618, offset 0, flags [none], proto UDP (17), length 597)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div>

<div>        OPTIONS sip:1002@192.168.1.103:34713;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport</div><div>        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div>

<div>        To: <sip:1002@192.168.1.103:34713;transport=udp></div><div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:41 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:42.906581 IP (tos 0x0, ttl 64, id 5619, offset 0, flags [none], proto UDP (17), length 597)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:34713;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport</div><div>

        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div><div>        To: <sip:1002@192.168.1.103:34713;transport=udp></div>

<div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:41 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:43.906740 IP (tos 0x0, ttl 64, id 5620, offset 0, flags [none], proto UDP (17), length 597)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:34713;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport</div><div>

        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div><div>        To: <sip:1002@192.168.1.103:34713;transport=udp></div>

<div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:41 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:44.905366 IP (tos 0x10, ttl 64, id 34743, offset 0, flags [none], proto UDP (17), length 413)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 385</div><div>        SIP/2.0 408 Request Timeout</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK75f42160;rport=5060</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40fc69ea</div>

<div>        To: <sip:1002@192.168.1.103:34713;transport=udp>;tag=6f6209fafb0c4bc816e1e7aa854ee2dd-8578</div><div>        Call-ID: <a href="http://7bacfa62676409266240568c5c9d055b@50.0.0.10:5060" target="_blank">7bacfa62676409266240568c5c9d055b@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        Server: kamailio (4.1.1 (x86_64/linux))</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.208464 IP (tos 0x10, ttl 64, id 34744, offset 0, flags [none], proto UDP (17), length 531)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 503</div><div>        REGISTER sip:194.190.8.171 SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5569 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bKd8a1.094de0504827adb22c7b874f77dfd698.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKe5bd1a6ceba7f0a0f4e7487cb17ca365353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div><div>        Expires: 0</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.209176 IP (tos 0x0, ttl 64, id 5621, offset 0, flags [none], proto UDP (17), length 713)</div>

<div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 685</div><div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bKd8a1.094de0504827adb22c7b874f77dfd698.0;received=50.0.0.1;rport=5060</div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKe5bd1a6ceba7f0a0f4e7487cb17ca365353236;rport=57288</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div>

<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as518dbea9</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5569 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="31daf0f8"</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.259436 IP (tos 0x10, ttl 64, id 34745, offset 0, flags [none], proto UDP (17), length 696)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 668</div><div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5570 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK56b1.d46d0ab6448c5edd99f24aa7ba8a2881.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK440337c23337c9913220fd825f4d9ded353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div><div>        Expires: 0</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="31daf0f8",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="2b0222b07da7af1c3b72c2eb36241f5f",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.260101 IP (tos 0x0, ttl 64, id 5622, offset 0, flags [none], proto UDP (17), length 713)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 685</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK56b1.d46d0ab6448c5edd99f24aa7ba8a2881.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK440337c23337c9913220fd825f4d9ded353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0716dea5</div>

<div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div><div>        CSeq: 5570 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2f70c759"</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.292708 IP (tos 0x10, ttl 64, id 34746, offset 0, flags [none], proto UDP (17), length 696)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 668</div>

<div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div>

<div>        CSeq: 5571 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK66b1.0173e2524e6deda0f27b83591a62730f.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK30fe030eee49e2eb50c619074c0f057b353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: *</div><div>        Expires: 0</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="2f70c759",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="9eb7d157cfd0d8e8575b59c94c5f82f6",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.293541 IP (tos 0x0, ttl 64, id 5623, offset 0, flags [none], proto UDP (17), length 676)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 648</div>

<div>        SIP/2.0 200 OK</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK66b1.0173e2524e6deda0f27b83591a62730f.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK30fe030eee49e2eb50c619074c0f057b353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=2801080754</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0716dea5</div>

<div>        Call-ID: <a href="mailto:676c32ab221a665a9bc9875ffb74930a@192.168.1.103" target="_blank">676c32ab221a665a9bc9875ffb74930a@192.168.1.103</a></div><div>        CSeq: 5571 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        Expires: 0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.317704 IP (tos 0x10, ttl 64, id 34747, offset 0, flags [none], proto UDP (17), length 583)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 555</div>

<div>        REGISTER sip:194.190.8.171 SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div><div>        CSeq: 2404 REGISTER</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK2624.44980ae0ad3ba5026d6f044c24770539.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKdeb946998664720c2c93538625cc649e353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Expires: 3600</div><div>        Content-Length: 0</div>

<div><br></div><div><br></div><div>19:54:51.318355 IP (tos 0x0, ttl 64, id 5624, offset 0, flags [none], proto UDP (17), length 712)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 684</div><div>        SIP/2.0 401 Unauthorized</div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK2624.44980ae0ad3ba5026d6f044c24770539.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKdeb946998664720c2c93538625cc649e353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as0bba2324</div>

<div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div><div>        CSeq: 2404 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="023deb34"</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.347429 IP (tos 0x10, ttl 64, id 34748, offset 0, flags [none], proto UDP (17), length 748)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 720</div>

<div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2405 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK3624.173cef757dc8f7da8b864ee1ab1bfe50.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK60a6798f72024444a9870698b766a04c353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Expires: 3600</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="023deb34",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="7fa5be98c7c0c395ed41f9e7da095629",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.348212 IP (tos 0x0, ttl 64, id 5625, offset 0, flags [none], proto UDP (17), length 712)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 684</div>

<div>        SIP/2.0 401 Unauthorized</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK3624.173cef757dc8f7da8b864ee1ab1bfe50.0;received=50.0.0.1;rport=5060</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bK60a6798f72024444a9870698b766a04c353236;rport=57288</div>

<div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as065abeba</div>

<div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div><div>        CSeq: 2405 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div>

<div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div><div>        WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="26886c3d"</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.373777 IP (tos 0x10, ttl 64, id 34749, offset 0, flags [none], proto UDP (17), length 748)</div><div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 720</div>

<div>        REGISTER sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> SIP/2.0</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2406 REGISTER</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div><div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>></div>

<div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK0624.82ac15efd62f203c1b009e3ab3c711bc.0</div><div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKf4d831e0612e1074bf49397d92907c80353236;rport=57288</div>

<div>        Max-Forwards: 16</div><div>        User-Agent: SIPAUA/0.1.001</div><div>        Contact: "1002" <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Expires: 3600</div><div>        Authorization: Digest username="1002",realm="asterisk",nonce="26886c3d",uri="sip:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>",response="cc17aae74d45f06e4712aa66b08e68df",algorithm=MD5</div>

<div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.374731 IP (tos 0x0, ttl 64, id 5626, offset 0, flags [none], proto UDP (17), length 597)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div>

<div>        OPTIONS sip:1002@192.168.1.103:57288;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport</div><div>        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div>

<div>        To: <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:51.374804 IP (tos 0x0, ttl 64, id 5627, offset 0, flags [none], proto UDP (17), length 746)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 718</div><div>        SIP/2.0 200 OK</div><div>        Via: SIP/2.0/UDP 50.0.0.1;branch=z9hG4bK0624.82ac15efd62f203c1b009e3ab3c711bc.0;received=50.0.0.1;rport=5060</div>

<div>        Via: SIP/2.0/UDP 192.168.1.103:57288;received=77.37.241.151;branch=z9hG4bKf4d831e0612e1074bf49397d92907c80353236;rport=57288</div><div>        From: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=134783744</div>

<div>        To: "1002" <<a href="mailto:sip%3A1002@194.190.8.171" target="_blank">sip:1002@194.190.8.171</a>>;tag=as065abeba</div><div>        Call-ID: <a href="mailto:fffb7a09e489ce1cad6783709652b6f9@192.168.1.103" target="_blank">fffb7a09e489ce1cad6783709652b6f9@192.168.1.103</a></div>

<div>        CSeq: 2406 REGISTER</div><div>        Server: Asterisk PBX 1.8.20.0</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div><div>        Supported: replaces, timer</div>

<div>        Expires: 3600</div><div>        Contact: <sip:1002@192.168.1.103:57288;transport=udp>;expires=3600</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Content-Length: 0</div><div><br>

</div><div><br></div><div>19:54:52.375348 IP (tos 0x0, ttl 64, id 5628, offset 0, flags [none], proto UDP (17), length 597)</div><div>    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:57288;transport=udp SIP/2.0</div>

<div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport</div><div>        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div>

<div>        To: <sip:1002@192.168.1.103:57288;transport=udp></div><div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:53.375562 IP (tos 0x0, ttl 64, id 5629, offset 0, flags [none], proto UDP (17), length 597)</div><div>

    50.0.0.10.5060 > 50.0.0.1.5060: SIP, length: 569</div><div>        OPTIONS sip:1002@192.168.1.103:57288;transport=udp SIP/2.0</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport</div><div>

        Max-Forwards: 70</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div><div>        To: <sip:1002@192.168.1.103:57288;transport=udp></div>

<div>        Contact: <<a href="http://sip:asterisk@50.0.0.10:5060" target="_blank">sip:asterisk@50.0.0.10:5060</a>></div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        User-Agent: Asterisk PBX 1.8.20.0</div><div>        Date: Mon, 03 Feb 2014 15:54:51 GMT</div><div>        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH</div>

<div>        Supported: replaces, timer</div><div>        Content-Length: 0</div><div><br></div><div><br></div><div>19:54:54.342525 IP (tos 0x10, ttl 64, id 34750, offset 0, flags [none], proto UDP (17), length 413)</div>

<div>    50.0.0.1.5060 > 50.0.0.10.5060: SIP, length: 385</div><div>        SIP/2.0 408 Request Timeout</div><div>        Via: SIP/2.0/UDP 50.0.0.10:5060;branch=z9hG4bK129c83a7;rport=5060</div><div>        From: "asterisk" <<a href="mailto:sip%3Aasterisk@50.0.0.10" target="_blank">sip:asterisk@50.0.0.10</a>>;tag=as40306b56</div>

<div>        To: <sip:1002@192.168.1.103:57288;transport=udp>;tag=6f6209fafb0c4bc816e1e7aa854ee2dd-1f6e</div><div>        Call-ID: <a href="http://0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060" target="_blank">0e6d3cec7afd68275843c14303988ff3@50.0.0.10:5060</a></div>

<div>        CSeq: 102 OPTIONS</div><div>        Server: kamailio (4.1.1 (x86_64/linux))</div><div>        Content-Length: 0</div></div><div><br></div><div><br><div class="gmail_extra"><pre style="white-space:pre-wrap;word-wrap:break-word">
####### Defined Values #########

# - 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 #########

# Enable debugging only when kamailio is mading boo-boo
### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
debug=3
log_stderror=no

memdbg=5
memlog=5

log_facility=LOG_LOCAL0

fork=yes
children=8

/* uncomment the next line to disable TCP (default on) */
disable_tcp=yes

/* 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 */
#alias="<a href="http://kamaz.ikatele.com" target="_blank">kamaz.ikatele.com</a>"

/* uncomment and configure the following line if you want Kamailio to 
   bind on a specific interface/port/proto (default bind on all available) */

#listen=udp:<a href="http://50.0.0.1:5060" target="_blank">50.0.0.1:5060</a> advertise <a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a>
#listen=udp:<a href="http://194.190.8.171:5060" target="_blank">194.190.8.171:5060</a> advertise <a href="http://50.0.0.1:5060" target="_blank">50.0.0.1:5060</a>

listen=udp:194.190.8.171
listen=udp:50.0.0.1

dns=no
rev_dns=no
check_via=yes

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

mhomed=1

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

# set paths to location of modules (to sources or installation folders)
mpath="/usr/lib64/kamailio/modules/"


loadmodule "mi_fifo.so"
loadmodule "kex.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 "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "mi_rpc.so"
loadmodule "acc.so"


loadmodule "nathelper.so"
loadmodule "rtpproxy.so"

#loadmodule "topoh.so"
#modparam("topoh", "mask_key", "balalayka")
#modparam("topoh", "mask_ip", "50.0.0.1")

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


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


# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 3000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 12000)


# ----- rr params -----
# add value to ;lr param to cope with most of the UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 1)



# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock", "udp:<a href="http://127.0.0.1:7722" target="_blank">127.0.0.1:7722</a>")

# ----- nathelper params -----
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from", "<a href="mailto:sip%3Apinger@194.190.8.171" target="_blank">sip:pinger@194.190.8.171</a>")

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



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


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

route {

        # per request initial checks
        route(REQINIT);

        # NAT detection
        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) Main Route before  ---NAT---\n");
        
        route(NATDETECT);

        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in Route[NATDETECT] fix_nat-register\n");

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

        # handle requests within SIP dialogs
        route(WITHINDLG);

        ### only initial requests (no To tag)

        t_check_trans();

        # 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);

        # handle registrations
        route(REGISTRAR);

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

        route(RELAY);

}

# Per SIP request initial checks
route[REQINIT] {
        if (!mf_process_maxfwd_header("20")) {
        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in MAX FDW HEADERS ALARMO\n");

                sl_send_reply("483","Too Many Hops");
                exit;
        }

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


# Caller NAT detection route
route[NATDETECT] {
        force_rport();
        if (nat_uac_test("19")) {
                if (is_method("REGISTER")) {
                        fix_nated_register();
                } else {
                        if(is_first_hop())
                                set_contact_alias();
                }
                setflag(FLT_NATS);

        }
        return;
}

# Handle requests within SIP dialogs
route[WITHINDLG] {
        if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        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 statelessy
                                route(NATMANAGE);
                        }
                        else if ( is_method("NOTIFY") ) {
                                # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
                                record_route();
                        }
                        route(RELAY);
                } else {
                        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 {
                                        xlog("L_NOTICE","ACK without matching transaction ... ignore and discard\n");
                                        # ACK without matching transaction ... ignore and discard
                                        exit;
                                }
                        }
                        sl_send_reply("404","Not here");
                }
                exit;
        }
}


# Routing to foreign domains
route[SIPOUT] {
        if (!uri==myself)
        {
                append_hf("P-hint: outbound\r\n");
                route(RELAY);
        }
}
# Handle SIP registrations
route[REGISTRAR] {
        if (is_method("REGISTER"))
        {
#               if(isflagset(FLT_NATS))
#               {
#                       setbflag(FLB_NATB);
#                       # uncomment next line to do SIP NAT pinging 
#                       xlog("L_NOTICE","--------------------- SIP NAT PINGING --------------------------------------\n");
#                       setbflag(FLB_NATSIPPING);
#               }
#               if (!save("location"))
#                       sl_reply_error();
#                       xlog("L_NOTICE","--------------------- SL REPLY ERROR --------------------------------------\n");
        
                        if( t_check_trans() )
                                {
                                xlog("L_NOTICE","Transaction already exist, forwarding\n");
                                }
                        else
                                {
                                xlog("L_NOTICE","New transaction upcoming, creating\n");

#                               forward("50.0.0.10");
#                               save("sip:50.0.0.10","0x02");
                                t_relay_to_udp("50.0.0.10", "5060");
                                exit;
                        }
                exit;
        }
}



route[RELAY] {
        # enable additional event routes for forwarded requests
        # - serial forking, RTP relaying handling, a.s.o.
        xlog("L_NOTICE","Default routing block raised!\n");
        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;
}


# RTPProxy control
route[NATMANAGE] {
        if (is_request()) {
                if(has_totag()) {
                        if(check_route_param("nat=yes")) {
                        xlog("L_NOTICE","------------------------------------ SETBFLAG ----------------------------\n");
                                setbflag(FLB_NATB);
                        }
                }
        }
        if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
                return;

        rtpproxy_manage();

        if (is_request()) {
                if (!has_totag()) {
                        if(t_is_branch_route()) {
                        xlog("L_NOTICE","------------------------------------ ADD RR PARAM NAT YES ----------------------------\n");
                                add_rr_param(";nat=yes");
                        }
                }
        }
        if (is_reply()) {
                if(isbflagset(FLB_NATB)) {
                        if(is_first_hop())
                                xlog("L_NOTICE","------------------------------------ IS FIRST HOP SRT CONACT ALIAS  ----------------------------\n");
                                set_contact_alias();
                }

        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in route[NATMANAGE] RTPproxy with EI Flags\n");

        }
        return;
}

# URI update for dialog requests
route[DLGURI] {
        if(!isdsturiset()) {
                handle_ruri_alias();

        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in route[DLGURI] RTPproxy with EI Flags\n");

        }
        return;
}

# manage outgoing branches
branch_route[MANAGE_BRANCH] {
        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in MANAGE_BRANCH\n");
        xdbg("new branch [$T_branch_idx] to $ru\n");
        route(NATMANAGE);
}

# manage incoming replies
onreply_route[MANAGE_REPLY] {
        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in MANAGE_REPLY\n");
        xdbg("incoming reply\n");
        if(status=~"[12][0-9][0-9]")
                route(NATMANAGE);
}

# manage failure routing cases
failure_route[MANAGE_FAILURE] {
        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) in MANAGE_FAILURE\n");
        route(NATMANAGE);

        if (t_is_canceled()) {
                exit;
        }
}


route[DEBUG] {
        if (method==("PUBLISH|SUBSCRIBE|REGISTER|OPTIONS")) {
                return;
        }
        xlog("[$mi] Received SIP Message (method: $rm) ($ml bytes) to $Ri:$Rp from $si:$sp:\n$mb\n");
}</pre></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 3 Feb 2014 15:14:19 +0400<br>
From: "*sm1Ly" <<a href="mailto:st.uzver@gmail.com" target="_blank">st.uzver@gmail.com</a>><br>
To: <a href="mailto:dipak.biswas@mezocliq.com" target="_blank">dipak.biswas@mezocliq.com</a>, <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
Subject: Re: [SR-Users] Kamailio not mdifying Contact in multi-homed<br>
        setup<br>
Message-ID:<br>
        <<a href="mailto:CABCivXiED_CDQiJtgQ-p_XQ1h8p3rbkE3fnxnS2iuUH%2BkdHZvA@mail.gmail.com" target="_blank">CABCivXiED_CDQiJtgQ-p_XQ1h8p3rbkE3fnxnS2iuUH+kdHZvA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
hello, I got the same issue. my sip device getting ok from kamailio, but<br>
asterisk reply 401.<br>
but.<br>
this is my config: <a href="http://pastebin.com/jGCak01E" target="_blank">http://pastebin.com/jGCak01E</a><br>
<br>
and I changed regfwd route to<br>
        $du = "sip:50.0.0.10:5060;transport=udp";<br>
        forward();<br>
<br>
and now I see this in logs:<br>
<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:633]: parse_msg(): SIP Reply  (status):<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:635]: parse_msg():  version: <SIP/2.0><br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:637]: parse_msg():  status:  <200><br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:639]: parse_msg():  reason:  <OK><br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/parse_via.c:1284]: parse_via_param(): Found param type 232,<br>
<branch> = <0>; state=16<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/parse_via.c:2672]: parse_via(): end of header reached, state=5<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found,<br>
flags=2<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the<br>
first via<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[receive.c:152]: receive_msg(): After parse_msg...<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: tm<br>
[t_lookup.c:1071]: t_check_msg(): DEBUG: t_check_msg: msg id=25 global<br>
id=24 T start=(nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param:<br>
tag=006cfccc318be31188fc19977b3a5651<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/parse_addr_spec.c:885]: parse_addr_spec(): end of header reached,<br>
state=29<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: <To><br>
[63]; uri=[sip:<a href="http://77.37.241.151:5060" target="_blank">77.37.241.151:5060</a>]<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [<sip:<br>
<a href="http://77.37.241.151:5060" target="_blank">77.37.241.151:5060</a>>]<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq <CSeq>: <1><br>
<OPTIONS><br>
*Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: tm<br>
[t_lookup.c:1045]: t_reply_matching(): DEBUG: t_reply_matching: failure to<br>
match a transaction*<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: tm<br>
[t_lookup.c:1140]: t_check_msg(): DEBUG: t_check_msg: msg id=25 global<br>
id=25 T end=(nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:204]: get_hdr_field(): DEBUG: get_hdr_body :<br>
content_length=0<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[parser/msg_parser.c:106]: get_hdr_field(): found end of header<br>
*Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[forward.c:784]: do_forward_reply(): reply cannot be forwarded - no 2nd via*<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying<br>
list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying<br>
list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying<br>
list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying<br>
list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying<br>
list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying<br>
list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil)<br>
Feb  3 15:13:38 kamaz /usr/sbin/kamailio[14502]: DEBUG: <core><br>
[receive.c:296]: receive_msg(): receive_msg: cleaning up<br>
<br>
<br>
any ideas?<br>
and show me ur conf please.<br>
<br>
<br>
--<br>
<br>
Hi All,<br>
<br>
I'm running into an issue, I'm not sure whether any of you seen this<br>
yourselves and resolved it. Please share some pointers. My network is:<br>
<br>
clients <--> Public IP(Kamailio/RTPProxy)10.1.128.11 <--> 10.1.128.34<br>
(Freeswitch)<br>
<br>
The 200 OK response from Freeswitch (on the way back from called party to<br>
caller) to Kamailio is shown below. Notice the Contact header URI host part<br>
contains Freeswitch Private IP (10.1.128.34). Kamailio suppose to change<br>
that to Public IP before forwarding the 200 OK (copied below) to Caller in<br>
public domain. But, it's not. As a result, ACK from Caller is not reaching<br>
back to Kamailio.<br>
<br>
How did you or anybody out there using Kamailio resolve this problem? If<br>
needed, I can copy/paste my kamailio.cfg.<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
yours respectfully, Alexander Vasin.<br>
<br>
8 926 1437200<br>
icq: 9906064<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.sip-router.org/pipermail/sr-users/attachments/20140203/e075d4f0/attachment-0001.html" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20140203/e075d4f0/attachment-0001.html</a>><br>


<br>
------------------------------<br><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr">yours respectfully, Alexander Vasin.<br><br>8 926 1437200<br>icq: 9906064<br></div>
</font></span></div></div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Thanks,<div>Dipak</div></div>
</div>