<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Can't work sample code.</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=" />
  <subtitle>Can't work sample code.</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=</id>
  <updated>2013-06-19T02:00:48Z</updated>
  <dc:date>2013-06-19T02:00:48Z</dc:date>
  <entry>
    <title>RE: New Message from LAURENT CARTAL in UC Express Services Interface - Tech</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2499743" />
    <author>
      <name>LAURENT CARTAL</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2499743</id>
    <updated>2010-09-02T13:33:29Z</updated>
    <published>2010-09-02T13:33:29Z</published>
    <summary type="html">Hmm yes thanks I forgot to add the cti watch command again. I can manage to add all of my phones now. Actually, I'm trying to build a simple application where I send through a socket some informations when a call is received. 
 
I modified the handling of the CMECallConnectionRingingEvent to add my code.For instance, when I place a call from number 404 to 405 the event is raised and the program works fine, but if I place the same call again, the event is not raised and I get the message :
com.cisco.cme.cti.CMECall makeTopoDelivered,  call exists.
 
Any idea of what's the problem here ?
 
Anyway thanks for all your fast answers :)</summary>
    <dc:creator>LAURENT CARTAL</dc:creator>
    <dc:date>2010-09-02T13:33:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: New Message from LAURENT CARTAL in UC Express Services Interface - Tech</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2494252" />
    <author>
      <name>LAURENT CARTAL</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2494252</id>
    <updated>2010-08-31T14:56:11Z</updated>
    <published>2010-08-31T14:55:39Z</published>
    <summary type="html">Ok thanks, I had to update my IOS to enable the cti commands. I can use the sample code fine with 2 Cisco 7912. But then I tried to add an IP Communicator softphone. If I call it via my application it works correctly but if I try to make a call from the SoftPhone to the 7912 I get an exception when trying to add a listener to the phone.
 
 
com.dynamicsoft.DsLibs.DsSipDialog.DsSipDialogException: Invalid input: IN_HANGUP - invitation terminated
    at com.dynamicsoft.DsLibs.DsSipDialog.DsSipInvitation.checkInput(DsSipInvitation.java:1759)
    at com.dynamicsoft.DsLibs.DsSipDialog.DsSipInvitation.hangup(DsSipInvitation.java:1244)
    at com.cisco.cme.cti.siputil.DsSipInvitationInterfaceImpl.rejected(DsSipInvitationInterfaceImpl.java:67)
    at com.dynamicsoft.DsLibs.DsSipDialog.DsSipInvitation$Callback.process(DsSipInvitation.java:1985)
    at com.dynamicsoft.DsLibs.DsUtil.DsQProcessor.run(DsQProcessor.java:49)
 
I add the listenner the same way I add it for the 7912 so I guess there might be some trick.</summary>
    <dc:creator>LAURENT CARTAL</dc:creator>
    <dc:date>2010-08-31T14:55:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: Can't work sample code.</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2479531" />
    <author>
      <name>LAURENT CARTAL</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2479531</id>
    <updated>2010-08-26T17:07:30Z</updated>
    <published>2010-08-26T17:07:30Z</published>
    <summary type="html">Hum yes sorry I tried with phone numbers too (404 and 405) but the result is exactly the same.</summary>
    <dc:creator>LAURENT CARTAL</dc:creator>
    <dc:date>2010-08-26T17:07:30Z</dc:date>
  </entry>
  <entry>
    <title>Can't work sample code.</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2479340" />
    <author>
      <name>LAURENT CARTAL</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2479340</id>
    <updated>2011-11-09T09:11:10Z</updated>
    <published>2010-08-26T14:14:11Z</published>
    <summary type="html">Hello,
 
I have a problem running the sample code provided by Cisco. When I run the FirstCallAppManager i get the following result :

