site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
1255
Share Topic
Posting?
Post a:
Post a:
Links: ·ALL ·Review Your VoIP Provider ·VoIP Providers ·VoIP FAQ ·Porting Rules ·What Codec?
page: 1 · 2
AuthorAll Replies


wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

[Asterisk] Trying to configure my Linksys PAP2 with Asterisk

I am running FreePBX and I am trying to incorporate my PAP2 into the mix. Currently one of the lines is configured with a Broadvoice account, and I plan on keeping it separate from the Asterisk deployment. The second line is configured as an extension of the PBX. Line 1 is connected to a cordless phone, and my issue is I dont have a second phone to connect to Line 2. Is there any way for me to either:

1) Have one line of the PAP2 associated with both Asterisk and the VoIP provider?

2) Have any inbound (internal) calls from other extensions of the PBX to Line 2 ring to Line 1? This is really my preferred situation so I am hoping its possible!
--
"No you won't" -The American people to President Obama (11/2/2010)



andrewhaji
Premium
join:2002-03-02
North York, ON
Reviews:
·Bell Sympatico
·TekSavvy Cable

I'm not that familiar with BroadVoice, but why wouldn't you want to set it up as a trunk on your Asterisk box? Then your PAP2T would only need to connect to the Asterisk server.

You can use inbound rules to make sure any incoming calls on the BroadVoice account only go to that one line.



wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

said by andrewhaji:

I'm not that familiar with BroadVoice, but why wouldn't you want to set it up as a trunk on your Asterisk box? Then your PAP2T would only need to connect to the Asterisk server.

You can use inbound rules to make sure any incoming calls on the BroadVoice account only go to that one line.

Unfortunately the Broadvoice line on the PAP2 is the wife's "home number". She will NOT be happy if I do any sort of "testing" with it that might mean she misses a call from her mother! Since I am an avid tinkerer this means there is probably a good chance the line would be up and down if I put it on the Asterisk. As such I need to leave it is....
--
"No you won't" -The American people to President Obama (11/2/2010)


Stewart

join:2005-07-13
kudos:14

You should be able to make this work. Set up the PAP2 with a static local IP address. Configure an extension on Asterisk that matches the Broadvoice user ID and password, with a hard-coded local IP address, so the PAP2 won't have to register there.

Incoming calls sent to that extension should ring the PAP2 with no problem. Then, set up the PAP2 dial plan to route some patterns to the static private IP address of Asterisk. You can probably work out a plan that won't require a timeout (or dialing #) for internal or domestic calls. For example, 01+extension (internal); 0+areacode+number (domestic); 00+countrycode+number (international). Assuming that you don't have extension numbers beginning with 1 (or if you do, have the 01 include that), then this should not conflict with the Broadvoice patterns.



wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

said by Stewart:

You should be able to make this work. Set up the PAP2 with a static local IP address. Configure an extension on Asterisk that matches the Broadvoice user ID and password, with a hard-coded local IP address, so the PAP2 won't have to register there.

Hmm, I am reading the above and not 100% following it. Asterisk extensions arent setup directly with the SIP provider (to my knowledge). Typically you setup your trunks and routes with that info, and then the extension just points the device/softphone/etc. back to the PBX itself. Am I missing something?

Additionally even if the above scenario was in place it would still mean that if the Asterisk box was unavailable then the Broadvoice account would also be unavailable. By leaving that registration with the PAP2 I eliminate any chance that my messing around with the PBX would get in the way of the wife's use of that 'line'.
--
"No you won't" -The American people to President Obama (11/2/2010)


Stewart

join:2005-07-13
kudos:14

The PAP2 registers with Broadvoice normally -- it won't be registering to Asterisk at all.

Incoming calls from Asterisk intended for the PAP2 will be sent there by having the PAP2's IP address hard-coded in the sip.conf file.

Outgoing calls to Asterisk will be sent by having some PAP2 Dial Plan entries hard-coded to the static private IP address of the Asterisk box. However, Asterisk will still try to authenticate the call (and the PAP2 has no other credentials), so Asterisk should be set up to accept the Broadvoice user ID and password.



wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

