Anthony - 

 

The problem with api originate <dialstring> conference
conf_uuid-TEST_CONF inline is that it does not return until after the
call is answered - so I do not have events during early media.  I did
try to add {ignore_early_media=true} but it still did not return until
after I answered the phone (using esl lua for this test)

 

I also tried "bgapi originate
{ignore_early_media=true,origination_uuid=my_uuid_my_uuid_my_test_uuid}s
ofia/internal/+18015551...@10.50.40.50:5060
&conference(conf_uuid-TEST_CONF) inline", (I used a different TN, but
changed it for privacy) which makes the call and returns events before I
answer the call, BUT the conf bridge does not get involved (called)
until AFTER the origination call is answered.

 

Neither of these allows me to get "start-talking" and "stop-talking"
events during Early Media from the conf bridge because the conference is
not involved during the early media part of the call.

 

Brian - 

 

I should have been more detailed in my sofia string in the subject.  I
am aware that sofia/ip/user is not valid. Two examples sofia string I
use are below.

* If I used sofia/10.50.48.222/1002 AND that user is registered and
answers, then all works well.  If that user is not registered, I need to
get USER_NOT_REGISTERED

* If I use sofia/internal/+18...@10.50.40.50 (which is not a valid E.164
TN) then I should get DESTINATION_OUT_OF_ORDER or some other error
message.

 

 

________________________________

From: freeswitch-dev-boun...@lists.freeswitch.org
[mailto:freeswitch-dev-boun...@lists.freeswitch.org] On Behalf Of
Anthony Minessale
Sent: Wednesday, March 10, 2010 12:16 PM
To: freeswitch-dev@lists.freeswitch.org
Subject: Re: [Freeswitch-dev] error events for failed calls
using'conference conf_name bgdial sofia/ip/user'

 

consider 

api originate <dialstring> conference conf_uuid-TEST_CONF inline

this returns success+uuid or fail



On Wed, Mar 10, 2010 at 12:04 PM, Brian West <br...@freeswitch.org>
wrote:

http://wiki.freeswitch.org/wiki/Dialplan_XML#SIP-Specific_Dialstrings  

 

Please read that there is no such thing as sofia/ip/user  (unless the ip
is an alias on the profile)

 

/b

 

On Mar 10, 2010, at 11:23 AM, Gledhill, James wrote:

 

         

        My goals are:

        1)       To get "start-talking" and "stop-talking" events during
Early Media (before the call is answered) as well as after the call is
answered.  

        2)       If there are problems with the call, get events that
tell me why the call failed.

         

        The way I am doing it accomplishes the start/stop talking (in
early media) BUT if the call fails, I do not get events back letting me
know it failed and why.  I DO get CHANNEL_DESTROY and CHANNEL_STATE
events that IF I had the UUID, I could match against, but at this point
in the call I do NOT have that UUID AND when setting the UUID via
"origination_uuid=my_uuid_my_uuid_my_test_uuid", my UUID has not yet
been set, so as far as I can tell there is no way to match those events
with details my application has at the time.  

         

        The console shows the errors (Below are two examples of calls
that failed in I entered "bad" sofia locations), but they do not come
back as events.

        2010-03-05 14:52:20.109497 [ERR] switch_ivr_originate.c:2389
Cannot create outgoing channel of type [sofia] cause:
[USER_NOT_REGISTERED]

        2010-03-05 16:34:13.669509 [ERR] switch_ivr_originate.c:2389
Cannot create outgoing channel of type [sofia] cause:
[DESTINATION_OUT_OF_ORDER]

         

        So ... I am wondering is there a better/different way to do it,
is there a work-around, should I get events to tell me the dial had
problems, etc.

         

        I am using esl/lua and esl/java to experiment with this.  Both
get the same results (as I would expect).

         

        I have had this as a ~take-a-number on IRC for about a week, so
I thought I would add more detail and open it up to this group.  I
realize many of the same people do both, but hoped more eyes may look at
it here and give thoughts.

         

         

        ===== From Pastebin ==== 

         

        I am not getting 'error' events in ESL [that match a UUID I can
track] when there is a problem with conference <conf_name> dial
sofia/myip/1006, so I can not tell what went wrong.  Is there a
work-around?  

         

         I start a call in a conference from ESL (conference
conf_uuid-TEST_CONF bgdial
[origination_uuid=my_uuid_my_uuid_my_test_uuid]sofia/10.50.48.232/1006)

         

         If the 'dial' works (meaning does not get an error) then I get