&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; PLEASE ENTER CALLER DN: 6
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; PLEASE ENTER DESTINATION DN: 5
&gt;&gt;&gt;&gt;&gt;Sample code: ++++++++++++++ connecting to CME ++++++++++++++ 
java.lang.NullPointerException
    at FirstCallAppManager.getMacbyExt(FirstCallAppManager.java:146)
    at FirstCallAppManager.connectCME(FirstCallAppManager.java:95)
    at FirstCallAppManager.main(FirstCallAppManager.java:451)


 
 
I looked around and the fact is that the lines
response = cme_http.getAllExtension();
response = cme_http.getAllDevice();
 
always return "null". I looked into the TCP exchanges via Wireshark and get the router sends me the following response:
 
HTTP/1.1 200 OK
Date: Thu, 26 Aug 2010 08:17:48 GMT
Server: cisco-IOS
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml
Expires: Thu, 26 Aug 2010 08:17:48 GMT
Last-Modified: Thu, 26 Aug 2010 08:17:48 GMT
Cache-Control: no-store, no-cache, must-revalidate
Accept-Ranges: none

00000001
 
0
 
I looked into the debug on the router and when i run the code, it shows as following:
 
*Aug 26 08:18:38.835: doc 0x687F44A4, doc-&gt;doc_type 4, req 0x689619C8

*Aug 26 08:18:38.835: Cannot extract bad formatted XML document
And the log file from the Java code:
 1
 2CMESDK] [2010-08-26 10:50:59,593] INFO
 3com.cisco.cme.xml.sdk.CMEXmlHttp &lt;?xml version="1.0"
 4encoding="UTF-8" standalone="yes"?&gt;
 5
 6&lt;SOAP-ENV:Envelope xmlns="cisco_cme_xml_namespace"&gt;
 7
 8    &lt;Body&gt;
 9
10        &lt;axl&gt;
11
12            &lt;request&gt;
13
14                &lt;ISgetExtension&gt;
15
16                    &lt;ISKeyword&gt;all&lt;/ISKeyword&gt;
17
18                &lt;/ISgetExtension&gt;
19
20            &lt;/request&gt;
21
22        &lt;/axl&gt;
23
24    &lt;/Body&gt;
25
26&lt;/SOAP-ENV:Envelope&gt;
27
28
29
30[CMESDK] [2010-08-26 10:50:59,609] INFO com.cisco.cme.xml.sdk.CMEXmlHttp  


 
 
 
I think it may be a configuration problem, here is mine.
 
[u]ucxsi_sdk.conf[/u]
 1
 2#-----Local machine (where running the application) info, change to yours
 3localHost=192.168.0.3
 4localPort=5060
 5localMACAddress=001e330e111e
 6controlTransport=tcp
 7subscriptionTransport=tcp
 8#-----CME info, your CME IP
 9proxyHost=192.168.0.251
