Make a dialplan

339 views
Skip to first unread message

ALMA

unread,
Jan 11, 2016, 6:55:37 AM1/11/16
to 2600hz-users
Hello!
I need to do a simple operation. My call works everywhere (inbound, outbound and through extension ). I need to control the call (without abort the callflow of kazoo obliviously) of the outbound calls.
For example if I call "123456789", I need to write a simple log.
This is my dialplan:

<include>
 
<context name="context_2">

 
<extension name="outbounds">
   
<condition field="destination_number" expression="^(.*)$">
   
<action application="log" data="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" />
   
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
   
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
   
<action application="bridge" data="{sip_cid_type=rpid}sofia/gateway/in4com/$1"/>
   
</condition>
 
</extension>
 
</context>
</include>

 In this case, in ALL the calls (expression should match all) freeswitch must write the log "AAAAAAAAA.." but I don't see anything.
Why my dialplan doesn't start? How can I start it?
The context in kazoo/freeswitch/sip_profiles/sip_profiles1.xml is "context_2"
My dialplan is in kazoo/freeswitch/dialplans/mydialplan.xml

I need to start an other application but I'm trying to write a simple log for verifing if dialplan start but I've also tried to play an mp3 after a "answer" and other test but nothing works.
I think that the dialplan fails because ecallmgr takes the control and freeswitch's dialplan aren't executed.
Thank you

Darren Schreiber

unread,
Jan 11, 2016, 6:56:47 AM1/11/16
to 2600hz...@googlegroups.com
Hi there,
This statement is correct:

"I think that the dialplan fails because ecallmgr takes the control and freeswitch's dialplan aren't executed.”

You can not build standard dial plans and have them execute.

- Darren


From: <2600hz...@googlegroups.com> on behalf of ALMA <alfons...@gmail.com>
Reply-To: "2600hz...@googlegroups.com" <2600hz...@googlegroups.com>
Date: Monday, January 11, 2016 at 1:01 AM
To: 2600hz-users <2600hz...@googlegroups.com>
Subject: Make a dialplan

Hello!
I need to do a simple operation. My call works everywhere (inbound, outbound and through extension ). I need to control the call (without abort the callflow of kazoo obliviously) of the outbound calls.
For example if I call "123456789", I need to write a simple log.
This is my dialplan:

<include>
 
<contextname="context_2">

 
<extensionname="outbounds">
   
<conditionfield="destination_number"expression="^(.*)$">
   
<actionapplication="log"data="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"/>

   
<actionapplication="set"data="effective_caller_id_number=${outbound_caller_id_number}"/>
   
<actionapplication="set"data="effective_caller_id_name=${outbound_caller_id_name}"/>
   
<actionapplication="bridge"data="{sip_cid_type=rpid}sofia/gateway/in4com/$1"/>
   
</condition>
 
</extension>
 
</context>
</include>

 In this case, in ALL the calls (expression should match all) freeswitch must write the log "AAAAAAAAA.." but I don't see anything.
Why my dialplan doesn't start? How can I start it?
The context in kazoo/freeswitch/sip_profiles/sip_profiles1.xml is "context_2"
My dialplan is in kazoo/freeswitch/dialplans/mydialplan.xml

I need to start an other application but I'm trying to write a simple log for verifing if dialplan start but I've also tried to play an mp3 after a "answer" and other test but nothing works.
I think that the dialplan fails because ecallmgr takes the control and freeswitch's dialplan aren't executed.
Thank you

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

ALMA

unread,
Jan 11, 2016, 9:16:33 AM1/11/16
to 2600hz-users
Hello Darren,

OK; I need to write this "<action application="socket" data="server:port async full"/>" for the library ESL (outbound mode).
But I cannot make dialplan from FreeSWITCH because there is ecallmgr. So how can I send the events to my second server for manage the call in real time?
I have thought to write a custom whapp in Erlang that send the events to my server and my server can reply for manage the outbound call (for example hang out the call) or a freeswitch module in C...
But I think that this is an hard way for resolve this problem. Are there other way for doing this? For example erlang-API or write a custom dialplan for erlang...
From Pivot (on Kazoo Callflow) can I hang out the call or play a media? But I think that callflows are only for inbound calls.

Thank you

Darren Schreiber

unread,
Jan 11, 2016, 9:17:22 AM1/11/16
to 2600hz...@googlegroups.com
Hi there, 
    To my knowledge a custom whapp is the only way. Contributions are definitely welcome.
--

ALMA

unread,
Jan 11, 2016, 11:57:31 AM1/11/16
to 2600hz-users, dschr...@2600hz.com
Hello,

OK, I think to build a whapp. How can I start? Is there a skeleton? I've read https://2600hz.atlassian.net/wiki/display/Dedicated/Build+Your+Own+WhApp but it don't tell much.
Know erlang isn't enough, for example... How can I define that my script is an whapp? How can I add it to kazoo whapps? Which is the entry point? And the libraries? From wich whapp can I take the ideal cue?  And so on...

Thank you

Kirill Sysoev

unread,
Jan 11, 2016, 12:04:05 PM1/11/16
to 2600hz...@googlegroups.com

ALMA

unread,
Jan 11, 2016, 12:06:35 PM1/11/16
to 2600hz-users
Thank you!

Darren Schreiber

unread,
Jan 11, 2016, 12:07:41 PM1/11/16
to 2600hz...@googlegroups.com
Thanks for posting that, Kirill!

