• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

SDP IP with multipe NIC and multiple SIP providers

Status
Not open for further replies.

herman

Bronze Partner
Basic Certified
Joined
May 20, 2010
Messages
5
Reaction score
0
Hi,

My 3CX machine has 2 NIC, one connected to the internal network (that contains my phones) and the internet, and a second that is directly connected to a local SIP provider over a dedicated line. Until recently I only used the one SIP provider but now want to add another one. This new SIP provider will be connected to through the internet.

I have added the new SIP provider and my registration succeeds. When I make a call no audio is available.
I checked with Wireshark and I found it is due to the fact that the IP of my other SIP provider is in the SDP part of the INVITE, but I don't know how to change this. The IP to use in the 'contact' field for registration on the advanced page is set to the correct external IP, I can see this in other parts of the INVITE, but the IP in the SDP is wrong.

Is there a way to change this?

Tx,

Herman
 
In VoIP provider settings | Advanced specify desired address (in my case: 10.251.222.114). This should help.
You may also need to set a static route in Windows.

Regards.
 

Attachments

  • untitled.JPG
    untitled.JPG
    176.2 KB · Views: 1,357
Hi Orlin,

Thanks for your reply. I already did this, but it does not work.

My primary nic has address 192.168.x.246, it has a gateway to 192.168.x.1 and access to the internet and lan.
My secondary nic has address 1.x.x.142, no gateway, but a static route has been set to the IP of the SIP-server of my provider. In the Settings, Network, STUN server, stun is disabled and the public ip to specify is set to the address of the secondary nic, it is also selected as Network card interface.

The primary VOIP Provider has its 'Contact' field IP set to specified IP 1.x.x.142. Calls along this provider work.

The secondary VOIP Provider has its 'Contact' field IP set to my pulic IP 78.x.x.x. Calls do not work. I am testing with iptel.org here.



To get a minimum of correct information in the request I need to change several parameters on the Outbound tab;

* Contact: Host Part : 78.x.x.x
* From: Host Part: 78.x.x.x

If I don't do this, all parameters in the call default to the address set on the STUN page.

Here is an extract from Wireshark after just setting up the VOIP Provider and setting the contact field to the external 78.x.x.x address.

Code:
No.     Time        Source                Destination           Protocol Info
    118 20.053471   192.168.x.246        217.9.36.145          SIP/SDP  Request: INVITE sip:[email protected]:5060, with session description

Frame 118: 981 bytes on wire (7848 bits), 981 bytes captured (7848 bits)
Ethernet II, Src: Giga-Byt_b8:0b:bd (1c:6f:65:b8:0b:bd), Dst: Netscree_92:fc:d0 (00:10:db:92:fc:d0)
Internet Protocol, Src: 192.168.x.246 (192.168.x.246), Dst: 217.9.36.145 (217.9.36.145)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
    Request-Line: INVITE sip:[email protected]:5060 SIP/2.0
        Method: INVITE
        Request-URI: sip:[email protected]:5060
        [Resent Packet: False]
    Message Header
        Via: SIP/2.0/UDP 192.168.x.246:5060;branch=z9hG4bK-d8754z-981be82f2753bc26-1---d8754z-;rport
        Max-Forwards: 70
        Contact: <sip:[email protected]:5060>
            Contact-URI: sip:[email protected]:5060
                Contactt-URI User Part: xxxxx
                Contact-URI Host Part: 1.x.x.142
                Contact-URI Host Port: 5060
        To: <sip:[email protected]:5060>
            SIP to address: sip:[email protected]:5060
                SIP to address User Part: 3246
                SIP to address Host Part: iptel.org
                SIP to address Host Port: 5060
        From: "+323xxxxxx"<sip:[email protected]:5060>;tag=4600b668
            SIP Display info: "+323xxxxxx"
            SIP from address: sip:[email protected]:5060
            SIP tag: 4600b668
        Call-ID: OTZjZWQ4NDc1ZmNmODU2YWJhZWUyNWQ3ZTRkMWExNjM.
        CSeq: 1 INVITE
        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
        Content-Type: application/sdp
        Supported: replaces
        User-Agent: 3CXPhoneSystem 10.0.22539.0
        Content-Length: 274
        Remote-Party-ID: "+323xxxxxx"<sip:[email protected]:5060>;party=calling
    Message Body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): 3cxPS 154300055552 400891576321 IN IP4 1.x.x.142
            Session Name (s): 3cxPS Audio call
            Connection Information (c): IN IP4 1.x.x.142
            Time Description, active time (t): 0 0
            Media Description, name and address (m): audio 9008 RTP/AVP 0 8 3 101
            Connection Information (c): IN IP4 1.x.x.142
            Media Attribute (a): rtpmap:0 PCMU/8000
            Media Attribute (a): rtpmap:8 PCMA/8000
            Media Attribute (a): rtpmap:3 GSM/8000
            Media Attribute (a): rtpmap:101 telephone-event/8000
            Media Attribute (a): sendrecv

