connecting call in freeswitch dial plan

342 views
Skip to first unread message

Neeraj Nagi

unread,
Jul 30, 2013, 1:46:28 PM7/30/13
to adhea...@googlegroups.com
I am parking all calls coming on default dialplan in a freeswitch controller.
within my controller I am dialling to call.to.

Now suppose   a@default call b@default.

call parked
dial to b@default
call parked
dail to b@default

so I am running in a loop

how to join calls in this scenario where both A and B party are parked for same ahn controller.

Ben Langfeld

unread,
Jul 30, 2013, 1:49:00 PM7/30/13
to adhea...@googlegroups.com
You're going to have to explain more thoroughly what you're trying to achieve. I don't understand what you mean by running in a loop, or why you are parking outbound calls. Please show code and explain in long-form.


--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adhearsion+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Neeraj Nagi

unread,
Jul 31, 2013, 2:20:14 AM7/31/13
to adhea...@googlegroups.com

I have linked sipml5 based browser client to freeswitch. All browser based client are registered as
sofia/internal/user@domain.

now I am routing all incoming calls on dialplan default to adhearsion controller. which is

answer
dial  "sofia/internal/#{ call.to }"
hangup

no dial in above controller will be again parked by default dialplan, and again and again.

my target is to bridge A and B if A calls to B.   I can do it without parking but I need to connect call thru ahn app, as I would be tracking ahn call.id . This call.id I will utilize later to make conference room and other stuff. 

Basically I don't want to use freeswitch dialplan, ahn give a much better control. 
 

Ben Langfeld

unread,
Jul 31, 2013, 9:22:57 AM7/31/13
to adhea...@googlegroups.com
And what problem are you experiencing when you use a controller like that? You say "no dial in above controller will be again parked by default dialplan, and again and again." but I'm afraid I don't understand what that means; I think we're hitting a language barrier. Could you please provide logs (at TRACE level) indicating the problem you are seeing using such a controller?


Neeraj Nagi

unread,
Aug 1, 2013, 8:35:54 AM8/1/13
to adhea...@googlegroups.com
within controller I am dialing call.to. freeswitch will again park that call for same controller. Again I will dial call.to. ad infinitum

--
You received this message because you are subscribed to a topic in the Google Groups "Adhearsion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adhearsion/T93mN_kQ8kc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adhearsion+...@googlegroups.com.

Ben Langfeld

unread,
Aug 1, 2013, 8:59:46 AM8/1/13
to adhea...@googlegroups.com
So you're seeing outbound calls produced as a result of CallController#dial coming in to Adhearsion as an inbound call and re-entering your CallController? That's definitely a bug, but not one I've experienced before and we do more or less exactly what you're suggesting in several applications. Please file a ticket on github with reproduction code and logs.

Neeraj Nagi

unread,
Aug 1, 2013, 9:41:02 AM8/1/13
to adhea...@googlegroups.com
 this is supposed to happen. I just don't know how to accomplish my target 

A and B are both registered as  sofia/internal user on freeswitch.

all incoming call for default dialplan( that is internal user ) have this controller

def run
answer
dial "sofia/internal/#{call.to}"
hangup
end

now If A calls to B , that call will be parked for above controller and a new call will be fired for sofia/internal/B.  This new call will be again parked according to dialplan . So this is ok. 

so what would you suggest. What should be in dialplan to connect A to B.

one more thing if I do something like

def run
answer
dial `fs_cli -x "sofia_contact user/dial.to/"`
hangup
end

call is connected. sofia_contact freeswitch cli command returns a full sip uri for registered user. 

Ben Langfeld

unread,
Aug 1, 2013, 9:57:14 AM8/1/13
to adhea...@googlegroups.com
Ok, so I think I now understand the problem: your use of a "sofia/internal/foo" goes via a second bridge command via the default FreeSWITCH XML dialplan. You should indeed dial directly to an endpoint; what happens if you try dialing "user/#{call.to}" instead, without using sofia_contact? FreeSWITCH should be able to deal with originating to a user/ URI.

Neeraj Nagi

unread,
Aug 6, 2013, 9:25:38 AM8/6/13
to adhea...@googlegroups.com, b...@langfeld.me
thanks, was creating user on the fly , seems  in freeswith user/xyz works if dial-string is specified for the user.
Reply all
Reply to author
Forward
0 new messages