0% found this document useful (0 votes)
536 views

Zadarma - Asterisk Setup Manual

This document provides instructions for configuring an Asterisk PBX to work with Zadarma VoIP services. It includes examples for standard setup, routing incoming calls based on caller ID name or number, and receiving incoming calls via SIP URI without registration. The setup involves editing the Asterisk configuration files sip.conf and extensions.conf to define incoming and outgoing call routing.

Uploaded by

Angad Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
536 views

Zadarma - Asterisk Setup Manual

This document provides instructions for configuring an Asterisk PBX to work with Zadarma VoIP services. It includes examples for standard setup, routing incoming calls based on caller ID name or number, and receiving incoming calls via SIP URI without registration. The setup involves editing the Asterisk configuration files sip.conf and extensions.conf to define incoming and outgoing call routing.

Uploaded by

Angad Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

3/12/2021 Zadarma: Asterisk setup manual

Instructions on how to con gure VoIP equipment Asterisk


setup

Setup manual / Asterisk

Setting up the Asterisk with Zadarma.

PBX is not used PBX is used

Information used in the example:

111111 - Your sip-number from the personal account.

Password - You sip password found in the "SIP Connection" section of your personal account.

101 - The Asterisk extension number that is connected to the softphone/IP phone.

Standard setup example

Outgoing calls from the extension number 101 are routed to the trunk 111111. Incoming calls
are received by registration and are routed to extension number 101.

Editing sip.conf

[general]

srvlookup=yes

[111111]
By continuing to use the site, you consent to the processing of Cookies and personal data. See
host=sip.zadarma.com
more details in our Cookie рolicy page. If you do not want your data to be processed, please leave
insecure=invite,port
the site.
type=friend

https://zadarma.com/en/support/instructions/asterisk/ 1/7
3/12/2021 Zadarma: Asterisk setup manual

fromdomain=sip.zadarma.com

disallow=all

allow=alaw

allow=ulaw

dtmfmode=auto

secret=password

defaultuser=111111

trunkname=111111

fromuser=111111

callbackextension=111111

context=zadarma-in

qualify=400

directmedia=no

nat=force_rport,comedia

[101] ;the Asterisk extension number

secret=password

host=dynamic

type=friend

context=zadarma-out

Incoming and outgoing routing can be set up in the extensions.conf le

[zadarma-in]

exten => 111111,1, Dial(SIP/101) ; all incoming calls from trunk 111111 are routed

[zadarma-out]

exten => _XXX,1,Dial(SIP/${EXTEN}) ; calls to 3-digit extension numbers of Asterisk

exten => _XXX.,1,Dial(SIP/${EXTEN}@111111) ; calls to numbers with 4 digits or more using the

By continuing to use the site, you consent to the processing of Cookies and personal data. See
more details in our Cookie рolicy page. If you do not want your data to be processed, please leave
the site.

https://zadarma.com/en/support/instructions/asterisk/ 2/7
3/12/2021 Zadarma: Asterisk setup manual

The standard setup is complete.

If you have several active virtual phone numbers, you can "name" each number (for example,
Moscow and London) and set the incoming routing based on this parameter. The virtual phone
number "Name" is displayed in theCALLERID(name) parameter.

In the following example, calls from the number named Moscow are routed to the extension
number 101, and calls from the number named London are routed to the extension number 102.
All other calls will be declined by the Asterisk with a "Busy" tone.

[zadarma-in]

exten => _X.,1,GotoIf($["${CALLERID(name)}" = "moscow"]?2:3)

exten => _X.,2,Dial(SIP/101)

exten => _X.,3,GotoIf($["${CALLERID(name)}" = "london"]?4:5)

exten => _X.,4,Dial(SIP/102)

exten => _X.,5,Busy

Your virtual phone number that received the call will be displayed in the CALLED_DID header. It
is possible to con gure incoming routing based on this parameter.

In the following example, calls from the number 74957776675 are routed to extension number
101, calls from the number 442037691880 are routed to extension number 102 and all other
calls will be declined by the Asterisk with a "Busy" tone.

[zadarma-in]

