Need help with remote Sip extension using Cisco 7940/60

dizel247
Posts: 16
Member Since:
2006-06-21

Hello,

I have been searching all over for the guidance on how to connect cisco 7940/60 remotely to my trixbox. I have seen many providers do that. Send you cisco phone as a demo unit to give you taste of their service. So far I have add the following info to sip_nat.conf

nat=yes
externip=my asterisk external ip
Localnet=192.168.1.0/255.255.255.0
externrefresh=10

I have also added to extension
nat=yes
qualify=yes

My network as follows. My asterisk is behind router. My remote phone is also behind router.

I have enabled following ports on the asterisk side.
UDP 69 for tftp server
UDP 5004-5082
UDP 10000-50000
UDP 4560 for IAX client

My home side I dont have anything forwarded.
When I turn on cisco 7960 @ home to load the configuration from asteirisk it connects to my asterisk load all firmware files. Load all the config. The only problem that its not registering with my *.

When I configure X-lite from home. I can register with my trixbox server and able to make calls and receive calls.

On the cisco phone I see following error witch I belive not related to my issue.
E102 MISC Error No time server.

Can some one help me to accomplish this simple task. Thanks in advance.

Roman



wtodd
Posts: 339
Member Since:
2007-04-29
Outside Cisco Phones 7960/7940

Roma,

I am assuming that you have your cisco phones already running on your local network under the tftp server (tftpboot in the root directory of tb). If that is the case, there is a very simple solution. Also assuming your firewall (if any) is configured correctly. You need do the following:

1.) You must change the script of your SIPDefault.cnf in about five locations. Normally the tftp server will have an ip address = 10.1.1.1 or something like that. You will need to change every place that appears to your {external ip address ie: 198.15.133.74}

There are two places nearly immediately at the beginning where these ip addresses appear, one midway throught the document that deals with the time server and three in the very last three lines at the bottom which deal with logo/xml services, etc.

Once you have altered your SIPDefault.cnf in your tftpbootfile and your phone has to connect to that in order to download the appropriate settings.

2.) You should make sure that the Alternate TFTP = yes (position 32 under Network Settings) and then make sure the phone has the TFTP settings set correctly:
Settings --> Network Settings(3) --> TFTP Server (7) = {your external tftp server address}

Once this is done the phone should accept the settings and register. (by the way this can be done from remote locations - i do it frequently)

3.) before returning the SIPDefault.cnf to its original state for your local tftpserver, you should return to the:

Settings --> Network Settings (3) --> Alternate TFTP (32) and change it to = NO
If you dont change the Alternate TFTP back to NO, everytime you power up the phone, it will search and not find your TFTP server SIPDefault.cnf and thus not work.

4.) Save this change in the phone when it requests the Save option.

5.) the phone Should be set for travel and/or use outside your home network

Hope this helps
wtodd



dizel247
Posts: 16
Member Since:
2006-06-21
Thanks Wtodd for you

Thanks Wtodd for you reply,

To answer some of your questions.

Yes I do have cisco on my local net. They are working with no problems.
I am also able to load my sip configs to the phone remotely. This is not the issue.

I did change all the local IP's in the SIPDefault to external IP as you mention. My phone loads that info. I can see the logo and other XML services. But the problem remains the same. Phone doesnt register to my asterisk. On the phone by the extension I see x next to it. Also in left side in my office phones I have time. On my home phone time is not showing. Could that be a firewall issue maybe? Can you please tell me what ports you have opened on your end?

I have following ports enabled on my asterisk side.
UDP 69 for tftp server
UDP 5004-5082
UDP 10000-50000
UDP 4560 for IAX client
TCP 80 for XML and Logo Services

My home side I dont have anything forwarded.

Thanks once again for your assistance its appreciated.

Best Regards,

Roman



wtodd
Posts: 339
Member Since:
2007-04-29
I will have to defer on the

I will have to defer on the firewall question. I did not set my firewall up and have little to no experience with that. To confirm that the firewall is your problem, i would disable it for a few minutes just to confirm. I would think that kerryg or many of the other much more experienced competent users on the forum can help you with the port issues.

Sorry to not be of more help.
wtodd



anchor85
Posts: 678
Member Since:
2006-06-07
Remote SIP extension Cisco 9740 / 7960

