[Freeswitch-users] ESL: not bein able to determine when SIP gateway is down when originating a call

Peter Olsson peter.olsson at visionutveckling.se
Tue Aug 2 10:02:42 MSD 2011


In this case there should at least be a BACKGROUND_JOB event with the result from originate (INVALID_NUMBER_FORMAT) - are you monitoring these events? If you want a specific event fired for "gateway down" you will have to create a patch for this.

/Peter
________________________________________
Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] för Anthony Minessale [anthony.minessale at gmail.com]
Skickat: den 2 augusti 2011 06:59
Till: FreeSWITCH Users Help
Ämne: Re: [Freeswitch-users] ESL: not bein able to determine when SIP gateway is down when originating a call

make a patch to add a new custom sofia event and fire it


On Mon, Aug 1, 2011 at 11:38 PM, Bill W. <freeswitch at aastral.net> wrote:
> Hey Anton,
>
> I'm running in to this same issue.  Did you ever find a result?
>
> Thanks,
> Bill
>
> On 5/14/11 1:17 PM, Anton VG wrote:
>> I'm trying to catch an error, in case I would dial wrong (non
>> existent) gateway (intentionally!)
>>
>> I'm running ESL outbound listener, subscribing to all events,
>> if I do bgapi 'originate' to a live gateway - there are normal events
>> flow, and I
>> can track what is happening.
>> But if I issue originate to a gateway, which is not configured or
>> simply down - there
>> are no any events fired.
>>
>> I only 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?
>>
>> 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;
>> }
>>
>> logically there should be a proper way to determine that gateway is bad in my
>> ESL dialplan, by catching the proper event/reply/whatever,
>> For the moment i did trick: 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, ESL dialplan will screw in that case
>>
>> Any clue?
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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/
Twitter: http://twitter.com/FreeSWITCH_wire

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
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900

_______________________________________________
Join us at ClueCon 2011, Aug 9-11, Chicago
http://www.cluecon.com 877-7-4ACLUE

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

!DSPAM:4e3784ca32763825510562!




More information about the FreeSWITCH-users mailing list