said by Stewart:

The PAP2 registers with Broadvoice normally -- it won't be registering to Asterisk at all.

Incoming calls from Asterisk intended for the PAP2 will be sent there by having the PAP2's IP address hard-coded in the sip.conf file.

Outgoing calls to Asterisk will be sent by having some PAP2 Dial Plan entries hard-coded to the static private IP address of the Asterisk box. However, Asterisk will still try to authenticate the call (and the PAP2 has no other credentials), so Asterisk should be set up to accept the Broadvoice user ID and password.

This sounds plausible but I am having trouble implementing it. Can you try to explain the details again? I want to make sure I totally understand before I start making these modifications.
--
"No you won't" -The American people to President Obama (11/2/2010)



espaeth
Digital Plumber
Premium,MVM
join:2001-04-21
Minneapolis, MN
kudos:2
Reviews:
·Clear Wireless

It should be noted that in order for this to work, "Restrict Source IP" needs to be set to "no" on the PAP2. If you are forwarding port 5060 in at your PAP2 from the Internet, that means that anyone who stumbles across your pap2 in a scan can ring your phone.

See: »[Future9] Future-Nine oddities


Stewart

join:2005-07-13
kudos:14

said by espaeth:

It should be noted that in order for this to work, "Restrict Source IP" needs to be set to "no" on the PAP2. ...

Sure, but there is no reason to use port 5060, and (unless your router is problematic with Boradvoice) there is no reason to forward the port.

Stewart

join:2005-07-13
kudos:14

reply to wifi4milez

said by wifi4milez:

Can you try to explain the details again? I want to make sure I totally understand before I start making these modifications.

Sorry, I can't, because I know nothing about FreePBX. However, if you get sip.conf for the extension to have host=192.168.1.123, where 192.168.1.123 is the static private IP address of the PAP2, then calls to the extension should ring the PAP2. For outgoing, you might start with a speed dial. Turn on Enable IP Dialing in the PAP2 and set e.g. Speed Dial 2 to e.g. 18004377950@192.168.1.124, where 192.168.1.124 is the static private IP address of your Asterisk. Then, dialing 2# should call 1-800-437-7950. If it doesn't, there should be console or log output pointing to the problem (authentication, context, etc.)

Sorry that I don't know enough to be more specific.


wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

said by Stewart:

said by wifi4milez:

Can you try to explain the details again? I want to make sure I totally understand before I start making these modifications.

Sorry, I can't, because I know nothing about FreePBX. However, if you get sip.conf for the extension to have host=192.168.1.123, where 192.168.1.123 is the static private IP address of the PAP2, then calls to the extension should ring the PAP2.

So I tried the above and it is still not working. How to I specify which line on the PAP2 for the inbound (internal) SIP calls to be sent to? Right now Line 2 on the PAP2 is registered as extension 300 on Asterisk. Line 1 is hard coded with Broadvoice. So any calls to extension 300 ring on Line 2. My issue remains that Line 1 has the phone attached to it so inbound (internal) calls to extension 300 "ring" but but I cant pick them up since there is no device attached to the jack. Any other thoughts?
--
"No you won't" -The American people to President Obama (11/2/2010)


Stewart

join:2005-07-13
kudos:14

In a typical PAP2 setup, SIP Port is set differently for the two lines. An incoming call will ring the line corresponding to the port to which it is sent.

Possibly, the Line 2 extension is confusing things; try unregistering it (just set Register to no in the PAP2). Then, set up a new extension with host pointing to the PAP2. If it doesn't work, see what SIP is being sent out (if none, there should be an obvious error in the console log) and what response, if any, is being returned by the PAP2.


A_VoIPer

join:2009-11-04

4 edits

reply to wifi4milez
I like to tinker with my PBX and want to make sure I don’t accidently impact my ATA, so I’ve tried different setups. I originally took the extension path making one with matching username/password, but I currently have some characters in my primary username and sadly, FreePBX doesn’t allow characters in an extension. So, I now use a trunk for calls from the ATA and a custom extension for calls to the ATA. I’m sure there’s many ways to accomplish what you want, but below is something that should work for you.