I have tried two methods to configure 7940 as a remote extension. It is quite possible to manually configure the 7940. You don't need to use a tftp server and the preconfigured config files.
- Setup Extension # in freePBX, with nat=yes, qualify=no
- Assuming you have a static IP (extIP) for your asterisk / router / firewall system
Manual Config
----------------
- Plug phone into your remote site and power up. Assume that your remote network has a DHCP server running.
- Do a factory reset. Hold down the # key as the phone boots. When the bottom right indicators flash, enter 123456789*0#
- then enter 2 on the keypad to clear network settings. This should set the phone to get a new IP via DHCP.
- Press the settings key to display settings
- Select 'Unlock Config' enter cisco as passwd and accept.
Configure SIP settings
--------------------------
- Line 1 enter the extension settings that match the required extension
- enter the 'extIP' as the proxy setting for line1
- general SIP settings
- Register with Proxy YES
- NAT enabled YES
- NAT Address set to 'extIP'

- To set the time and date display, go to Localizations and setup local settings and the SNTP
server to a public NTP server IP, I also set unicast as the mode.

- As you go from one menu to the other you may need to select save and the phone may then reboot. In this case you need to unlock the config and carry on from where you left off. A bit tedious but you can get there in the end. Check the configs to make sure that you have the settings that you require.

The phone should show it has registered. Reboot the phone to make sure its OK. This method does not pickup the trixbox logo.

Using the local TFTP server
-------------------------------
It also works if you use the endpoint manager to configure a 7940. Assuming the default endpoint configs are OK for Cisco phones on your localnet. Use the endpoint manager to change the phone's SIPxxxx.cnf file
- select nat enable
- set the nat address to extIP
- set the proxy for Line1 to extIP
so the first part of the SIPxxx.cnf file will look like:

phone_label: "801"
nat_enable: "1"
nat_address: "extIP"
line1_name: "801"
line1_shortname: "801"
line1_displayname: "801"
line1_password: "secret"
proxy1_address: "extIP"

reboot the phone, so that it picks up the new settings. It of course won't register. Take the phone to the remote end. Unlock the phone and in the Network Config set the DHCP to be released. Save settings & reboot the phone. It should pick up a new IP and try to connect to the tftp server which will fail. It will eventually drop back to the preset configs and connect to your remote trixbox server.

Manually update the time server. Update the HTTP proxy address and the phone will pick up the trixbox logo.
Both these methods have worked for me several times.
The only portforwarding is on the firewall protecting the main network with the following ports pointing to trix-localip

UDP 5060:5090
UDP 10000:20000
UDP 4569
TCP 80

--

John
Cat24.net



dizel247
Posts: 16
Member Since:
2006-06-21
Hello, I have followed your

Hello,

I have followed your instructions and my phone can register with asterisk now. The only problem I have is that when i call that external sip extension I get a message that the person you are calling is on the phone. Outbound is working but inbound is not. Please let me know what can be wrong? Please see bellow debug info.

