Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Outbound calls from the CLI in Python


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
marc at kasteris.com
Guest





PostPosted: Mon Oct 06, 2008 10:05 pm    Post subject: [Freeswitch-users] Outbound calls from the CLI in Python Reply with quote

Hello. I was wondering if origination of outbound calls from the CLI is currently supported in Python.
I've been unable to find a working example of this anywhere, and when I try calling a python script from the CLI I always get an error: "Module does not define fsapi".

Here's a non-working example of what I'm trying to do:

import os
from freeswitch import *

def handler(session, args):
consoleLog("INFO","Im in handler")
new_session = Session()
new_session.originate(session,"{ignore_early_media=true}sofia/gateway/" + SIP_CARRIER + "/" + phone_number)
Back to top
mike at jerris.com
Guest





PostPosted: Mon Oct 06, 2008 11:54 pm    Post subject: [Freeswitch-users] Outbound calls from the CLI in Python Reply with quote

Check out http://svn.freeswitch.org/svn/freeswitch/trunk/src/mod/languages/mod_python/python_example.py for more information on how you need to structure your python scripts. Please note that the information on the wiki at :

http://wiki.freeswitch.org/wiki/Mod_python


is out of date. If someone would update that with information from the example file above it would be much appreciated.


Mike



On Oct 6, 2008, at 11:02 PM, Marc Orenberg wrote:
Quote:
Hello. I was wondering if origination of outbound calls from the CLI is currently supported in Python.
I've been unable to find a working example of this anywhere, and when I try calling a python script from the CLI I always get an error: "Module does not define fsapi".

Here's a non-working example of what I'm trying to do:

import os
from freeswitch import *

def handler(session, args):
consoleLog("INFO","Im in handler")
new_session = Session()
new_session.originate(session,"{ignore_early_media=true}sofia/gateway/" + SIP_CARRIER + "/" + phone_number)


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services