As an example, let’s assume the following:
Your ATA is set with an IP of 10.1.1.2 and your line is using port 5061 and the primary user is 12345_ATA. And your PBX is 10.1.1.3 and the bindport is 5080. You dial #9 then phone number (and then # to avoid any delays) to route from the ATA to the PBX. Calls to extension 4444 on your PBX go to the ATA.

On your ATA, modify your dialplan to include the following:
|<#9,:>[x*].<:@10.1.1.3:5080>|

On your PBX, to allow a connection from the ATA, create a SIP trunk with a name of your choice and include the following peer details (since my ATA and PBX is isolated, I authenticate based on IP and port):

host=10.1.1.2
port=5061
type=friend
callerid=PAP2 ATA <4444>
nat=yes ;might not be needed, depending on your network
insecure=port,invite
context=from-internal

»www.voip-info.org/wiki/view/Aste···sip.conf is a good wiki for Asterisk settings.

For calls to extension 4444, setup a custom device. In the device options section, use the following dial string:

SIP/12345_ATA@10.1.1.2:5061



wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

said by A_VoIPer:

As an example, let’s assume the following:
Your ATA is set with an IP of 10.1.1.2

Thank you for this idea. First, is this IP static or can it be assigned by DHCP?

said by A_VoIPer:

On your ATA, modify your dialplan to include the following:
|<#9,:>[x*].<:@10.1.1.3:5080|

