[Freeswitch-users] Help with early end to ringback when calling PSTN?

Harry Coin hcoin at quietfountain.com
Fri Feb 24 00:47:15 MSK 2012


On 2/23/2012 3:17 PM, Michael Collins wrote:
> Try adding this before your bridge:
> http://wiki.freeswitch.org/wiki/Channel_Variables#ringback
>
> -MC

Yup, the fusionpbx hunt group lua put that in here:

session:execute("set", "ringback=${hold_music}");          --set to music
session:execute("set", "transfer_ringback=${hold_music}"); --set to music
session:setVariable("continue_on_fail", "true");
session:setVariable("ignore_early_media", "true");
session:setVariable("hangup_after_bridge", "true");


The answer turns out to be that the music on hold selection matched the 
previous failed extension ring's length.   It basically ran out at the 
wrong moment and had me looking hard for configuration issues.   So, it 
was a configuration issue -- wrong wait music length.

Sorry!
-HC

P.S.  Might take a look at that 'transfer' and 'execute_extension' 
documentation relative to 'continue_on_fail'.   If continue_on_fail is 
set, and bridge /sofia/internal/<dialplan target> itself does either a 
transfer, execute_extension leading to another bridge which then fails, 
the first bridge doesn't continue.  Seems either freeswitch or sofia 
ends the connection at the time of the transfer or execute_extension.   
So not exactly like 'goto' and 'gosub' as per the docs.  Found out the 
hard way to have the hunt group machinery do a loopback bridge 
(supported by Fusionpbx) or execute_extension (not supported by 
fusionpbx)  instead of bridge.



