[Freeswitch-users] How to send sip MESSAGE from script

Chad Engler Chad.Engler at patlive.com
Mon Oct 15 18:09:27 MSD 2012


After some research it looks like Expressjs and Socket.IO have some
issues working together on node v0.9+. For now if you can use v0.8 that
will fix your issue, but I am looking into a solution for v0.9+ and
track some bugs.

 

Thanks for the heads up!

 

-Chad

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Khue
Nguyen Minh
Sent: Monday, October 15, 2012 9:43 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] How to send sip MESSAGE from script

 

Hi Chad,

 

I used node version 0.9.3-pre. This is config.json:

{

    "fsw": {

        "host": "192.168.0.24",

        "port": 8021,

        "password": "ClueCon"

    },

    "server": {

        "host": "192.168.0.24",

        "port": 8181,

        "provider": "sms-proxy.yourprovider.com",

        "from": "from_number at from_host",

        "profile": "external"

    }

}

 

and chatplan:

<?xml version="1.0" encoding="utf-8"?>

<include>

  <context name="default">

 

    <extension name="demo">

      <condition field="to" expression="^(.*)$">

      

        <action application="fire" data=""/>

       

      </condition>

    </extension>

 

  </context>

</include>

 

Brs,

Khue.

 

2012/10/15 Chad Engler <Chad.Engler at patlive.com>

It would also be nice to see your config.json in the root of the chatty
directory.

 

-Chad

 

From: Chad Engler 
Sent: Monday, October 15, 2012 8:48 AM
To: FreeSWITCH Users Help
Subject: RE: [Freeswitch-users] How to send sip MESSAGE from script

 

Khue,

 

What version of node are you running? Can I also see your chatplan?

 

Thanks,

Chad

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Khue
Nguyen Minh
Sent: Friday, October 12, 2012 11:44 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] How to send sip MESSAGE from script

 

Hi Chad,

 

I installed node-esl and tried it. But, I have some error:

1.	When I enter url: http://my_ip:8181, chatty stopped immediately
with error:

	http.js:650

	    throw new Error('Can\'t set headers after they are sent.');

	          ^

	Error: Can't set headers after they are sent.

	    at ServerResponse.OutgoingMessage.setHeader (http.js:650:11)

	    at ServerResponse.res.setHeader
(/opt/englercj-node-esl-50aba9e/examples/chatty/node_modules/express/nod
e_modules/connect/lib/patch.js:59:22)

	    at SendStream.type
(/opt/englercj-node-esl-50aba9e/examples/chatty/node_modules/express/nod
e_modules/connect/node_modules/send/lib/send.js:444:7)

	    at SendStream.send
(/opt/englercj-node-esl-50aba9e/examples/chatty/node_modules/express/nod
e_modules/connect/node_modules/send/lib/send.js:343:8)

	    at
/opt/englercj-node-esl-50aba9e/examples/chatty/node_modules/express/node
_modules/connect/node_modules/send/lib/send.js:319:10

	    at Object.oncomplete (fs.js:308:15)

	    at process._makeCallback (node.js:248:20)

1.	In fs_cli have error:

	2012-10-13 06:56:01.476306 [WARNING] sofia_presence.c:204 Not
sending to local box for  9910 at 192.168.0.24

	2012-10-13 06:56:01.476306 [ERR] sofia_presence.c:253 Chat proto
[sip]

	from ["1000" <sip:1000 at 192.168.0.24
<mailto:sip%3A1000 at 192.168.0.24> >;tag=7700467a]

	to [9910 at 192.168.0.24]

	<FONT size=2 face=Arial>how are you?</FONT>

	Nobody to send to: Profile internal

please help me fix it.

 

Thanks& Best regards,

Khue

 

 

2012/10/12 Chad Engler <Chad.Engler at patlive.com>

Hello,

 

Check out https://github.com/englercj/node-esl

 

Thanks,

 

Chad

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Khue
Nguyen Minh
Sent: Friday, October 12, 2012 5:01 AM
To: FreeSWITCH Users Help
Subject: [Freeswitch-users] How to send sip MESSAGE from script

 

Hi all,

 

I want send message "MESSAGE" to caller from javascript. How I can do
it, please guide me?

 

Brs,

Khue.


________________________________________________________________________
_
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

 


________________________________________________________________________
_
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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121015/92996200/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list