Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: steveo on April 28, 2007, 02:23:59 PM

Title: SAIL IAX Provider Setup
Post by: steveo on April 28, 2007, 02:23:59 PM
I am having a bit of trouble getting my faktortel iax account working in sail / asterisks. I can dial out on the trunk, no worries - but I cannot seem to get sail to answer a call from the DID. I am running in server only mode.

When I call the DID, I get the following on asterisks console:
Code: [Select]
NOTICE[25061]: chan_iax2.c:6777 socket_process: Rejected connect attempt from 203.161.130.132, who was trying to reach '0261002140@'
This would seem to indicate the firewall is forwarding the packets through to the sail box.

Now I've checked the provider web site. And they say the iax.conf should look like this:
Code: [Select]
[faktortel]
disallow=all
allow=ilbc
type=friend
username=YOUR-USERNAME
secret=YOUR-PASSWORD
host=iax.faktortel.com.au
auth=md5
context=incoming
qualify=3000

My IAX on the other had looks like this:
Code: [Select]
[{user_name}]
type=peer
host=iax.faktortel.com.au
qualify=3000
canreinvite=no
username={user_name}
fromuser={user_name}
auth=md5
secret={password}
disallow=all
allow=alaw
allow=ulaw
[0261002140] <= DID number I was given
type=user
context=mainmenu

If I enter "faktortel" in the Peer Stanza Label field, so it goes in the square brackets, the trunk won't connect. On the other hand if I enter user_name I was given in the stanza field, it will connect, but I can't get incoming calls. I have also entered the DID in the stanza field, but again it won't connect. According  to this post (http://forums.whirlpool.net.au/forum-replies-archive.cfm/727105.html) "faktortel" must appear within [] to receive incoming calls.

I have also noted that faktortel's website says the type should be "friend", where sail sets up as a peer / user. I have changed the type to "friend", but this does not resolve the incoming call problem.

I'm a bit stumped as to how to resolve this within sail and would appreciate any advice anyone could offer.

Cheers,
Title: SAIL IAX Provider Setup
Post by: SARK devs on April 28, 2007, 09:51:27 PM
Hi There

First of all,

Have you set the registration string correctly and is asterisk registering correctly with Faktortel?

You can check with "iax2 show registry" at the console.

The peer stanza label value should be entirely irrelevant because it is only ever referenced during outbound calls.  Inbound calls use the user stanza label value during verification (or not at all).

The net net net seems to be that your inbound call is not finding a corresponding DNID value to lock to in extensions.

To fully see what is going on you need to run your inbound call with "iax2 debug"

What I'm looking for in the debug data looks like this....

Code: [Select]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW
   Timestamp: 00019ms SCall: 00171 DCall: 00000 [206.191.37.138:4569]
   VERSION : 2
   CALLED NUMBER : 4168487537
   CODEC_PREFS : (ulaw|gsm)
   CALLING NUMBER : 6472339600
   CALLING PRESNTN : 0
   CALLING TYPEOFN : 0
   CALLING TRANSIT : 0
   LANGUAGE : en
   USERNAME : 4168487537
   FORMAT : 4
   CAPABILITY : 63494
   ADSICPE : 2
   DATE TIME : 2007-02-28 08:54:48

