Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] how to config FS with two net interface?


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





PostPosted: Tue Oct 27, 2009 3:59 am    Post subject: [Freeswitch-users] how to config FS with two net interface? Reply with quote

Hi all, I run FS on a machine with two net interface, each interface has a ip addr, one of the them connect to public network(has ip addr A), the other  connect to a private network(has ip addr B), FS server as a SIP server for public through A, all outbound call will bridge to a softswitch in private network through B. here is my sofia config file and diaplan config:

sofia internal.xml
....
<param name="rtp-ip" value="A"/>
<param name="sip-ip" value="A"/>
 ....

sofia external.xml
....
<param name="rtp-ip" value="B"/>
<param name="sip-ip" value="B"/>....

dialplan
......
<extension name="OUTBOUND">
    <condition field="destination_number" expression="^(\d+)$">
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
        <action application="set" data="effective_caller_id_number=xxxxxxx"/>  <!--here change the caller number -->
        <action application="bridge" data="sofia/external/${destination_number}@xxxxx"/>
      </condition>
    </extension>
.....

then call seq is
sipAgent --> [internal -->(bridge)-->external] -->softswith
                          FREESWITCH

the question is, when sipAgent make a outbound call, FS can't recevie the caller's up audio stream, I traced the SIP packets, found that FS has return addr B in SDP when ack the invite request from sipAgent, the ack packet is
===============
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP xxxxx:12208;branch=z9hG4bK-d8754z-dc750d57652c7c51-1---d8754z-;rport=12208
From: "1000" <sip:xxxx@A>;tag=cb4d3c4e
To: "65960581" <sip:xxxx@A>;tag=DtvSc0QX01yKN
Call-ID: ZTI2NmIwZGZiYzlhOGNkNTdiYWUzMzkzZTMwYzgxZjI.
CSeq: 2 INVITE
Contact: <sip:xxxxxx@B:5060;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.0.4-14460
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 245

v=0
o=FreeSWITCH 1256598185 1256598186 IN IP4 B   ;>>>>wrong this is the ip addr of the adapter connect to the private network
s=FreeSWITCH
c=IN IP4 B ;>>>>wrong this is the ip addr of the adapter connect to the private network
t=0 0
m=audio 31066 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
================
I think FS should return A in SDP, not the external binding addr (B), does somebody known how to solve this problem?

--
Lei.Tang
lei.tlfly@gmail.com (lei.tlfly@gmail.com)
Back to top
egable+freeswitch at g...
Guest





PostPosted: Tue Oct 27, 2009 9:12 am    Post subject: [Freeswitch-users] how to config FS with two net interface? Reply with quote

Try setting ext-rtp-ip and ext-sip-ip on both profiles.

On Tue, Oct 27, 2009 at 4:49 AM, Lei Tang <lei.tlfly@gmail.com> wrote:
Quote:
Hi all, I run FS on a machine with two net interface, each interface has a
ip addr, one of the them connect to public network(has ip addr A), the
other  connect to a private network(has ip addr B), FS server as a SIP
server for public through A, all outbound call will bridge to a softswitch
in private network through B. here is my sofia config file and diaplan
config:

sofia internal.xml
....
<param name="rtp-ip" value="A"/>
<param name="sip-ip" value="A"/>
 ....

sofia external.xml
....
<param name="rtp-ip" value="B"/>
<param name="sip-ip" value="B"/>
....

dialplan
......
<extension name="OUTBOUND">
    <condition field="destination_number" expression="^(\d+)$">
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set"
data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
        <action application="set"
data="effective_caller_id_number=xxxxxxx"/>  <!--here change the caller
number -->
        <action application="bridge"
data="sofia/external/${destination_number}@xxxxx"/>
      </condition>
    </extension>
.....

then call seq is
sipAgent --> [internal -->(bridge)-->external] -->softswith
                          FREESWITCH

the question is, when sipAgent make a outbound call, FS can't recevie the
caller's up audio stream, I traced the SIP packets, found that FS has return
addr B in SDP when ack the invite request from sipAgent, the ack packet is
===============
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP
xxxxx:12208;branch=z9hG4bK-d8754z-dc750d57652c7c51-1---d8754z-;rport=12208
From: "1000" <sip:xxxx@A>;tag=cb4d3c4e
To: "65960581" <sip:xxxx@A>;tag=DtvSc0QX01yKN
Call-ID: ZTI2NmIwZGZiYzlhOGNkNTdiYWUzMzkzZTMwYzgxZjI.
CSeq: 2 INVITE
Contact: <sip:xxxxxx@B:5060;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.0.4-14460
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, call-info, sla,
include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 245

v=0
o=FreeSWITCH 1256598185 1256598186 IN IP4 B   ;>>>>wrong this is the ip addr
of the adapter connect to the private network
s=FreeSWITCH
c=IN IP4 B ;>>>>wrong this is the ip addr of the adapter connect to the
private network
t=0 0
m=audio 31066 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
================
I think FS should return A in SDP, not the external binding addr (B), does
somebody known how to solve this problem?

--
Lei.Tang
lei.tlfly@gmail.com

_______________________________________________
FreeSWITCH-users mailing list
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





--
Eliot Gable

"We do not inherit the Earth from our ancestors: we borrow it from our
children." ~David Brower

"I decided the words were too conservative for me. We're not borrowing
from our children, we're stealing from them--and it's not even
considered to be a crime." ~David Brower

"Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to
live; not live to eat.) ~Marcus Tullius Cicero

_______________________________________________
FreeSWITCH-users mailing list
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
lei.tlfly at gmail.com
Guest





PostPosted: Tue Oct 27, 2009 8:26 pm    Post subject: [Freeswitch-users] how to config FS with two net interface? Reply with quote

Thanks Eliot, It works.

