Diameter Routing

158 views
Skip to first unread message

yulian_o

unread,
May 4, 2011, 2:13:44 PM5/4/11
to mobicents-public
Hello
I receive the following exception :

java.io.IOException: Failed to send message, due to:
org.jdiameter.api.InternalException: org.jdiameter.api.RouteException:
Can not find valid connection to peer[null] in realm[web-ukraine.com]

Thats i guess is because i dont insert destination host avp to
message.
together with that by : http://www.etsi.org/deliver/etsi_ts/183000_183099/183017/02.03.01_60/ts_183017v020301p.pdf
the destination-host is not part of AAR and STR message.

My Diameter mux configuration ( part is ommited ) ;

<LocalPeer>
<URI value="aaa://pcscf1.web-ukraine.com:3868" />
<!-- URI value="aaa://mobicents.open-ims.test:1812" /-->
<IPAddresses>
<IPAddress value="172.20.20.59" />
</IPAddresses>
<Realm value="web-ukraine.com" />
<VendorID value="193" />
<ProductName value="jDiameter" />
<FirmwareRevision value="1" />
<OverloadMonitor>
<Entry index="1" lowThreshold="0.5" highThreshold="0.6">
<ApplicationID>
<VendorId value="193" />
<AuthApplId value="0" />
<AcctApplId value="19302" />
</ApplicationID>
</Entry>
</OverloadMonitor>
</LocalPeer>

<Network>
<Peers>
<Peer name="aaa://spdf.web-ukraine.com:3868"
attempt_connect="true" rating="1" />
</Peers>
<Realms>
<Realm name="web-ukraine.com" peers="172.20.20.58"
local_action="LOCAL" dynamic="false" exp_time="1">
<ApplicationID>
<VendorId value="10415" />
<AuthApplId value="16777222" />
<AcctApplId value="0" />
</ApplicationID>
</Realm>
</Realms>
</Network>


So my question is : does Mobicents Diameter have realm based
routing.If so what could be a problem?
Otherwise should i modify the dictionary configuration , add the
destination host to those messages and use them this way?

Thanks and best regards
Yulian Oifa

Bartosz Baranowski

unread,
May 4, 2011, 4:25:20 PM5/4/11
to mobicent...@googlegroups.com
Hi Yulian.

We are actually improving this feature. During work on examples it turned out that stack can benefit from better algorithms in routing part. Shortly, there should be release which includes improved routing.
YOu may want to follow: http://code.google.com/p/mobicents/issues/detail?id=2443 Alex is currently digging through proposed changes. Once there he green lits it, changes will be incorporated into trunk.


Note: Dictionary definition has no impact on routing code, it only allows stack to validate messages in terms of correct content.

Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.

yulian_o

unread,
May 5, 2011, 5:24:26 AM5/5/11
to mobicents-public
Hello Bartosz
Yes i know that dictionary will not impact routing but it will not
allow to add
destination host AVP if its not defined in message.
I will add this AVP so i will be able to move forward , i have added
myself to mail
for this issue , so i will be able to know when the issue will be
resolved, hope this will
be done ASAP.

Best regards
Yulian Oifa

On May 4, 10:25 pm, Bartosz Baranowski <baran...@gmail.com> wrote:
> Hi Yulian.
>
> We are actually improving this feature. During work on examples it turned
> out that stack can benefit from better algorithms in routing part. Shortly,
> there should be release which includes improved routing.
> YOu may want to follow:http://code.google.com/p/mobicents/issues/detail?id=2443Alex is currently
> digging through proposed changes. Once there he green lits it, changes will
> be incorporated into trunk.
>
> Note: Dictionary definition has no impact on routing code, it only allows
> stack to validate messages in terms of correct content.
>
> Bartosz Baranowski
> JBoss R & D
> ==================================
> Word of criticism meant to improve is always step forward.
>
> On Wed, May 4, 2011 at 8:13 PM, yulian_o <oifa.yul...@gmail.com> wrote:
> > Hello
> > I receive the following exception :
>
> > java.io.IOException: Failed to send message, due to:
> > org.jdiameter.api.InternalException: org.jdiameter.api.RouteException:
> > Can not find valid connection to peer[null] in realm[web-ukraine.com]
>
> > Thats i guess is because i dont insert destination host avp to
> > message.
> > together with that by :
> >http://www.etsi.org/deliver/etsi_ts/183000_183099/183017/02.03.01_60/...

