Your best bet is to use a pastebin for this sort of thing. The FreeSWITCH project maintains their own at <a href="http://pastebin.freeswitch.org">pastebin.freeswitch.org</a>. There are numerous others (pastie, <a href="http://pastebin.com">pastebin.com</a>, etc.) After you put all the information in a pastebin you&#39;ll get a handy URL that you can include in the email thread. One other advantage to pastebins is that you can refer to a specific line number in paste. (&quot;Look at the BYE message at line xxx - it looks unusual...&quot;)<br>
<br>-MC<br><br><div class="gmail_quote">On Mon, May 21, 2012 at 12:26 AM, Arif Hossain <span dir="ltr">&lt;<a href="mailto:aftnix@gmail.com" target="_blank">aftnix@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
We have the following network architecture :<br>
<br>
UAC1-------------------------&gt;kamailio--------------------&gt;VoipSwitch-----&gt;PSTN----------&gt;Phone1<br>
(Sip Client)<br>
<br>
Now UAC1 calls Phone1 and everything is ok. If UAC1 hangs up session<br>
is terminated cleanly.<br>
But if Phone1 hangs up the BYE message which  comes to kamailio and<br>
goes back to VoipSwitch<br>
instead of relayed to UAC1 .<br>
<br>
So The session becomes a zombie one, And UAC1 unfortunately gets<br>
billed for a session<br>
which should be terminated.<br>
<br>
Following is the Call flow as seen from VoipSwitch :<br>
<br>
 | &lt;kamilio IP&gt;                      |<br>
