# SLA Implementation using SIP Trunk Lines

**URL:** <https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922>\
**Category:** Asterisk Support\
**Created:** [July 10, 2008, 8:44am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922 "2008-07-10T08:44:37Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![citapinc](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@citapinc](https://community.asterisk.org/u/citapinc)\
**Post date:** [July 10, 2008, 8:44am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/1 "2008-07-10T08:44:37Z")

</div>

Good day everyone:

I am trying to get SLA implemented in my office for testing purposes and to learn more about it. We are using Trixbox, which is a flavor of Asterisk, with both Linksys SPA942 phones and Aastra 57ict phones. All of our incoming lines are SIP trunks hosted with Teliax with NO ZAP cards or FXO boards.

Based on reading a ton of posts and PDF documents, this is what I have so far:

\*\*\ ***SLA.CONF**  
[general]  
attemptcallerid=no  
ringtimeout=30  
barge=no  
hold=open

[line1]  
type=trunk  
device=SIP/zone  
autocontext=line1

; ---- Station Declarations ------------  
[401]  
type=station  
device=SIP/401  
autocontext=sla\_stations  
ringtimeout=10  
ringdelay=10  
hold=private  
trunk=line1

[402]  
type=station  
device=SIP/402  
autocontext=sla\_stations  
ringtimeout=10  
ringdelay=10  
hold=private  
trunk=line1  
**_End SLA.CONF_**

**_Begin Extensions\_custom.conf_**  
[macro-slaline]  
exten =\> s,1,SLATrunk(${ARG1})  
exten =\> s,n,Goto(s-${SLATRUNK\_STATUS}|1)  
exten =\> s-FAILURE,1,Voicemail(1234|u)  
exten =\> s-UNANSWERED,1,Voicemail(1234|u)

[line1]  
exten =\> s,1,Macro(slaline|line1)

[line1\_outbound]  
exten =\> disa,1,Disa(no-password|line1\_outbound)  
exten =\> \_XXXX,1,Dial(SIP/${EXTEN})  
exten =\> \_1NXXNXXXXXX,1,Dial(Zap/1/${EXTEN})

[sla\_stations]  
exten =\> 401,1,SLAStation(401)  
exten =\> 401\_line1,hint,SLA:401\_line1  
exten =\> 401\_line1,1,SLAStation(401\_line1)  
exten =\> 402,1,SLAStation(402)  
exten =\> 402\_line1,hint,SLA:402\_line1  
exten =\> 402\_line1,1,SLAStation(402\_line1)  
**End Extensions\_custom.con** \*

**Begin Sip\_custom.conf**  
;--------------Zone VOIP Trunk-------------------  
[zone]  
type=peer  
[host=den.teliax.net](http://host=den.teliax.net)

;--------------SIP Devices-----------------------  
[401]  
type=friend  
host=dynamic  
secret=1234  
context=sla\_stations  
qualify=yes

[402]  
type=friend  
host=dynamic  
secret=1234  
context=sla\_stations  
qualify=yes  
**End Sip\_custom.conf**

Right now I can connect a line on either phone to Ext 401 or 402 but not Ext 401\_line1 or 402\_line1 as indicated in several PDF files.

What am I missing to get to this step?

Thanks!

Dean  
Anaheim, CA

---

<div class="post-metadata">

**Author:** ![dufus](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dufus](https://community.asterisk.org/u/dufus)\
**Post date:** [July 10, 2008, 1:26pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/2 "2008-07-10T13:26:44Z")

</div>

Currently, the SLA feature only works with ZAP trunks. It does not support SIP trunks.

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [July 11, 2008, 4:58am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/3 "2008-07-11T04:58:55Z")

</div>

> [@dufus](#):
>
> Currently, the SLA feature only works with ZAP trunks. It does not support SIP trunks.

not true see it right here running with sip trunks.

[youtube.com/watch?v=qvbrnqcSU1A](http://www.youtube.com/watch?v=qvbrnqcSU1A)

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [July 11, 2008, 4:59am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/4 "2008-07-11T04:59:57Z")

</div>

however i am not sure it if itll easily run in trixbox (doesnt that run 1.2 ?)

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [July 11, 2008, 5:03am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/5 "2008-07-11T05:03:21Z")

</div>

post a console of what happens when your phone dials

exten =\> 401\_line1,1,SLAStation(401\_line1)

[quote=“citapinc”]Good day everyone:

I am trying to get SLA implemented in my office for testing purposes and to learn more about it. We are using Trixbox, which is a flavor of Asterisk, with both Linksys SPA942 phones and Aastra 57ict phones. All of our incoming lines are SIP trunks hosted with Teliax with NO ZAP cards or FXO boards.

Based on reading a ton of posts and PDF documents, this is what I have so far:

\*\*\ ***SLA.CONF**  
[general]  
attemptcallerid=no  
ringtimeout=30  
barge=no  
hold=open

[line1]  
type=trunk  
device=SIP/zone  
autocontext=line1

; ---- Station Declarations ------------  
[401]  
type=station  
device=SIP/401  
autocontext=sla\_stations  
ringtimeout=10  
ringdelay=10  
hold=private  
trunk=line1

[402]  
type=station  
device=SIP/402  
autocontext=sla\_stations  
ringtimeout=10  
ringdelay=10  
hold=private  
trunk=line1  
**_End SLA.CONF_**

**_Begin Extensions\_custom.conf_**  
[macro-slaline]  
exten =\> s,1,SLATrunk(${ARG1})  
exten =\> s,n,Goto(s-${SLATRUNK\_STATUS}|1)  
exten =\> s-FAILURE,1,Voicemail(1234|u)  
exten =\> s-UNANSWERED,1,Voicemail(1234|u)

[line1]  
exten =\> s,1,Macro(slaline|line1)

[line1\_outbound]  
exten =\> disa,1,Disa(no-password|line1\_outbound)  
exten =\> \_XXXX,1,Dial(SIP/${EXTEN})  
exten =\> \_1NXXNXXXXXX,1,Dial(Zap/1/${EXTEN})

[sla\_stations]  
exten =\> 401,1,SLAStation(401)  
exten =\> 401\_line1,hint,SLA:401\_line1  
exten =\> 401\_line1,1,SLAStation(401\_line1)  
exten =\> 402,1,SLAStation(402)  
exten =\> 402\_line1,hint,SLA:402\_line1  
exten =\> 402\_line1,1,SLAStation(402\_line1)  
**End Extensions\_custom.con** \*

**Begin Sip\_custom.conf**  
;--------------Zone VOIP Trunk-------------------  
[zone]  
type=peer  
[host=den.teliax.net](http://host=den.teliax.net)

;--------------SIP Devices-----------------------  
[401]  
type=friend  
host=dynamic  
secret=1234  
context=sla\_stations  
qualify=yes

[402]  
type=friend  
host=dynamic  
secret=1234  
context=sla\_stations  
qualify=yes  
**End Sip\_custom.conf**

Right now I can connect a line on either phone to Ext 401 or 402 but not Ext 401\_line1 or 402\_line1 as indicated in several PDF files.

What am I missing to get to this step?

Thanks!

Dean  
Anaheim, CA[/quote]

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [July 11, 2008, 5:05am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/6 "2008-07-11T05:05:02Z")

</div>

post a console of what happens when your phone dials

exten =\> 401\_line1,1,SLAStation(401\_line1)

[quote=“citapinc”]Good day everyone:

I am trying to get SLA implemented in my office for testing purposes and to learn more about it. We are using Trixbox, which is a flavor of Asterisk, with both Linksys SPA942 phones and Aastra 57ict phones. All of our incoming lines are SIP trunks hosted with Teliax with NO ZAP cards or FXO boards.

Based on reading a ton of posts and PDF documents, this is what I have so far:

\*\*\ ***SLA.CONF**  
[general]  
attemptcallerid=no  
ringtimeout=30  
barge=no  
hold=open

[line1]  
type=trunk  
device=SIP/zone  
autocontext=line1

; ---- Station Declarations ------------  
[401]  
type=station  
device=SIP/401  
autocontext=sla\_stations  
ringtimeout=10  
ringdelay=10  
hold=private  
trunk=line1

[402]  
type=station  
device=SIP/402  
autocontext=sla\_stations  
ringtimeout=10  
ringdelay=10  
hold=private  
trunk=line1  
**_End SLA.CONF_**

**_Begin Extensions\_custom.conf_**  
[macro-slaline]  
exten =\> s,1,SLATrunk(${ARG1})  
exten =\> s,n,Goto(s-${SLATRUNK\_STATUS}|1)  
exten =\> s-FAILURE,1,Voicemail(1234|u)  
exten =\> s-UNANSWERED,1,Voicemail(1234|u)

[line1]  
exten =\> s,1,Macro(slaline|line1)

[line1\_outbound]  
exten =\> disa,1,Disa(no-password|line1\_outbound)  
exten =\> \_XXXX,1,Dial(SIP/${EXTEN})  
exten =\> \_1NXXNXXXXXX,1,Dial(Zap/1/${EXTEN})

[sla\_stations]  
exten =\> 401,1,SLAStation(401)  
exten =\> 401\_line1,hint,SLA:401\_line1  
exten =\> 401\_line1,1,SLAStation(401\_line1)  
exten =\> 402,1,SLAStation(402)  
exten =\> 402\_line1,hint,SLA:402\_line1  
exten =\> 402\_line1,1,SLAStation(402\_line1)  
**End Extensions\_custom.con** \*

**Begin Sip\_custom.conf**  
;--------------Zone VOIP Trunk-------------------  
[zone]  
type=peer  
[host=den.teliax.net](http://host=den.teliax.net)

;--------------SIP Devices-----------------------  
[401]  
type=friend  
host=dynamic  
secret=1234  
context=sla\_stations  
qualify=yes

[402]  
type=friend  
host=dynamic  
secret=1234  
context=sla\_stations  
qualify=yes  
**End Sip\_custom.conf**

Right now I can connect a line on either phone to Ext 401 or 402 but not Ext 401\_line1 or 402\_line1 as indicated in several PDF files.

What am I missing to get to this step?

Thanks!

Dean  
Anaheim, CA[/quote]

---

<div class="post-metadata">

**Author:** ![dufus](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dufus](https://community.asterisk.org/u/dufus)\
**Post date:** [July 11, 2008, 12:35pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/7 "2008-07-11T12:35:47Z")

</div>

If you look at the website for Alohatone, they are doing IP-PRI services. Not SIP trunks.

That’s why their service can do SLA. A PRI channel can be used to do SLA on Asterisk.

With SLA, a trunk channel is specifically tied to the line appearances of specific phones. When that trunk channel is in service, it creates hints for all of the phones that are connected so that they can be aware of the call state and progress.

It’s possible to do that since with a ZAP or PRI channel, there can be only 1 call in progress on any given channel. With SIP channels, that’s not true. You can send as many SIP invites as you like or have capacity to handle on your IP connection. The single call limitation doesn’t exist, so it’s possible to send 2 or more calls that would have arrived on “line 1”. This creates significant issues with line button states and updates. Which button do you tell to stop flashing if the second or third call ends?

This is primarily why the SLA feature is not supported for SIP channels in Asterisk, and is only supported for ZAP channels. SIP doesn’t have the limitations that a single phone line would have, and doesn’t work the same way.

---

<div class="post-metadata">

**Author:** ![Anisha\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@Anisha\_Gupta](https://community.asterisk.org/u/Anisha_Gupta)\
**Post date:** [July 11, 2008, 1:55pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/8 "2008-07-11T13:55:03Z")

</div>

Hi,

We are looking for a top-notch Asterisk System Architect, an expert. Not someone who has merely used configured or deployed Asterisk. Client is now looking at how to build products with it for their demanding customer environments.

They really need an expert, someone who

- can change the internals (for example to support private lines)
  - this requires C programming

- has AGI and other scripting expertise
- has configured it to use a relational database
- has used SIP proxies with Asterisk
- can scale asterisk to multiple, distributed instances
- has built high availability solutions

Total 10+ yrs of IT experience  
Status: H1/GC/US Citizen  
Rate: DOE  
Contracting position.  
Location: NY  
No need of F2F, Only telephonic screening.  
Duration: Long term

Contact [Anisha.gupta@SystemGuru.com](mailto:Anisha.gupta@SystemGuru.com)

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [July 11, 2008, 6:22pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/9 "2008-07-11T18:22:47Z")

</div>

I assure you that the demo that you are seeing is OF SIP TRUNKs… You just need to treat the SIP trunks like channels and AS the provider we only send 1 call per sip trunk for people that want SLA

the SLA itself can be done with sip trunking. The video is of phones connected to an asterisk server that is SIP trunked to our us. The trick is as a provider to set the call limit (channel limit I dont remember right now) setting in sip.conf and say for 4 lines your need 4 sip accounts that work in a rotary

Simply emulate “Phone lines” with 1 channel sip accounts and write some smart dialplan logic and it works 100%.

[quote=“dufus”]If you look at the website for Alohatone, they are doing IP-PRI services. Not SIP trunks.

That’s why their service can do SLA. A PRI channel can be used to do SLA on Asterisk.

With SLA, a trunk channel is specifically tied to the line appearances of specific phones. When that trunk channel is in service, it creates hints for all of the phones that are connected so that they can be aware of the call state and progress.

It’s possible to do that since with a ZAP or PRI channel, there can be only 1 call in progress on any given channel. With SIP channels, that’s not true. You can send as many SIP invites as you like or have capacity to handle on your IP connection. The single call limitation doesn’t exist, so it’s possible to send 2 or more calls that would have arrived on “line 1”. This creates significant issues with line button states and updates. Which button do you tell to stop flashing if the second or third call ends?

This is primarily why the SLA feature is not supported for SIP channels in Asterisk, and is only supported for ZAP channels. SIP doesn’t have the limitations that a single phone line would have, and doesn’t work the same way.[/quote]

---

<div class="post-metadata">

**Author:** ![riddlebox](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@riddlebox](https://community.asterisk.org/u/riddlebox)\
**Post date:** [July 11, 2008, 10:28pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/10 "2008-07-11T22:28:30Z")

</div>

I implented SLA on a customers system and found that it was slow and did not work that well, I taught them how to use a parking, and I created a park button for them, so they press transfer and then park, I also have 4 parking lot buttons on their phones, so when you transfer a call to park(700) if it appears on 701, their light lights up. It works perfectly

---

<div class="post-metadata">

**Author:** ![808blogger](https://avatars.discourse-cdn.com/v4/letter/8/b5e925/32.png) [@808blogger](https://community.asterisk.org/u/808blogger)\
**Post date:** [July 11, 2008, 10:59pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/11 "2008-07-11T22:59:30Z")

</div>

I agree 100% sla is not as good as parking lots with hints

> [@riddlebox](#):
>
> I implented SLA on a customers system and found that it was slow and did not work that well, I taught them how to use a parking, and I created a park button for them, so they press transfer and then park, I also have 4 parking lot buttons on their phones, so when you transfer a call to park(700) if it appears on 701, their light lights up. It works perfectly

---

<div class="post-metadata">

**Author:** ![citapinc](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@citapinc](https://community.asterisk.org/u/citapinc)\
**Post date:** [July 19, 2008, 11:59pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/12 "2008-07-19T23:59:55Z")

</div>

> [@808blogger](#):
>
> The trick is as a provider to set the call limit (channel limit I dont remember right now) setting in sip.conf and say for 4 lines your need 4 sip accounts that work in a rotary

Now that makes perfect sense to me! I’ll have to call cBeyond to see if they can create 6 separate SIP accounts each with 1 channel instead of 1 SIP account with 6 channels.

[quote=“dufus”]With SLA, a trunk channel is specifically tied to the line appearances of specific phones. When that trunk channel is in service, it creates hints for all of the phones that are connected so that they can be aware of the call state and progress.

It’s possible to do that since with a ZAP or PRI channel, there can be only 1 call in progress on any given channel. With SIP channels, that’s not true. You can send as many SIP invites as you like or have capacity to handle on your IP connection. The single call limitation doesn’t exist, so it’s possible to send 2 or more calls that would have arrived on “line 1”. This creates significant issues with line button states and updates. Which button do you tell to stop flashing if the second or third call ends?  
[/quote]

That makes total sense to me. Now that you’ve outlined what is exactly going on, I can take this to the next step.

I’ll keep everyone updated as I move forward with this project.

Dean Penderghast

---

<div class="post-metadata">

**Author:** ![citapinc](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@citapinc](https://community.asterisk.org/u/citapinc)\
**Post date:** [July 20, 2008, 12:02am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/13 "2008-07-20T00:02:30Z")

</div>

> [@riddlebox](#):
>
> I implented SLA on a customers system and found that it was slow and did not work that well, I taught them how to use a parking, and I created a park button for them, so they press transfer and then park, I also have 4 parking lot buttons on their phones, so when you transfer a call to park(700) if it appears on 701, their light lights up. It works perfectly

In this customer’s case, that won’t work. They want to have 4 cordless phones in their store all showing the status of a line. My goal was to get the Lines 1-4 on the Aastra 57ict phones to be linked to 4 SLA lines, but it looks like that will require a lot more testing.

Trust me, if this was 4 desktop phones I’d have them up and running in a heart beat. It’s just that the Aastra cordless phones are really limited on what they can do so I’m stuck for now.

Thanks!

---

<div class="post-metadata">

**Author:** ![citapinc](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@citapinc](https://community.asterisk.org/u/citapinc)\
**Post date:** [July 20, 2008, 12:03am UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/14 "2008-07-20T00:03:06Z")

</div>

> [@riddlebox](#):
>
> I implented SLA on a customers system and found that it was slow and did not work that well, I taught them how to use a parking, and I created a park button for them, so they press transfer and then park, I also have 4 parking lot buttons on their phones, so when you transfer a call to park(700) if it appears on 701, their light lights up. It works perfectly

In this customer’s case, that won’t work. They want to have 4 cordless phones in their store all showing the status of a line. My goal was to get the Lines 1-4 on the Aastra 57ict phones to be linked to 4 SLA lines, but it looks like that will require a lot more testing.

Trust me, if this was 4 desktop phones I’d have them up and running in a heart beat. It’s just that the Aastra cordless phones are really limited on what they can do so I’m stuck for now.

Thanks!

---

<div class="post-metadata">

**Author:** ![citapinc](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@citapinc](https://community.asterisk.org/u/citapinc)\
**Post date:** [July 20, 2008, 5:35pm UTC](https://community.asterisk.org/t/sla-implementation-using-sip-trunk-lines/21922/15 "2008-07-20T17:35:25Z")

</div>

[quote=“808blogger”]I assure you that the demo that you are seeing is OF SIP TRUNKs… You just need to treat the SIP trunks like channels and AS the provider we only send 1 call per sip trunk for people that want SLA  
[/quote]

808blogger: Right now I am stuck on the phone side of the installation. If I setup a line on the Aastra phone to look at the extention called station1 with password 1234, it shows that extention is there. But if I look at station1\_line1 with password 1234, it doesn’t show that extention exists.

Therefore on your phones did you have each button look at each sub-extention directly (ie station1\_line1, station1\_line2, etc…) as an extention on the phone system, or is each button simply looking at the status of each sub-extention via BLA?

Thanks!

Dean  
Anaheim, CA
