[Freeswitch-users] 2 SIP Lines, Difficulty Originating Call

Chris Danielson chris at maxpowersoft.com
Sun Aug 26 18:16:12 EDT 2007


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.
Thank you in advance for any light you can shine on my issues.
Kind Regards,
    Chris Danielson

freeswitch at MaxPowerSoft001> version
FreeSwitch Version 1.0.pre1 (5644M)
(I just downloaded and compiled this version last week from subversion)
=====================
MaxPowerSoft001:/usr/local/freeswitch/conf# uname -a
Linux MaxPowerSoft001 2.6.18-4-amd64 #1 SMP Mon Mar 26 11:36:53 CEST 
2007 x86_64 GNU/Linux
=====================

/* SNIPPET of JavaScript that is supposed to bridge and inbound call 
with a newly created outbound call.  */
    var str = "sofia/gateway/line2/"+phone;
    var ns = new Session();
    if (ns.originate(session, str, 30)) { //this actually places a call
        if (session.ready() && ns.ready()) {
            console_log("notice", "bridging call\n");
            bridge(session, ns);
        }
    } else {
        console_log("notice", "originate failed.\n");
    }

<!-- snippet from sofia.conf.xml -->
     <gateways>
            <gateway name="sip.vonics.net">
                <param name="username" value="1231234567"/>
                <param name="realm" value="sip.vonics.net:13412"/>
                <param name="password" value="xxxxxxxxxxxxxxx"/>
                <param name="extension" value="1231234567"/>
                <param name="expire-seconds" value="300"/>
            </gateway>
            <gateway name="line2">
                <param name="username" value="1231234567"/>
                <param name="realm" value="sip.vonics.net"/>
                <param name="password" value="xxxxxxxxxxxxxxx"/>
                <param name="extension" value="2231234567"/>
                <param name="expire-seconds" value="300"/>
                <param name="register" value="false"/>
            </gateway>
      </gateways>
<!-- settings snippets for the profile containing the gateways listed 
above -->
<settings>
    <param name="debug" value="1"/>
    <param name="rfc2833-pt" value="101"/>
    <param name="sip-port" value="13412"/>
    <param name="dialplan" value="XML"/>
    <param name="dtmf-duration" value="100"/>
    <param name="codec-prefs" value="$${global_codec_prefs}"/>
    <param name="codec-ms" value="20"/>
    <param name="use-rtp-timer" value="true"/>
    <param name="rtp-timer-name" value="soft"/>
    <param name="rtp-ip" value="$${bind_server_ip}"/>
    <param name="sip-ip" value="$${bind_server_ip}"/>
    <param name="accept-blind-reg" value="true"/>
    <param name="nonce-ttl" value="60"/>
    <param name="ext-sip-ip" value="my.dyndns.org"/>
</settings>

LOG Output with export SOFIA_DEBUG=9

tport_vsend returned 1237
nta: resent INVITE (87950735) to udp/64.157.86.41:5060
tport_release(0x560f80): 0x5d03b0 by 0x5eac00 with (nil)
tport_pend(0x560f80): pending 0x5d03b0 for udp/10.0.0.2:13412 (already 2)
nta_outgoing_timer: 1/1 resent, 0/1 tout, 0/1 term, 0/4 free
nta: timer set next to 1000 ms
nta: timer A fired, retransmit INVITE (87950735)
tport_tsend(0x560f80) tpn = udp/64.157.86.41:5060
tport_resolve addrinfo = 64.157.86.41:5060
tport_by_addrinfo(0x560f80): not found by name udp/64.157.86.41:5060
tport_vsend returned 1237
nta: resent INVITE (87950735) to udp/64.157.86.41:5060
tport_release(0x560f80): 0x5d03b0 by 0x5eac00 with (nil)
tport_pend(0x560f80): pending 0x5d03b0 for udp/10.0.0.2:13412 (already 2)
nta_outgoing_timer: 1/1 resent, 0/1 tout, 0/1 term, 0/4 free
nta: timer set next to 2000 ms
tport_wakeup_pri(0x560f80): events IN
tport_recv_event(0x560f80)
tport_recv_iovec(0x560f80) msg 0x5ebbb0 from (udp/10.0.0.2:13412) has 
573 bytes, veclen = 1
tport_deliver(0x560f80): msg 0x5ebbb0 (573 bytes) from 
udp/64.157.86.41:13412/sip next=(nil)
nta: received 100 trying -- your call is important to us for INVITE 
(87950735)
nta: 100 trying -- your call is important to us is going to a transaction
nta_outgoing: RTT is 1650.79 ms
tport_release(0x560f80): 0x5d03b0 by 0x5eac00 with 0x5ebbb0 (preliminary)