2009/10/27 Eliot Gable <egable+freeswitch@gmail.com ([email]egable%2Bfreeswitch@gmail.com[/email])>
Quote:
Try setting ext-rtp-ip and ext-sip-ip on both profiles.


On Tue, Oct 27, 2009 at 4:49 AM, Lei Tang <lei.tlfly@gmail.com (lei.tlfly@gmail.com)> wrote:
Quote:
Hi all, I run FS on a machine with two net interface, each interface has a
ip addr, one of the them connect to public network(has ip addr A), the
other  connect to a private network(has ip addr B), FS server as a SIP
server for public through A, all outbound call will bridge to a softswitch
in private network through B. here is my sofia config file and diaplan
config:

sofia internal.xml
....
<param name="rtp-ip" value="A"/>
<param name="sip-ip" value="A"/>
 ....

sofia external.xml
....
<param name="rtp-ip" value="B"/>
<param name="sip-ip" value="B"/>
....

dialplan
......
<extension name="OUTBOUND">
    <condition field="destination_number" expression="^(\d+)$">
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set"
data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
        <action application="set"
data="effective_caller_id_number=xxxxxxx"/>  <!--here change the caller
number -->
        <action application="bridge"
data="sofia/external/${destination_number}@xxxxx"/>
      </condition>
    </extension>
.....

then call seq is
sipAgent --> [internal -->(bridge)-->external] -->softswith
                          FREESWITCH

the question is, when sipAgent make a outbound call, FS can't recevie the
caller's up audio stream, I traced the SIP packets, found that FS has return
addr B in SDP when ack the invite request from sipAgent, the ack packet is
===============
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP
xxxxx:12208;branch=z9hG4bK-d8754z-dc750d57652c7c51-1---d8754z-;rport=12208
From: "1000" <sip:xxxx@A>;tag=cb4d3c4e
To: "65960581" <sip:xxxx@A>;tag=DtvSc0QX01yKN
Call-ID: ZTI2NmIwZGZiYzlhOGNkNTdiYWUzMzkzZTMwYzgxZjI.
CSeq: 2 INVITE
Contact: <sip:xxxxxx@B:5060;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.0.4-14460
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY,
REFER, UPDATE, REGISTER, INFO, PUBLISH
Supported: timer, precondition, path, replaces
Allow-Events: talk, presence, dialog, call-info, sla,
include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 245

v=0
o=FreeSWITCH 1256598185 1256598186 IN IP4 B   ;>>>>wrong this is the ip addr
of the adapter connect to the private network
s=FreeSWITCH
c=IN IP4 B ;>>>>wrong this is the ip addr of the adapter connect to the
private network
t=0 0
m=audio 31066 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
================
I think FS should return A in SDP, not the external binding addr (B), does
somebody known how to solve this problem?

--
Lei.Tang
lei.tlfly@gmail.com (lei.tlfly@gmail.com)



Quote:
_______________________________________________
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





--
Eliot Gable

"We do not inherit the Earth from our ancestors: we borrow it from our
children." ~David Brower

"I decided the words were too conservative for me. We're not borrowing
from our children, we're stealing from them--and it's not even
considered to be a crime." ~David Brower

"Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to
live; not live to eat.) ~Marcus Tullius Cicero

_______________________________________________
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



--
Lei.Tang
lei.tlfly@gmail.com (lei.tlfly@gmail.com)
Back to top
brian at freeswitch.org
Guest





PostPosted: Tue Oct 27, 2009 8:32 pm    Post subject: [Freeswitch-users] how to config FS with two net interface? Reply with quote

you should have just needed to set the rtp-ip and the sip-ip on both
profiles to their values and it would have worked fine... their would
have been no need to set the ext-*-ip equiv.

/b

On Oct 27, 2009, at 8:14 PM, Lei Tang wrote:

Quote:
Thanks Eliot, It works.


_______________________________________________
FreeSWITCH-users mailing list
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
lei.tlfly at gmail.com
Guest





PostPosted: Tue Oct 27, 2009 8:45 pm    Post subject: [Freeswitch-users] how to config FS with two net interface? Reply with quote

Hi Brian, It doesn't work if I only set rtp-ip and sip-ip. when  I set the ext-rtp-ip, it works fine. 

2009/10/28 Brian West <brian@freeswitch.org (brian@freeswitch.org)>
Quote:
you should have just needed to set the rtp-ip and the sip-ip on both
profiles to their values and it would have worked fine... their would
have been no need to set the ext-*-ip equiv.

/b

On Oct 27, 2009, at 8:14 PM, Lei Tang wrote:

Quote:
Thanks Eliot, It works.



_______________________________________________
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





--
Lei.Tang
lei.tlfly@gmail.com (lei.tlfly@gmail.com)
Back to top
brian at freeswitch.org
Guest





PostPosted: Tue Oct 27, 2009 9:16 pm    Post subject: [Freeswitch-users] how to config FS with two net interface? Reply with quote

Ok then something is broken badly... and that makes NO sense. Because it works on my box.

/b

On Oct 27, 2009, at 8:34 PM, Lei Tang wrote:
Quote:
Hi Brian, It doesn't work if I only set rtp-ip and sip-ip. when I set the ext-rtp-ip, it works fine.

2009/10/28 Brian West <brian@freeswitch.org (brian@freeswitch.org)>
Quote:
you should have just needed to set the rtp-ip and the sip-ip on both
profiles to their values and it would have worked fine... their would
have been no need to set the ext-*-ip equiv.

/b

On Oct 27, 2009, at 8:14 PM, Lei Tang wrote:

Quote:
Thanks Eliot, It works.



_______________________________________________
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





--
Lei.Tang
lei.tlfly@gmail.com (lei.tlfly@gmail.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