[Freeswitch-dev] Answering a call...
Kevin Snow
kevin.snow at ooma.com
Thu Aug 13 10:54:04 PDT 2009
Guys,
In my module (written in C), I have a call answering edge case that I think
there must be an easier way than what I¹m doing. Or, more correctly, a right
way to do this and I¹m currently not doing that.
I have an active/established call. An incoming SIP call arrives and I send
it off to switch_ivr_originate to ring my endpoints. Based on action outside
of Freeswitch, I want to stop the ringing and have an endpoint from the
established call answer this ringing call. I have a custom FS event
generated to indicate this condition. In this event handler I want to take a
channel from the active call and answer this incoming call.
Here¹s what I¹m currently doing.
In my event handler I¹m taking the endpoint of the active call and sending
to a specific dialplan
This dialplan has it call my C application.
At this point the application is the session of the endpoint and it can get
the session that¹s currently ringing.
It gets the session of the ringing channel
It uses switch_channel_answer to answer the ringing channel.
Then it uses switch_ivr_uuid_bridge to bridge these two endpoints.
Seems simple enough but it¹s not working.
The problems I have are:
Doing this seems to make the switch_ivr_originate that was ringing the
endpoints fail with ORIGINATOR_CANCEL. I special case this but it leads me
to believe I¹m going about this the wrong way. I¹m not trying to cancel it,
I want to answer it.
I¹m not breaking the bridge of the original established call. That too seems
wrong. I think I should be doing something there but it¹s not clear what.
Is there a better way to handle this?
Thanks
Kevin Snow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090813/f036c708/attachment.html
More information about the FreeSWITCH-dev
mailing list