Alexandre Mendonça

unread,
May 5, 2011, 6:37:38 AM5/5/11
to mobicent...@googlegroups.com
It should be working anyway, realm routing should work at the moment.

The error message thrown is a bit misleading since it tries to show the Destination-Host value, even if there isn't one, thus showing a "null". 

If you can check and/or provide us the logs in DEBUG level (you can do it privately if you feel it's more adequate), we can investigate further what's going on.

Regards,

--
Alexandre Mendonça // JBoss R&D
http://ammendonca.blogspot.com/

yulian_o

unread,
May 5, 2011, 8:45:50 AM5/5/11
to mobicents-public
Hello Alexandre
The problem was with VendorID that was not configured correctly in
messages.
I have changed that in gq' , but then there was different error.
InternalException.
As i checked DestinationHost must be part of the message , otherwise i
receive this exception.
InternalException comes from ClientAuthSessionImpl.send
Also you can see there :
sessionData.setDestinationHost(event.getMessage().getAvps().getAvp(Avp.DESTINATION_HOST).getOctetString());
When there will no be Destination Host avp it will throw exception.

Also i think that error is coming from
session.send(event.getMessage(), this); in same function , since
without destination host message is not send to other side, while with
it its received on server.

Btw in diameter dictionary there is no need to specify the Destination
Host avp for each command , it accepts it anyway.


Attached log with and without destination host
1) Without destination host

2011-05-05 15:08:09,176 INFO
[javax.slee.SbbNotification[service=ServiceID[name=PCSCF Call
Service,vendor=Web Ukraine,version=1.0.0.0],sbb=SbbID[name=Call
Proxy,vendor=Web Ukraine,version=1.0.0.0]].Cal
lProxySbb] Sending Message
+----------------------------------- HEADER
----------------------------------+
| Version.................1
| Message-Length..........0
| Command-Flags...........R[true] P[true] E[false] T[false]
| Command-Code............265
| Application-Id..........16777222
| Hop-By-Hop Identifier...0
| End-To-End Identifier...741343242
+------------------------------------ AVPs
-----------------------------------+
| AVP: Code[260] VendorID[0] Value[<Grouped>]
Flags[M=true;E=false;V=false]
| AVP: Code[266] VendorID[0] Value[10415]
Flags[M=true;E=false;V=false]
| AVP: Code[258] VendorID[0] Value[16777222]
Flags[M=true;E=false;V=false]
| AVP: Code[264] VendorID[0] Value[pcscf1.web-ukraine.com]
Flags[M=true;E=false;V=false]
| AVP: Code[296] VendorID[0] Value[web-ukraine.com]
Flags[M=true;E=false;V=false]
| AVP: Code[523] VendorID[10415] Value[0] Flags[M=true;E=false;V=true]
| AVP: Code[513] VendorID[10415] Value[2] Flags[M=true;E=false;V=true]
| AVP: Code[513] VendorID[10415] Value[4] Flags[M=true;E=false;V=true]
| AVP: Code[513] VendorID[10415] Value[6] Flags[M=true;E=false;V=true]
| AVP: Code[517] VendorID[10415] Value[<Grouped>]
Flags[M=true;E=false;V=true]
| AVP: Code[520] VendorID[10415] Value[0]
Flags[M=true;E=false;V=true]
| AVP: Code[519] VendorID[10415] Value[<Grouped>]
Flags[M=true;E=false;V=true]
| AVP: Code[509] VendorID[10415] Value[1]
Flags[M=true;E=true;V=true]
| AVP: Code[507] VendorID[10415] Value[permit in 17 from
192.168.0.55 6410 to any ] Flags[M=true;E=true;V=true]
| AVP: Code[519] VendorID[10415] Value[<Grouped>]
Flags[M=true;E=false;V=true]
| AVP: Code[509] VendorID[10415] Value[2]
Flags[M=true;E=true;V=true]
| AVP: Code[512] VendorID[10415] Value[1]
Flags[M=true;E=true;V=true]
| AVP: Code[507] VendorID[10415] Value[permit in 17 from
192.168.0.55 6411 to any ] Flags[M=true;E=true;V=true]
| AVP: Code[524] VendorID[10415] Value[downlinkofferm=audio 6410 RTP/
AVP 0 8 3 101a=rtpmap:101 telephone-event/8000a=fmtp:101 0-15]
Flags[M=true;E=false;V=true]
| AVP: Code[511] VendorID[10415] Value[2]
Flags[M=true;E=false;V=true]
| AVP: Code[518] VendorID[10415] Value[1]
Flags[M=true;E=false;V=true]
| AVP: Code[283] VendorID[0] Value[web-ukraine.com]
Flags[M=true;E=false;V=false]
| AVP: Code[457] VendorID[13019] Value[0]
Flags[M=false;E=false;V=true]
+-----------------------------------------------------------------------------
+