(SNIP)

tport_wakeup_pri(0x560f80): events IN
tport_recv_event(0x560f80)
tport_recv_iovec(0x560f80) msg 0x5ebbb0 from (udp/10.0.0.2:13412) has 
837 bytes, veclen = 1
tport_deliver(0x560f80): msg 0x5ebbb0 (837 bytes) from 
udp/64.157.86.41:13412/sip next=(nil)
nta: received 180 Ringing for INVITE (87950735)
nta: 180 Ringing was discarded
nta: timer set next to 28460 ms

(ABOVE REPEATS...)

nta: 180 Ringing was discarded
2007-08-26 07:22:51 [NOTICE] switch_ivr_originate.c:805 
switch_ivr_originate() Hangup sofia/sip.vonics.net/18001234567 [CS_HOLD] 
[NO_ANSWER]
2007-08-26 07:22:51 [DEBUG] switch_channel.c:1076 
switch_channel_perform_hangup() Kill sofia/sip.vonics.net/18001234567 [KILL]
2007-08-26 07:22:51 [DEBUG] switch_core_session.c:647 
switch_core_session_signal_state_change() Kill 
sofia/sip.vonics.net/18001234567 [BREAK]
2007-08-26 07:22:51 [DEBUG] switch_ivr_originate.c:878 
switch_ivr_originate() Originate Cancelled by originator termination 
Cause: 19 [NO_ANSWER]
2007-08-26 07:22:51 [WARNING] mod_spidermonkey.c:2361 
session_originate() Cannot Create Outgoing Channel! 
[sofia/gateway/line2/18001234567]
2007-08-26 07:22:51 [NOTICE] myjavascript.js:24 console_log() originate 
failed.
nua: nua_cancel: entering
nua(0x67bf60): signal r_cancel
2007-08-26 07:22:51 [DEBUG] switch_core_state_machine.c:347 
switch_core_session_run() (sofia/sip.vonics.net/18001234567) State HANGUP
2007-08-26 07:22:51 [DEBUG] mod_sofia.c:217 sofia_on_hangup() Channel 
sofia/sip.vonics.net/18001234567 hanging up, cause: NO_ANSWER
2007-08-26 07:22:51 [DEBUG] mod_sofia.c:242 sofia_on_hangup() Sending 
CANCEL to sofia/sip.vonics.net/18001234567
2007-08-26 07:22:51 [DEBUG] switch_core_state_machine.c:45 
switch_core_standard_on_hangup() Standard HANGUP 
sofia/sip.vonics.net/18001234567, cause: NO_ANSWER
2007-08-26 07:22:51 [DEBUG] switch_core_session.c:706 
switch_core_session_thread() Session 6 
(sofia/sip.vonics.net/18001234567) Locked, Waiting on external entities
2007-08-26 07:22:51 [INFO] switch_core_session.c:712 
switch_core_session_thread() Session 6 
(sofia/sip.vonics.net/18001234567) Ended
2007-08-26 07:22:51 [NOTICE] switch_core_session.c:714 
switch_core_session_thread() Close Channel 
sofia/sip.vonics.net/18001234567 [CS_HANGUP]
nua: nua_stack_set_params: entering
soa_set_params(static::0x604d40, ...) called
tport(0x560f80): EXPENSIVE unresolved udp/64.157.86.41:5060
tport_tsend(0x560f80) tpn = udp/64.157.86.41:5060
tport_resolve addrinfo = 64.157.86.41:5060
tport_by_addrinfo(0x560f80): not found by name udp/64.157.86.41:5060
tport_vsend returned 325
nta: sent CANCEL (87950735) to udp/64.157.86.41:5060
tport_pend(0x560f80): pending 0x5ec4d0 for udp/10.0.0.2:13412 (already 3)
nta: timer shortened to 500 ms





More information about the Freeswitch-users mailing list