How to create a SipURI

20 views
Skip to first unread message

seydou konaté

unread,
Mar 16, 2010, 6:42:02 AM3/16/10
to mobicents-public


---------- Forwarded message ----------
From: seydou konaté <konate.dao...@gmail.com>
Date: 2010/3/16
Subject: SipURI problem
To: mobicents-public <mobicent...@googlegroups.com>


I want to create a sipURI to be able to forward my requests to.
I did   URI uri=SipFactory.getInstance().createAddressFactory().createURI(contactStr);

but when I do request.setRequestURI(uri) I 'm having the following error

        at org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(Sbb
Entity.java:670)
        at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTask.r
outeQueuedEvent(EventRoutingTask.java:351)
        at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTask.r
un(EventRoutingTask.java:111)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
08:39:44,886 INFO  [SipResourceAdaptor] Received Request:
CANCEL sip:1...@127.0.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:12760;branch=z9hG4bK-d8754z-0b25b90a72522001-1---d875
4z-;rport=12760;received=127.0.0.1
To: "123" <sip:1...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=8d21cb34
Call-ID: OWQ3OTM0MTRiM2ZhYTQxNmI3ZDUzZTE0MTc2YzMzM2E.
CSeq: 1 CANCEL
User-Agent: X-Lite release 1104o stamp 56125
Content-Length: 0


08:39:44,933 INFO  [SimpleSip11B2BTestSbb] Got a CANCEL request.
08:39:44,949 INFO  [ServerTransactionWrapper] ServerTransaction[z9hG4bK-d8754z-0
b25b90a72522001-1---d8754z-] sending response:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:12760;branch=z9hG4bK-d8754z-0b25b90a72522001-1---d875
4z-;rport=12760;received=127.0.0.1
To: "123" <sip:1...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=8d21cb34
Call-ID: OWQ3OTM0MTRiM2ZhYTQxNmI3ZDUzZTE0MTc2YzMzM2E.
CSeq: 1 CANCEL
Content-Length: 0


08:39:45,027 INFO  [ServerTransactionWrapper] ServerTransaction[z9hG4bK-d8754z-0
b25b90a72522001-1---d8754z-] sending response:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 127.0.0.1:12760;branch=z9hG4bK-d8754z-0b25b90a72522001-1---d875
4z-;rport=12760;received=127.0.0.1
To: "123" <sip:1...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=8d21cb34
Call-ID: OWQ3OTM0MTRiM2ZhYTQxNmI3ZDUzZTE0MTc2YzMzM2E.
CSeq: 1 INVITE
Content-Length: 0


08:39:45,074 ERROR [SimpleSip11B2BTestSbb] Failed to process cancel request
javax.sip.SipException: could not find peer dialog
        at org.mobicents.slee.example.sip11.b2b.SimpleSip11B2BTestSbb.getPeerDia
log(SimpleSip11B2BTestSbb.java:215)
        at org.mobicents.slee.example.sip11.b2b.SimpleSip11B2BTestSbb.onCancel(S
impleSip11B2BTestSbb.java:159)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(Sbb
Entity.java:670)
        at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTask.r
outeQueuedEvent(EventRoutingTask.java:351)
        at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTask.r
un(EventRoutingTask.java:111)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
08:39:50,027 INFO  [SipResourceAdaptor] SIP Transaction z9hG4bK-d8754z-0b25b90a7
2522001-1---d8754z-:INVITE terminated
08:40:37,855 INFO  [SipResourceAdaptor] Received Request:
REGISTER sip:127.0.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:12760;branch=z9hG4bK-d8754z-055db140304a7046-1---d875
4z-;rport=12760;received=127.0.0.1
Max-Forwards: 70
Contact: <sip:7629...@127.0.0.1:12760;rinstance=750ebdbf053ad756>;expires=0
To: "sey" <sip:7629...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=376a8c1d
Call-ID: ZTJiZDE0MzUwNWVlZGYzZjNiNDhjYmQyYWQ3NjhhZTc.
CSeq: 2 REGISTER
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
User-Agent: X-Lite release 1104o stamp 56125
Content-Length: 0


