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
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@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@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@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
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@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@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@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400 _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Intresting, I will have to look at both of these. We route advance based on a 503 so we don't even a pipe we just go down in order. Just had a ideal, could you run some scripts between the next gateway, as in the next line in the XML calls a script or something that would then log it? Thanks On Mon, May 18, 2009 at 12:21 PM, dujinfang <dujinfang@gmail.com> wrote:
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@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@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@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Anthony Minessale
-
dujinfang
-
Ron McCarthy