the events I want and expect.  If it errors (not able to make the call (
[USER_NOT_REGISTERED] | [DESTINATION_OUT_OF_ORDER] | etc. ) then I do
not get any events that tell me something went wrong.

         

         Is there a work-around for this?

         

        =====================

        LUA Code  run from ./freeswitch.trunk/libs/esl/lua

         

        #!/usr/local/bin/lua

        require("ESL")

         

        myip = "10.50.48.239"  -- change this to your IP address

        myExt = 1006  -- change to one that is registered, then rerun
with an unregistered

         

        con = ESL.ESLconnection("localhost", "8021", "ClueCon");

         

        str = string.format("conference conf_uuid-TEST_CONF bgdial
[origination_uuid=my_uuid_my_uuid_my_test_uuid]sofia/%s/%s", myip,
myExt)

         

        con:sendRecv("event plain ALL")

         

         

        ff = con:api( str )

         

        print("** sent " .. str )

         

        print( (ff and ff:getBody() or "no body" ))

         

        cnt = 0

        while cnt <= 30 do

         

            print("loop = " .. cnt )

            cnt = cnt + 1

            ev = con:recvEventTimed(1000)

            print( ev and ev:serialize("plain") or "no event this time"
)

         

        end

         

        ==============

         

        The printout is :

         

        ** sent conference conf_uuid-TEST_CONF bgdial
[origination_uuid=my_uuid_my_uuid_my_test_uuid]sofia/10.50.48.239/1006

        OK Job-UUID: a5d57b34-9205-483c-ae64-60601d8178d7

         

        loop = 0

        Event-Name: CHANNEL_DESTROY

        Core-UUID: 438a66f9-8e41-4c6a-bbfd-1b0e8527cec1

        FreeSWITCH-Hostname: tpa-es-rh-232.dev.sipstorm.com

        FreeSWITCH-IPv4: 10.50.48.232

        FreeSWITCH-IPv6: %3A%3A1

        Event-Date-Local: 2010-03-05%2017%3A06%3A52

        Event-Date-GMT: Fri,%2005%20Mar%202010%2022%3A06%3A52%20GMT

        Event-Date-Timestamp: 1267826812571550

        Event-Calling-File: switch_core_session.c

        Event-Calling-Function: switch_core_session_perform_destroy

        Event-Calling-Line-Number: 1051

        Channel-State: CS_NEW

        Channel-State-Number: 0

        Channel-Name: N/A

        Unique-ID: ff9f875e-941f-438a-b384-844a6da23f66

        Call-Direction: outbound

        Presence-Call-Direction: outbound

        Answer-State: ringing

         

         

        loop = 1

        Event-Name: CHANNEL_STATE

        Core-UUID: 438a66f9-8e41-4c6a-bbfd-1b0e8527cec1

        FreeSWITCH-Hostname: tpa-es-rh-232.dev.sipstorm.com

        FreeSWITCH-IPv4: 10.50.48.232

        FreeSWITCH-IPv6: %3A%3A1

        Event-Date-Local: 2010-03-05%2017%3A06%3A52

        Event-Date-GMT: Fri,%2005%20Mar%202010%2022%3A06%3A52%20GMT

        Event-Date-Timestamp: 1267826812571550

        Event-Calling-File: switch_channel.c

        Event-Calling-Function: switch_channel_perform_set_running_state

        Event-Calling-Line-Number: 1301

        Channel-State: CS_DESTROY

        Channel-State-Number: 12

        Channel-Name: _undef_

        Unique-ID: ff9f875e-941f-438a-b384-844a6da23f66

        Call-Direction: outbound

        Presence-Call-Direction: outbound

        Answer-State: ringing

         

         

        loop = 2

        Event-Name: API

        Core-UUID: 438a66f9-8e41-4c6a-bbfd-1b0e8527cec1

        FreeSWITCH-Hostname: tpa-es-rh-232.dev.sipstorm.com

        FreeSWITCH-IPv4: 10.50.48.232

        FreeSWITCH-IPv6: %3A%3A1

        Event-Date-Local: 2010-03-05%2017%3A06%3A52

        Event-Date-GMT: Fri,%2005%20Mar%202010%2022%3A06%3A52%20GMT

        Event-Date-Timestamp: 1267826812571550

        Event-Calling-File: switch_loadable_module.c

        Event-Calling-Function: switch_api_execute

        Event-Calling-Line-Number: 1581

        API-Command: conference

        API-Command-Argument:
conf_uuid-TEST_CONF%20bgdial%20%5Borigination_uuid%3Dmy_uuid_my_uuid_my_
test_uuid%5Dsofia/10.50.48.239/1006%20

         

         

        loop = 3

        no event this time

        loop = 4

        _______________________________________________
        FreeSWITCH-dev mailing list
        FreeSWITCH-dev@lists.freeswitch.org
        http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
        
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
        http://www.freeswitch.org

 


_______________________________________________
FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
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_miness...@hotmail.com
<mailto:msn%3aanthony_miness...@hotmail.com> 
GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
<mailto:paypal%3aanthony.miness...@gmail.com> 
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:8...@conference.freeswitch.org
<mailto:sip%3a...@conference.freeswitch.org> 
iax:gu...@conference.freeswitch.org/888
googletalk:conf+...@conference.freeswitch.org
<mailto:googletalk%3aconf%2b...@conference.freeswitch.org> 
pstn:+19193869900

_______________________________________________
FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

Reply via email to