Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Originating Calls, without knowing the en


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





PostPosted: Tue Sep 02, 2008 3:35 pm    Post subject: [Freeswitch-users] Originating Calls, without knowing the en Reply with quote

I'm experimenting with FreeSWITCH. I have a setup working with FXO, FXS,
and SIP (to hardware and software phones, and gateways). I'd like to be
able to place a new outgoing call and then do something, for example,
play a message notifying me that the power has gone out.

I have been successful doing this through the event socket, XML-RPC,
JavaScript, etc. However, I have to know the full endpoint URL. I've
searched the list, wiki, web for examples. I've seen several attempts at
an example, but no clear and complete example.

What I'd really like to be able to do is something like (JavaScript
example):

var s = new Session();
s.originate(session, "1234567890");
s.streamFile("test.wav");

Instead of:

var s = new Session();
s.originate(session, "sofia/internal/1000");
s.streamFile("test.wav");

I would like to be able to originate a new session, and have FreeSWITCH
lookup the endpoint. Transfer and bridge don't seem quite right, and
exceute_extension seems to block (and require a existing session). I've
looked at Session.Originate, but I can't seem to get it to do anything
useful.

So far, about the only ideas I have are to either parse the dialplan
myself, or use mod_xml_curl to fetch the dialplan from my own
software/database/etc. Then I could query my external source for the
endpoint URL. This seems like overkill, but I can't find anyway to
lookup the endpoint URL or place a call without one.

I plan on adding more gateways and possibly T1 cards into the system, so
I would prefer if FreeSWITCH could do the "routing", and my scripts not
have to know what the endpoint is.

It seems like there should be a way to do this (or at least a way query
the for the endpoint given an extension/number). Maybe I'm just looking
at the problem the wrong way. Maybe the dialplan is the complete wrong
place to be looking, since it can do a lot more than just specify an
endpoint.

Is there any easy way to do this, or do I simply have to have a endpoint
URL?

On a related note, on an OpenZAP channel, how can I tell FreeSWITCH to
use any available FXO channel? I can dial out using
openzap/1/1/1234567890. However, if I have a T1 board or X number of FXO
ports, is there a way to tell it to automatically use any available
channel in a endpoint URL?

Thanks.

_______________________________________________
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
Back to top
brian at freeswitch.org
Guest





PostPosted: Tue Sep 02, 2008 3:48 pm    Post subject: [Freeswitch-users] Originating Calls, without knowing the en Reply with quote

On Sep 2, 2008, at 3:20 PM, Brian Wood wrote:

Quote:
I'm experimenting with FreeSWITCH. I have a setup working with FXO,
FXS,
and SIP (to hardware and software phones, and gateways). I'd like to
be
able to place a new outgoing call and then do something, for example,
play a message notifying me that the power has gone out.

I have been successful doing this through the event socket, XML-RPC,
JavaScript, etc. However, I have to know the full endpoint URL. I've
searched the list, wiki, web for examples. I've seen several
attempts at
an example, but no clear and complete example.

What I'd really like to be able to do is something like (JavaScript
example):

var s = new Session();
s.originate(session, "1234567890");
s.streamFile("test.wav");

Instead of:

var s = new Session();
s.originate(session, "sofia/internal/1000");
s.streamFile("test.wav");

I would like to be able to originate a new session, and have
FreeSWITCH
lookup the endpoint. Transfer and bridge don't seem quite right, and
exceute_extension seems to block (and require a existing session).
I've
looked at Session.Originate, but I can't seem to get it to do anything
useful.

Well the only thing you can use is the user channel to resolve the
target endpoint. Look at the dial-string in the directory/default.xml
and you can use that on a per domain or per user...


Example you can have user/mycell@domain.com which resolves to openzap/
1/19185551212 but you don't know that its just user/mycell@domain.com


Brian West
sip:brian@freeswitch.org







_______________________________________________
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
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