08:40:37,870 INFO  [SimpleSip11B2BTestSbb] *********************Reception d'une
requete de Registration************************
08:40:37,870 INFO  [SimpleSip11B2BTestSbb] ***********Registration from:From: "s
ey" <sip:7629...@127.0.0.1:5060>;tag=376a8c1d

08:40:37,870 INFO  [SimpleSip11B2BTestSbb] ***********Frome String:"sey" <sip:76
299...@127.0.0.1:5060>;tag=376a8c1d

08:40:37,870 INFO  [SimpleSip11B2BTestSbb] ***********Users:{e=<sip:76299194@127
.0.0.1:12760;rinstance=750ebdbf053ad756>;expires=0
}
08:40:37,870 INFO  [ServerTransactionWrapper] ServerTransaction[z9hG4bK-d8754z-0
55db140304a7046-1---d8754z-] sending response:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:12760;branch=z9hG4bK-d8754z-055db140304a7046-1---d875
4z-;rport=12760;received=127.0.0.1
To: "sey" <sip:7629...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=376a8c1d
Call-ID: ZTJiZDE0MzUwNWVlZGYzZjNiNDhjYmQyYWQ3NjhhZTc.
CSeq: 2 REGISTER
Content-Length: 0


08:40:50,152 INFO  [SipResourceAdaptor] SIP Transaction z9hG4bK-d8754z-db1bca683
65c6801-1---d8754z-:REGISTER terminated
08:40:59,214 INFO  [SipResourceAdaptor] SIP Transaction z9hG4bK-d8754z-0b25b90a7
2522001-1---d8754z-:CANCEL terminated
08:41:10,089 INFO  [SipResourceAdaptor] SIP Transaction z9hG4bK-d8754z-055db1403
04a7046-1---d8754z-:REGISTER terminated
08:54:47,402 INFO  [ServiceManagement] Deactivated ServiceID[name=SimpleSip11B2B
TestService,vendor=org.mobicents,version=1.0]
08:54:47,527 WARN  [DeployableUnit] The deployable unit 'mobicents-slee-example-
sip11-b2b-DU-2.0.0.CR1.jar' contains components that are already deployed. The f
ollowing are already installed:
08:54:47,542 WARN  [DeployableUnit]  - SbbID[name=SimpleSip11B2BTestSbb,vendor=o
rg.mobicents,version=1.0]
08:54:47,558 WARN  [DeployableUnit]  - ServiceID[name=SimpleSip11B2BTestService,
vendor=org.mobicents,version=1.0]
08:54:47,558 WARN  [DeploymentManager] Unable to INSTALL mobicents-slee-example-
sip11-b2b-DU-2.0.0.CR1.jar right now. Waiting for dependencies to be resolved.
08:54:48,152 INFO  [DeploymentMBeanImpl] Uninstalling DeployableUnitID[url=file:
/C:/jslee2.0/jboss-5.1.0.GA/server/default/deploy/mobicents-slee-example-sip11-b
2b-DU-2.0.0.CR1.jar/]
08:54:48,167 INFO  [DeploymentMBeanImpl] Uninstalled ServiceID[name=SimpleSip11B
2BTestService,vendor=org.mobicents,version=1.0]
08:54:48,183 INFO  [DeploymentMBeanImpl] Uninstalled SbbID[name=SimpleSip11B2BTe
stSbb,vendor=org.mobicents,version=1.0]
08:54:48,183 INFO  [DeploymentMBeanImpl] Uninstalled DeployableUnitID[url=file:/
C:/jslee2.0/jboss-5.1.0.GA/server/default/deploy/mobicents-slee-example-sip11-b2
b-DU-2.0.0.CR1.jar/]
08:55:16,324 INFO  [DeploymentMBeanImpl] Installing DeployableUnitID[url=file:/C
:/jslee2.0/jboss-5.1.0.GA/server/default/deploy/mobicents-slee-example-sip11-b2b
-DU-2.0.0.CR1.jar/]
08:55:16,824 INFO  [DeploymentMBeanImpl] Installed SbbID[name=SimpleSip11B2BTest
Sbb,vendor=org.mobicents,version=1.0]
08:55:16,839 INFO  [DeploymentMBeanImpl] Installed ServiceID[name=SimpleSip11B2B
TestService,vendor=org.mobicents,version=1.0]. Root sbb is SbbID[name=SimpleSip1
1B2BTestSbb,vendor=org.mobicents,version=1.0]
08:55:16,855 INFO  [DeploymentMBeanImpl] Installed DeployableUnitID[url=file:/C:
/jslee2.0/jboss-5.1.0.GA/server/default/deploy/mobicents-slee-example-sip11-b2b-
DU-2.0.0.CR1.jar/]
08:55:17,105 INFO  [ServiceManagement] Activated ServiceID[name=SimpleSip11B2BTe
stService,vendor=org.mobicents,version=1.0]
08:55:17,370 WARN  [DeployableUnit] The deployable unit 'mobicents-slee-example-
sip11-b2b-DU-2.0.0.CR1.jar' contains components that are already deployed. The f
ollowing are already installed:
08:55:17,386 WARN  [DeployableUnit]  - SbbID[name=SimpleSip11B2BTestSbb,vendor=o
rg.mobicents,version=1.0]
08:55:17,386 WARN  [DeployableUnit]  - ServiceID[name=SimpleSip11B2BTestService,
vendor=org.mobicents,version=1.0]
08:55:17,402 WARN  [DeployableUnit] The deployable unit 'mobicents-slee-example-
sip11-b2b-DU-2.0.0.CR1.jar' contains components that are already deployed. The f
ollowing are already installed:
08:55:17,417 WARN  [DeployableUnit]  - SbbID[name=SimpleSip11B2BTestSbb,vendor=o
rg.mobicents,version=1.0]
08:55:17,417 WARN  [DeployableUnit]  - ServiceID[name=SimpleSip11B2BTestService,
vendor=org.mobicents,version=1.0]
08:55:30,995 INFO  [SipResourceAdaptor] Received Request:
REGISTER sip:127.0.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:55418;branch=z9hG4bK-d8754z-794c30187d59ff36-1---d875
4z-;rport=55418;received=127.0.0.1
Max-Forwards: 70
Contact: <sip:7629...@127.0.0.1:55418;rinstance=9bad3c35a500577f>
To: "sey" <sip:7629...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=700eb639
Call-ID: MDk0YzFkYjUwNGU2NDU0ZWJmN2E1Mzc3Yjk2MWZmODY.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
User-Agent: X-Lite release 1104o stamp 56125
Content-Length: 0


