[Freeswitch-users] 2 SIP Lines, Difficulty Originating Call
Chris Danielson
chris at maxpowersoft.com
Thu Sep 6 21:50:29 PDT 2007
Thanks again for all the help. My apologies for not replying sooner, I
was out of town for a week and needed some extra time to research and
try some of the things you had mentioned. Everything that is brought up
in this thread will get documented by me within the wiki.
So far I have tried both techniques within my JavaScript code that
Anthony mentioned. Here is one example:
function cf_bridge_call(phone) {
var str = "sofia/gateway/line2/"+phone;
session.setVariable("ringback", "%(2000, 4000, 440.0, 480.0)");
session.preAnswer();
session.execute("bridge", str);
}
cf_bridge_call("18881234567");
When I make this call I still do not hear the ringing and notice that
the console renders:
nta: received 180 Ringing for INVITE (87950735)
nta: 180 Ringing was discarded
When the phone is actually answered, I still cannot hear the person on
the other side speaking too.
Is this possibly due to the fact that I am having a NAT issue? Or could
this be that my carrier is doing something out of the norm? And
finally, should I implement this strictly as a dialplan within the
default_context.xml file and avoid handling this functionality within
JavaScript?
Kind Regards,
Chris Danielson
Anthony Minessale wrote:
> You should choose one or the other not both.
> One is inband ringing generated by FreeSWITCH and the other
> is just the sip message telling the phone to indicate ringinig.
> Here is a description I wrote on an earlier posting here that someone
> may want to stick in the wiki.
>
> ---snip
>
> ring_ready is a dialplan application that sends the protocol specific
> message to indicate ringing. In the case of SIP a 180 Ringing.
>
> ringback is a channel variable you can set to artificially generate a
> tone or play an audio file to an originating channel while it waits to
> be connected to another call.
>
> pre_answer is a dialplan application that will send the protocol
> specific message to indicate early media. In the case of SIP a 183
> Progress
>
> So, if you call into freeswitch with sip and the first entry in your
> dialplan is ring_ready followed by a bridge to some other destination
> when it hits ring_ready it will send "180 Ringing" back to your phone
> so it can generate the ringing sound.
>
> If instead you use the set application to set ringback to a tone spec
> or audio file followed by a call to pre_answer to establish an early
> media connection followed by a call to bridge to another dest, then
> the core will generate this audio locally and send it back to your
> phone. Again, this occurs during early media meaning the call has not
> been answered but the SIP has negotiated a media path in advance for
> this type of pre-answer audio indication. SIP has no promise that
> early media must be supported so some switches and devices opt to not
> support it meaning you may not be able to hear any audio until the
> call is officially answered which would keep you from hearing the
> artificial ringback at all.
>
>
>
>
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> iax:guest at conference.freeswitch.org/888
> googletalk:conf+888 at conference.freeswitch.org
> pstn:213-799-1400
>
>
> ----- Original Message ----
> From: Tamas Cseke <cstomi.levlist at gmail.com>
> To: chris at maxpowersoft.com; freeswitch-users at lists.freeswitch.org
> Sent: Monday, August 27, 2007 2:34:22 AM
> Subject: Re: [Freeswitch-users] 2 SIP Lines, Difficulty Originating Call
>
> Chris Danielson írta:
> > If any one can help me, I am having two issues. Basically, while my
> > javascript is executing a single inbound SIP call the script
> > conditionally gets to a point where the end-user can originate a
> call to
> > an external phone number. Keep in mind that I have two sip lines
> > defined as gateways supplied by my carrier vonics.net. Upon calling
> the
> > originate method, the call is actually placed and the destination phone
> > actually begins to ring. At this point I still cannot hear the ringing
> > on the original session that was originated by my inbound call. Also,
> > the originate method times out regardless of whether or not the
> > destination "phone" number was answered or not.
> >
> > So my two issues are:
> > 1) Why does the originate method start a call, the destination phone
> > called actually rings, but always times out, regardless of whether or
> > not the phone was answered?
> > 2) When calling the originate method, I never hear the phone
> ringing on
> > my inbound connection.
> >
> You should call ring_ready app, if you want to hear the ringing afaik.
>
> /* set ringback tone */
> session.setVariable("ringback", "%(2000, 4000, 440.0,
> 480.0)");
> session.execute("ring_ready", "");
>
> I found these pages, maybe you can find more about it on wiki.
> http://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones
> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_ring_ready
>
> Hope this help!
>
> Regards,
> Tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20070906/590ecf12/attachment-0002.html
More information about the FreeSWITCH-users
mailing list