Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Problem: re-invite with 'inactive' SDP and 'bridge' function


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





PostPosted: Wed May 27, 2009 8:41 am    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

Hi everyone!

In my environment I use FreeSwitch as media server and session border
controller. SIP routing is mostly done with my private B2BUA. The problem
itself is in my "hold" functionality. In details: A is calling to B:

<!--
     if the calling party is the called party, go to their VM
     if the calling party is NOT the called party dial the extension
     (1000-1019) for 30 seconds and go to voicemail if the
     call fails (continue_on_fail=true), otherwise hang up after a
     successful bridge (hangup_after-bridge=true)
-->
<extension name="Local_Extension_from_SP">
  <condition field="${sip_contact_uri}"
expression="^.*StarPound_.*_B2BUA.*$"/>
  <condition field="destination_number" expression="^([0-9]{2,9})$">
    <action application="set" data="dialed_extension=$1"/>
    <action application="export" data="dialed_extension=$1"/>
  </condition>
  <condition field="${sip_to_host}" expression="^([^.]*)\..*$">
    <action application="set" data="orgname=$1"/>
  </condition>
  <condition field="destination_number" expression="^${caller_id_number}$">
    <anti-action application="set" data="ringback=${us-ring}"/>
    <anti-action application="set" data="transfer_ringback=${us-ring}"/>
    <anti-action application="set" data="call_timeout=10"/>
    <anti-action application="set" data="hangup_after_bridge=true"/>
    <anti-action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED"/>
    <anti-action application="set" data="continue_on_fail=true"/>
    <anti-action application="db" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
    <anti-action application="db" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
    <anti-action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name}var callgroup)}"/>
    <anti-action application="db" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
    <anti-action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
    <anti-action application="answer"/>
    <anti-action application="export" data="sip_h_X-SPFrom=&quote;${sip_from_user}&quote;&lt;${sip_from_uri}&gt;"/>
    <anti-action application="export" data="sip_h_X-SPTo=&lt;${sip_to_uri}&gt;"/>
    <anti-action application="export" data="sip_h_X-SPCallId=${sip_call_id}"/>
    <anti-action application="bridge" data="sofia/external/${orgname}send2voicemail@$${starpound_sip_app_server}"/>
  </condition>
</extension>

Call being answered. Then B wants to hold a call (A should hear music-on-hold, B should hear nothing but still have a call). To accomplish this I:
1. on behalf of B2BUA make call to FreeSwitch "hold" extension, get SDP for music-on-hold (moh_sdp)
<extension name="hold">
    <condition field="destination_number" expression="hold">
      <action application="answer"/>
      <action application="playback" data="$${hold_music}"/>
    </condition>
</extension>
2. re-invite A with SDP moh_sdp
3. re-invite B with it's own sdp and attribute 'inactive' (also tried re-invite with A's SDP and 'inactive' and with 0.0.0.0 IP in SDP and 'inactive' - same results)

Result: both A and B hear music-on-hold.
I suspect that the reason is in 'bridge' function.. it seems, that it still bridges media against the SIP.

Here is a snippet from FreeSwitch log related to "strange" (from my point of view) behaviour - when FreeSwitch change media for B to the incorrect one.
Here 1004 is B.