08:55:31,074 INFO  [SimpleSip11B2BTestSbb] *********************Reception d'une
requete de Registration************************
08:55:31,089 INFO  [SimpleSip11B2BTestSbb] ***********Registration from:From: "s
ey" <sip:7629...@127.0.0.1:5060>;tag=700eb639

08:55:31,105 INFO  [SimpleSip11B2BTestSbb] ***********Frome String:"sey" <sip:76
299...@127.0.0.1:5060>;tag=700eb639

08:55:31,120 INFO  [SimpleSip11B2BTestSbb] ***********Users:{e=<sip:76299194@127
.0.0.1:55418;rinstance=9bad3c35a500577f>
}
08:55:31,136 INFO  [ServerTransactionWrapper] ServerTransaction[z9hG4bK-d8754z-7
94c30187d59ff36-1---d8754z-] sending response:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:55418;branch=z9hG4bK-d8754z-794c30187d59ff36-1---d875
4z-;rport=55418;received=127.0.0.1
To: "sey" <sip:7629...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=700eb639
Call-ID: MDk0YzFkYjUwNGU2NDU0ZWJmN2E1Mzc3Yjk2MWZmODY.
CSeq: 1 REGISTER
Content-Length: 0


08:55:31,292 INFO  [SipResourceAdaptor] Received Request:
SUBSCRIBE sip:7629...@127.0.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:55418;branch=z9hG4bK-d8754z-cf27cc65aa542759-1---d875
4z-;rport=55418;received=127.0.0.1
Max-Forwards: 70
Contact: <sip:7629...@127.0.0.1:55418>
To: "sey" <sip:7629...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=d56b4523
Call-ID: NGM5NDRmOTIxZThlNTJlNjlmZDA4MTEyMjBlNGE3Yjc.
CSeq: 1 SUBSCRIBE
Expires: 300
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
User-Agent: X-Lite release 1104o stamp 56125
Event: message-summary
Content-Length: 0


