ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
I'm trying to catch an error, in case I would dial wrong (non existent) gateway I'm running ESL outbound listener, subscribing to all events, if I do proper bgapi 'originate' - there are normal events flow, and I can track what is happening. But if issue originate to a gateway, which is not configured - there is simply no any events fired. I have an error on FS console 2011-05-14 20:58:13.072927 [ERR] mod_sofia.c:4044 Invalid Gateway following by 2011-05-14 20:58:13.072927 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [INVALID_NUMBER_FORMAT] But HOW to catch the given in ESL? Trying trick like checking for UUID exist or bgapi job ID - all unsuccessfull. sofia.c seems just does not have event code for that cases if (profile_name && !profile_found) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Such Profile '%s'\n", profile_name);
status = SWITCH_STATUS_FALSE; }
Any clue?
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired. 2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER] Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
maybe your gateway is blocking some numbers ----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired.
2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]
Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
_______________________________________________ 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
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown') When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one. The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw Possibly I should ask in DEV list... 2011/5/14 Madovsky <infos@madovsky.org>:
maybe your gateway is blocking some numbers
----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired.
2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]
Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
_______________________________________________ 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
Read up on mod distributor on the wiki. On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown')
When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one.
The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw
Possibly I should ask in DEV list...
2011/5/14 Madovsky <infos@madovsky.org>:
maybe your gateway is blocking some numbers
----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired.
2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]
Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
_______________________________________________ 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
_______________________________________________ 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
That good one, but not for the my case. i use originate &park, and than bridge_uuid, when there is an early_media. I have a number of gateways, which support specific destinations each, so it's up to my billing to decide what gateway should be dialed and in which order. But I still need to determine if gateway could be reached or not, or if while calling, it gives an error, and which one. I see gwlist down could be used for bridge, but bridge does not give flexibility I try to achieve. Will see what it gives if used for originate... So, considering your brief reply, there just no support for the case I need, so will try to get inside sofia.c ... Regards, Anton. 2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
Read up on mod distributor on the wiki.
On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown')
When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one.
The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw
Possibly I should ask in DEV list...
2011/5/14 Madovsky <infos@madovsky.org>:
maybe your gateway is blocking some numbers
----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired.
2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]
Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
_______________________________________________ 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
_______________________________________________ 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
If I'm not wrong mod_distribute just provides a list for dialing the set of gateways, but not generating events itself. So seems not for the case anyway... 2011/5/14 Anton VG <anton.vazir@gmail.com>:
That good one, but not for the my case.
i use originate &park, and than bridge_uuid, when there is an early_media. I have a number of gateways, which support specific destinations each, so it's up to my billing to decide what gateway should be dialed and in which order. But I still need to determine if gateway could be reached or not, or if while calling, it gives an error, and which one.
I see gwlist down could be used for bridge, but bridge does not give flexibility I try to achieve. Will see what it gives if used for originate...
So, considering your brief reply, there just no support for the case I need, so will try to get inside sofia.c ...
Regards, Anton.
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
Read up on mod distributor on the wiki.
On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown')
When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one.
The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw
Possibly I should ask in DEV list...
2011/5/14 Madovsky <infos@madovsky.org>:
maybe your gateway is blocking some numbers
----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired.
2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]
Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
_______________________________________________ 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
_______________________________________________ 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
It works with mod sofia dialplan app to test if a gw is down. That's your hint ;) On May 14, 2011 1:19 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
If I'm not wrong mod_distribute just provides a list for dialing the set of gateways, but not generating events itself. So seems not for the case anyway...
2011/5/14 Anton VG <anton.vazir@gmail.com>:
That good one, but not for the my case.
i use originate &park, and than bridge_uuid, when there is an early_media. I have a number of gateways, which support specific destinations each, so it's up to my billing to decide what gateway should be dialed and in which order. But I still need to determine if gateway could be reached or not, or if while calling, it gives an error, and which one.
I see gwlist down could be used for bridge, but bridge does not give flexibility I try to achieve. Will see what it gives if used for originate...
So, considering your brief reply, there just no support for the case I need, so will try to get inside sofia.c ...
Regards, Anton.
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
Read up on mod distributor on the wiki.
On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown')
When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one.
The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw
Possibly I should ask in DEV list...
2011/5/14 Madovsky <infos@madovsky.org>:
maybe your gateway is blocking some numbers
----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
The same goes for gateway, which is just down. No events, signalling that call will not succeed. And no events fired.
2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]
Am I missing the way to get info in the ESL about gateways, which are out of order, or there is simple no way, without hacking the code?
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
Yes, it does :) And I can use it to test is gw is up or down. But question digs slightly deeper, it looks a kind odd, that when I issue the non-working 'originate' or 'bridge' - there is no ERROR event at least. So seems there is no way to determine in ESL, that 'originate' or other command have fauiled have failed. On successful execution - there is "BACKGROUD_JOB" event. But no event on error. Don't you think that errors should fire events either, to inform ESL dialplan that issued command have failed? 2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
It works with mod sofia dialplan app to test if a gw is down. That's your hint ;)
On May 14, 2011 1:19 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
If I'm not wrong mod_distribute just provides a list for dialing the set of gateways, but not generating events itself. So seems not for the case anyway...
2011/5/14 Anton VG <anton.vazir@gmail.com>:
That good one, but not for the my case.
i use originate &park, and than bridge_uuid, when there is an early_media. I have a number of gateways, which support specific destinations each, so it's up to my billing to decide what gateway should be dialed and in which order. But I still need to determine if gateway could be reached or not, or if while calling, it gives an error, and which one.
I see gwlist down could be used for bridge, but bridge does not give flexibility I try to achieve. Will see what it gives if used for originate...
So, considering your brief reply, there just no support for the case I need, so will try to get inside sofia.c ...
Regards, Anton.
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
Read up on mod distributor on the wiki.
On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown')
When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one.
The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw
Possibly I should ask in DEV list...
2011/5/14 Madovsky <infos@madovsky.org>:
maybe your gateway is blocking some numbers
----- Original Message ----- From: "Anton VG" <anton.vazir@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Saturday, May 14, 2011 12:23 PM Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on submitted API command, like originate sofia to non-existent gateway
> The same goes for gateway, which is just down. No events, signalling > that call will not succeed. And no events fired. > > 2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! > 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot > create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER] > > Am I missing the way to get info in the ESL about gateways, which are > out of order, or there is simple no way, without hacking the code? > > _______________________________________________ > 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
_______________________________________________ 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
_______________________________________________ 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
There is always a result to originate and its always in a background job event success or fail. In the body of the event you will find the return value. On May 14, 2011 1:52 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
Yes, it does :) And I can use it to test is gw is up or down. But question digs slightly deeper, it looks a kind odd, that when I issue the non-working 'originate' or 'bridge' - there is no ERROR event at least. So seems there is no way to determine in ESL, that 'originate' or other command have fauiled have failed. On successful execution - there is "BACKGROUD_JOB" event. But no event on error. Don't you think that errors should fire events either, to inform ESL dialplan that issued command have failed?
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
It works with mod sofia dialplan app to test if a gw is down. That's your hint ;)
On May 14, 2011 1:19 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
If I'm not wrong mod_distribute just provides a list for dialing the set of gateways, but not generating events itself. So seems not for the case anyway...
2011/5/14 Anton VG <anton.vazir@gmail.com>:
That good one, but not for the my case.
i use originate &park, and than bridge_uuid, when there is an early_media. I have a number of gateways, which support specific destinations each, so it's up to my billing to decide what gateway should be dialed and in which order. But I still need to determine if gateway could be reached or not, or if while calling, it gives an error, and which one.
I see gwlist down could be used for bridge, but bridge does not give flexibility I try to achieve. Will see what it gives if used for originate...
So, considering your brief reply, there just no support for the case I need, so will try to get inside sofia.c ...
Regards, Anton.
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
Read up on mod distributor on the wiki.
On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
You did not understand. I INTENTIONALLY dialing the bad gateway, and I'm looking for a proper way to determine that gateway is bad in my ESL dialplan, by catching the proper event/reply/whatever, And much preferably without tricks, like esl.api('sofia status gateway GatewayWhichIsDown')
When in production, and there is more than a single route, there will be plenty of cases, when you dial a bad gateway, so there should be a way for ESL dialplan to determine that a gateway is not callable for a moment, the reason WHY and to retry with another one.
The trick above is bad, since: 1. blocking api query, before evey single gateway call attempt. 2. Gateway maybe known in UP state, but the state is stale, in dial in fact will go to DOWN gateway. So, dialplan will screw
Possibly I should ask in DEV list...
2011/5/14 Madovsky <infos@madovsky.org>: > maybe your gateway is blocking some numbers > > ----- Original Message ----- > From: "Anton VG" <anton.vazir@gmail.com> > To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> > Sent: Saturday, May 14, 2011 12:23 PM > Subject: Re: [Freeswitch-users] ESL: No events fired when there is > error > on > submitted API command, like originate sofia to non-existent gateway > > >> The same goes for gateway, which is just down. No events, signalling >> that call will not succeed. And no events fired. >> >> 2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! >> 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot >> create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER] >> >> Am I missing the way to get info in the ESL about gateways, which are >> out of order, or there is simple no way, without hacking the code? >> >> _______________________________________________ >> 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 >
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
What the shame... Reimplementation in plain event receiver catches the BACKGROUND_JOB event on bad gateway. Seems I'm loosing some events in multi-threaded app. I was so sure I'm getting all events. Thanks so much Anthony, and sorry for bothering, usually I double check in advance. Seems I have to get some sleep. 2011/5/15 Anthony Minessale <anthony.minessale@gmail.com>:
There is always a result to originate and its always in a background job event success or fail. In the body of the event you will find the return value.
On May 14, 2011 1:52 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
Yes, it does :) And I can use it to test is gw is up or down. But question digs slightly deeper, it looks a kind odd, that when I issue the non-working 'originate' or 'bridge' - there is no ERROR event at least. So seems there is no way to determine in ESL, that 'originate' or other command have fauiled have failed. On successful execution - there is "BACKGROUD_JOB" event. But no event on error. Don't you think that errors should fire events either, to inform ESL dialplan that issued command have failed?
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
It works with mod sofia dialplan app to test if a gw is down. That's your hint ;)
On May 14, 2011 1:19 PM, "Anton VG" <anton.vazir@gmail.com> wrote:
If I'm not wrong mod_distribute just provides a list for dialing the set of gateways, but not generating events itself. So seems not for the case anyway...
2011/5/14 Anton VG <anton.vazir@gmail.com>:
That good one, but not for the my case.
i use originate &park, and than bridge_uuid, when there is an early_media. I have a number of gateways, which support specific destinations each, so it's up to my billing to decide what gateway should be dialed and in which order. But I still need to determine if gateway could be reached or not, or if while calling, it gives an error, and which one.
I see gwlist down could be used for bridge, but bridge does not give flexibility I try to achieve. Will see what it gives if used for originate...
So, considering your brief reply, there just no support for the case I need, so will try to get inside sofia.c ...
Regards, Anton.
2011/5/14 Anthony Minessale <anthony.minessale@gmail.com>:
Read up on mod distributor on the wiki.
On May 14, 2011 12:12 PM, "Anton VG" <anton.vazir@gmail.com> wrote: > You did not understand. I INTENTIONALLY dialing the bad gateway, and > I'm looking for a proper way to determine that gateway is bad in my > ESL dialplan, by catching the proper event/reply/whatever, > And much preferably without tricks, like esl.api('sofia status > gateway > GatewayWhichIsDown') > > When in production, and there is more than a single route, there will > be plenty of cases, when you dial a bad gateway, so there should be a > way for ESL dialplan to determine that a gateway is not callable for > a > moment, the reason WHY and to retry with another one. > > The trick above is bad, since: > 1. blocking api query, before evey single gateway call attempt. > 2. Gateway maybe known in UP state, but the state is stale, in dial > in > fact will go to DOWN gateway. So, dialplan will screw > > Possibly I should ask in DEV list... > > 2011/5/14 Madovsky <infos@madovsky.org>: >> maybe your gateway is blocking some numbers >> >> ----- Original Message ----- >> From: "Anton VG" <anton.vazir@gmail.com> >> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> >> Sent: Saturday, May 14, 2011 12:23 PM >> Subject: Re: [Freeswitch-users] ESL: No events fired when there is >> error >> on >> submitted API command, like originate sofia to non-existent gateway >> >> >>> The same goes for gateway, which is just down. No events, >>> signalling >>> that call will not succeed. And no events fired. >>> >>> 2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down! >>> 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot >>> create outgoing channel of type [sofia] cause: >>> [NETWORK_OUT_OF_ORDER] >>> >>> Am I missing the way to get info in the ESL about gateways, which >>> are >>> out of order, or there is simple no way, without hacking the code? >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > 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
_______________________________________________ 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
_______________________________________________ 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
-
Anton VG
-
Madovsky