Koozali.org: home of the SME Server

Making Outgoing calls (PSTN)

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Making Outgoing calls (PSTN)
« on: July 26, 2008, 11:54:36 PM »
Hi

I've got one PTSN line connected to a spa3102. Incoming calls are working fine. But i can't make any outgoing calls (probably due to miss configuration on my side). I suppose i have to create a Route first, but I have no idea what the Route Dial Plans should look like. I tried some examples i found on the forum and on the net with no success. All I get is an engaged tone (which sounds like my telecommunications company's engaged tone). Is there any documentation available that will help me understand dialling plans? Do I also have to set a dialling plan on the 3102's web based configuration or just in SAIL?

Offline ronaldson40

  • ****
  • 96
  • +0/-0
Re: Making Outgoing calls (PSTN)
« Reply #1 on: July 27, 2008, 12:13:24 AM »
Hey
I was also in the same situation as you 2 weeks earlier. I also have a SPA3102 configured for incoming and outgoing calls.

All dial plans in Sail start with the "_" character and multiple dialplans over a single route is done by placing a space " " character between each dial pattern

For example,
My Local area number is a seven digit no and my mobile numbers have a prefixes of 050 + 7 digits and 055 + 7 digits. If I want a particular cluster (you can create admin groups with clusters) say "default" to dial only local numbers and mobiles with prefix 055, then my dialplan will look like this

Code: [Select]
_XXXXXXX _055XXXXXXXNotice the space between X and _

Now for the engaged part, this is happening because your Line1 dialplan is configured wrongly
For my situation, I have used the following dialplan (this is listed on the linksys website)

Code: [Select]
(xx.|<#9,:>xx.<:@gw0>)
Note : Make sure, your SPA3102 is registered and you can see its IP address, both under the Trunks section and the extensions section....

For more information, read my earlier post....

http://forums.contribs.org/index.php?topic=41515.msg193789#msg193789

My advice is,firstly, configure the SPA3102 as per the linksys wiki and then feed in the values posted on the selintra docs...
Regards
Ronald
« Last Edit: July 27, 2008, 12:22:53 AM by ronaldson40 »

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Making Outgoing calls (PSTN)
« Reply #2 on: July 27, 2008, 12:31:36 AM »
Thanx for the reply, I read that post before. I just changed my line 1 dial plan to "(xx.|<#9,:>xx.<:@gw0>)" and created a route with a dial plan "_XXXXXXXXXX" cause both our land line and mobile numbers is 10 digit numbers. But no joy. i still get the same engaged tone.


Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Making Outgoing calls (PSTN)
« Reply #3 on: July 27, 2008, 02:43:18 AM »
I am sure that the problem lies in the config of the spa3102. I installed asterisk-sounds and now instead of the engaged tone i get a voice that says "we're sorry, please hang up and try again". But only if the dialed number matches the route dial plan setup in routes. Otherwise i only get an engaged tone.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Making Outgoing calls (PSTN)
« Reply #4 on: July 29, 2008, 08:18:42 AM »
OK, now I am not so sure anymore. When I unplug the spa3102 completely the results stays exactly the same. How can i see if asterisk attempted to use the trunk?

Offline ronaldson40

  • ****
  • 96
  • +0/-0
Re: Making Outgoing calls (PSTN)
« Reply #5 on: July 31, 2008, 12:54:08 PM »
Hi Gert

Try this site for more info on Dial Plans
http://www.netphonedirectory.com/pap2_dialplan.htm

Offline ronaldson40

  • ****
  • 96
  • +0/-0
Re: Making Outgoing calls (PSTN)
« Reply #6 on: July 31, 2008, 01:01:56 PM »
Regarding checking whether Asterisk has used the trunk, check the Asterisk cli by ssh-ing into your sme as root and typing asterisk -rvvvvv at the command prompt.

Once you see the asterisk CLI (SME*CLI>), try calling again using your phone and check the diagnostic messages and try analysing it... if you want you can post it for selintra to look at it.

Regards
Ronald

Note: If you want to post your SPA3102 config here, use a tool called SPACONF - http://www.opensky.ca/~jdhildeb/software/spaconf/
« Last Edit: July 31, 2008, 01:04:52 PM by ronaldson40 »

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Making Outgoing calls (PSTN)
« Reply #7 on: July 31, 2008, 02:22:14 PM »
Hi

Here is my console output:

Code: [Select]
[root@terraserv ~]# asterisk -rvvvvv
Asterisk 1.4.21.1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.21.1 currently running on terraserv (pid = 15088)
Verbosity is at least 5
    -- Executing [0126631666@internal:1] AGI("SIP/5000-08d37b98", "selintra|OutCluster|0126631666") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing [0126631666@default:1] AGI("SIP/5000-08d37b98", "selintra|OutRoute|telkom") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (SIP/0126631666@0126542873)
    -- Called 0126631666@0126542873
    -- SIP/0126542873-08d3dff0 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- AGI Script Executing Application: (Background) Options: (were-sorry)
    -- <SIP/5000-08d37b98> Playing 'were-sorry' (language 'en')
    -- AGI Script Executing Application: (Background) Options: (call-cannot-complete)
[Jul 31 14:17:02] WARNING[15487]: file.c:602 ast_openstream_full: File call-cannot-complete does not exist in any format
[Jul 31 14:17:02] WARNING[15487]: file.c:912 ast_streamfile: Unable to open call-cannot-complete (format 0x8 (alaw)): No such file or directory
[Jul 31 14:17:02] WARNING[15487]: pbx.c:5722 pbx_builtin_background: ast_streamfile failed on SIP/5000-08d37b98 for call-cannot-complete
    -- AGI Script Executing Application: (Background) Options: (please-hang-up-and-try-again)
    -- <SIP/5000-08d37b98> Playing 'please-hang-up-and-try-again' (language 'en')
    -- AGI Script selintra completed, returning 0
  == Auto fallthrough, channel 'SIP/5000-08d37b98' status is 'CONGESTION'
    -- Executing [h@default:1] Hangup("SIP/5000-08d37b98", "") in new stack
  == Spawn extension (default, h, 1) exited non-zero on 'SIP/5000-08d37b98'
    -- Got SIP response 400 "Bad Request" back from 41.208.50.176
[Jul 31 14:19:10] WARNING[15098]: chan_sip.c:12892 handle_response: Remote host can't match request NOTIFY to call '4fb813c2325a5e4e5c1c320363509d7c@41.240.179.218'. Giving up.

Offline ronaldson40

  • ****
  • 96
  • +0/-0
Re: Making Outgoing calls (PSTN)
« Reply #8 on: July 31, 2008, 09:27:53 PM »
The diagnostic messages look similar to mine....( in my earlier post)

So I think your SPA3102 is configured wrongly.

First, reset it to factory settings and follow the Linksys guide for setting up inbound and outbound calls as mentioned in my earlier post....

Secondly, make sure you have the following settings under Line1 and PSTN tab
Code: [Select]
Line1 Tab:
--------------
Line Enable : Yes
....Proxy and Registration
    ----> Proxy : Your asterisk IP
    ---->  Outbound Proxy : Your asterisk IP
    ---->  Use Outbound Proxy : YEs
    ---->  Use OB Proxy In Dialog: yes 
    ---->  Register: yes 
    ---->  Make Call Without Reg: no 

......Subscriber information:

Display Name: 5000
User ID: 5000  
Password: Your extension password
Use Auth ID: no

... Dial Plan 
Dial Plan:  (xx.|<#9,:>xx.<:@gw0>)
Enable IP Dialing: no 
  

=====PSTN TAB

Line Enable : Yes
....Proxy and Registration
    ----> Proxy : Your asterisk IP
    ---->  Outbound Proxy : empty
    ---->  Use Outbound Proxy : no
    ---->  Use OB Proxy In Dialog: yes 
    ---->  Register: yes 
    ---->  Make Call Without Reg: yes 

......Subscriber information:

Display Name: 0126542873 --> The number you used under trunk line..
User ID: 0126542873 
Password: asterisk
Use Auth ID: no

... Dial Plan 
Dial Plan 8 :  (S0<:0126542873)
Enable IP Dialing: no 

VoIP-To-PSTN Gateway Enable: yes 
VoIP Caller Auth Method: none


.......PSTN-To-VoIP Gateway Setup 
PSTN-To-VoIP Gateway Enable: yes
 PSTN Caller Auth Method: none 
PSTN Ring Thru Line 1: yes 
 
PSTN Caller Default DP: 8

 
  

If you follow the above, you should see the following under the info tab of SPA3102

Line 1 Status 
Hook State: On Registration State: Registered 
Last Registration At: 7/31/2008 10:37:45 Next Registration In: 133 s 


PSTN Line Status 
Hook State: On
Line Voltage: -53 (V) 
Loop Current: 0.0 (mA)
Registration State: Registered 
Last Registration At: 7/31/2008 10:37:45
Next Registration In: 132 s 


Third, check if you can see the IP address of your SPA3102 under the trunkline and the 5000 extension. (In SME Server Web panel)
If you can see it, SPA3102 is configured properly.

Fourth, define a dial plan like this under the route
Route : Any name will do...
Cluster : default
Dial Plan : _XXXXXXXXXX
Primary : 0126542873
Active : Yes

Make sure you press the commit button... to confirm the changes

Fifth, make you dial the PSTN number 0126631666 from another extension say 5001 using xlite.
Make sure this extension is also under the DEFAULT cluster.... if your SPA3102 (ext 5000) and other ext 5001 are in different clusters , you will get an engaged tone.

Let me know if you still have issues...


Regards
Ronald
« Last Edit: July 31, 2008, 09:30:30 PM by ronaldson40 »

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
[RESOLVED] Re: Making Outgoing calls (PSTN)
« Reply #9 on: August 05, 2008, 01:27:19 AM »
Ronald,

Thank you for your help and your replies. I finaly got it working. I am still not sure what I did (or went) wrong but it is working now. What i did:

1. Reset the spa3102 to factory default.
2. Deleted the extention and the trunk in server manager.
3. Recreated both.
4. Used Automatic Provisioning (tftp) to configure the spa3102

And it working!

I changed nothing on the spa3102. The dial plan on the spa3012 seems like it is of no importance when using asterix.

Offline ronaldson40

  • ****
  • 96
  • +0/-0
Re: Making Outgoing calls (PSTN)
« Reply #10 on: August 05, 2008, 09:28:45 AM »
Thanks.

Gert, can you tell the steps on how does one provision IP phones and the SPA3102. I am pretty new to this field of IP telephony.
If you have a how-to online, please tell me.


I have a pfSense Gateway installed on my network.

Regards
Ronald