exten => _X.,1,GotoIf($["${SIP_HEADER(CALLED_DID)}" = "74957776675"]?2:3)

exten => _X.,2,Dial(SIP/101)

exten => _X.,3,GotoIf($["${SIP_HEADER(CALLED_DID)}" = "442037691880"]?4:5)

exten => _X.,4,Dial(SIP/102)

exten => _X.,5,Busy

TheBy
setup is complete.
continuing to use the site, you consent to the processing of Cookies and personal data. See
more details in our Cookie рolicy page. If you do not want your data to be processed, please leave
Example
the site.№2 (SIP URI)

https://zadarma.com/en/support/instructions/asterisk/ 3/7
3/12/2021 Zadarma: Asterisk setup manual

If the Asterisk is located on a "white" IP address (not behind a router, for example in a data
centre), incoming calls can be received without registration by a SIP URI scheme.

Information used in the example:

15555555555 - Your virtual phone number connected to Zadarma.

2.20.190.41 - your Asterisk server IP address.

Go to your personal account, "Settings - Virtual phone numbers" and route the calls from the
virtual number to the external server (SIP URI) using this format: [email protected]

Editing sip.conf

[zadarma]

host=sipurifr.zadarma.com

type=friend

insecure=port,invite

context=zadarma-in

disallow=all

allow=alaw

allow=ulaw

dtmfmode = auto

directmedia=no

nat=force_rport,comedia

[zadarma2]

host=sipurims.zadarma.com

type=friend

insecure=port,invite

context=zadarma-in

disallow=all

allow=alaw

allow=ulaw

dtmfmode = auto

directmedia=no
By continuing to use the site, you consent to the processing of Cookies and personal data. See
nat=force_rport,comedia
more details in our Cookie рolicy page. If you do not want your data to be processed, please leave
the site.
[zadarma3]

https://zadarma.com/en/support/instructions/asterisk/ 4/7
3/12/2021 Zadarma: Asterisk setup manual

host=sipurifr.zadarma.com

type=friend

insecure=port,invite

context=zadarma-in

disallow=all

allow=alaw

allow=ulaw

dtmfmode = auto

directmedia=no

nat=force_rport,comedia

Incoming route is in the extensions.conf le

[zadarma-in]

exten => 15555555555,1, Dial(SIP/101)

The setup is complete.

Setup example using the authorization by IP address.

+44 203 769 18 80 +1 646 980 4741

CONTACT US  ON-LINE CHAT

Zadarma apps

Zadarma on Social Media


By continuing to use the site, you consent to the processing of Cookies and personal data. See
more details in our Cookie рolicy page. If you do not want your data to be processed, please leave
English
the site.

$ - Dollar
https://zadarma.com/en/support/instructions/asterisk/ 5/7
3/12/2021 Zadarma: Asterisk setup manual

SERVICES

Calls
Calls from a computer
Calls from smartphone and tablet
Speech analytics
SIP-trunk
CallBack
Database actualization (HLR lookup)
Phone numbers
Incoming calls forwarding
Porting phone numbers
Business Phone System
Callback button
Click to call button
Call Tracking
SMS
ZCRM
Video conferencing

PRICING

Phone system bundles


Calls
How to choose a plan?
Standard
Economy
Free
Personal unlimited EU
Personal unlimited US
Phone numbers
800 numbers (Toll Free)
SMS

ZADARMA PROJECT

About
Bythe project to use the site, you consent to the processing of Cookies and personal data. See
continuing
Newsmore details in our Cookie рolicy page. If you do not want your data to be processed, please leave
the site.
Zadarma Reviews
VoIP for Business

https://zadarma.com/en/support/instructions/asterisk/ 6/7
3/12/2021 Zadarma: Asterisk setup manual

Become a partner
Terms of Use
Privacy Policy

HELP

How to pay
Setup manual
Integrations
FAQ
Online chat
Support request
API
Blog

By continuing to use the site, you consent to the processing of Cookies and personal data. See
more details in our Cookie рolicy page. If you do not want your data to be processed, please leave
the site.

https://zadarma.com/en/support/instructions/asterisk/ 7/7

You might also like