08:55:35,527 INFO  [SipResourceAdaptor] Received Request:
INVITE sip:1...@127.0.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:55418;branch=z9hG4bK-d8754z-e746ab14c3445846-1---d875
4z-;rport=55418;received=127.0.0.1
Max-Forwards: 70
Contact: <sip:7629...@127.0.0.1:55418>
To: "123" <sip:1...@127.0.0.1:5060>
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=5f6b7012
Call-ID: ZmNmZGM1YjBhZDE4NTJiZDNlYTg5ZGE1NjZkYWFkNWI.
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1104o stamp 56125
Content-Length: 257

v=0
o=- 0 2 IN IP4 127.0.0.1
s=CounterPath X-Lite 3.0
c=IN IP4 127.0.0.1
t=0 0
m=audio 56938 RTP/AVP 107 0 8 101
a=alt:1 1 : 0J1wAn7A QtfGIkBm 10.172.1.90 56938
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=sendrecv

08:55:35,839 ERROR [SimpleSip11B2BTestSbb] Failed to process incoming INVITE.
java.lang.RuntimeException: Unexpected non-sip URI
        at gov.nist.core.InternalErrorHandler.handleException(InternalErrorHandl
er.java:75)
        at gov.nist.javax.sip.stack.DefaultRouter.getNextHop(DefaultRouter.java:
249)
        at gov.nist.javax.sip.stack.SIPTransactionStack.getNextHop(SIPTransactio
nStack.java:1782)
        at gov.nist.javax.sip.SipProviderImpl.getNewClientTransaction(SipProvide
rImpl.java:346)
        at org.mobicents.slee.resource.sip11.SleeSipProviderImpl.getNewDialogAct
ivityClientTransaction(SleeSipProviderImpl.java:414)
        at org.mobicents.slee.resource.sip11.wrappers.ClientDialogWrapper.sendRe
quest(ClientDialogWrapper.java:498)
        at org.mobicents.slee.example.sip11.b2b.SimpleSip11B2BTestSbb.onInviteEv
ent(SimpleSip11B2BTestSbb.java:111)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(Sbb
Entity.java:670)
        at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTask.r
outeQueuedEvent(EventRoutingTask.java:351)
        at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTask.r
un(EventRoutingTask.java:111)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
08:55:36,011 INFO  [ServerTransactionWrapper] ServerTransaction[z9hG4bK-d8754z-e
746ab14c3445846-1---d8754z-] sending response:
SIP/2.0 503 Service unavailable
Via: SIP/2.0/UDP 127.0.0.1:55418;branch=z9hG4bK-d8754z-e746ab14c3445846-1---d875
4z-;rport=55418;received=127.0.0.1
To: "123" <sip:1...@127.0.0.1:5060>;tag=82b32422
From: "sey" <sip:7629...@127.0.0.1:5060>;tag=5f6b7012
Call-ID: ZmNmZGM1YjBhZDE4NTJiZDNlYTg5ZGE1NjZkYWFkNWI.
CSeq: 1 INVITE
Content-Length: 0


08:55:36,074 INFO  [SipResourceAdaptor] SIP Dialog zmnmzgm1yjbhzde4ntjizdnlytg5z
ge1njzkywfknwi.:82b32422:5f6b7012 terminated
08:55:41,089 INFO  [SipResourceAdaptor] SIP Transaction z9hG4bK-d8754z-e746ab14c
3445846-1---d8754z-:INVITE terminated
08:56:03,558 INFO  [SipResourceAdaptor] SIP Transaction z9hG4bK-d8754z-794c30187
d59ff36-1---d8754z-:REGISTER terminated

Who can tell me how to create a sip uri using the contact header in the request string. Thank you before..
regards!!!!!!!


NB: in my onRegisterEvent method, I did:      usersHashtable.put("e", uri);  here is the content of the usersHashtable Users:{e=<sip:76299194@127
.0.0.1:55418;rinstance=9bad3c35a500577f>
}

I don't know why he's telling that NO SIP ADDR

Reply all
Reply to author
Forward
0 new messages