15:09:04,813 INFO [AuthSessionFactoryImpl] Diameter Base
AuthorizationSessionFactory :: stateChanged ::
source[org.jdiameter.client.impl.app.auth.ClientAuthSessionImpl@667b06b6],
oldState[IDLE], newState[PENDING]
15:09:04,813 INFO [DiameterActivityImpl] Gq Client FSM State Changed:
IDLE => PENDING
15:09:04,814 ERROR [CallProxySbb] Failure trying to create/send AAR.
java.io.IOException: Failed to send message, due to:
org.jdiameter.api.InternalException: java.lang.NullPointerException
at
com.webukraine.ims.diameter.gq.ra.GqClientSessionActivityImpl.sendGqAARequest(GqClientSessionActivityImpl.java:
127)
at com.webukraine.ims.core.pcscf.CallProxySbb.onINVITE(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityImpl.java:
497)
at
org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQueuedEvent(EventRoutingTaskImpl.java:
378)
at
org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(EventRoutingTaskImpl.java:
126)
at org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl
$EventRoutingTaskStatsCollector.run(EventRouterExecutorImpl.java:73)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

2) With destination host
15:23:40,279 INFO [DiameterGqResourceAdaptor] Activity started
[Diameter Session ID[pcscf1.web-ukraine.com;303;3222093329]]
15:23:40,307 INFO [CallProxySbb] Sending Message
+----------------------------------- HEADER
----------------------------------+
| Version.................1
| Message-Length..........0
| Command-Flags...........R[true] P[true] E[false] T[false]
| Command-Code............265
| Application-Id..........16777222
| Hop-By-Hop Identifier...0
| End-To-End Identifier...741343310
+------------------------------------ AVPs
-----------------------------------+
| AVP: Code[260] VendorID[0] Value[<Grouped>]
Flags[M=true;E=false;V=false]
| AVP: Code[266] VendorID[0] Value[10415]
Flags[M=true;E=false;V=false]
| AVP: Code[258] VendorID[0] Value[16777222]
Flags[M=true;E=false;V=false]
| AVP: Code[264] VendorID[0] Value[pcscf1.web-ukraine.com]
Flags[M=true;E=false;V=false]
| AVP: Code[296] VendorID[0] Value[web-ukraine.com]
Flags[M=true;E=false;V=false]
| AVP: Code[523] VendorID[10415] Value[0] Flags[M=true;E=false;V=true]
| AVP: Code[513] VendorID[10415] Value[2] Flags[M=true;E=false;V=true]
| AVP: Code[513] VendorID[10415] Value[4] Flags[M=true;E=false;V=true]
| AVP: Code[513] VendorID[10415] Value[6] Flags[M=true;E=false;V=true]
| AVP: Code[517] VendorID[10415] Value[<Grouped>]
Flags[M=true;E=false;V=true]
| AVP: Code[520] VendorID[10415] Value[0]
Flags[M=true;E=false;V=true]
| AVP: Code[519] VendorID[10415] Value[<Grouped>]
Flags[M=true;E=false;V=true]
| AVP: Code[509] VendorID[10415] Value[1]
Flags[M=true;E=true;V=true]
| AVP: Code[507] VendorID[10415] Value[permit in 17 from
192.168.0.55 7538 to any ] Flags[M=true;E=true;V=true]
| AVP: Code[519] VendorID[10415] Value[<Grouped>]
Flags[M=true;E=false;V=true]
| AVP: Code[509] VendorID[10415] Value[2]
Flags[M=true;E=true;V=true]
| AVP: Code[512] VendorID[10415] Value[1]
Flags[M=true;E=true;V=true]
| AVP: Code[507] VendorID[10415] Value[permit in 17 from
192.168.0.55 7539 to any ] Flags[M=true;E=true;V=true]
| AVP: Code[524] VendorID[10415] Value[downlinkofferm=audio 7538 RTP/
AVP 0 8 3 101a=rtpmap:101 telephone-event/8000a=fmtp:101 0-15]
Flags[M=true;E=false;V=true]
| AVP: Code[511] VendorID[10415] Value[2]
Flags[M=true;E=false;V=true]
| AVP: Code[518] VendorID[10415] Value[1]
Flags[M=true;E=false;V=true]
| AVP: Code[283] VendorID[0] Value[web-ukraine.com]
Flags[M=true;E=false;V=false]
| AVP: Code[293] VendorID[0] Value[aaa://spdf.web-ukraine.com:3868]
Flags[M=true;E=false;V=false]
| AVP: Code[457] VendorID[13019] Value[0]
Flags[M=false;E=false;V=true]
+-----------------------------------------------------------------------------
+

15:23:40,308 INFO [AuthSessionFactoryImpl] Diameter Base
AuthorizationSessionFactory :: stateChanged ::
source[org.jdiameter.client.impl.app.auth.ClientAuthSessionImpl@667b0e3a],
oldState[IDLE], newState[PENDING]
15:23:40,308 INFO [DiameterActivityImpl] Gq Client FSM State Changed:
IDLE => PENDING

3) Other side log ( there is nothing implement yet , but i have
configured diameter to check whether it receives the message ):
2011-05-05 15:07:07,847 INFO
[org.jdiameter.server.impl.io.tcp.NetworkGuard] Open incomming
connection Socket[addr=/172.20.20.58,port=39592,localport=3868]
2011-05-05 15:23:40,314 INFO
[org.mobicents.diameter.stack.DiameterStackMultiplexer] Diameter Stack
Mux :: processRequest :: Command-Code [265]
2011-05-05 15:23:40,315 INFO
[javax.slee.RAEntityNotification[entity=DiameterGq].DiameterGqResourceAdaptor]
Diameter Gq RA :: Got Request. Command-Code[265]
2011-05-05 15:23:40,385 INFO
[javax.slee.RAEntityNotification[entity=DiameterGq].DiameterGqResourceAdaptor]
Activity started [Diameter Session ID[pcscf1.web-ukraine.com;
303;3222093329]]
2011-05-05 15:23:40,394 INFO
[org.mobicents.slee.resource.diameter.base.handlers.AuthorizationSessionFactory]
Diameter Base AuthorizationSessionFactory :: doOtherEvent ::
appSession[org.jdiameter.server.impl.app.auth.ServerAuthSessionImpl@667b0e3a],
Request[MessageImpl{commandCode=265, flags=192}], Answer[null]

Best regards
Yulian Oifa

Alexandre Mendonça

unread,
Jun 5, 2011, 4:32:45 AM6/5/11
to mobicent...@googlegroups.com
Yulian,

Have you checked that it works properly now, since patch was applied?

Thanks & Regards,

--
Alexandre Mendonça // JBoss R&D
http://ammendonca.blogspot.com/



Reply all
Reply to author
Forward
0 new messages