RT Create a SIP peer
From AstBillWiki
Create a SIP peer for a Service Provider to send outgoing SIP calls to PSTN
REALTIME CONFIGURATION
Click on AstBill Admin / Friends & Incoming
Fill in the following:
User/Owner of this number: Select the user that owns this Trunk. If you are the Main Administrator you can keep it as 0.
Publicnumber: (Normally Not Used for Outgoing Tunks)
Password: 652871
Username: 71900
Forward to: (Normally Not Used for Outgoing Tunks)
From User: 71900
Auth User: (Normally Not Used for Outgoing Tunks)
From Domain: pbx.astartelecom.com
Host: pbx.astartelecom.com
Port: (Normally Not Used for Outgoing Tunks)
Callerid: (Normally Not Used for Outgoing Tunks)
Context: default
Disallow: (Leave Empty or the disallowed codecs in this format 'ulaw;alaw;gsm')
Allow: (Leave Empty or the disallowed codecs in this format 'ulaw;alaw;gsm')
Comment: The Best Service Provider
Trunk Path: @realtime_sip (This is the name that will be visible in the selection trunk)
Change friend type: peer
NAT: no
ServerID: All (Not Used for Now)
Qualify: no
DTMF Mode: off
Insecure: very
Can reinvite: no
RestrictID: yes
Active: Realtime
Tech: SIP
Click on Create
Change the above fromuser, username, host, fromdomain and secret to the correct settings for your SIP provider.
The next you have to do is to inform AstBill that this Trunk (Route) Exist. This we do in:
AstBill Admin / Trunks
Click on Create New and select the following:
Choose Outgoing Trunk type: SIP Name: realtimeSIP REALTIME TrunkPath: @realtime_sip (Choose the entry you created before) STATIC TrunkPath: (Leave this empty) ServerID: All (Not used for now) Comment: This is the Best SIP Provider Bla, Bla, Bla Vat: 0 Vat2: 0 MaxUsage: 9999 TrunkCost: 1 Check to make default (If this is your first Trunk you have to click to make it Default)
Click on Create
This is all there are to it. If this is your only Trunk please confirm in the Trunk View that this is now your Default trunk. The Default trunk will have a * displayed under Default.
AstBill Admin / Trunks
Outgoing Trunk type: You can choose SIP, IAX2, H323 or ZAP
Name:
Please enter the Trunk Name. Every Trunk have to be given a name. This is the same name as is used in the table.column astroute.trunk. The way it works is that in the astroute table we put all the Outgoing Dial Routes. In the trunk field we put the name of the trunk to use to dial thisRoute.
REALTIME TrunkPath:
If the outgoing trunk you want to use is defined using the Asterisk REALTIME engine you can choose the trunk Definition to use from this drop down box. If the outgoing trunk is defined in the Static files sip.conf, iax.conf or h323.conf you have to choose STATIC.
STATIC TrunkPath:
This field is only valid if REALTIME TrunkPath = STATIC
If the outgoing trunk is defined as a section in the Static files sip.conf, iax.conf or h323.conf you have to put the defined name in this field. You have to start the name with a @.
Example:
If the section [astartele_sip] is defined in sip.conf you will have to enter @astartele_sip in this field.
ServerID:
This field is not in use for now.
Comment:
This is for the Administrator to put his own comment or description related to this trunk.
VAT is a Sales Tax widely used in Europe.
In the US they call it sales tax.
Vat:
If you want to add VAT to the Vendors prices before you calculate our cost. This field will make the Call Data Records (CDR) in table astcdr.ourcost include VAT. This is useful if you are not able to get your VAT back.
Vat2:
If you don't want astcdr.ourcost to include the VAT but want to store the rate for use on reports. Update the vendors VAT rate. This rate is not used during calculations of astcdr.ourcost:
MaxUsage:
Some Trunks may only be used one at the time. Enter the number of times the provider allows you concurrent connections to their system. If a provider allows 2 concurrent connections This trunk will not be available if the system need a 3rd connection to this route. By then AstBill will use the trunk with the higher cost.
TrunkCost:
This is the relative cost of this trunk. If you have two trunks serving the same route. AstBill will chose the Route with the lowest cost. If the route with the lowest cost is in use and no more concurrent connections is allowed AstBill will choose the system with the a highest cost.
Check to make default
If this is your first Trunk you have to click to make it Default.
