Help converting Polycom Reg line to Sip Trunk Settings

Hi I need some help converting a Polycom reg setting to a SIP Trunk setting. I’m trying to use our current provider with asterisk. They of course say they can’t help. Now I’m new to Asterisk so I’m having a hard time figuring out what I should do with this.

Now this is the tag for the polycom

<reg reg.1.csta="0" reg.1.displayName="MY NAME" reg.1.address="1xxxxxxxxxx" reg.1.label="MY NAME" reg.1.lcs="0" 
reg.1.type="private" reg.1.thirdPartyName="" reg.1.auth.userId="yyyyyyyyy" reg.1.auth.password="pppppppp" 
reg.1.acd-login-logout="0" reg.1.acd-agent-available="0" reg.1.ringType="" reg.1.lineKeys="2" reg.1.callsPerLineKey="" 
reg.1.bargeInEnabled="0" reg.1.outboundProxy.address="sip21.proivder.com" reg.1.outboundProxy.port="5090" 
reg.1.outboundProxy.transport="UDPonly" reg.1.proxyRequire="" reg.1.serverFeatureControl.cf="0" 
reg.1.serverFeatureControl.dnd="0" reg.1.auth.optimizedInFailover="0" reg.1.auth.strictLineSeize="" 
reg.1.musicOnHold.uri="" reg.1.tcpFastFailover="" reg.1.server.1.address="sip.proivder.com" reg.1.server.1.port="" 
reg.1.server.1.transport="UDPonly" reg.1.server.1.register="1" reg.1.server.1.expires="" reg.1.server.1.expires.overlap="" 
reg.1.server.1.retryTimeout="" reg.1.server.1.retryMaxCount="" reg.1.server.1.expires.lineSeize="" 
reg.1.server.1.reg.lcs="0" reg.2.csta="0" reg.2.displayName="" reg.2.address="" reg.2.label="" reg.2.lcs="0" reg.2.type="private" 
reg.2.thirdPartyName="" reg.2.auth.userId="" reg.2.auth.password="" reg.2.acd-login-logout="0" reg.2.acd-agent-available="0" r
eg.2.ringType="" reg.2.lineKeys="2" reg.2.callsPerLineKey="" reg.2.bargeInEnabled="0" reg.2.outboundProxy.address="" 
reg.2.outboundProxy.port="" reg.2.outboundProxy.transport="UDPonly" reg.2.proxyRequire="" reg.2.serverFeatureControl.cf="0" 
reg.2.serverFeatureControl.dnd="0" reg.2.auth.optimizedInFailover="0" reg.2.auth.strictLineSeize="" 
reg.2.musicOnHold.uri="" reg.2.tcpFastFailover="" reg.2.server.1.address="" reg.2.server.1.port="" 
reg.2.server.1.transport="UDPonly" reg.2.server.1.register="1" reg.2.server.1.expires="" reg.2.server.1.expires.overlap=""
 reg.2.server.1.retryTimeout="" reg.2.server.1.retryMaxCount="" reg.2.server.1.expires.lineSeize="" reg.2.server.1.reg.lcs="0"></reg>

here is what I think the trunk settings should by, but they don’t work.
PEER Details

authname=yyyyyyyyy
secert=pppppppp
host=sip.proivder.com
fromuser=yyyyyyyyy
fromdomain=1xxxxxxxxxx
qualify=5000
allow=all&g729&ulaw&alaw
canreinvite=no
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes
disallow=all
outboundproxy=sip21.proivder.com:5090
type=peer

Register String

[email protected]:yyyyyyyyy:[email protected]/1xxxxxxxxxx

Can anyone help me?

order of codecs count. use:-

disallow=all
allow=g729&ulaw&alaw

or you won’t be able to negotiate an rtp stream.

Ok, I adjusted the codecs order and this is what I get when looking at the console.

[2012-08-13 09:31:23] NOTICE[32444]: chan_sip.c:26345 sip_poke_noanswer: Peer 'siptrunk1' is now UNREACHABLE!  Last qualify: 0
[2012-08-13 09:31:33] NOTICE[32444]: chan_sip.c:13232 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #2)

That is nothing to do with the codec, that is todo with the network,

I notice that the regisration is on port 5090 so

port=5090
outboundproxyport=5090

also

can the server ping the provider? You are Getting a timeout.

Also do you have g729 codec installed?

You can’t use insecure statement and authentication commands.

Suggest you review Asterisk sip.CONF example file

You also need to set context.

http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf

Base of what it shows in the sip.conf documentation. I would assume this is correct.

Peer Details:

username=1xxxxxxxxxx
authname=yyyyyyyyy
type=peer
trustrpid=yes
secert=pppppppp
rfc2833compensate=yes
qualify=5000
outboundproxyport=5090
outboundproxy=sip21.proivder.com
host=sip.proivder.com
disallow=all
allow=ulaw&alaw
context=from-sip-external
canreinvite=yes

Register String:

[email protected]:[email protected]

But they don’t work. So i thought i would try to use a softphone to connect to see if maybe they have some sort of Mac filitering going on. They don’t these settings in XLite worked:

User ID (my phone Number): 1xxxxxxxxxx
Domain: sip.proivder.com
Password: pppppppp
Auth ID: yyyyyyyyy
Proxy: sip21.proivder.com:5090

debug with

sip set debug ip <sip.proivder.com>

I would remove the outboundproxy line and the outbound proxy port. Just use the port=5090 variable.

The SIP debug would be handy also.

Your register string looks odd, try

username:passwod:[email protected]/username also make fromdomain=sipprovider.com insecure=very and authuser=authname.

I have found there is always a bit of trial and error with these things and no two sip providers are the same.

Insecure=very has not been valid since Asterisk 1.4 It’s now insecure=port,invite.

If you do insecure=invite you are telling Asterisk to ignore AAA for this peer. So any authname or other AAA constructs become superfluous.