10proxyPort=5060
11registrationTimeInterval=3000
12subscriptionTimeInterval=30000
13# xml user name and password in "telephony-service"
14user=infologic
15password=infologic
16# provider name, will be used in code to get provider 
17controllerName=CME_Provider
18#This is "register-id" under "voice register session-server" configuration in IOS
19sessionServer=OCT_CME
20keepAliveTimeInterval=60
21retryCount=6
22# --------Log param --------
23# ALL=0 DEBUG=1 INFO=2 WARN=3 ERROR=4 FATAL=5 OFF=6
24console=out
25consoleLevel= 6
26#file name and location for log
27fileName=C:\\Logs\\CMESDK-%t.log
28append=false
29fileLevel=0
30#----- Test
31 


 
[u]And on router :[/u]

  1
  2Cisco2801#sh ephone
  3
  4ephone-5[4] Mac:0013.C353.09CD TCP socket:[1] activeLine:0 REGISTERED in SCCP ve
  5r 8/8
  6mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0 caps:7
  7IP:192.168.0.1 7490 7912  keepalive 100 max_line 1
  8button 1: dn 5  number 404 CH1   IDLE         CH2   IDLE
  9Preferred Codec: g711ulaw
 10
 11ephone-6[5] Mac:0013.C353.0506 TCP socket:[2] activeLine:0 REGISTERED in SCCP ve
 12r 8/8
 13mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0 caps:7
 14IP:192.168.0.2 6528 7912  keepalive 99 max_line 1
 15button 1: dn 6  number 405 CH1   IDLE         CH2   IDLE
 16Preferred Codec: g711ulaw
 17 
 18Cisco2801#sh running-configuration
 19 
 20Current configuration : 8961 bytes
 21!
 22version 12.4
 23service timestamps debug datetime msec
 24service timestamps log datetime msec
 25no service password-encryption
 26!
 27hostname Cisco2801
 28!
 29boot-start-marker
 30boot-end-marker
 31!
 32logging message-counter syslog
 33logging buffered 51200 warnings
 34!
 35no aaa new-model
 36clock timezone gw 1
 37network-clock-participate wic 0
 38dot11 syslog
 39ip source-route
 40!
 41ip dhcp pool voix
 42   network 192.168.0.0 255.255.255.0
 43   option 150 ip 192.168.0.251
 44   default-router 192.168.0.251
 45   dns-server 212.27.54.252
 46!
 47ip cef
 48ip domain name yourdomain.com
 49ip name-server 212.27.54.252
 50ip name-server 212.27.53.252
 51!
 52no ipv6 cef
 53multilink bundle-name authenticated
 54!
 55voice service voip
 56 gcid
 57 callmonitor
 58allow-connections h323 to sip
 59 allow-connections sip to h323
 60 allow-connections sip to sip
 61 no supplementary-service sip moved-temporarily
 62 no supplementary-service sip refer
 63 sip
 64  registrar server expires max 120 min 60
 65!
 66voice register global
 67 mode cme
 68 max-dn 144
 69 max-pool 24
 70!
 71voice register session-server  1
 72 keepalive 60
 73 register-id OCT_CME
 74!
 75voice register dn  5
 76 session-server 1
 77!
 78voice register dn  6
 79 session-server 1
 80!
 81voice translation-rule 1
 82 rule 1 /.*/ /0486573028/
 83!
 84voice translation-rule 2
 85 rule 1 /.*/ /491/
 86!
 87voice translation-profile inclid
 88 translate called 1
 89!
 90voice translation-profile outclid
 91translate calling 1
 92!
 93voice-card 0
 94!
 95application
 96  service queue flash:app-b-acd-2.1.2.2.tcl
 97  param queue-len 10
 98  param aa-hunt1 491
 99  param number-of-hunt-grps 2
