Problem with handling unanswered calls for a managed redirect
Can anyone suggest a good way to do the following; 1 - I want to be alerted [via the event API] to a new incoming call. 2 - I do not want that incoming call to be answered but just stay ringing. 3 - Then via the API I want to send a redirect command to push the call off to a new destination of my choice, I do not want to use the answer/deflect sequence. So far I've managed 1 - I see on the incoming call on the event API 2 - I used sleep 180000 (3 mins) see rule below. 3 - failed - because the rule is executing a sleep command and I cannot break in with my redirect. <extension name="Trunk_Line1"> <condition field="destination_number" expression="^012345$"> <action application="set" data="domain_name=x.x.x.x"/> <action application="ring_ready" /> <action application="sleep" data="180000"/> </condition> </extension> ============ I have tested the following works as single DP rule. Using the fixed dial plan rule below I do get the SIP signalling I want but of course it's a redirect immediately and to a fixed destination. The redirect causes FS to send a "302 moved temporarily", and the move works. <extension name="Trunk_Line1"> <condition field="destination_number" expression="^012345$"> <action application="set" data="domain_name=x.x.x.x"/> <action application="ring_ready" /> <action application="set" data="effective_caller_id_number= 00123456789"/> <action application="set" data="effective_caller_id_name= fred"/> <action application="redirect" data="sip:012345678901@${domain_name}"/> </condition> </extension> ============= Any suggestions would be gratefully received Richard Lamkin richard.lamkin@mettoni.com ************************************************************************* Please consider the environment before printing this e-mail ************************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. http://www.mettoni.com Mettoni Ltd Registered in England and Wales: 4485956 9400 Garsington Road, Oxford Business Park, Oxford, OX4 2HN *************************************************************************
On Jun 23, 2009, at 11:31 AM, Richard Lamkin wrote:
Can anyone suggest a good way to do the following;
1 - I want to be alerted [via the event API] to a new incoming call.
See below.. ie park. You should get an event via event socket you can decide what to do.
2 - I do not want that incoming call to be answered but just stay ringing.
Can't really do it that way.. you can answer it but then you're responsible for generating ringback. And billing starts when you answer it.
3 – Then via the API I want to send a redirect command to push the call off to a new destination of my choice, I do not want to use the answer/deflect sequence.
Try using park ... this way you put the call in limbo and you can send the call commands at your leisure. http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_park
So far I’ve managed 1 - I see on the incoming call on the event API 2 – I used sleep 180000 (3 mins) see rule below. 3 – failed - because the rule is executing a sleep command and I cannot break in with my redirect.
Brian West brian@freeswitch.org -- Meet us at ClueCon! http://www.cluecon.com
Brian, Thank you for suggesting I try PARK. I tried PARK but unfortunately it sends out a 183 with SDP which stops the originator hearing ringing (ring back). If you know of a way to park without sending a 183 that would solve my problem. Regards Richard Lamkin Richard.lamkin@mettoni.com From: Brian West [mailto:brian@freeswitch.org] Sent: 23 June 2009 17:37 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Problem with handling unanswered calls for amanaged redirect On Jun 23, 2009, at 11:31 AM, Richard Lamkin wrote: Can anyone suggest a good way to do the following; 1 - I want to be alerted [via the event API] to a new incoming call. See below.. ie park. You should get an event via event socket you can decide what to do. 2 - I do not want that incoming call to be answered but just stay ringing. Can't really do it that way.. you can answer it but then you're responsible for generating ringback. And billing starts when you answer it. 3 - Then via the API I want to send a redirect command to push the call off to a new destination of my choice, I do not want to use the answer/deflect sequence. Try using park ... this way you put the call in limbo and you can send the call commands at your leisure. http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_park So far I've managed 1 - I see on the incoming call on the event API 2 - I used sleep 180000 (3 mins) see rule below. 3 - failed - because the rule is executing a sleep command and I cannot break in with my redirect. Brian West brian@freeswitch.org -- Meet us at ClueCon! http://www.cluecon.com <http://www.cluecon.com/> ************************************************************************* Please consider the environment before printing this e-mail ************************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. http://www.mettoni.com Mettoni Ltd Registered in England and Wales: 4485956 9400 Garsington Road, Oxford Business Park, Oxford, OX4 2HN *************************************************************************
participants (2)
-
Brian West
-
Richard Lamkin