[newbie] route incomming call to endpoint using fs_cli
Hello, I'm just taking first steps in learning freeswitch. What I would like to do is route my incomming call to 'some' endpoint using fs_cli. (just to see how all is working). My config (snapshot): <extension name="raymondtest"> <condition field="destination_number" expression="^5800$"> <action application="answer"/> <action application="sleep" data="200000"/> </condition> </extension> <extension name="echo"> <condition field="destination_number" expression="^9196$"> <action application="answer"/> <action application="echo"/> </condition> </extension> Both endpoints are working. So when I call using my softphone to 5800 I can see the call in fs_cli using show calls: 0dbf4066-dd7a-11e2-a52c-b9fe005eb6ff,inbound,2013-06-25 11:31:46,1372152706,sofia/internal/1500@172.30.4.186,CS_EXECUTE,1500,1500,172.30.4.132,5800,1500@172.30.4.186,,ACTIVE,,,,,fs-devel,,,,,,,,,,,,,,,,,,,,, But how can I route this call USING FS_CLI commands to the echo endpoint ? I looked into originate, bridge and sofia. But I couldn't find out how to do this. Best regards, Raymond Domingo -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/newbie-route-incomming-call-to... Sent from the freeswitch-users mailing list archive at Nabble.com.
In this case you could try http://wiki.freeswitch.org/wiki/Mod_commands#uuid_transfer but it probably wouldn't be the best way to handle the call. All incoming calls will hit a dialplan search, so the call needs to be handled there. If you're wanting to handle calls via ESL look at the outbound socket. Also if doing it the way you are now. better than sleep might be this: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_park -Steve On 25 June 2013 10:34, Raymond Domingo <raymond@telecats.nl> wrote:
Hello,
I'm just taking first steps in learning freeswitch.
What I would like to do is route my incomming call to 'some' endpoint using fs_cli. (just to see how all is working).
My config (snapshot): <extension name="raymondtest"> <condition field="destination_number" expression="^5800$"> <action application="answer"/> <action application="sleep" data="200000"/> </condition> </extension>
<extension name="echo"> <condition field="destination_number" expression="^9196$"> <action application="answer"/> <action application="echo"/> </condition> </extension>
Both endpoints are working.
So when I call using my softphone to 5800 I can see the call in fs_cli using show calls:
0dbf4066-dd7a-11e2-a52c-b9fe005eb6ff,inbound,2013-06-25 11:31:46,1372152706,sofia/internal/1500@172.30.4.186 ,CS_EXECUTE,1500,1500,172.30.4.132,5800,1500@172.30.4.186 ,,ACTIVE,,,,,fs-devel,,,,,,,,,,,,,,,,,,,,,
But how can I route this call USING FS_CLI commands to the echo endpoint ?
I looked into originate, bridge and sofia. But I couldn't find out how to do this.
Best regards, Raymond Domingo
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/newbie-route-incomming-call-to... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
Thank you Steve ! Once you know how it works it seems really simple :) I do notice there's only one channel: show channels 05fcaa8a-dda7-11e2-98e8-1dfb6433c845,inbound,2013-06-25 16:53:40,1372172020,sofia/internal/1500@172.30.4.186,CS_EXECUTE,1500,1500,172.30.4.132,9196,echo,,XML,default,G722,16000,64000,G722,16000,64000,,fs-devel,1500@172.30.4.186,,ACTIVE,,,,,, 1 total. I kind of expected there would be two. One between softphone and freeswitch, and one between freeswitch and endpoint. Do you (can you explain to me) know when new channels are created/needed ? Are they only used when you have a 'leg' between freeswitch and some other system and are they not needed when using freeswitch (local) endpoints ? -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/newbie-route-incomming-call-to... Sent from the freeswitch-users mailing list archive at Nabble.com.
In that example you're sending the call to echo. That's an application not an endpoint. If it went to a bridge then you'd see another channel. On Tuesday, June 25, 2013, Raymond Domingo wrote:
Thank you Steve ! Once you know how it works it seems really simple :)
I do notice there's only one channel: show channels
05fcaa8a-dda7-11e2-98e8-1dfb6433c845,inbound,2013-06-25 16:53:40,1372172020,sofia/internal/1500@172.30.4.186 <javascript:;> ,CS_EXECUTE,1500,1500,172.30.4.132,9196,echo,,XML,default,G722,16000,64000,G722,16000,64000,,fs-devel, 1500@172.30.4.186 <javascript:;>,,ACTIVE,,,,,,
1 total.
I kind of expected there would be two. One between softphone and freeswitch, and one between freeswitch and endpoint. Do you (can you explain to me) know when new channels are created/needed ?
Are they only used when you have a 'leg' between freeswitch and some other system and are they not needed when using freeswitch (local) endpoints ?
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/newbie-route-incomming-call-to... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:;> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:;> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Raymond Domingo
-
Steven Ayre