Gerry,

From my experience, you only get the CHANNEL_DESTROY event; however I use the return value from command "api originate sofia/internal/5344 &park()", if it is not "+OK ...", than I immediately issue an error. In your case, the return value would be something like "-ERR NO_ROUTE_DESTINATION".

If you want to perform the API command asynchronously, than you would do something like:

"bgapi originate sofia/internal/5344 &park()"

The command will return immediately and will return a unique Job-UUID and will fire the BACKGROUND_JOB event when the command has finished execution. In this BACKGROUND_JOB event you'll get the previously mentioned Job-UUID and the status of issued command; for your case "-ERR NO_ROUTE_DESTINATION".

As stated above, this information is based on my experience only and maybe there is a better way...

Hope this helps,
 Boris

On Wed, Aug 6, 2008 at 10:08 PM, Gerry Hull <gerry@pstn2.net> wrote:
I'm using mod_eventsocket.

If I perform the API command

originate sofia/internal/5344 &park()

and 5344 is not a valid destination, I receive the following:

2008-08-06 16:04:30 [WARNING] mod_sofia.c:1890 sofia_outgoing_channel() Cannot l
ocate registered user 5344@10.0.6.63
2008-08-06 16:04:30 [NOTICE] mod_sofia.c:1975 sofia_outgoing_channel() Close Cha
nnel N/A [CS_NEW]
2008-08-06 16:04:30 [ERR] switch_ivr_originate.c:912 switch_ivr_originate() Cann
ot create outgoing channel of type [sofia] cause: [NO_ROUTE_DESTINATION]
API CALL [originate(sofia/internal/5344 &park())] output:
-ERR NO_ROUTE_DESTINATION

in the log.   However, How can I receive an event as to trap this issue?  I don't see one I can subscribe to to get this
information.

Thanks,

Gerry


_______________________________________________
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