--- (16 headers 11 lines) ---
[Kpbx*CLI> Destroying call '2d7ce3c61cb09ed11aa8c0b11a8a7c68@192.168.1.105'
[Kpbx*CLI> 12 headers, 0 lines
Reliably Transmitting (NAT) to 207.38.199.199:5061:
OPTIONS sip:208@207.38.199.199:5061;transport=udp SIP/2.0
Via: SIP/2.0/UDP 207.38.192.192:5060;branch=z9hG4bK64d9a168;rport
From: "Unknown" ;tag=as1d3644bf
To:
Contact:
Call-ID: 53a2c4b66eb383e531d29fd628fc0244@207.38.192.192
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Mon, 22 Oct 2007 05:10:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

Scheduling destruction of call '001319df-deed004a-9c162572-9dea875a@192.168.1.128' in 15000 ms
[Kpbx*CLI>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 207.38.192.192:5060;branch=z9hG4bK64d9a168;rport
From: "Unknown" ;tag=as1d3644bf
To: ;tag=000ab7b135ce03be6917200d-4b8ab873
Call-ID: 53a2c4b66eb383e531d29fd628fc0244@207.38.192.192
Date: Mon, 22 Oct 2007 05:10:47 GMT
CSeq: 102 OPTIONS
Server: Cisco-CP7940G/8.0
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE
Accept: application/sdp,multipart/mixed,multipart/alternative
Accept-Encoding: identity
Accept-Language: en
Supported: replaces,join,norefersub
Content-Length: 238
Content-Type: application/sdp
Content-Disposition: session;handling=optional

v=0
o=Cisco-SIPUA 1896 0 IN IP4 207.38.199.199
s=SIP Call
t=0 0
m=audio 0 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

Scheduling destruction of call '001319df-deed004a-9c162572-9dea875a@192.168.1.128' in 15000 ms
[Kpbx*CLI> == CDR updated on SIP/212xxxxx18-09a3c1f8
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "exten-vm|208|208") in new stack
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "user-callerid") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "user-callerid: Unavailable ") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?report") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?start") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "REALCALLERIDNUM=") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "REALCALLERIDNUM is ") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "AMPUSER=") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "AMPUSERCIDNAME=") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "1?report") in new stack
-- Goto (macro-user-callerid,s,11)
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "TTL: ARG1: 208") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?continue") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "__TTL=64") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "1?continue") in new stack
-- Goto (macro-user-callerid,s,21)
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "Using CallerID "Unavailable" ") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "FROMCONTEXT=exten-vm") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "VMBOX=208") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "EXTTOCALL=208") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "CFUEXT=") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "CFBEXT=") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "RT=15") in new stack
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "record-enable|208|IN") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?2:4") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing DeadAGI("SIP/212xxxxx18-09a3c1f8", "recordingcheck|20071022-011059|1193029852.3142") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
[Kpbx*CLI> recordingcheck|20071022-011059|1193029852.3142: Inbound recording not enabled
[Kpbx*CLI> -- AGI Script recordingcheck completed, returning 0
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "No recording needed") in new stack
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "dial|15|tr|208") in new stack
-- Executing DeadAGI("SIP/212xxxxx18-09a3c1f8", "dialparties.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
[Kpbx*CLI> dialparties.agi: Starting New Dialparties.agi
[Kpbx*CLI> == Parsing '/etc/asterisk/manager.conf': Found
== Parsing '/etc/asterisk/manager_custom.conf': Found
== Manager 'admin' logged on from 127.0.0.1
[Kpbx*CLI> dialparties.agi: priority is 1
[Kpbx*CLI> dialparties.agi: Caller ID name is 'Unavailable' number is 'unknown'
[Kpbx*CLI> dialparties.agi: Methodology of ring is 'none'
[Kpbx*CLI> -- dialparties.agi: Added extension 208 to extension map
[Kpbx*CLI> -- dialparties.agi: Extension 208 cf is disabled
[Kpbx*CLI> -- dialparties.agi: Extension 208 do not disturb is disabled
[Kpbx*CLI> dialparties.agi: Extension 208 has ExtensionState: 1
[Kpbx*CLI> -- dialparties.agi: Checking CW and CFB status for extension 208
[Kpbx*CLI> dialparties.agi: Extension 208 is not available to be called
[Kpbx*CLI> dialparties.agi: Extension 208 has call waiting disabled
[Kpbx*CLI> == Manager 'admin' logged off from 127.0.0.1
[Kpbx*CLI> -- AGI Script dialparties.agi completed, returning 0
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "Returned from dialparties with no extensions to call") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "DIALSTATUS is BUSY") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "SV_DIALSTATUS=BUSY") in new stack
-- Executing GosubIf("SIP/212xxxxx18-09a3c1f8", "0?docfu|1") in new stack
-- Executing GosubIf("SIP/212xxxxx18-09a3c1f8", "0?docfb|1") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "DIALSTATUS=BUSY") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "Voicemail is 208") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?s-BUSY|1") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "Sending to Voicemail box 208") in new stack
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "vm|208|BUSY") in new stack
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "user-callerid|SKIPTTL") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "user-callerid: Unavailable ") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?report") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?start") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "REALCALLERIDNUM=") in new stack
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "REALCALLERIDNUM is ") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "AMPUSER=") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "AMPUSERCIDNAME=") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "1?report") in new stack
-- Goto (macro-user-callerid,s,11)
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "TTL: 64 ARG1: SKIPTTL") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "1?continue") in new stack
-- Goto (macro-user-callerid,s,21)
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "Using CallerID "Unavailable" ") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "VMGAIN=") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "1?s-BUSY|1") in new stack
-- Goto (macro-vm,s-BUSY,1)
-- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "BUSY voicemail") in new stack
-- Executing Macro("SIP/212xxxxx18-09a3c1f8", "get-vmcontext|208") in new stack
-- Executing Set("SIP/212xxxxx18-09a3c1f8", "VMCONTEXT=default") in new stack
-- Executing GotoIf("SIP/212xxxxx18-09a3c1f8", "0?200:300") in new stack
-- Goto (macro-get-vmcontext,s,300)
[Kpbx*CLI> -- Executing NoOp("SIP/212xxxxx18-09a3c1f8", "") in new stack
-- Executing VoiceMail("SIP/212xxxxx18-09a3c1f8", "208@default|b") in new stack
-- Playing 'vm-theperson' (language 'en')

Thanks in advance,

Roman



cal-tec
Posts: 7
Member Since:
2009-05-18
Hi

Did you ever get your remote cp-7940 to accept inbound calls?



jquintana
Posts: 54
Member Since:
2008-12-13
what ports need to be opened

what ports need to be opened on the remote firewall?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.