2009-05-26 13:19:14 [DEBUG] sofia_glue.c:2939 sofia_glue_negotiate_sdp()
Audio Codec Compare [GSM:3:8000:20]/[GSM:3:8000:20]
2009-05-26 13:19:14 [DEBUG] sofia_glue.c:1863 sofia_glue_tech_set_codec()
Already using GSM
2009-05-26 13:19:14 [DEBUG] sofia_glue.c:2899 sofia_glue_negotiate_sdp()
Set 2833 dtmf payload to 101
2009-05-26 13:19:14 [DEBUG] sofia_glue.c:2908 sofia_glue_negotiate_sdp()
Set comfort noise payload to 13
2009-05-26 13:19:14 [DEBUG] sofia_glue.c:2139 sofia_glue_activate_rtp()
Audio params changed for sofia/external/6782886802@10.249.194.9:5060 from
75.101.166.29:27426 to 75.101.166.29:22922
2009-05-26 13:19:14 [DEBUG] sofia_glue.c:2146 sofia_glue_activate_rtp()
AUDIO RTP [sofia/external/6782886802@10.249.194.9:5060] 10.249.194.9 port
28594 -> 75.101.166.29 port 22922 codec: 3 ms: 20
2009-05-26 13:19:14 [DEBUG] sofia_glue.c:2165 sofia_glue_activate_rtp()
AUDIO RTP CHANGING DEST TO: [75.101.166.29:22922]
2009-05-26 13:19:14 [DEBUG] sofia.c:2996 sofia_handle_sip_i_state()
Channel sofia/external/1005@10.249.194.9 (1005@10.249.194.9) entering state [ready][200]
2009-05-26 13:19:15 [DEBUG] switch_ivr.c:540 switch_ivr_parse_event()
sofia/doublenat5090/sip:1004@172.16.0.6 ([email]sip%3A1004@172.16.0.6[/email]);fs_nat=yes;fs_path=sip%3A1004%40193.33.170.63%3A5060
Command Execute playback(local_stream://moh)
EXECUTE sofia/doublenat5090/sip:1004@172.16.0.6 ([email]sip%3A1004@172.16.0.6[/email]);fs_nat=yes;fs_path=sip%3A1004%40193.33.170.63%3A5060 playback(local_stream://moh)
2009-05-26 13:19:15 [DEBUG] mod_local_stream.c:346
local_stream_file_open() Opening Stream [moh/8000] 8000hz
2009-05-26 13:19:15 [DEBUG] switch_ivr_play_say.c:1084
switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2009-05-26 13:19:15 [DEBUG] switch_core_io.c:649
switch_core_session_write_frame()
sofia/doublenat5090/sip:1004@172.16.0.6 ([email]sip%3A1004@172.16.0.6[/email]);fs_nat=yes;fs_path=sip%3A1004%40193.33.170.63%3A5060
receive message [TRANSCODING_NECESSARY]


Any thoughts would be really appreciated!
Artem
Back to top
brian at freeswitch.org
Guest





PostPosted: Wed May 27, 2009 9:32 am    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

Try not using RFC2543 HOLD since we do not support it.

/b

On May 27, 2009, at 7:38 AM, Artem Shiyanov wrote:
Quote:
Hi everyone!

In my environment I use FreeSwitch as media server and session border
controller. SIP routing is mostly done with my private B2BUA. The problem
itself is in my "hold" functionality. In details: A is calling to B:


Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon! http://www.cluecon.com
Back to top
shiyanov at gmail.com
Guest





PostPosted: Wed May 27, 2009 9:42 am    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

Thanks for the answer!
Maybe you can advise me another scheme how to accomlish "mute" or "hold" functionality? I just wonder if mute/hold in X-Lite works with FreeSwitch.. I'll try and send the results.



On Wed, May 27, 2009 at 6:22 PM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote:
Try not using RFC2543 HOLD since we do not support it.

/b

On May 27, 2009, at 7:38 AM, Artem Shiyanov wrote:

Quote:
Hi everyone!

In my environment I use FreeSwitch as media server and session border
controller. SIP routing is mostly done with my private B2BUA. The problem
itself is in my "hold" functionality. In details: A is calling to B:



Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon!  http://www.cluecon.com











_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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: Wed May 27, 2009 9:49 am    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

Yes, but if the stream says inactive we might have an issue but I can't recall off the top of my head... but Last I tested x-lite it works fine.

/b

On May 27, 2009, at 9:34 AM, Artem Shiyanov wrote:
Quote:
Thanks for the answer!
Maybe you can advise me another scheme how to accomlish "mute" or "hold" functionality? I just wonder if mute/hold in X-Lite works with FreeSwitch.. I'll try and send the results.



Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon! http://www.cluecon.com
Back to top
shiyanov at gmail.com
Guest





PostPosted: Wed May 27, 2009 11:46 am    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

I've just tried native "hold" X-Lite hold with FreeSwitch - it works.
When you hold call, X-Lite (eyeBeam) sends re-INVITE with SDP
v=0
o=- 8 3 IN IP4 172.16.0.6
s=CounterPath eyeBeam 1.5
c=IN IP4 0.0.0.0
t=0 0
m=audio 43362 RTP/AVP 3 101
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendonly

SJPhone does the same way.
I also tried to send the same - own SDP with
c=IN IP4 0.0.0.0
a=sendonly
but no luck.

Probably mentioned sopftphones simply do not play incomming media when the call is holded?
In general, is how should I hold a call using FS?






On Wed, May 27, 2009 at 6:34 PM, Artem Shiyanov <shiyanov@gmail.com (shiyanov@gmail.com)> wrote:
Quote:
Thanks for the answer!
Maybe you can advise me another scheme how to accomlish "mute" or "hold" functionality? I just wonder if mute/hold in X-Lite works with FreeSwitch.. I'll try and send the results.




On Wed, May 27, 2009 at 6:22 PM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:


Quote:

Try not using RFC2543 HOLD since we do not support it.

/b

On May 27, 2009, at 7:38 AM, Artem Shiyanov wrote:

Quote:
Hi everyone!

In my environment I use FreeSwitch as media server and session border
controller. SIP routing is mostly done with my private B2BUA. The problem
itself is in my "hold" functionality. In details: A is calling to B:



Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon!  http://www.cluecon.com













_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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: Wed May 27, 2009 12:05 pm    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

Yes you won't hear anything if you press HOLD... the other caller you were talking to will hear music.

/b

On May 27, 2009, at 11:45 AM, Artem Shiyanov wrote:
Quote:
Probably mentioned sopftphones simply do not play incomming media when the call is holded?
In general, is how should I hold a call using FS?


Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon! http://www.cluecon.com
Back to top
shiyanov at gmail.com
Guest





PostPosted: Wed May 27, 2009 12:12 pm    Post subject: [Freeswitch-users] Problem: re-invite with 'inactive' SDP an Reply with quote

I've checked again (thanks for your hint) and, really, FreeSwitch is so wise that he plays MOH for the holded person and and silence for the hold initiator!

I'm going to is this work_flow for my B2BUA.

Thanks!



On Wed, May 27, 2009 at 8:47 PM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote:
Yes you won't hear anything if you press HOLD... the other caller you were talking to will hear music.

/b

On May 27, 2009, at 11:45 AM, Artem Shiyanov wrote:

Quote:
Probably mentioned sopftphones simply do not play incomming media when the call is holded?
In general, is how should I hold a call using FS?



Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon!  http://www.cluecon.com












_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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