neil,

in makecall.lua, you're creating a new session. don't. when makecall.lua is called, it's already in a session.  try this one:
    session:execute("bridge","sessiondata")

for flexibility,  it's better to pass the URI to the lua script at the dialplan.

-nandy

On Fri, Apr 23, 2010 at 6:16 AM, Neil Patel <neilp@cs.stanford.edu> wrote:
Thanks for clarifying.

Here's the output (with siptrace on) when trying to dial out over the gateway:

2010-04-22 15:13:10.104866 [NOTICE] switch_channel.c:669 New Channel sofia/internal/1001@server.com [a6aac86b-4a40-41f3-8968-f9b37501483a]
2010-04-22 15:13:10.112850 [INFO] mod_dialplan_xml.c:418 Processing neilp->5001 in context default
2010-04-22 15:13:10.120874 [INFO] switch_core_session.c:1750 Sending early media
2010-04-22 15:13:10.122856 [NOTICE] mod_sofia.c:1907 Pre-Answer sofia/internal/1001@server.com!
2010-04-22 15:13:10.123810 [NOTICE] switch_channel.c:669 New Channel sofia/internal/1234@conference.freeswitch.org [af13cf37-eb6a-4e9f-b1cc-366b6a24aec5]
2010-04-22 15:13:10.386879 [INFO] switch_rtp.c:2049 Auto Changing port from IP1 to IP2
2010-04-22 15:13:10.697870 [NOTICE] sofia.c:4789 Hangup sofia/internal/1234@conference.freeswitch.org [CS_CONSUME_MEDIA] [NO_USER_RESPONSE]
2010-04-22 15:13:10.706880 [ERR] mod_conference.c:4563 Cannot create outgoing channel, cause: NO_USER_RESPONSE
2010-04-22 15:13:10.706880 [NOTICE] mod_conference.c:4566 Hangup sofia/internal/1001@server.com [CS_EXECUTE] [NO_USER_RESPONSE]
2010-04-22 15:13:10.706880 [NOTICE] switch_core_session.c:1179 Session 2 (sofia/internal/1234@conference.freeswitch.org) Ended
2010-04-22 15:13:10.706880 [NOTICE] switch_core_session.c:1181 Close Channel sofia/internal/1234@conference.freeswitch.org [CS_DESTROY]
2010-04-22 15:13:10.714854 [NOTICE] switch_core_session.c:1179 Session 1 (sofia/internal/1001@server.com) Ended
2010-04-22 15:13:10.714854 [NOTICE] switch_core_session.c:1181 Close Channel sofia/internal/1001@server.com [CS_DESTROY]


 In case it is relevant, the call is triggered in a lua script which is executed by dialing a extension 5001. The dialplan in freeswitch/conf/dialplan/default/5001_gizmo.xml:
 <extension name="gizmo">
      <condition field="destination_number" expression="^5001$">
      <action application="lua" data="makecall.lua"/>
    </condition>
  </extension>

makecall.lua:
function make_call()
  sessiondata = "sofia/gateway/gizmo/<num>"
  new_session = freeswitch.Session(sessiondata)
end
make_call()



On Thu, Apr 22, 2010 at 2:58 PM, William Suffill <william.suffill@gmail.com> wrote:
gizmo is your gateway.


siptrace is by profile.


sofia status in the cli will list your profiles/gateways (default cfgs use internal/external)

so in that case sofia profile external siptrace on 


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