Question : How come I can't get my Polycom IP 400 to register with asterisk?

Hi,

I am trying to use a Polycom IP 4000.  I can call another extension .. but I cannot use and outside line or have a call come in.   The phone never registers.   If I do a sip show peers it has the extension 399 but never registers.

Here is a log sample on an attempted call followed by extensions.conf and sip.conf related entries,

<--- SIP read from 192.168.100.217:5060 --->
ACK sip:[email protected]17 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.217;branch=z9hG4bKbceb6f37BB2F655E
From: "SoundStation IP" ;tag=C5D81A82-F05C757D
To: 217;user=phone>;tag=as0503a8a7
CSeq: 1 ACK
Call-ID: 1839fce9-10d2c848-5a2ab02b@192.168.100.217
Contact: transport=udp>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundStationIP-SSIP_4000-UA/2.2.0.0047
Max-Forwards: 70
Content-Length: 0



from extensions.conf
exten => 399,1,Dial,SIP/399

fron sip.conf
[399]
callerid="Conference" <399>
type=peer  (tried user and friend as well)
host=dynamic
dtmfmode=inband  (also tried rfc2833)
mailbox=399
username=399
progressinband=no



Any thoughts?  I find their admin guide for the phone pretty confusing and I wasn't able to find much asterisk specific help.

Answer : How come I can't get my Polycom IP 400 to register with asterisk?

That is fairly easy to fix. The problem is identified by this line from the SIP Debug output:
Looking for 99357865 in default (domain 192.168.100.30)

This means that whenever your IP phone makes an outgoing call, the number you dial has to match a number or pattern within the context called "default". You have two options to fix this:
1. Add a line to the existing context [default] in extensions.conf that handles these calls
2. Create a new context specifically for handling calls dialled by the IP phones

The line you need to add would be something like this:
exten => _99.,1,Dial(ZAP/g1/${EXTEN},30)
This would recognise any dialled number starting with 99 and send it out over the first Zap group (if your outside line is connected to Asterisk using a Digium card or similar).

The exact format of the parameters passed to the Dial command will depend on the type of outside line you have. It might, for example, be a SIP trunk provided by an VoIP Internet Service Provider. The pattern or patterns you want to match for numbers dialled from those IP phones is up to you, but I suggest you have distinct patterns for calls to outside lines and internal calls (IP phone to IP phone). If you make it so every call to an outside line starts with a 9 then the dial plan would look more like this:
exten => _9.,1,Dial(ZAP/g1/${EXTEN:1},30)
This strips the leading digit from the dialled number before passing it to the outside line.

If you don't want to use the [default] context for both inbound and outbound calls, then you can create a dedicated context in extensions.conf for calls from IP phones. You must add a line to sip.conf for each IP phone to tell it to use that context. Something like this:
context=local-extensions
(That was shown in my example snippet from an earlier comment).
And now add the new context to extensions.conf like this:
[local-extensions]
exten => _9.,1,Dial(ZAP/g1/${EXTEN:1},30)
Random Solutions  
 
programming4us programming4us