[Feb 28 08:54:50] NOTICE[2340]: chan_iax2.c:6754 socket_process: Rejected connec t attempt from 206.191.37.138, who was trying to reach '4168487537@'
Tx-Frame Retry[-01] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: ACK
   Timestamp: 00019ms SCall: 00002 DCall: 00171 [206.191.37.138:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REJECT
   Timestamp: 00003ms SCall: 00002 DCall: 00171 [206.191.37.138:4569]
   CAUSE : No authority found
   CAUSE CODE : 50


Kind Regards

Selintra
Title: Results from IAX
Post by: steveo on April 29, 2007, 12:08:15 AM
Registration seems ok:
Code: [Select]
arkstar*CLI> iax2 show registry
Host                  dnsmgr  Username    Perceived             Refresh  State
203.161.130.132:4569  N       09510783    202.161.6.123:4569         60  Registered

Setting iax debug:
Code: [Select]
iax2 set debug
IAX2 Debugging Enabled

Here's the output from the console for the incoming call:
Code: [Select]
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REGACK
   Timestamp: 00063ms  SCall: 00196  DCall: 00003 [203.161.130.132:4569]
   USERNAME        : 09510783
   DATE TIME       : 2007-04-29  07:51:18
   REFRESH         : 60
   APPARENT ADDRES : IPV4 202.161.6.123:4569
   CALLING NUMBER  : 09510783
darkstar*CLI>
Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK    
   Timestamp: 00063ms  SCall: 00003  DCall: 00196 [203.161.130.132:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE  
   Timestamp: 00017ms  SCall: 00001  DCall: 00000 [203.161.130.132:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: PONG  
   Timestamp: 00017ms  SCall: 00305  DCall: 00001 [203.161.130.132:4569]
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: ACK    
   Timestamp: 00017ms  SCall: 00001  DCall: 00305 [203.161.130.132:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW    
   Timestamp: 00003ms  SCall: 00233  DCall: 00000 [203.161.130.132:4569]
   VERSION         : 2
   CALLED NUMBER   : 0261002140
   CODEC_PREFS     : (g729|ilbc|ulaw|gsm)
   CALLING NUMBER  : 0261002140
   CALLING PRESNTN : 0
   CALLING TYPEOFN : 0
   CALLING TRANSIT : 0
   LANGUAGE        : en
   USERNAME        : faktortel
   FORMAT          : 1024
   CAPABILITY      : 64774
   ADSICPE         : 2
   DATE TIME       : 2007-04-29  07:51:54

Thought this bit might be relevant (cause code 50):
Code: [Select]
chan_iax2.c:6777 socket_process: Rejected connect attempt from 203.161.130.132, who was trying to reach '0261002140@'
Tx-Frame Retry[-01] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: ACK    
   Timestamp: 00008ms  SCall: 00002  DCall: 00051 [203.161.130.132:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REJECT
   Timestamp: 00013ms  SCall: 00002  DCall: 00051 [203.161.130.132:4569]
   CAUSE           : No authority found
   CAUSE CODE      : 50


Not sure it is relevant, but I also noticed a lot of these lines:
Code: [Select]
[Apr 29 07:54:18] WARNING[25077]: chan_sip.c:8847 check_via: 'sock_ntop_host' is not a valid host


Thanks for responding to my post, I really appreciate it.
Title: SAIL IAX Provider Setup
Post by: gippsweb on April 30, 2007, 10:37:11 AM
I haven't used a DID with Faktortel, but vaguely remember reading something on the way the incoming DID call is being seen by Asterisk.
It is looking for a call coming to your 0950xxx Faktortel numberand because it's coming from the DID is being rejected.
I haven't had the need for a DID so can't be any more help than that.
Hopefully that may point you in the right direction.
Someone help out here if I'm looking at this incorrectly. ;)
Title: SAIL IAX Provider Setup
Post by: SARK devs on May 01, 2007, 10:13:00 PM
No, you are right on the money GW.  I think it has to do with the dialled number and how it;s being delivered.

I'm pretty sure that what is happening is they are delivering against a user-id of "faktortel" rather than your number.  A few carriers do something similar and its a bit dumb, still what ya gonna do?

So - rebuild your iax trunk using your user-id as the DID.  You should also use faktortel in the stanza name.  

Next just create a DID for your number - it's a very simple process - just add a new trunk and choose ptt-did-group from the drop down.

I think that may crack it for you.

It's worked in the past with SIP carriers who deliver this way but I don't remember ever coming across an IAX carrier who does this so you may have to fiddle around a bit.  You may even have to use "faktortel" as the DiD judging by what they've got in the input IAX stream.  

You may end up having two trunks pointing at the same account, one for inbound and one for outbound.  It doesn't really matter as long as it does the job.

Let me know how you get on.

Best

S
Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 19, 2008, 11:32:21 AM
Hi

Trying to get a SAIL box up and running using
Sail-2.2.1-631
Asterisk-1.4.18.1-59
TDM400 with 2 FXO ports
Phones: Polycom IP320
Carrier: austechpartnerships.com

We can dial out on the PSTN lines but dialling in on or out on VOIP fails. Engaged tone only.
Would think it is a trunk configuration error but so far unable to find the combination that works.
The debug shows that in coming calls can not find the entry

"[Jun 19 18:22:09] NOTICE[23633]: chan_iax2.c:7773 socket_process: Rejected connect attempt from 59.154.183.70, request '30182849@atp-incoming' does not exist"

The incoming call is seen. The debug window shows the source phone number.

Has someone else used Australian Technology Partnerships (ATP) for a provider? If so what did you use for the carrier and trunk entries?

I think it is close but just unable to close out this error.

TIA
Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 19, 2008, 04:06:07 PM
Change type from friend to peer
Now we have
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00006ms  SCall: 00005  DCall: 00102 [59.154.183.70:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: PONG
   Timestamp: 00012ms  SCall: 00129  DCall: 00006 [59.154.183.70:4569]
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00012ms  SCall: 00006  DCall: 00129 [59.154.183.70:4569]
  == Manager 'fop' logged off from 127.0.0.1
  == Parsing '/etc/asterisk/manager.conf': Found
  == Manager 'fop' logged on from 127.0.0.1
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW
   Timestamp: 00013ms  SCall: 16384  DCall: 00000 [59.154.183.70:4569]
   VERSION         : 2
   CALLED NUMBER   : 30182849
   CODEC_PREFS     : (g729|ilbc|gsm)
   CALLING NUMBER  : 0740551605
   CALLING PRESNTN : 3
   CALLING TYPEOFN : 33
   CALLING TRANSIT : 0
   CALLING NAME    :
   LANGUAGE        : en
   USERNAME        : 7339
   FORMAT          : 2
   CAPABILITY      : 58626
   ADSICPE         : 2
   DATE TIME       : 2008-06-19  23:58:50

[Jun 19 23:58:50] NOTICE[9611]: chan_iax2.c:7332 socket_process: Rejected connect attempt from 59.154.183.70, who was trying to reach '30182849@'
Tx-Frame Retry[-01] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00013ms  SCall: 00002  DCall: 16384 [59.154.183.70:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REJECT
   Timestamp: 00006ms  SCall: 00002  DCall: 16384 [59.154.183.70:4569]
   CAUSE           : No authority found
   CAUSE CODE      : 50

but still no connection. Is it an entry in the extensions.conf file that is missing?
Title: Re: SAIL IAX Provider Setup
Post by: SARK devs on June 19, 2008, 05:05:55 PM
Can we see iax.conf and do you actually have a trunk with the number 30182849 defined?
Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 20, 2008, 12:55:59 AM
Hi Selintra

I believe so. Hope the info below helps.
ATP have suggested that when I had "request '30182849@atp-incoming' does not exist"  to put an entry in extensions.conf for [atp-incoming] but that did not seem to stick. When I manually added it for testing to the extensions.conf the system removed the entries on restarting.

Thank you for the help.

iax.conf
;#------------------------------------------------------------
;# DO NOT MODIFY THIS FILE! It is updated automatically by the
;# SAIL & SME Server software. Instead, modify the source template in
;# an /etc/e-smith/templates-custom directory. For more
;# information, see http://www.e-smith.org/custom/
;#
;# copyright (C) 2005 Selintra Ltd. United Kingdom
;#------------------------------------------------------------

[general]
tos=0x18
maxexpirey=180
defaultexpirey=160
jitterbuffer=no
allow=g729



register => xxxx:password@gw3.austechpartnerships.com

   

;
;==========================================================================
;      This is where we deal with generated IAX phones. We generate 
;      an IAX extension if iaxextn is set to Yes. 
;      Both SIP and IAX will have the same extension number and both
;      will ring if they are connected when a call comes in. 
;==========================================================================
;
;Internal IP phones

;External IAX2 lines
;
;==========================================================================
;      This is where we deal with IAX2 trunks (if any).
;      We generate 2 entries (peer and user) for each. 
;==========================================================================
;

[ATP]
type=peer
host=gw3.austechpartnerships.com
qualify=3000
canreinvite=no
username=xxxx
fromuser=xxxx
auth=md5
secret=password
context=default
disallow=all
allow=alaw
allow=ulaw
[30182849]
type=user
context=mainmenu

Trunks
30182849    default    ATP    59.154.183.70    75 ms    4569    IAX2    None    Operator    Operator                
Zap3-1    default    AnalogFXO    LOCAL    N/A         Analogue    13    Operator    Operator    N/A             
Zap4-1    default    AnalogFXO    LOCAL    N/A         Analogue    12    Operator    Operator    N/A             

ATP recommended settings are
in [general] section

register => username:password@server_host

Then create a new stanza for the username we allocated for you

[username]
type=friend
username=username
secret=password
auth=md5
host=server_hostname
context=atp_incoming
trunk=yes
qualify=3000
disallow=all
allow=g729/gsm ; put your appropriate codec here

Put "atp_incoming" as a context in extensions.conf and handle the incoming call - don't forget we send your DID number in as a DNI.

A little bit extra here for the extensions.conf, assuming you have 2 DID's, each from different nodes:

[atp_incoming]
exten => 82315700,1,Dial(SIP/200,60|tr) ; incoming number from syd
exten => 32952000,1,Dial(SIP/201,60|tr) ; incoming number from bne
Title: Re: SAIL IAX Provider Setup
Post by: SARK devs on June 20, 2008, 11:27:16 AM
try setting it up like this...

delete the existig trunk... then recreate it as follows...

peer stanza (whatever you like - e.g. ATP1)
DiD  7339
username 7339
password (whatever your password is)

The resulting stanzas will look something like this...

Code: [Select]
[ATP1]
type=peer
host=gw3.austechpartnerships.com
qualify=3000
canreinvite=no
username=7339
fromuser=7339
secret=password
context=default
disallow=all
allow=alaw
allow=ulaw
[7339]
type=user
context=mainmenu

add auth=md5 to both sides (user and peer)

Next create a PTT-DiD with the number 30182849 - you will use this trunk to do your inbound routing.

Er... That's it.

Best
Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 23, 2008, 09:43:06 AM
Hi S

Thank you for the help.
Also sorry for the delay. I was out of town for a couple of days.

Still no change. Engaged tone on calling.
iax.conf: after setting new trunks

;#------------------------------------------------------------
;# DO NOT MODIFY THIS FILE! It is updated automatically by the
;# SAIL & SME Server software. Instead, modify the source template in
;# an /etc/e-smith/templates-custom directory. For more
;# information, see http://www.e-smith.org/custom/
;#
;# copyright (C) 2005 Selintra Ltd. United Kingdom
;#------------------------------------------------------------

[general]
tos=0x18
maxexpirey=180
defaultexpirey=160
jitterbuffer=no
allow=g729



register => xxxx:password@gw3.austechpartnerships.com

   

;
;==========================================================================
;      This is where we deal with generated IAX phones. We generate 
;      an IAX extension if iaxextn is set to Yes. 
;      Both SIP and IAX will have the same extension number and both
;      will ring if they are connected when a call comes in. 
;==========================================================================
;
;Internal IP phones

;External IAX2 lines
;
;==========================================================================
;      This is where we deal with IAX2 trunks (if any).
;      We generate 2 entries (peer and user) for each. 
;==========================================================================
;

[ATP1]
type=peer
host=gw3.austechpartnerships.com
qualify=3000
canreinvite=no
username=xxxx
fromuser=xxxx
auth=md5
secret=password
context=default
disallow=all
allow=alaw
allow=ulaw
[xxxx]
type=user
context=mainmenu
auth=md5

;

extensions.conf: Note ATP keep on saying we need to put entries in this file for it to answer calls. But nothing seems to go into the
"Customer Supplied Contexts below this line (if any)." section. They are suggesting we need a context
 
"A little bit extra here for the extensions.conf, assuming you have 2 DID's, each from different nodes:

[atp_incoming]
exten => 82315700,1,Dial(SIP/200,60|tr) ; incoming number from syd
exten => 32952000,1,Dial(SIP/201,60|tr) ; incoming number from bne"


;#------------------------------------------------------------
;# DO NOT MODIFY THIS FILE! It is updated automatically by the
;# SAIL & SME Server software. Instead, modify the source template in
;# an /etc/e-smith/templates-custom directory. For more
;# information, see http://www.e-smith.org/custom/
;#
;# copyright (C) 2005 Selintra Ltd. United Kingdom
;#------------------------------------------------------------

;extensions.conf

[general]

static=yes       ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.
[globals]

   FAX=5001
   SYSOP=5001
   DYNAMIC_FEATURES=>automon

;
;   Customer supplied Globals & Header data
;
TESTGLOBAL=15
;
;   End of Customer supplied Globals & Header data
;

[internal]

   include => internal-presets
   include => extensions
   include => utilities

   exten => _X.,1,agi(selintra,OutCluster,${EXTEN})

[priv_sibling]

   exten => _X.,1,agi(selintra,OutCluster,${EXTEN})

[default]

   include => internal-presets
   include => extensions
   include => conferences
   include => utilities
   exten => _12X.,1,agi(selintra,OutTrunk,Zap4-1)

   exten => t,1,Hangup
   exten => h,1,Hangup
   exten => i,1,Playtones(congestion)

[default-callback]

   exten => _X.,1,DISA(no-password|default)


;
[extensions]
   include => internal-presets
   include => parkedcalls

   exten => 101,1,ParkedCall(101)
   exten => 101,hint,park:101@parkedcalls

   exten => 102,1,ParkedCall(102)
   exten => 102,hint,park:102@parkedcalls

   exten => 103,1,ParkedCall(103)
   exten => 103,hint,park:103@parkedcalls

   exten => 104,1,ParkedCall(104)
   exten => 104,hint,park:104@parkedcalls

   exten => 0,1,Goto(${SYSOP},1) ; accept zero as operator request

   exten => 5000,hint,SIP/5000
   exten => 5000,1,agi(selintra,InCall,)
   exten => *5000,1,Playback(silence/2)
   exten => *5000,2,Voicemail(5000)
   exten => *5000,3,Hangup
   exten => 5001,hint,SIP/5001
   exten => 5001,1,agi(selintra,InCall,)
   exten => *5001,1,Playback(silence/2)
   exten => *5001,2,Voicemail(5001)
   exten => *5001,3,Hangup
   exten => o,1,Background(pbx-transfer)
   exten => o,2,GoTo(0,1)
   exten => t,1,Hangup
   exten => h,1,Hangup
   exten => i,1,Playtones(congestion)

   exten => i,2,Hangup

[queues]
   exten => 5000,1,agi(selintra,Dial,5000,queue)
   exten => 5001,1,agi(selintra,Dial,5001,queue)
   exten => t,1,Hangup
   exten => h,1,Hangup
   exten => i,1,Playtones(congestion)



[vmails]

   exten => s,1,GoToIf($["$VMAIL" = "External"]?3) 
   exten => s,2,Voicemail(su$EXTEN)
   exten => s,3,Macro(stdtrunk,$EXTEN,voicemail)

[vmailr]

   exten => *50*,2,VoicemailMain($CALLERIDNUM)
   exten => X.,1,Voicemail(su$EXTEN)


[conferences]

   exten => _30[0-7],1,Meetme(${EXTEN},Mp)


[mainmenu]
      include => extensions

   exten => 30182849,1,agi(selintra,Inbound,${EXTEN})
   exten => 7339,1,agi(selintra,Inbound,${EXTEN})
   exten => s-Zap4-1,1,agi(selintra,Inbound,Zap4-1)

   exten => s,1,GotoIf($["${CHANNEL}" = "Zap/3-1"]?s-Zap3-1,1)
   exten => s,2,GotoIf($["${CHANNEL}" = "Zap/4-1"]?s-Zap4-1,1)
   exten => s,3,agi(selintra,CheckState,)
       
    exten => fax,1,GoToIf($["$FAX" = ""]?3:2)     ;no FAX defined - hangup
    exten => fax,2,GoTo(extensions,${FAX},1)
     exten => fax,3,Playtones(congestion)

   exten => t,1,GotoIf($["${OPEN}" = "YES"]?t,4)
   exten => t,2,Voicemail(su${SYSOP})
   exten => t,3,Hangup
   exten => t,4,Goto(extensions,${SYSOP},1)
         exten => t,5,Hangup
   exten => h,1,Hangup
   exten => i,1,Playtones(congestion)

[default-inbound]
   include => extensions
   include => internal-presets

   exten => fax,1,GoToIf($["${FAX}" = ""]?3:2)     ;no FAX defined - hangup
   exten => fax,2,GoTo(extensions,${FAX},1)
   exten => fax,3,Playtones(congestion)
   exten => t,1,GotoIf($["${OPEN}" = "YES"]?t,4)
   exten => t,2,Voicemail(su${CLUSTEROP})
   exten => t,3,Hangup
   exten => t,4,Goto(extensions,${CLUSTEROP},1)
   exten => t,5,Hangup
   exten => h,1,Hangup
   exten => i,1,Playtones(congestion)
[internal-presets]
;
;


   exten => _*XX*,1,Background(silence/1)
   exten => _*XX*,2,agi(selintra,${EXTEN})
   exten => _*XX*X,1,Background(silence/1)
   exten => _*XX*X,2,agi(selintra,${EXTEN})
   exten => _*XX*XX,1,Background(silence/1)
   exten => _*XX*XX,2,agi(selintra,${EXTEN})
   exten => _*XX*XXXX,1,Background(silence/1)
   exten => _*XX*XXXX,2,agi(selintra,${EXTEN})
   exten => _*XX*XXXXX.,1,Background(silence/1)
   exten => _*XX*XXXXX.,2,agi(selintra,${EXTEN})

   exten => _*XX8,1,Background(silence/1)
   exten => _*XX8,2,agi(selintra,${EXTEN})
   exten => _*XX8X,1,Background(silence/1)
   exten => _*XX8X,2,agi(selintra,${EXTEN})
   exten => _*XX8XX,1,Background(silence/1)
   exten => _*XX8XX,2,agi(selintra,${EXTEN})
   exten => _*XX8XXXX,1,Background(silence/1)
   exten => _*XX8XXXX,2,agi(selintra,${EXTEN})
   exten => _*XX8XXXXX.,1,Background(silence/1)
   exten => _*XX8XXXXX.,2,agi(selintra,${EXTEN})

   exten => h,1,Hangup
   exten => t,1,Hangup
   exten => i,1,Playtones(congestion)
[defaultOpenGreet]
        include => extensions
   include => internal-presets
   include => conferences

        exten => s,1,Background(if-u-know-ext-dial)
        exten => s,2,Background(otherwise)
        exten => s,3,Background(pls-hold-while-try)
        exten => s,4,Background(silence/3)
        exten => s,5,Goto(defaultOpenGreet,t,1)

        exten => t,1,Goto(extensions,${SYSOP},1)                ;to operator
        exten => t,2,Hangup

   exten => i,1,Background(invalid)
   exten => i,2,Goto(defaultOpenGreet,s,4)

[defaultClosedGreet]
        include => extensions
   include => internal-presets
   include => conferences

   exten => s,1,Background(were-sorry)
   exten => s,2,Background(nbdy-avail-to-take-call)
        exten => s,3,Background(if-u-know-ext-dial)
        exten => s,4,Background(otherwise)
        exten => s,5,Background(pls-hold-while-try)
        exten => s,6,Background(silence/3)
        exten => s,7,Goto(defaultClosedGreet,t,1)

        exten => t,1,Goto(extensions,${CLUSTEROP},1)                ;to operator
        exten => t,2,Hangup

   exten => i,1,Background(invalid)
   exten => i,2,Goto(defaultClosedGreet,s,6)


[customOpenGreet]
        include => extensions
   include => internal-presets
   include => conferences

        exten => s,1,Background(${CUSTOMGREET})
        exten => s,2,Background(silence/3)
        exten => s,3,Goto(customOpenGreet,t,1)

        exten => t,1,Goto(extensions,${SYSOP},1)                ;to operator
        exten => t,2,Hangup

   exten => i,1,Background(invalid)
   exten => i,2,Goto(customOpenGreet,s,2)

[customClosedGreet]
        include => extensions
   include => internal-presets
   include => conferences

   exten => s,1,Background(${CUSTOMGREET})
        exten => s,2,Background(silence/1)
        exten => s,3,Goto(customClosedGreet,t,1)

        exten => t,1,Voicemail(s${CLUSTEROP})                ;to operator
        exten => t,2,Hangup

   exten => i,1,Background(invalid)
   exten => i,2,Goto(customClosedGreet,s,2)

;#####################################################################
;
;   Customer Supplied Contexts below this line (if any).
;
;#####################################################################


;
;   Customer Supplied Context utilities
;
[utilities]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;  Utilities - a few useful scripts
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;   run a backup and send it to the administrator
;
exten => *901*,1,System(/etc/selintra/backup.sh)
exten => *901*,2,GoTo(utilend,1)
;
; reload the PBX
;
exten => *902*,1,System(/etc/init.d/asterisk reload)
exten => *902*,2,GoTo(utilend,1)
;
; send daily CDRs to owner
;
exten => *903*,1,system(/etc/selintra/daycall ${CALLERIDNUM})
exten => *903*,2,GoTo(utilend,1)
;
; send ALL daily CDRs to site administrator
;
exten => *904*,1,PlayBack(silence/1)
exten => *904*,2,Authenticate(3333)
exten => *904*,3,system(/etc/selintra/daycall)
exten => *904*,4,GoTo(utilend,1)

;
; common utility exit
;
exten => utilend,1,PlayBack(silence/1)
exten => utilend,2,PlayBack(activated)
exten => utilend,3,Hangup;
Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 23, 2008, 10:01:45 AM
In the asterisk messages log is

"[Jun 23 17:57:23] WARNING[30570] chan_iax2.c: Section 'ATP1' lacks type
[Jun 23 17:57:23] WARNING[29684] chan_sip.c: tos value at line 11 is deprecated.  See doc/ip-tos.txt for more information.
[Jun 23 17:57:23] NOTICE[30570] app_playback.c: Reloading say.conf
[Jun 23 17:57:36] WARNING[30605] channel.c: Unable to find a codec translation path from g729 to slin
[Jun 23 17:57:36] WARNING[30605] indications.c: Unable to set 'IAX2/ATP1-7' to signed linear format (write)
[Jun 23 17:57:36] NOTICE[30605] res_indications.c: Unable to start playtones"

Is the system failing to write the conf file correctly?
Title: Re: SAIL IAX Provider Setup
Post by: SARK devs on June 23, 2008, 03:11:18 PM
Quote
extensions.conf: Note ATP keep on saying we need to put entries in this file for it to answer calls. But nothing seems to go into the
"Customer Supplied Contexts below this line (if any)." section. They are suggesting we need a context
 
"A little bit extra here for the extensions.conf, assuming you have 2 DID's, each from different nodes:

[atp_incoming]
exten => 82315700,1,Dial(SIP/200,60|tr) ; incoming number from syd
exten => 32952000,1,Dial(SIP/201,60|tr) ; incoming number from bne"

You do have an entry in extensions (SAIL has generated it for you)...

Quote
[mainmenu]
      include => extensions

   exten => 30182849,1,agi(selintra,Inbound,${EXTEN})

SAIL's inbound context is "mainmenu".  Context name is not important per se.  It's just used as a pointer to tell Asterisk where to look to match the number. You tell Asterisk which context to look in, in the the friend or user entry..

Code: [Select]
[xxxx]
type=user
context=mainmenu
auth=md5

The number you have told Asterisk to match against is  30182849.  If this is NOT the dialled number then that is probably the problem.  Every time you create a VoIP Trunk, SAIL adds numbers into the mainmenu context for you.  You can also add as many DiD numbers as you like by creating PTT-DiD entries.  That is what they are there for.  "Customer Supplied Contexts" are something quite different - they are generated by the "Custom Apps" panel.

Quote
Jun 23 17:57:23] WARNING[30570] chan_iax2.c: Section 'ATP1' lacks type

I'm not happy with this warning, it says that the type= tuple is not being recognised.  I have no idea why (have you changed it?). 

Quote
Unable to find a codec translation path from g729 to slin
Unable to set 'IAX2/ATP1-7' to signed linear format (write)

This tells me that your codec settings are not being recognised (the system is taking the g729 statement from your header as the default and what's more, you don't have any g729 licenses fitted..

It looks like your [ATP1] iax.conf defiition is being ignored by asterisk. Is there perhaps a spurious comment statement somewhere which is blocking the iax definition? Or... have you edited it using a Windoze editor? 

In any event - Asterisk is not reading it correctly. 

 

 


 
Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 23, 2008, 11:53:19 PM
Hi S

Yes I had seen the [mainmenu] entry but was not sure if it was equal to their suggestion of [atp-incoming]

No we have not modified any conf files from windows. Could the problem be that they are using g729 and gsm protocols, or the Carrier definition section?
Is there another way of setting up a temp test to prove the fault is only in the this carrier setup?

Thanks
Title: Re: SAIL IAX Provider Setup
Post by: SARK devs on June 24, 2008, 12:08:58 AM
Send us your login details and DiD number and we'll run a simulation from here when we get a moment.

Send them to admin@selintra.com and mark your mail "austech carrier sim".

All I can tell you is that we have a lot of SARK/SAIL sites up and running now.  We don't get connection problems with IAX carriers.  Therefore we have to assume that either you or austech are doing something not quite right, or perhaps out of the ordinary. However, it's always difficult to tell when you are trying to diagnose a problem second-hand... and much as we like to help, we can only do so much with the resources we have.


Best

 
Title: Re: SAIL IAX Provider Setup
Post by: SARK devs on June 24, 2008, 07:02:53 AM
OK, thaks for sending us your account details.  It works as we described a couple of posts back…

Quote
try setting it up like this...

delete the existig trunk... then recreate it as follows...

peer stanza (whatever you like - e.g. ATP1)
DiD  7339
username 7339
password (whatever your password is)

The resulting stanzas will look something like this...
Code:
[ATP1]
type=peer
host=gw3.austechpartnerships.com
qualify=3000
canreinvite=no
username=7339
fromuser=7339
secret=password
context=default
disallow=all
allow=alaw
allow=ulaw
[7339]
type=user
context=mainmenu

add auth=md5 to both sides (user and peer)

Next create a PTT-DiD with the number 30182849 - you will use this trunk to do your inbound routing.

Er... That's it.

Best

There is one addition (which you didn’t tell us in your posts) which is that this carrier account only works with g729 so you need to add allow=g729 to your user entry. Also, we didn't bother with md5 and it worked OK.  N.B. Don't forget to set up the PTT_DiD trunk or it won't work

Your registration string should look like this…

username:password@gw3.austechpartnerships.com

Here is a loop call (out and back in) using your account on one of our test systems…

Code: [Select]
    -- Executing [980730182849@internal:1] AGI("SIP/4001-08fc8e90", "selintra|OutCluster|980730182849") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing [980730182849@default:1] AGI("SIP/4001-08fc8e90", "selintra|OutTrunk|7339") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (MixMonitor) Options: (0730182849-4001-1214282783.wav|b)
  == Begin MixMonitor Recording SIP/4001-08fc8e90
    -- AGI Script Executing Application: (Dial) Options: (IAX2/7339@peer7339/0730182849)
    -- Called 7339@peer7339/0730182849
    -- Call accepted by 59.154.183.70 (format g729)
    -- Format for call is g729
    -- IAX2/peer7339-6 is proceeding passing it to SIP/4001-08fc8e90
    -- Accepting UNAUTHENTICATED call from 59.154.183.70:
       > requested format = gsm,
       > requested prefs = (g729|ilbc|gsm),
       > actual format = g729,
       > host prefs = (),
       > priority = caller
    -- Executing [30182849@mainmenu:1] AGI("IAX2/peer7339-14", "selintra|Inbound|30182849") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (MixMonitor) Options: (30182849-0730182849-1214282784.wav|b)
  == Begin MixMonitor Recording IAX2/peer7339-14
    -- AGI Script selintra completed, returning 0
    -- Executing [4007@internal:1] AGI("IAX2/peer7339-14", "selintra|OutCluster|4007") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing [4007@default:1] AGI("IAX2/peer7339-14", "selintra|InCall|") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (SIP/4007|120|t)
    -- Called 4007
    -- SIP/4007-b7c06c88 is ringing
    -- IAX2/peer7339-6 is ringing

You may be puzzled by the fact that the dialled number is preceeded by 98, this is because we used carrier pre-select to force the call over the austech channel.  Other than that it is vanilla.

Here is our iax.conf entry…

Code: [Select]
[peerxxxx]
type=peer
host=gw3.austechpartnerships.com
qualify=3000
canreinvite=no
username=xxxx
fromuser=xxxx
secret=xxxxxxxx
disallow=all
allow=g729
[xxxx]
type=user
context=mainmenu

the xxxx fields contain your account number (user-id) and the secret field your password.

I think that wraps it up.


Title: Re: SAIL IAX Provider Setup
Post by: compsos on June 24, 2008, 10:25:45 AM
Hi S

Ok we have made a successful call in. The codec was certainly a problem but so was 1 new phone (operator 5000) that is, I think, suspect.
Resetting the Open Inbound Route and Closed Inbound Route to the working ext 5001 worked. I had previously set the "Operator"
to 5001 (global page) but that seems it was not enough to get the call to 5001.

Also putting "allow=g729" in anything other than the iax.conf header just simply disappeared on committing. Is that normal behaviour or am I just trying to put a square peg in a round hole?

On a restart I am still seeing the "Use of uninitialized value in string eq .....line 54" from the S55conf-asterisk file. But it does load and work.

Cheers
Title: Re: SAIL IAX Provider Setup
Post by: SARK devs on June 24, 2008, 10:56:00 AM
Quote
Also putting "allow=g729" in anything other than the iax.conf header just simply disappeared on committing. Is that normal behaviour or am I just trying to put a square peg in a round hole?

no, it should be OK if you put it immediately after the disallow=all.
What release of SAIL are you running?

Code: [Select]
Use of uninitialized value in string eq .....line 54
This is NOT an error.  Perl issues a warning on uninitialised fields being referenced.  The code is checking to see if the field is empty - all part of the plan.

best

s