[Freeswitch-users] {Disarmed} Re: Originate call into conference - no early media
Alex Crow
acrow at integrafin.co.uk
Tue Apr 24 00:05:39 MSD 2012
Michael, Anthony,
Cheers guys. Really great help and also stunned with the new var! I will
probably c/o head this weekend to try it out.
I'm not that great on wikis (I've installed and set up MediaWiki for
others but only ever added a couple of pages to it) but I will try to
make a start on at least updating the conference callout example page.
Cheers
Alex
On 23/04/12 20:29, Michael Collins wrote:
> Excellent description and cool new chan var.
>
> Alex, this is definitely something you should put on the wiki. If you
> need any help please let me know. Don't forget that we have a template
> that you can use to add a channel variable:
>
> http://wiki.freeswitch.org/wiki/Variable_skeleton
>
> The rest of the documentation can go in
> http://wiki.freeswitch.org/wiki/Mod_loopback. For bonus points you can
> use the wiki {{:foo}} syntax to include the channel variable docs in
> the mod_loopback page w/o actually duplicating your work. See the main
> channel variables page for examples on how to do that.
>
> -MC
>
> On Mon, Apr 23, 2012 at 12:21 PM, Anthony Minessale
> <anthony.minessale at gmail.com <mailto:anthony.minessale at gmail.com>> wrote:
>
> You should definitely help on the wiki. It's always worth it.
>
> I did not mean that the book would teach you about L16 on loopback but
> codecs and setting up calls.
> Since you said you cannot understand why there is no early media in
> your conference I thought you might benefit but studying the nuances
> of call origination.
>
> As for loopback, if its important enough to you to get that ring
> sound, its really the only choice you have.
> I check and it's easy enough to add a patch to let you specify the
> initial codec so try out git HEAD and use the new variable
> loopback_initial_codec you can specify it in the originate string like
>
> originate {loopback_initial_codec=L16 at 16000h}loopback/1234 4321
>
> Transcoding fees may apply.
>
>
>
>
> On Mon, Apr 23, 2012 at 12:29 PM, Alex Crow
> <acrow at integrafin.co.uk <mailto:acrow at integrafin.co.uk>> wrote:
> > On 23/04/12 16:09, Anthony Minessale wrote:
> >> If you originate loopback channels in that manner it chooses
> raw PCM
> >> (L16) because it has no idea what other codec to use.
> >> You want to avoid loopback unless its absolutely necessary since it
> >> adds extra resource consumption dynamically allocating the
> audio for
> >> each frame.
> >>
> >> I suggest you study the books we have (not a plug, just that's
> where
> >> its best documented) To get the full descriptions of how the
> dialplan
> >> and codec stuff works. It's very complicated and hard to
> describe in
> >> a simple reply.
> >
> >
> > Thanks Anthony,
> >
> > I do have the FreeSwitch book and just got the cookbook. However
> I'd not
> > come across any docs stating that loopback defaults to L16/8000
> so far,
> > so perhaps I should reread them.
> >
> > Is there any reason why loopback can't use L16/16000 or higher so HD
> > codecs can be of advantage? Just curious as my new dialplan seems to
> > have solved the problem. For anyone else that is interested I have
> > pasted it below (it is slightly adapted from the example):
> >
> > <extension name="confringback">
> > <condition field="destination_number" expression="^confringback$">
> > <action application="set" data="ringback=$${uk-ring}"/>
> > <action application="bridge"
> > data="{ignore_early_media=true}loopback/confringback_media"/>
> > </condition>
> > </extension>
> >
> > <extension name="confringback_media">
> > <condition field="destination_number"
> expression="^confringback_media$">
> > <action application="pre_answer"/>
> > <action application="sleep" data="200000"/>
> > <action application="hangup"/>
> > </condition>
> > </extension>
> >
> > <extension name="Add new OB call to conference">
> > <condition field="destination_number" expression="^add_a_call$">
> > <!-- ask caller for a number + #, collect into ${target_num}
> variable -->
> > <action application="play_and_get_digits" data="3 13 4 5000 #
> >
> file_string://ivr/ivr-please_enter_the_phone_number.wav!ivr/ivr-followed_by_pound.wav
> > ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/>
> > <!-- add this call to the conference -->
> > <action application="execute_extension"
> > data="ADD_CALL_TO_CONF__${target_num}"/>
> > </condition>
> > </extension>
> >
> > <extension name="Remove last OB call added to conference">
> > <condition field="destination_number" expression="^remove_a_call$">
> > <!-- remove a call from the conference -->
> > <action application="play_and_get_digits" data="3 13 1 5000 #
> >
> file_string://ivr/ivr-please_enter_the_phone_number.wav!ivr/ivr-followed_by_pound.wav
> > ivr/ivr-that_was_an_invalid_entry.wav target_num \d+"/>
> > <action application="set" data="res=${uuid_kill
> > ${hash(select/domain-${domain_name}/last_user_${target_num})}}"/>
> > <action application="set" data="res=${uuid_kill
> >
> ${hash(select/domain-${domain_name}/last_user_ring_${target_num})}}"/>
> > </condition>
> > </extension>
> >
> > <extension name="add that call">
> > <!-- if we have a four-digit number then attempt to dial it as a
> user
> > ... -->
> > <condition field="destination_number"
> > expression="^ADD_CALL_TO_CONF__(2\d{2})$" break="on-true">
> > <action application="set" data="new_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="set" data="pb_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}" />
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${pb_uuid}}loopback/confringback
> > &conference(${conference_name})}"/>
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${new_uuid}}sofia/gateway/om.net/$1
> <http://om.net/$1>
> > &conference(${conference_name})}"/>
> > </condition>
> > <condition field="destination_number"
> > expression="^ADD_CALL_TO_CONF__(6\d{2})$" break="on-true">
> > <action application="set" data="new_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${new_uuid}}sofia/gateway/*MailScanner
> warning: numerical links are often malicious:* 192.168.44.43/$1
> <http://192.168.44.43/$1>
> > &conference(${conference_name})}"/>
> > </condition>
> > <condition field="destination_number"
> >
> expression="^ADD_CALL_TO_CONF__(49\d\d|5[3-4]\d\d|74\d\d|8\d{3}|0|9\d{3,13}|0\d{10,12})$"
> > break="on-true">
> > <action application="set" data="new_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="set" data="pb_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}" />
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${pb_uuid}}loopback/*9181
> > &conference(${conference_name})}"/>
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${new_uuid},api_on_answer='uuid_kill
> > ${pb_uuid}'}sofia/gateway/*MailScanner warning: numerical links
> are often malicious:* 10.10.0.2/$1 <http://10.10.0.2/$1>
> &conference(${conference_name})}"/>
> > </condition>
> > <condition field="destination_number"
> > expression="^ADD_CALL_TO_CONF__(3\d{2})$" break="on-true">
> > <action application="set" data="new_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${new_uuid}}sofia/gateway/*MailScanner
> warning: numerical links are often malicious:* 192.168.44.15/$1
> <http://192.168.44.15/$1>
> > &conference(${conference_name})}"/>
> > </condition>
> > <condition field="destination_number"
> > expression="^ADD_CALL_TO_CONF__(1\d{3}|11\d{4})$" break="on-true">
> > <action application="set" data="new_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="set" data="pb_uuid=${create_uuid foo}"
> inline="true"/>
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_$1/${new_uuid}" />
> > <action application="hash"
> > data="insert/domain-${domain_name}/last_user_ring_$1/${pb_uuid}" />
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${pb_uuid}}loopback/confringback
> > &conference(${conference_name})}"/>
> > <action application="set" data="res=${bgapi originate
> > {origination_uuid=${new_uuid},api_on_answer='uuid_kill
> > ${pb_uuid}'}user/$1 &conference(${conference_name})}"/>
> > </condition>
> > <!-- ... otherwise inform moderator that the operation was not
> exactly
> > successful -->
> > <condition field="destination_number"
> expression="^ADD_CALL_TO_CONF__$">
> > <action application="playback" data="ivr/ivr-please_try_again.wav"/>
> > </condition>
> > </extension>
> >
> >
> > So for 3 destinations (1st local extensions at 1xxx or 11xxxx, 2nd
> > 350-399 and 3rd 600-649) we don't need to fake it, for the other 2
> > gateways we do.
> >
> > Seems to work pretty well for now. Would it be worth getting
> Wiki write
> > access to add that to the article about joining members by
> calling out
> > from a conference?
> >
> > Cheers
> >
> > Alex
> >
> >
> _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> > http://www.freeswitchsolutions.com
> >
> >
> >
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> <mailto: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
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com
> <mailto:MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> <mailto:PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> <mailto:sip%3A888 at conference.freeswitch.org>
> googletalk:conf+888 at conference.freeswitch.org
> <mailto:googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:+19193869900 <tel:%2B19193869900>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto: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
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
--
This message is intended only for the addressee and may contain
confidential information. Unless you are that person, you may not
disclose its contents or use it in any way and are requested to delete
the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc
Domain House, 5-7 Singer Street, London EC2A 4BQ
Tel: (020) 7608 4900 Fax: (020) 7608 5300
(Registered office: as above; Registered in England and Wales under number: 3727592)
Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120423/beb62f45/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list