<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Even the b leg cdr is enabled it only remember the final state(channel vars) on the b leg.</div><div><br></div><div>At least there are two possible ways to keep tracking all the gateways:</div><div><br></div><div>1) don't use '|'&nbsp;separated&nbsp;dial string, use a lua script like this:</div><div><br></div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;session:execute("bridge", dial_string1);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;bridge_hangup_cause = session:getVariable("bridge_hangup_cause") or session:getVariable("originate_disposition");</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (bridge_hangup_cause == "NORMAL_TEMPORARY_FAILURE" or bridge_hangup_cause == "NO_ROUTE_DESTINATION" or bridge_hangup_cause == "CALL_REJECTED") &nbsp;then</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;freeswitch.consoleLog("notice", "Hangup. Cause: [" .. bridge_hangup_cause .. "]. Retry: "&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>--&nbsp;database.insert('something')<br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>session:execue("bridge", dial_string2);<br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&nbsp;if (bridge_hangup_cause == "NORMAL_TEMPORARY_FAILURE" or bridge_hangup_cause == "NO_ROUTE_DESTINATION" or bridge_hangup_cause == "CALL_REJECTED") &nbsp;then</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>session:execute("bridge", dial_string3);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>.... obviously it can be done in a loop<br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><br></div></div><div>2)&nbsp;by sip:&nbsp;add a custom header to INVITE,</div><div>bridge({sip_h_x_xxx=yyy}sofia/gateways/a/...|sofia/gateways/b/...|sofia/gateways/c/...</div><div><br></div><div>be sure to give yyy a unique value each time you call, then you can dump all the sip messages and by cross reference of the sip_h_x_xxx and call-ID you can get all the related sip messages(every INVITE will have the same sip_h_x_xxx header and each INVITE related message will have the same call-ID.</div><div><br></div><div><br></div><div><br></div><br><div><html>On May 18, 2009, at 9:05 PM, Anthony Minessale wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite">enable the b leg cdr as well and you will also get cdr from the b leg perspective.<br>both xml cdr and cdr csv have params in the config to enable it.<br><br><br><div class="gmail_quote">On Sun, May 17, 2009 at 1:26 PM, Ron McCarthy <span dir="ltr">&lt;<a href="mailto:ronmccar@gmail.com">ronmccar@gmail.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi list,<br><br>Ive been trying to find a way to log 503's, 480's and other SIP response codes. If we have continue_on_fail=true and have multiple gateways for the call to go out, if the 1st,2nd or whatever gateways fail can we log it somehow? We'd like to know if a carrier is having issues or not letting us send calls for some reason, from what I can tell I only show one CDR get written and that's at the end of the call, so it says nothing about the gateways we tried to send a call before and if they failed.<br> <br>Any ideals on how to do this? Im using the XML CURL dialplan if that matter. Any ideals how this could be setup so we can keep track of what is going on?<br><br>Thanks<br> <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> <br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br> <br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br> IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br> _______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></body></html>