100  param aa-hunt2 492
101  !
102  service aa flash:app-b-acd-aa-2.1.2.2.tcl
103  paramspace english index 1
104  param number-of-hunt-grps 2
105  param dial-by-extension-option 3
106  param handoff-string aa
107  paramspace english language en
108  param max-time-vm-retry 2
109  param aa-pilot 0486573028
110  paramspace english location flash:
111  param second-greeting-time 60
112 param call-retry-timer 15
113  param voice-mail 5678
114  param max-time-call-retry 600
115  param service-name queue
116!
117crypto pki trustpoint TP-self-signed-1200597247
118 enrollment selfsigned
119 subject-name cn=IOS-Self-Signed-Certificate-1200597247
120 revocation-check none
121 rsakeypair TP-self-signed-1200597247
122!
123username dm privilege 15 secret 5 $1$OC6p$gmVKlKSnG6A2gAwc.Z3ZR0
124username cisco privilege 15 password 0 cisco
125archive
126 log config
127  hidekeys
128!
129interface FastEthernet0/0
130 description $ETH-LAN$$ETH-SW-LAUNCH$$INTF-INFO-FE 0$
131 ip address 192.168.0.251 255.255.255.0
132 ip nat inside
133 ip virtual-reassembly
134 no ip route-cache cef
135 no ip route-cache
136 no ip mroute-cache
137 duplex auto
138 speed auto
139!
140interface FastEthernet0/1
141 ip address dhcp
142 ip nat outside
143 ip virtual-reassembly
144 no ip route-cache cef
145 no ip route-cache
146 no ip mroute-cache
147 duplex auto
148 speed auto
149!
150interface BRI0/0/0
151 no ip address
152!
153interface BRI0/0/1
154 no ip address
155!
156ip forward-protocol nd
157ip route 0.0.0.0 0.0.0.0 82.242.178.254
158ip http server
159ip http authentication local
160ip http secure-server
161ip http path flash:
162!
163ip nat inside source list 115 interface FastEthernet0/1 overload
164!
165access-list 115 permit ip 192.168.0.0 0.0.0.255 any
166!
167ixi transport http
168 response size 8
169 no shutdown
170 request outstanding 2
171 request timeout 30
172!
173ixi application cme
174 response timeout 30
175 no shutdown
176!
177dial-peer voice 1 voip
178 translation-profile incoming inclid
179 translation-profile outgoing outclid
180 destination-pattern ..........
181 voice-class sip profiles 1
182 session protocol sipv2
183 session target dns:ippi.fr
184 codec g711ulaw
185!
186dial-peer voice 2 voip
187 translation-profile incoming inclid
188 translation-profile outgoing outclid
189 destination-pattern .1234
190 voice-class sip profiles 1
191 session protocol sipv2
192 session target dns:ippi.fr
193 dtmf-relay rtp-nte
194 codec g711ulaw
195!
196dial-peer voice 3 voip
197 service aa
198 destination-pattern 0486573028
199 session target ipv4:192.168.0.251
200 incoming called-number 0486573028
201(19 dtmf-relay h245-alphanumeric
202 codec g711ulaw
203 no vad
204!
205telephony-service
206 xml user infologic password infologic 15
207 load 7910 P00403020214
208 load 7912 CP7912080003SCCP070409A
209 load 7960-7940 P00305000301
210 max-ephones 8
211 max-dn 8
212 ip source-address 192.168.0.251 port 2000
213 auto assign 1 to 8
214 time-format 24
215date-format dd-mm-yy
216 dialplan-pattern 1 4.. extension-length 3
217 max-conferences 4 gain -6
218 moh Terre.wav
219 transfer-system full-consult
220 log table retain-timer 30
221 log table max-size 100
222 create cnf-files version-stamp Jan 01 2002 00:00:00
223!
224ephone-dn  1  dual-line
225 number 400 no-reg primary
226!
227ephone-dn  2  dual-line
228 number 401 no-reg primary
229!
230ephone-dn  3  dual-line
231 number 402 no-reg primary
232!
233ephone-dn  4  dual-line
234 number 403 no-reg primary
235!
236ephone-dn  5  dual-line
237 number 404 no-reg primary
238!
239ephone-dn  6  dual-line
240 number 405 no-reg primary
241!
242ephone-dn  7  dual-line
243number 406 no-reg primary
244!
245ephone-dn  8  dual-line
246 number 407 no-reg primary
247!
248ephone  5
249 device-security-mode none
250 mac-address 0013.C353.09CD
251 type 7912
252 button  1:5
253!
254ephone  6
255 device-security-mode none
256 mac-address 0013.C353.0506
257 type 7912
258 button  1:6
259!
260ephone  7
261 device-security-mode none
262!
263ephone  8
264 device-security-mode none
265!
266ephone-hunt 1 sequential
267 pilot 491
268 list 400, 401, 402
269!
270line con 0
271 login local
272line aux 0
273line vty 0 4
274 privilege level 15
275 login local
276 transport input telnet ssh
277line vty 5 15
278 


 
I'm looking forward to your help.</summary>
    <dc:creator>LAURENT CARTAL</dc:creator>
    <dc:date>2010-08-26T14:14:11Z</dc:date>
  </entry>
</feed>