Here is an extract from Wireshark after changing mentioned parameters.

Code:
No.     Time        Source                Destination           Protocol Info
    174 16.178084   192.168.x.246        217.9.36.145          SIP/SDP  Request: INVITE sip:[email protected]:5060, with session description

Frame 174: 986 bytes on wire (7888 bits), 986 bytes captured (7888 bits)
Ethernet II, Src: Giga-Byt_b8:0b:bd (1c:6f:65:b8:0b:bd), Dst: Netscree_92:fc:d0 (00:10:db:92:fc:d0)
Internet Protocol, Src: 192.168.x.246 (192.168.x.246), Dst: 217.9.36.145 (217.9.36.145)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
    Request-Line: INVITE sip:[email protected]:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 192.168.x.246:5060;branch=z9hG4bK-d8754z-f92c7757da2d1100-1---d8754z-;rport
        Max-Forwards: 70
        Contact: <sip:[email protected]:5060>
            Contact-URI: sip:[email protected]:5060
                Contactt-URI User Part: xxxxxx
                Contact-URI Host Part: 78.x.x.x
                Contact-URI Host Port: 5060
        To: <sip:[email protected]:5060>
            SIP to address: sip:[email protected]:5060
                SIP to address User Part: 3246
                SIP to address Host Part: iptel.org
                SIP to address Host Port: 5060
        From: "+323xxxxxx"<sip:[email protected]:5060>;tag=79518028
            SIP Display info: "+323xxxxxx"
            SIP from address: sip:[email protected]:5060
            SIP tag: 79518028
        Call-ID: YTJhNjFhODJhYTQzNGE0NmY0YTI3YzdhNzE4Y2I0NDg.
        CSeq: 1 INVITE
        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
        Content-Type: application/sdp
        Supported: replaces
        User-Agent: 3CXPhoneSystem 10.0.22539.0
        Content-Length: 273
        Remote-Party-ID: "+323xxxxxx"<sip:[email protected]:5060>;party=calling
            [Expert Info (Note/Undecoded): Unrecognised SIP header (Remote-Party-ID)]
    Message Body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): 3cxPS 43318771712 137891938305 IN IP4 1.x.x.142
                Owner Username: 3cxPS
                Session ID: 43318771712
                Session Version: 137891938305
                Owner Network Type: IN
                Owner Address Type: IP4
                Owner Address: 1.x.x.142
            Session Name (s): 3cxPS Audio call
            Connection Information (c): IN IP4 1.x.x.142
                Connection Network Type: IN
                Connection Address Type: IP4
                Connection Address: 1.x.x.142
            Time Description, active time (t): 0 0
            Media Description, name and address (m): audio 9004 RTP/AVP 0 8 3 101
            Connection Information (c): IN IP4 1.x.x.142
                Connection Network Type: IN
                Connection Address Type: IP4
                Connection Address: 1.x.x.142
            Media Attribute (a): rtpmap:0 PCMU/8000
            Media Attribute (a): rtpmap:8 PCMA/8000
            Media Attribute (a): rtpmap:3 GSM/8000
            Media Attribute (a): rtpmap:101 telephone-event/8000
            Media Attribute (a): sendrecv