Does it matter which line (Line 1 or Line 2) I change the dialplan on? I dont have any experience modifying the PAP2 dialer plans, here is what it is currently set to:
(*xx|#xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)
Do I simply add your entry to the end of what is there now?

--
"No you won't" -The American people to President Obama (11/2/2010)



nunya
Who is John Galt?
Premium,MVM
join:2000-12-23
O Fallon, MO
kudos:5
Reviews:
·Charter
·voip.ms

reply to wifi4milez
The easiest and simplest solution for tinkering is to go buy a cheap phone for $10 at Walmart.
This is very foreign to me, as I have been using asterisk for the better part of a decade - to me the PAP2 is simply an extension device of the * server, and nothing more (not involved with any outside provider).
So, I had to think about it for a few minutes. Whatever you do will only be temporary. Once you get comfy with asterisk, you are going to put all your trunks on the * server and use the PAP2 as an ATA for the * only.

Does Broadvoice have inbound SIP uri? Many providers do b/c inbound SIP uri is of little cost to them compared to inbound calls from POTS.

What you do is set up an extension in asterisk that forwards to the sip uri to reach your Broadvoice account. KISS.

The drawback is that you will only have inward calls from your * server, but not outbound. It's basically like "call forwarding".

If you want to really KISS, you can just set up an extension to forward to your BV number. You will be using minutes and a channel though.
As a "for instance": for after hours emergency calls, I have two extensions set up. One with my cell number, and one with my wifes cell number. If someone calls and has an emergency, the * server rings our cell phones just like regular extensions. The call is using minutes and 3 channels, but my customers can reach me.
--
...because I care.


A_VoIPer

join:2009-11-04

reply to wifi4milez

said by wifi4milez:

Thank you for this idea. First, is this IP static or can it be assigned by DHCP?

If you want to eliminate the chance of it changing, I recommend setting it to static or if your router/DHCP server has the option, have it always dish out the same IP each time it asks for an address.

Does it matter which line (Line 1 or Line 2) I change the dialplan on? I dont have any experience modifying the PAP2 dialer plans, here is what it is currently set to:
(*xx|#xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)
Do I simply add your entry to the end of what is there now?

You only need to add it to the line where you want the #9 option available. Since no other entries should match #9 then a phone number, it shouldn't matter where you put it. Note, I had a typo and missed the closing > and you won't need the last | if it's at the end. Also, when posting dial plans here, make sure you use the <code> or [code] option (shown on the right side while editing) to avoid it possibly getting mangled.


wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

reply to nunya

said by nunya:

The easiest and simplest solution for tinkering is to go buy a cheap phone for $10 at Walmart.

I actually have an older corded phone that I use for all my Asterisk testing. The thing is I am hoping to integrate Asterisk with the wireless phone to keep the clutter to a minimum! Two phones sitting next to each other in the living room and I will never hear the end of it....

said by nunya:

Whatever you do will only be temporary. Once you get comfy with asterisk, you are going to put all your trunks on the * server and use the PAP2 as an ATA for the * only.

Trust me, this is not by design! I installed my Asterisk box almost two years ago however I need to keep the Broadvoice line separate since my wife uses it. It MUST be available 100% of the time and it seems she wants to talk on the phone at the same time I like to make configuration changes to the PBX. This would inevitably lead to some sort of an argument, so in order to keep the peace Broadvoice must remain on the PAP2 (for now).

said by nunya:

Does Broadvoice have inbound SIP uri? Many providers do b/c inbound SIP uri is of little cost to them compared to inbound calls from POTS.

What you do is set up an extension in asterisk that forwards to the sip uri to reach your Broadvoice account. KISS.

Awesome idea! Unfortunately after reading that I found out Broadvoice blocks inbound SIP calls. They dont seem to want to make this easy for me....

The drawback is that you will only have inward calls from your * server, but not outbound. It's basically like "call forwarding".

said by nunya:

If you want to really KISS, you can just set up an extension to forward to your BV number. You will be using minutes and a channel though.
As a "for instance": for after hours emergency calls, I have two extensions set up. One with my cell number, and one with my wifes cell number. If someone calls and has an emergency, the * server rings our cell phones just like regular extensions. The call is using minutes and 3 channels, but my customers can reach me.

This is how I used to have my cell phone setup. It feels like "cheating" using this method, especially since I know I can get the Asterisk box to work if I keep messing with it. Thanks for the suggestions, I will continue to puzzle through this until I get it working.
--
"No you won't" -The American people to President Obama (11/2/2010)



wifi4milez
Big Russ, 1918 to 2008. Rest in Peace

join:2004-08-07
New York, NY

reply to A_VoIPer

said by A_VoIPer:

As an example, let’s assume the following:
Your ATA is set with an IP of 10.1.1.2 and your line is using port 5061 and the primary user is 12345_ATA.

Perhaps this is where I am missing a setting. When you say the "primary user is 12345_ATA" how do I quantify that? I am supposed to find a specific name for the ATA and use it here?

said by A_VoIPer:

On your PBX, to allow a connection from the ATA, create a SIP trunk with a name of your choice and include the following peer details (since my ATA and PBX is isolated, I authenticate based on IP and port):

host=10.1.1.2
port=5061
type=user
callerid=PAP2 ATA <4444>
nat=yes ;might not be needed, depending on your network
insecure=port,invite
context=from-internal

Done.

said by A_VoIPer:

For calls to extension 4444, setup a custom device. In the device options section, use the following dial string:

SIP/12345_ATA@10.1.1.2:5061

Also done, but without success. Perhaps this is related to my question about regarding the naming convention of the ATA?

--
"No you won't" -The American people to President Obama (11/2/2010)


Dan_voip

join:2007-01-03
Saint-Hubert, QC
kudos:3

If your PAP2 is V1 you can load the firmware for SPA1001 and you'll have 2 lines (1 for Asterisk and the other for Broadvoice) using just 1 phone plugged in the port 1.


A_VoIPer

join:2009-11-04

1 edit

reply to wifi4milez

said by wifi4milez:

Perhaps this is where I am missing a setting. When you say the "primary user is 12345_ATA" how do I quantify that? I am supposed to find a specific name for the ATA and use it here?

I don't have a PAP (I use an SPA2102), but I'd expect the menus to be similar. On settings for your line, there should be an entry for User ID and/or Auth ID (this is likely set as your Broadvoice SIP account number). On that same menu, you'll also likely find a setting for the SIP port. These are the key settings that need to match in your PBX configuration.

BTW, it looks like I had the wrong type set in the config. I tested with type=user and applied it via the WebUI, but that didn't clear what was cached. I think you'll want type=friend to avoid sending a fake auth rejection back. Note to self, applying changes from the WebUI isn't always a valid test.

Monday, 04-Jun 02:24:40 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics