[Freeswitch-users] Originate in Dial plan

Michael Collins msc at freeswitch.org
Tue Jul 14 00:48:28 PDT 2009


On Mon, Jul 13, 2009 at 9:30 PM, Dome Charoenyost <dome at tel.co.th> wrote:

> 2009/7/14 Michael Collins <msc at freeswitch.org>:
> > What phone number do you call back? I mean, how do you know what the
> > customer's number is? Do you go by the caller id number?
> yes callback to caller id
>

Okay, here's a dialplan snippet that I used to successfully do the
autocallback. In my case I used ext 1001 as the customer and portaudio as
the "agent" if you get my meaning. Extension 1001 dials 9902, hangs up, and
immediately the api_hangup_hook's originate command is executed. In this
case it calls portaudio/auto_answer for the A-leg and user/1001 as the
B-leg. I don't claim that it's the prettiest thing in the world but it
definitely works. You'll need to adjust according to your specific
situation.

  <extension name="callback-test-answer-ib-call">
    <!-- From mailing list - a question about how to do this:
        Caller calls in, ring (no answer), capture Caller ID, wait for
caller to hangup
        Generate outbound call to captured caller ID number
        Only use dialplan, no scripting
    -->
    <condition field="destination_number" expression="^9902$">
      <action application="pre_answer"/>
      <action application="set" data="callbacknum=${caller_id_number}"/>
      <action application="log" data="INFO Callback number is
'${callbacknum}'"/>
      <action application="set" data="api_hangup_hook=originate
portaudio/auto_answer CBTEST${callbacknum}"/>
      <action application="sleep" data="10000"/> <!-- wait 10 sec for caller
to hangup, otherwise we hangup -->
      <action application="hangup"/>
    </condition>
  </extension>

  <extension name="callback-test-generate-ob-call">
    <condition field="destination_number" expression="^CBTEST(\d+)$">
      <action application="bridge" data="user/$1"/>
    </condition>
  </extension>


Let us know how it goes. BTW, what is the reason for this type of scenario?
Just curious.
-MC

>
>
> >
> > -MC
> >
> > On Sun, Jul 12, 2009 at 9:59 AM, Dome Charoenyost <dome at tel.co.th>
> wrote:
> >>
> >> Dear sir,
> >>         I want to user dialplan callback to customer. is posible to
> >> to this is dialplan XML ?
> >> Now i use javascript.
> >> my call flow.
> >> 1. customer call
> >> 2. FS rining and wait until customer hangup
> >> 3. callback to customer number
> >>
> >>
> >> Best Regards.
> >>
> >> Dome C.
> >>
> >> _______________________________________________
> >> Freeswitch-users mailing list
> >> Freeswitch-users at lists.freeswitch.org
> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >> UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> >> http://www.freeswitch.org
> >
> >
> > _______________________________________________
> > Freeswitch-users mailing list
> > Freeswitch-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> >
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090714/54ad43f0/attachment-0002.html 


More information about the FreeSWITCH-users mailing list