Remote friends¶
Remote friends connect a vPBX client with an external SIP entity.
Types of remote friends¶
There are 2 main types of SIP PBX that can be integrate with IvozProvider:
- Direct connection PBX (Connectivity mode: direct): IvozProvider must be able to talk SIP directly with this kind of friends by just redirecting the traffic to the proper port of the public IP address of the PBX.
- PBX behind NAT (Connectivity mode: register): Not directly accessible. This kind of PBX must register at IvozProvider (just like all the Terminals do).
What do remote friends allow?¶
This section allows not just communication between users at boths ends of the SIP trunk, but also:
- Users “from the other side” can call to the public network just like native Ivozprovider Users.
- Public network calls can be routed to the other SIP trunk end.
What kind of calls can be routed through a remote friend?¶
IvozProvider must know what calls must be routed to the different defined friends (both internal and remote friends). For that, client administrator will configure regular expressions that describe the numbers that can be reached through the friend.
Note
Internal extensions have priority over any expression defined in the friends.
To sum up, IvozProvider will route a call received by a user or a friend following this logic:
- Destination matches an existing IvozProvider extension?
- If not: Destination matches any friend regular expression?
- If not: This is an external call.
Important
Avoid PCRE regular expressions in friend configuration: use [0-9] instead of \d.
Configuration of remote friends¶
The Friend configuration is a merge between a User and a Terminal
These are the configurable settings of friends:
- Name
- Name of the friend, like in Terminals. This will also be used in SIP messages (sent From User).
- Description
- Optional. Extra information for this friend.
- Priority
- Used to solve conflicts while routing calls through friends. If a call destination matches more than one friend regular expression the call will be routed through the friend with less priority value.
- Password
- When the friend send requests, IvozProvider will authenticate it using this password. Like in terminals using password IS A MUST.
- Connectivity mode
- Choose between “Direct” and “Register” for a remote friend.
- Call ACL
- Similar to internal users, friends can place internal client calls without restriction (including Extension or other Friends). When calling to external numbers, this ACL will be checked if set.
- Fallback Outgoing DDI
- External calls from this friend will be presented with this DDI, unless the source presented by friend is a DDI that exists in DDIs section.
- Country and Area code
- Used for number transformation from and to this friend.
- Allowed codecs
- Like a terminal, friends will talk the selected codec.
- From domain
- Request from IvozProvider to this friend will include this domain in the From header.
- DDI In
- If set to ‘Yes’, use endpoint username in R-URI when calling this friend. If set to ‘No’, use called number instead.
- Enable T.38 passthrough
- If set to ‘yes’, this SIP endpoint must be a T.38 capable fax sender/receiver. IvozProvider will act as a T.38 gateway, bridging fax-calls of a T.38 capable carrier and a T.38 capable device.
Note
Calls to friends are considered internal. That means that ACLs won’t be checked when calling a friend, no matter if the origin of the call is a user or another friend.
Asterisk as a remote friend¶
At the other end of a friend can be any kind of SIP entity. This section takes as example an Asterisk PBX system using SIP channel driver that wants to connect to IvozProvider.
register
If the system can not be directly access, Asterisk will have to register in the platform (like a terminal will do).
Configuration will be something like this:
register => friendName:friendPassword@ivozprovider-client.sip-domain.com
peer
[friendName]
type=peer
host=ivozprovider-client.sip-domain.com
context=XXXXXX
disallow=all
allow=alaw
defaultuser=friendName
secret=friendPassword
fromuser=friendName
fromdomain=ivozprovider-brand.sip-domain.com
insecure=port,invite
sendrpid=pai
directmedia=no
Warning
Friends, like terminals, MUST NOT challenge IvozProvider. That’s why the insecure setting is used here.
Note
As from username is used to identify the friend, P-Asserted-Identity must be used to specify caller number.
Summary of remote friends¶
The key point is understanding that a remote friend has a direct relation with the extension-user-terminal trio:
- Can place calls to all internal extensions and other friends.
- Can place external calls that its ACL allows
- Display their configured outgoing DDI when calling to external entities
- Never challenge IvozProvider requests (don’t request authentication on received requests)
- Answers IvozProvider authentication challenges (All request from them to IvozProvider must be authenticated for security reasons)
- Only connects with Users SIP Proxy, like terminals. In fact, SIP traffic from friends are identical to any other user terminal traffic in format.