>
> On Thu, Feb 23, 2012 at 10:56 AM, Harry Coin <hcoin at quietfountain.com 
> <mailto:hcoin at quietfountain.com>> wrote:
>
>     Hello all, great project!
>
>     In the simple case of dialing out through a small 4 port fxo
>     (grandstream-4104) there is an unwelcome ringback silence gap of
>     almost exactly 10 seconds while the fxo goes offhook and issues
>     its dtmf, then the audio resumes with whatever audio the PSTN
>     sends in response to the dialled number.
>
>     I've tried to continue the ringback music using
>     ignore_early_media=true with no success.  Tried transfer_ringback,
>     instant_ringback, no joy.    In the following short fs_cli trace
>     no matter what I try the music stops at the point below noted as
>     12:19:44... and there is silence until 12:19:54... when the PSTN
>     provides audio.  What can I do to keep the ringback music going
>     until  the log point noted at ...:54xxxx below?
>
>     2012-02-23 12:19:44.000317 [DEBUG] mod_dptools.c:1176
>     sofia/internal/011 at gate.quietfountain.com
>     <mailto:011 at gate.quietfountain.com> SET [bypass_media]=[true]
>      EXECUTE sofia/internal/011 at gate.quietfountain.com
>     <mailto:011 at gate.quietfountain.com>
>     bridge({ignore_early_media=true}sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>|sofia/internal/9915551212 at fxoports1to4.quietfountain.com
>     <mailto:9915551212 at fxoports1to4.quietfountain.com>)
>
>     2012-02-23 12:19:44.000317 [DEBUG] switch_ivr_originate.c:1882
>     Parsing global variables
>     2012-02-23 12:19:44.000317 [DEBUG] switch_event.c:1521 Parsing
>     variable [ignore_early_media]=[true]
>     2012-02-23 12:19:44.000317 [NOTICE] switch_channel.c:911 New
>     Channel sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>
>     [ab71adf5-4a5e-e111-b2c4-00104b98432d]
>
>     2012-02-23 12:19:44.000317 [DEBUG] mod_sofia.c:4496
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State Change
>     CS_NEW -> CS_INIT
>     2012-02-23 12:19:44.000317 [DEBUG] switch_core_session.c:1175 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:362
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) Running State
>     Change CS_INIT
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:401
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State INIT
>     2012-02-23 12:19:44.021687 [DEBUG] mod_sofia.c:85
>     sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> SOFIA INIT
>     2012-02-23 12:19:44.021687 [DEBUG] mod_sofia.c:125
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State Change
>     CS_INIT -> CS_ROUTING
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_session.c:1175 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:401
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State INIT
>     going to sleep
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:362
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) Running State
>     Change CS_ROUTING
>     2012-02-23 12:19:44.021687 [DEBUG] switch_channel.c:1840
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) Callstate
>     Change DOWN -> RINGING
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:410
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State ROUTING
>     2012-02-23 12:19:44.021687 [DEBUG] mod_sofia.c:148
>     sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> SOFIA ROUTING
>     2012-02-23 12:19:44.021687 [DEBUG] switch_ivr_originate.c:66
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State Change
>     CS_ROUTING -> CS_CONSUME_MEDIA
>
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_session.c:1175 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:410
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State ROUTING
>     going to sleep
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:362
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) Running State
>     Change CS_CONSUME_MEDIA
>
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:429
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State
>     CONSUME_MEDIA
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_state_machine.c:429
>     (sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>) State
>     CONSUME_MEDIA going to sleep
>     2012-02-23 12:19:44.021687 [DEBUG] switch_core_session.c:870 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     send 1397 bytes to udp/[192.168.29.55]:5060 at 18:19:44.034612:
>      
>     ------------------------------------------------------------------------
>       INVITE sip:9935551212 at fxoports1to4.quietfountain.com
>     <mailto:sip%3A9935551212 at fxoports1to4.quietfountain.com> SIP/2.0
>       Via: SIP/2.0/UDP 192.168.29.1;rport;branch=z9hG4bKQKjKXKZBmD1Sr
>        Max-Forwards: 69
>        From: "Net Ops Desk L1" <sip:x011 at 192.168.29.1
>     <mailto:sip%3Ax011 at 192.168.29.1>>;tag=3F61avHXm0t2K
>        To: <sip:9935551212 at fxoports1to4.quietfountain.com
>     <mailto:sip%3A9935551212 at fxoports1to4.quietfountain.com>>
>        Call-ID: cd0d8ada-d8ed-122f-669c-3fb68015248b
>        CSeq: 24674528 INVITE
>        Contact: <sip:mod_sofia at 192.168.29.1:5060
>     <http://sip:mod_sofia@192.168.29.1:5060>>
>        User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-7f17ad7
>     2011-10-01 14-05-14 +0200
>        Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE,
>     INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
>        Supported: timer, precondition, path, replaces
>        Allow-Events: talk, hold, presence, dialog, line-seize,
>     call-info, sla, include-session-description, presence.winfo,
>     message-summary, refer
>        Privacy: none
>        Content-Type: application/sdp
>        Content-Disposition: session
>        Content-Length: 445
>        X-FS-Support: update_display
>        P-Asserted-Identity: "Net Ops Desk L1" <sip:x011 at 192.168.29.1
>     <mailto:sip%3Ax011 at 192.168.29.1>>
>        v=0
>        o=011 8004 8000 IN IP4 192.168.29.57
>        s=SIP Call
>        c=IN IP4 192.168.29.57
>        t=0 0
>        m=audio 5012 RTP/AVP 0 8 4 18 112 97 103 102 101
>        a=rtpmap:0 PCMU/8000
>        a=rtpmap:8 PCMA/8000
>        a=rtpmap:4 G723/8000
>        a=rtpmap:18 G729/8000
>        a=fmtp:18 annexb=no
>        a=rtpmap:112 G726-32/8000
>        a=rtpmap:97 iLBC/8000
>        a=fmtp:97 mode=20
>        a=rtpmap:103 AAL2-G726-40/8000
>        a=rtpmap:102 G729E/8000
>        a=rtpmap:101 telephone-event/8000
>        a=fmtp:101 0-16,32-36,54
>        a=ptime:20
>      
>      ------------------------------------------------------------------------
>
>
>     2012-02-23 12:19:44.021687 [DEBUG] sofia.c:5174 Channel
>     sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> entering state
>     [calling][0]
>      recv 353 bytes from udp/[192.168.29.55]:5060 at 18:19:44.040757:
>      
>     ------------------------------------------------------------------------
>
>       SIP/2.0 100 Trying
>       Via: SIP/2.0/UDP 192.168.29.1;rport;branch=z9hG4bKQKjKXKZBmD1Sr
>       From: "Net Ops Desk L1" <sip:x011 at 192.168.29.1
>     <mailto:sip%3Ax011 at 192.168.29.1>>;tag=3F61avHXm0t2K
>       To: <sip:9935551212 at fxoports1to4.quietfountain.com
>     <mailto:sip%3A9935551212 at fxoports1to4.quietfountain.com>>
>       Call-ID: cd0d8ada-d8ed-122f-669c-3fb68015248b
>       CSeq: 24674528 INVITE
>       User-Agent: Grandstream GXW4104 (HW 1.0, Ch:2) 1.3.4.10
>       Content-Length: 0
>      
>     ------------------------------------------------------------------------
>
>     SNOOZE WITH UNWELCOME SILENCE.....
>
>
>     recv 503 bytes from udp/[192.168.29.55]:5060 at 18:19:54.350776:
>      
>     ------------------------------------------------------------------------
>
>       SIP/2.0 180 Ringing
>       Via: SIP/2.0/UDP 192.168.29.1;rport;branch=z9hG4bKQKjKXKZBmD1Sr
>       From: "Net Ops Desk L1" <sip:x011 at 192.168.29.1
>     <mailto:sip%3Ax011 at 192.168.29.1>>;tag=3F61avHXm0t2K
>       To: <sip:9935551212 at fxoports1to4.quietfountain.com
>     <mailto:sip%3A9935551212 at fxoports1to4.quietfountain.com>>;tag=7be5ae114be4f046
>       Call-ID: cd0d8ada-d8ed-122f-669c-3fb68015248b
>       CSeq: 24674528 INVITE
>       User-Agent: Grandstream GXW4104 (HW 1.0, Ch:2) 1.3.4.10
>       Contact: <sip:192.168.29.55:5060
>     <http://192.168.29.55:5060>;transport=udp>
>       Allow:
>     INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
>       Content-Length: 0
>
>      
>     ------------------------------------------------------------------------
>     2012-02-23 12:19:54.332358 [DEBUG] switch_core_session.c:870 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:54.332358 [DEBUG] switch_core_session.c:870 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:54.353976 [DEBUG] sofia.c:5174 Channel
>     sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> entering state
>     [proceeding][180]
>     2012-02-23 12:19:54.353976 [NOTICE] sofia.c:5253 Ring-Ready
>     sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com>!
>     2012-02-23 12:19:54.353976 [NOTICE] mod_sofia.c:2393 Ring-Ready
>     sofia/internal/011 at gate.quietfountain.com
>     <mailto:011 at gate.quietfountain.com>!
>
>     recv 797 bytes from udp/[192.168.29.55]:5060 at 18:19:54.362180:
>      
>     ------------------------------------------------------------------------
>       SIP/2.0 200 OK
>       Via: SIP/2.0/UDP 192.168.29.1;rport;branch=z9hG4bKQKjKXKZBmD1Sr
>       From: "Net Ops Desk L1" <sip:x011 at 192.168.29.1
>     <mailto:sip%3Ax011 at 192.168.29.1>>;tag=3F61avHXm0t2K
>       To: <sip:9935551212 at fxoports1to4.quietfountain.com
>     <mailto:sip%3A9935551212 at fxoports1to4.quietfountain.com>>;tag=7be5ae114be4f046
>       Call-ID: cd0d8ada-d8ed-122f-669c-3fb68015248b
>       CSeq: 24674528 INVITE
>       User-Agent: Grandstream GXW4104 (HW 1.0, Ch:2) 1.3.4.10
>       Contact: <sip:192.168.29.55:5060
>     <http://192.168.29.55:5060>;transport=udp>
>       Allow:
>     INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
>       Content-Type: application/sdp
>       Supported: replaces, timer, 100rel, path
>       Content-Length: 224
>       v=0
>       o=system 8002 8000 IN IP4 192.168.29.55
>       s=SIP Call
>       c=IN IP4 192.168.29.55
>       t=0 0
>       m=audio 5012 RTP/AVP 0 8 4 18 3 101
>       a=sendrecv
>       a=rtpmap:0 PCMU/8000
>       a=ptime:20
>       a=rtpmap:101 telephone-event/8000
>       a=fmtp:101 0-11
>
>      
>     ------------------------------------------------------------------------
>
>     2012-02-23 12:19:54.353976 [DEBUG] switch_core_session.c:870 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:54.353976 [DEBUG] switch_core_session.c:870 Send
>     signal sofia/internal/9935551212 at fxoports1to4.quietfountain.com
>     <mailto:9935551212 at fxoports1to4.quietfountain.com> [BREAK]
>     2012-02-23 12:19:54.353976 [DEBUG] switch_core_session.c:724 Send
>     signal sofia/internal/011 at gate.quietfountain.com
>     <mailto:011 at gate.quietfountain.com> [BREAK]
>     2012-02-23 12:19:54.353976 [NOTICE] switch_ivr_originate.c:481
>     Ring Ready sofia/internal/011 at gate.quietfountain.com
>     <mailto:011 at gate.quietfountain.com>!
>
>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto: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
>     <mailto: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
>
>


-- 

Harry Coin
Quiet Fountain LLC
2118 Lundy Ln
Bettendorf, Iowa 52722 USA
Office: 563 332 4970x101 Fax: 563 332 9633
Mobile: 563 650 7800

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120223/3845140f/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4461 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120223/3845140f/attachment-0001.bin 


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