To test more, I switched the ip address in the Settings, Network, Stun to the normal external IP, but then calls over the original provider exhibit the same problem.

Herman
 
Hi Herman,

Look also in Settings | Advanced | Custom parameters -- some of addresses are also stated there.

I have the following setup (using only one interface):
Local LAN: 192.168.88.0/24
3CX server address: 192.168.88.88/24
gateway: 192.168.88.1

I have also public address, which is NAT-ed via router (MikroTik) and ports (5060, 5090, 9000-9049) forwarded to internal address of 3CX (192.168.88.88).


I have a provider, requiring 3CX to present the address: 10.251.222.114/30 in contact / from fields (as shown in above post). I've put this address as second address of my LAN card (MS Windows) settings without gateway and added static route (in MS Windows) to provider's address using the gateway (10.251.222.113) of the provider. My router is not having address from this network (10.251.222.112/30), infact this is untagged VLAN to the same port of the router which has already address 192.168.88.1/24.

I have also other providers (via NAT) where I've set my public address which is static (I'm not using STUN).

This is working fine for me. I'm using only one LAN interface. Your setup is something similar (looks so). May be you must rethink it. You should be able to do it with 2 LAN interfaces (without second gateway) using same concept.

Kind regards,
Orlin
 
Orin,

Hmm, I must be missing something. If I understand correctly, then when I make a call to Destiny (my fist sip provider), it goes through a seperate non-internet connection to their network, for which I use my second nic and a static route in windows. In the SDP I see all IP addresses as they should be.

The second provider has to go over the internet, So logically all I should do is to set the correct IP in the provider settings. But when I make a call the IP of the nic for the first provider messes things up. Could you look in your trace and see what IP is inside the SDP when you make your calls over the different providers? Is it always the same?

Herman
 
Hi Herman,

somewhere in the forum / blog was a comment about using several NICs. The recommendation was not to use more than 1 NIC. If this is so, why don't you try to do the same as me, using just one NIC with several addresses on it (I'm using MS Windows 2008R2 Foundation server, but this should not be important). The 'main' address of the NIC has also defined a default gateway and is NAT-ed to Internet, additional addresses are not NAT-ed but used also for presentation to providers and requests to providers are statically routed to corresponding provider networks.

Once again, I have a 3CX server with main address 192.168.88.88/24, gateway 192.168.88.1 (a MikroTik router). All requests to other providers (several) and remote extensions pass through public static address of the router and NAT-ed and port forwarded correspondingly. Upto now everything is standard and trivial.

I have a VLAN to one specific provider with remote end address 10.251.222.113/30. The provider requires the PBX present itself with IP address 10.251.222.114/30 (in SIP/SDP). The VLAN is untagged to the same port (LAN interface of the router with address 192.168.88.1), where the 3CX server is connected. The only three things I set are: (1) the second IP address to the same NIC (i.e. 10.251.222.114/30), (2) added in MS Windows a static route for 213.226.60.0/24 (the provider's network) via 10.251.222.113 and (3) configured the 3CX to use the address 10.251.222.114 for this provider, which I can confirm to see into the logs. The provider is sending traffic to this address and will not accept traffic from other addresses including SIP/SDP headers.

The rest of the providers are using 'regular' Internet connection without STUN (I've configured for them the public static address to be presented). The problem could be with 2 NICs in your case, but I don't have idea why this might be happening.


Before that I was using Cisco 8xx series router which is performing SIP ALG (i.e. rewrites SIP/SDP headers beside standard NAT). This is another model and requires different settings (and could be a problem if your router is doing it).

Kind regards,
Orlin.
 
Status
Not open for further replies.
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.