Date: Monday, January 11, 2016 at 9:00 AM
To: "2600hz...@googlegroups.com" <2600hz...@googlegroups.com>
Subject: Re: Make a dialplan

https://github.com/2600hz/kazoo/tree/master/applications/skel

Welcome! :)



On 11.01.2016 19:52, ALMA wrote:
Hello,

OK, I think to build a whapp. How can I start? Is there a skeleton? I've read https://2600hz.atlassian.net/wiki/display/Dedicated/Build+Your+Own+WhApp but it don't tell much.
Know erlang isn't enough, for example... How can I define that my script is an whapp? How can I add it to kazoo whapps? Which is the entry point? And the libraries? From wich whapp can I take the ideal cue?  And so on...

Thank you

Il giorno lunedì 11 gennaio 2016 15:17:22 UTC+1, Darren Schreiber ha scritto:
Hi there, 
    To my knowledge a custom whapp is the only way. Contributions are definitely welcome.


-------- Original message --------
From: ALMA <alfons...@gmail.com>
Date: 01/11/2016 6:16 AM (GMT-08:00)
To: 2600hz-users <2600hz...@googlegroups.com>
Subject: Re: Make a dialplan

Hello Darren,

OK; I need to write this "<actionapplication="socket"data="server:port async full"/>" for the library ESL (outbound mode).
But I cannot make dialplan from FreeSWITCH because there is ecallmgr. So how can I send the events to my second server for manage the call in real time?
I have thought to write a custom whapp in Erlang that send the events to my server and my server can reply for manage the outbound call (for example hang out the call) or a freeswitch module in C...
But I think that this is an hard way for resolve this problem. Are there other way for doing this? For example erlang-API or write a custom dialplan for erlang...
From Pivot (on Kazoo Callflow) can I hang out the call or play a media? But I think that callflows are only for inbound calls.

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

James Aimonetti

unread,
Jan 11, 2016, 6:18:32 PM1/11/16
to 2600hz...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I think you may be missing the point of ecallmgr. ecallmgr abstracts
the individual FreeSWITCH nodes, handles the bookkeeping related to
how calls are spun up, how commands are executed, etc. To the
applications, like Pivot, Callflow, etc, there is one logical switch;
ecallmgr does all the plumbing to take "play file X on call Y" and
execute the appropriate FreeSWITCH commands on server F. For more
complex scenarios (like conferencing) ecallmgr will transparently move
calls from one FreeSWITCH server to another to avoid unnecessary
bridging between FreeSWITCH servers.

So, if you can, perhaps describe what type of application you'd like
to build and we can point you in the right direction for how to
properly control it "the Kazoo way". Building your own whapp (while
fun!) may be over-engineering a solution when simpler methods exist to
get you going.

James

> -------- Original message -------- From: ALMA
> <alfons...@gmail.com> Date: 01/11/2016 6:16 AM (GMT-08:00) To:
> 2600hz-users <2600hz...@googlegroups.com> Subject: Re: Make a
> dialplan
>
> Hello Darren,
>
> OK; I need to write this "<action application="socket"
> data="server:port async full"/>" for the library ESL (outbound
> mode). But I cannot make dialplan from FreeSWITCH because there is
> ecallmgr. So how can I send the events to my second server for
> manage the call in real time? I have thought to write a custom
> whapp in Erlang that send the events to my server and my server can
> reply for manage the outbound call (for example hang out the call)
> or a freeswitch module in C... But I think that this is an hard way
> for resolve this problem. Are there other way for doing this? For
> example erlang-API or write a custom dialplan for erlang...
>> From Pivot (on Kazoo Callflow) can I hang out the call or play a
>> media? But I think that callflows are only for inbound calls.
>
> Thank you
>
> -- You received this message because you are subscribed to the
> Google Groups "2600hz-users" group. To unsubscribe from this group
> and stop receiving emails from it, send an email to
> 2600hz-users...@googlegroups.com<mailto:2600hz-users+unsubscr
i...@googlegroups.com>.
>
>
For more options, visit https://groups.google.com/d/optout.
>


- --
James Aimonetti
Lead Systems Architect / Impressionable Scallywag
"If Dialyzer doesn't care, I don't care"

2600HzPDX | http://2600hz.com
sip:ja...@2600hz.com
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJWlDhFAAoJENTKa+JPXCVgnCIH/10ieH0QmsmU1MwAbAEf2uqk
VWPZa5i6YohZ9ev48lECAAd5ETs4jFllbD4Wg7tVJPKey1qMLB+f2FjkXLRuHIPF
DAya6FfEx2eVdYDsJ6nF9iy8f5joA6q7VppXTwmZSinIqwOXKuyGdOG0PWUKi0h9
2vlQ9l0P4pR3wGdUnkq+MR1VZGuKZbH7uONVEbzmZtsTzmlsNGdBK7wOHeZWyByB
rI/9mKLvGA/pEoAV5/BxkABpyyYzdCjNtO1K7/Z76VSAD516YbRldWW6JSi2tAQu
/oAmcDbSrjuur57QnjGqEI64A+bo82S0fVRyXf1Z5LGsgoMwlh1nT23YO1rh4Bk=
=f8Dh
-----END PGP SIGNATURE-----

Mattia Alfonso

unread,
Jan 11, 2016, 6:34:02 PM1/11/16
to 2600hz...@googlegroups.com

Hello, thank you for your reply!
We have written a custom extern system of billing so I need to tell to my billing-server the status of all outbounds call and eventually hang up if there is not enough credit or to establish the time maximum of the call and so on.

Reply all
Reply to author
Forward
0 new messages