|         |                                              | &lt;VoipSwitch<br>
IP&gt;     |<br>
|134.856  |         INVITE SDP<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|134.858  |         407 Proxy Authentication Required<br>
|         |(7890)   &lt;------------------  (5060)   |<br>
|134.902  |         ACK       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|135.408  |         INVITE SDP<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|135.414  |         100 Trying|<br>
|         |(7890)   &lt;------------------  (5060)   |<br>
|140.121  |         183 Session Progress SDP<br>
|         |(7890)   &lt;------------------  (5060)   |<br>
|140.184  |         RTP (g729)                    |<br>
|         |(61868)  &lt;------------------  (5136)   |<br>
|141.295  |         RTP (g729)                    |<br>
|         |(61868)  ------------------&gt;  (5136)   |<br>
|153.701  |         200 OK SDP<br>
|         |(7890)   &lt;------------------  (5060)   |<br>
|153.713  |         RTP (g729)                    |<br>
|         |(61868)  ------------------&gt;  (5136)   |<br>
|154.126  |         ACK       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|159.988  |         BYE       |<br>
|         |(7890)   &lt;------------------  (5060)   |<br>
|160.031  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|160.478  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|161.412  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|163.280  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|167.015  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|170.750  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|174.481  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|178.216  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|181.952  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|185.687  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|188.018  |         408 Request Timeout<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|211.849  |         BYE       |<br>
|         |(7890)   ------------------&gt;  (5060)   |<br>
|212.292  |         BYE       |<br>
<br>
<br>
Sip Traces :<br>
<br>
kamailio------&gt;VoipSwitch<br>
<br>
I&#39;m posting only the offending BYE msg instead of full trace , because<br>
of the mail will become difficult to read . If more traces needed, i<br>
can post it.<br>
<br>
The following BYE message is sent by VoipSwitch:<br>
<br>
BYE <a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a> SIP/2.0<br>
Route: &lt;sip:108.166.195.189:7890;lr=on;nat=yes&gt;<br>
CSeq: 2 BYE<br>
Via: SIP/2.0/UDP <a href="http://205.164.40.74:5060" target="_blank">205.164.40.74:5060</a><br>
From: <a href="mailto:sip%3A008801673345531@205.164.40.74">sip:008801673345531@205.164.40.74</a>;tag=100528120745985872655137<br>
Call-ID: IqBknV19AuxW0jk.8BjuE4hyx93Ws9qS<br>
To: &quot;123456&quot; &lt;<a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a>&gt;;tag=Zopl5lj5YiqyaSR5Le3QnfoR-G0NZAGG<br>
Content-Length: 0<br>
<br>
Kamailio instead of relaying the message, sends a BYE message towards<br>
VoipSwitch:<br>
<br>
BYE <a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a> SIP/2.0<br>
Max-Forwards: 10<br>
CSeq: 2 BYE<br>
Via: SIP/2.0/UDP 108.166.195.189:7890;branch=z9hG4bK4b2b.5d893e95.0<br>
Via: SIP/2.0/UDP 205.164.40.74:5060;rport=5060<br>
From: <a href="mailto:sip%3A008801673345531@205.164.40.74">sip:008801673345531@205.164.40.74</a>;tag=100528120745985872655137<br>
Call-ID: IqBknV19AuxW0jk.8BjuE4hyx93Ws9qS<br>
To: &quot;123456&quot; &lt;<a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a>&gt;;tag=Zopl5lj5YiqyaSR5Le3QnfoR-G0NZAGG<br>
Content-Length: 0<br>
<br>
When the first BYE message comes from VoipSwitch , kamailio does the following :<br>
May 20 02:25:53 VOS20-108 /usr/local/sbin/kamailio[16442]: DEBUG:<br>
&lt;core&gt; [receive.c:289]: receive_msg: cleaning up<br>
May 20 02:25:53 VOS20-108 /usr/local/sbin/kamailio[16442]: DEBUG:<br>
&lt;core&gt; [parser/sdp/sdp.c:751]: _sdp = 0x831bf10<br>
May 20 02:25:53 VOS20-108 /usr/local/sbin/kamailio[16442]: DEBUG:<br>
&lt;core&gt; [parser/sdp/sdp.c:753]: sdp = 0x83043dc<br>
May 20 02:25:53 VOS20-108 /usr/local/sbin/kamailio[16442]: DEBUG:<br>
&lt;core&gt; [parser/sdp/sdp.c:755]: session = 0x8304504<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:630]: SIP Request:<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:632]:  method:  &lt;BYE&gt;<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:634]:  uri:<br>
&lt;<a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a>&gt;<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:636]:  version: &lt;SIP/2.0&gt;<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:167]: get_hdr_field: cseq &lt;CSeq&gt;: &lt;1&gt;<br>
&lt;BYE&gt;<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/parse_via.c:1287]: Found param type 232, &lt;branch&gt; =<br>
&lt;z9hG4bk19052612230719933454843&gt;; state=16<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/parse_via.c:2300]: end of header reached, state=5<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:515]: parse_headers: Via found, flags=2<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:517]: parse_headers: this is the first via<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [receive.c:145]: After parse_msg...<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [receive.c:186]: preparing to run routing scripts...<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/parse_to.c:174]: DEBUG: add_param:<br>
tag=arILprdVR1srJ76HHlt4BEc3XsyaWcZm<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/parse_to.c:803]: end of header reached, state=29<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:187]: DEBUG: get_hdr_field: &lt;To&gt; [76];<br>
uri=[<a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a>]<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:189]: DEBUG: to body [&quot;ipphone&quot;<br>
&lt;<a href="mailto:sip%3Aipphone@205.164.40.74">sip:ipphone@205.164.40.74</a>&gt;]<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:201]: DEBUG: get_hdr_body :<br>
content_length=0<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:103]: found end of header<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
maxfwd [mf_funcs.c:66]: max_forwards header not found!<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/parse_to.c:174]: DEBUG: add_param:<br>
tag=1905251223419334290936029<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/parse_to.c:803]: end of header reached, state=29<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
siputils [checks.c:76]: totag found<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: rr<br>
[loose.c:85]: is_preloaded: No<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us:<br>
13==15 &amp;&amp;  [205.164.40.74] == [108.166.195.189]<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 7890<br>
matches port 5060<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us:<br>
13==15 &amp;&amp;  [205.164.40.74] == [108.166.195.189]<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 5060<br>
matches port 5060<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [forward.c:448]: check_self: host != me<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [socket_info.c:501]: grep_sock_info - checking if host==us:<br>
15==15 &amp;&amp;  [108.166.195.189] == [108.166.195.189]<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [socket_info.c:504]: grep_sock_info - checking if port 7890<br>
matches port 7890<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: rr<br>
[loose.c:792]: Topmost route URI:<br>
&#39;sip:108.166.195.189:7890;lr=on;nat=yes&#39; is me<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [parser/msg_parser.c:103]: found end of header<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: rr<br>
[loose.c:257]: No next Route HF found<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: rr<br>
[loose.c:811]: No next URI found<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: rr<br>
[loose.c:983]: params are &lt;;lr=on;nat=yes&gt;<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
siputils [checks.c:76]: totag found<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: tm<br>
[t_lookup.c:1379]: DEBUG: t_newtran: msg id=2501 , global msg id=2500<br>
, T on entrance=0xffffffff<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: tm<br>
[t_lookup.c:528]: t_lookup_request: start searching: hash=29177,<br>
isACK=0<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: tm<br>
[t_lookup.c:564]: DEBUG: proceeding to pre-RFC3261 transaction<br>
matching<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: tm<br>
[t_lookup.c:711]: DEBUG: t_lookup_request: no transaction found<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: tm<br>
[t_hooks.c:374]: DBG: trans=0xb61626a4, callback type 1, id 0 entered<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [msg_translator.c:204]: check_via_address(205.164.40.74,<br>
205.164.40.74, 0)<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG: tm<br>
[t_funcs.c:388]: SER: new transaction fwd&#39;ed<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [usr_avp.c:646]: DEBUG:destroy_avp_list: destroying list (nil)<br>
May 20 02:26:04 VOS20-108 last message repeated 5 times<br>
May 20 02:26:04 VOS20-108 /usr/local/sbin/kamailio[16443]: DEBUG:<br>
&lt;core&gt; [receive.c:289]: receive_msg: cleaning up<br>
May 20 02:26:22 VOS20-108 /usr/local/sbin/kamailio[16445]: DEBUG:<br>
&lt;core&gt; [udp_server.c:486]: udp_rcv_loop: probing packet received from<br>
180.234.62.230 38722<br>
May 20 02:26:34 VOS20-108 /usr/local/sbin/kamailio[16450]: DEBUG: tm<br>
[t_reply.c:1134]: -&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; T_code=0, new_code=408<br>
May 20 02:26:34 VOS20-108 /usr/local/sbin/kamailio[16450]: DEBUG: tm<br>
[t_reply.c:1636]: DEBUG: relay_reply: branch=0, save=0, relay=0<br>
May 20 02:26:34 VOS20-108 /usr/local/sbin/kamailio[16450]: DEBUG:<br>
&lt;core&gt; [msg_translator.c:204]: check_via_address(205.164.40.74,<br>
205.164.40.74, 0)<br>
May 20 02:26:34 VOS20-108 /usr/local/sbin/kamailio[16450]: DEBUG:<br>
&lt;core&gt; [mem/shm_mem.c:105]: WARNING:vqm_resize: resize(0) called<br>
May 20 02:26:34 VOS20-108 /usr/local/sbin/kamailio[16450]: DEBUG: tm<br>
[t_hooks.c:288]: DBG: trans=0xb61626a4, callback type 128, id 0<br>
entered<br>
May 20 02:26:54 VOS20-108 /usr/local/sbin/kamailio[16451]: WARNING:<br>
&lt;core&gt; [timer.c:450]: WARNING: our timer runs faster then real-time<br>
(300000 ms / 4800 ticks our time .-&gt; 299923 ms / 4798 ticks real time)<br>
<br>
OT: How do you guys maintain 80 column mails? i do not use a mail<br>
client, use gmail mailbox.<br>
--<br>
-aft<br>
<br>
<br>
--<br>
-aft<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>