[Freeswitch-users] Logging 503's or other errors
dujinfang
dujinfang at gmail.com
Mon May 18 12:21:58 PDT 2009
Even the b leg cdr is enabled it only remember the final state(channel
vars) on the b leg.
At least there are two possible ways to keep tracking all the gateways:
1) don't use '|' separated dial string, use a lua script like this:
session:execute("bridge", dial_string1);
bridge_hangup_cause =
session:getVariable("bridge_hangup_cause") or
session:getVariable("originate_disposition");
if (bridge_hangup_cause == "NORMAL_TEMPORARY_FAILURE" or
bridge_hangup_cause == "NO_ROUTE_DESTINATION" or bridge_hangup_cause
== "CALL_REJECTED") then
freeswitch.consoleLog("notice", "Hangup. Cause: [" ..
bridge_hangup_cause .. "]. Retry: "
-- database.insert('something')
session:execue("bridge", dial_string2);
if (bridge_hangup_cause == "NORMAL_TEMPORARY_FAILURE" or
bridge_hangup_cause == "NO_ROUTE_DESTINATION" or bridge_hangup_cause
== "CALL_REJECTED") then
session:execute("bridge", dial_string3);
.... obviously it can be done in a loop
2) by sip: add a custom header to INVITE,
bridge({sip_h_x_xxx=yyy}sofia/gateways/a/...|sofia/gateways/b/...|
sofia/gateways/c/...
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.
On May 18, 2009, at 9:05 PM, Anthony Minessale wrote:
> enable the b leg cdr as well and you will also get cdr from the b
> leg perspective.
> both xml cdr and cdr csv have params in the config to enable it.
>
>
> On Sun, May 17, 2009 at 1:26 PM, Ron McCarthy <ronmccar at gmail.com>
> wrote:
> Hi list,
>
> 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.
>
> 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?
>
> Thanks
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> iax:guest at conference.freeswitch.org/888
> googletalk:conf+888 at conference.freeswitch.org
> pstn:213-799-1400
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090519/5c2713fa/attachment-0002.html
More information about the FreeSWITCH-users
mailing list