Difference between revisions of "How to make several connections from one IP"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 57: | Line 57: | ||
= Example = | = Example = | ||
Lets say we have MOR and another Asterisk server from which we want to configure 2 connections to MOR. | |||
First on MOR we need to describe such connections as Devices for different Users. | |||
We will create 2 devices 1028 and 1009 for these connections: |
Revision as of 12:55, 19 February 2010
Description
Sometimes it is necessary to make several connections from one IP (server usually) to MOR to separate traffic.
Main rules how to do that:
- Devices should be DYNAMIC and should REGISTER to MOR
- In INVITE packet from external server in line From: should be visible, which device is dialing. (If external server is Asterisk, then in MOR descriptions (in sip.conf file) on external server, should be fromuser= lines which points which device is dialing - check explanation in details below)
If devices are not configured properly, then call from external server to MOR is possible, but only 1 device will be billed all the time or only 1 trunk will be active (depends on misconfiguration).
Possible error on misconfiguration:
WARNING[2836]: chan_sip.c:8385 check_auth: username mismatch, have <XXXX>, digest has <YYYY>
SIP INVITE packet
As described previously correct SIP INVITE packet should be received in order for MOR to correcly authenticate user.
Good SIP INVITE packet
INVITE sip:3908155xxxxx@82.215.xxx.xxx SIP/2.0 Via: SIP/2.0/UDP 82.215.xxx.xxx:5060;branch=z9hG4bK50ef8b9b;rport From: "39081761xxxxx" <sip:1028@82.215.xxx.xxx>;tag=as3b117c95 To: <sip:390815517304@82.215.xxx.xxx> Contact <sip:1028@82.215.xxxx.xxx> Call-ID: 2f6f09f8498065164a9aadae5ef123cf@82.215.xxx.xxx CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Date: Fri, 19 Feb 2010 12:28:03 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Type: application/sdp Content-Length: 242
Bad SIP INVITE packet
INVITE sip:3908155xxxxx@82.215.xxx.xxx SIP/2.0 Via: SIP/2.0/UDP 82.215.xxx.xxx:5060;branch=z9hG4bK7edd0b9e;rport From: "3908176xxxxx" <sip:3908176xxxxx@82.215.xxx.xxx>;tag=as1b7e883e To: <sip:3908155xxxxx@82.215.xxx.xxx> Contact: <sip:3908176xxxxx@82.215.xxx.xxx> Call-ID: 1efdd14505519d1a6b769e5c269f555d@82.215.xxx.xxx CSeq: 103 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Proxy-Authorization: Digest username="1028", realm="asterisk", algorithm=MD5, uri="sip:3908155xxxxx@82.215.xxx.xxx", nonce="0f96c765", response="df7b502821c03ad43222d007b20dbf84", opaque="" Date: Fri, 19 Feb 2010 12:17:41 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Type: application/sdp Content-Length: 242
Example
Lets say we have MOR and another Asterisk server from which we want to configure 2 connections to MOR.
First on MOR we need to describe such connections as Devices for different Users.
We will create 2 devices 1028 and 1009 for these connections: