[SR-Users] Error Registering the user and finding the AVP

Henning Westerholt hw at skalatan.de
Tue Aug 6 09:32:16 CEST 2019


Hello Javier,

I am sorry but I don't know the details of this particular module. Maybe 
somebody else from the IMS guys can step in here to support.

I can just give you some general debugging help - try to execute with 
DEBUG log level, maybe add some more debugging logging to the code. You 
can also use the "debugger" module to get detailed information about the 
cfg execution or to filter to certain modules.

Cheers,

Henning

Am 05.08.19 um 19:01 schrieb jespinosa:
> Hello Henning Westerholt,
>
> First of all thanks for your fast answer, as you mentioned I had not 
> defined that xml file but I have defined three xml for each node (that 
> are referenced in kamailio.cfg also one per node) that contains the 
> DiameterPeer information and for the icscf.xml this is the parameters:
> <?xml version="1.0" encoding="UTF-8"?>
> <DiameterPeer
>         FQDN="icscf.net1.test"
>         Realm="net1.test"
>         Vendor_Id="10415"
>         Product_Name="CDiameterPeer"
>         AcceptUnknownPeers="1"
>         DropUnknownOnDisconnect="1"
>         Tc="30"
>         Workers="4"
>         QueueLength="8"
>         TransactionTimeout="5"
>         SessionsHashSize="128"
>         DefaultAuthSessionTimeout="345600"
>         MaxAuthSessionTimeout="345600">
>
>
>
>         <Peer FQDN="hss6.morsecore.epc.mnc001.mcc001.3gppnetwork.org" 
> Realm="epc.mnc001.mcc001.3gppnetwork.org" port="3868" 
> src_addr="127.0.0.20"/>
>
>         <Acceptor port="3868" bind="127.0.0.20"/>
>
>         <Auth id="16777216" vendor="10415"/>
>         <SupportedVendor vendor="10415" />
>
>         <!--Realm name="epc.mnc001.mcc001.3gppnetwork.org">
>                 <Route 
> FQDN="hss6.morsecore.epc.mnc001.mcc001.3gppnetwork.org" metric="1"/>
>         </Realm-->
>         <DefaultRoute 
> FQDN="hss6.morsecore.epc.mnc001.mcc001.3gppnetwork.org" metric="2"/> 
> <!--DefaultRoute is needed for vendor=0 -->
> </DiameterPeer>
>
> For the node P-CSCF this is the XML file:
> <?xml version="1.0" encoding="UTF-8"?>
> <DiameterPeer
>         FQDN="pcscf.net1.test"
>         Realm="net1.test"
>         Vendor_Id="10415"
>         Product_Name="CDiameterPeer"
>         AcceptUnknownPeers="1"
>         DropUnknownOnDisconnect="1"
>         Tc="30"
>         Workers="4"
>         QueueLength="8"
>         TransactionTimeout="5"
>         SessionsHashSize="128"
>         DefaultAuthSessionTimeout="345600"
>         MaxAuthSessionTimeout="345600">
>
>
>
>         <Peer FQDN="pcrf2.morsecore.epc.mnc001.mcc001.3gppnetwork.org" 
> Realm="epc.mnc001.mcc001.3gppnetwork.org" port="3868" 
> src_addr="10.102.81.111"/>
>
>         <Acceptor port="3868" bind="10.102.81.111"/>
>
>         <Auth id="16777236" vendor="10415"/>
>         <SupportedVendor vendor="10415" />
>
>         <!--Realm name="epc.mnc001.mcc001.3gppnetwork.org">
>                 <Route 
> FQDN="pcrf2.morsecore.epc.mnc001.mcc001.3gppnetwork.org" metric="1"/>
>         </Realm-->
>         <DefaultRoute 
> FQDN="pcrf2.morsecore.epc.mnc001.mcc001.3gppnetwork.org" metric="2"/> 
> <!--DefaultRoute is needed for vendor=0 -->
> </DiameterPeer>
>
> And for the S-CSCF:
> <?xml version="1.0" encoding="UTF-8"?>
> <DiameterPeer
>         FQDN="scscf.net1.test"
>         Realm="net1.test"
>         Vendor_Id="10415"
>         Product_Name="CDiameterPeer"
>         AcceptUnknownPeers="1"
>         DropUnknownOnDisconnect="1"
>         Tc="30"
>         Workers="4"
>         QueueLength="8"
>         TransactionTimeout="5"
>         SessionsHashSize="128"
>         DefaultAuthSessionTimeout="345600"
>         MaxAuthSessionTimeout="345600">
>
>
>
>         <Peer FQDN="hss6.morsecore.epc.mnc001.mcc001.3gppnetwork.org" 
> Realm="epc.mnc001.mcc001.3gppnetwork.org" port="3868" 
> src_addr="127.0.0.22"/>
>
>         <Acceptor port="3868" bind="127.0.0.22"/>
>
>         <Auth id="16777216" vendor="10415"/>
>         <SupportedVendor vendor="10415" />
>
>         <!--Realm name="epc.mnc001.mcc001.3gppnetwork.org">
>                 <Route 
> FQDN="hss6.morsecore.epc.mnc001.mcc001.3gppnetwork.org" metric="1"/>
>         </Realm-->
>         <DefaultRoute 
> FQDN="hss6.morsecore.epc.mnc001.mcc001.3gppnetwork.org" metric="2"/> 
> <!--DefaultRoute is needed for vendor=0 -->
> </DiameterPeer>
>
> Maybe this could help to find the answer to my problem. Thank you a lot.
> Kind regards,
> Javier Espinosa.
>
>
>> Hello Javiar,
>>
>> I am not an IMS expert - but see my comment below inline:
>>
>> Am 02.08.19 um 14:05 schrieb jespinosa:
>>> Hello,
>>> My name is Javier, I must first apologize for my little knowledge
>>> about the tool and my poor English. I am trying to connect a
>>> functional core network LTE with Kamailio and I have used the Polaris
>>> Networks Solution that brings an iso with both functionalities.
>>> The EPC is correctly configured and working because I can have data
>>> connection in my UE, I have also activated all the IMS options in the
>>> EPC: I have created the APN with ims identifier, the default carrier
>>> QCI assigned is 5 (for SIP signaling), the MME has activated the
>>> option to support IMS Voice over the PS session and the HSS and PCRF
>>> nodes are configured with the interfaces at the addresses and ports
>>> Cx-HSS 127.0.0.1:3868 and Cx-PCRF 10.11.0.35:3868 .
>>> There are several parameters that I do not know if it is necessary to
>>> activate, for example, in the PCRF the customization of the QCI for
>>> the media type, if I must include the OCS and OFCS as nodes, or if in
>>> the profile of my APN I must include authentication by PDN AAA.
>>> The configuration I use for the IMS is as follows:
>>> imsrealm = net1.test
>>> imsport = 5060
>>> pcscfgmip = 10.77.0.35
>>> pcscfgmipintf = eth6
>>> pcscfrxip = 10.102.81.111
>>> pcscfrxipintf = eth1
>>> icscfmwip = 127.0.0.21
>>> icscfmwipintf = lo:21
>>> icscfcxip = 127.0.0.20
>>> icscfcxipintf = lo:20
>>> scscfmwip = 127.0.0.23
>>> scscfmwipintf = lo:23
>>> scscfcxip = 127.0.0.22
>>> scscfcxipintf = lo:22
>>> audiobandwidth = 64
>>> videobandwidth = 128
>>> epcrealm = epc.mnc001.mcc001.3gppnetwork.org
>>> pcrfhost = pcrf2.morsecore
>>> pcrfrxip = 10.11.0.35
>>> pcrfrxport = 3868
>>> hsshost = hss6.morsecore
>>> hsscxdxip = 127.0.0.1
>>> hsscxdxport = 3868
>>>
>>> Both cores are running on the same machine but I have disabled the
>>> option of PCRF Co-located with IMS to be able to edit the pcrf host
>>> name since if I enable it it does not reach the peer pcrf.localhost
>>> even if the DNS is well configured. My UE is not able to launch the
>>> REGISTER by itself when it is going to make a call, so I am using the
>>> Google IMSDroid application to be able to launch the SIP requests and
>>> check the operation of the IMS. In the application of the UE the
>>> configuration is as follows:
>>> Identity: Alice
>>> Public Identity: sip:<MSISDN>@net1.test (MSISDN=8800000451 configurado
>>> previamente en el EPC)
>>> Private Identity: sip:<IMSI>@net1.test (IMSI incluyendo MCC y MNC)
>>> Password: alice
>>> Realm: net1.test (Aunque no sé si debo poner aquí
>>> epc.mnc001.mcc001.3gppnetwork.org, pero entonces la petición da error)
>>> Network: Proxy-CSCF Host: 10.77.0.35:5060 Transport UDP and NO
>>> Proxy-CSCF discovery.
>>>
>>> So, I launch my request and the log of the P-CSCF node is as follows:
>>> Aug  2 12:50:04 morsecore kamailio[53656]: INFO: <script>: REGISTER
>>> (sip:8800000451 at net1.test (10.77.0.196:37651) to
>>> sip:8800000451 at net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
>>> Aug  2 12:50:04 morsecore kamailio[53656]: INFO: cdp
>>> [authstatemachine.c:200]: auth_client_statefull_sm_process(): after
>>> callback of event 1
>>> Aug  2 12:50:04 morsecore kamailio[53802]: INFO: cdp
>>> [authstatemachine.c:200]: auth_client_statefull_sm_process(): after
>>> callback of event 7
>>> Aug  2 12:50:04 morsecore kamailio[53655]: INFO: <script>: REGISTER
>>> (sip:8800000451 at net1.test (10.77.0.196:37651) to
>>> sip:8800000451 at net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
>>> Aug  2 12:50:05 morsecore kamailio[53664]: INFO: <script>: REGISTER
>>> (sip:8800000451 at net1.test (10.77.0.196:37651) to
>>> sip:8800000451 at net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
>>> Aug  2 12:50:07 morsecore kamailio[53659]: INFO: <script>: REGISTER
>>> (sip:8800000451 at net1.test (10.77.0.196:37651) to
>>> sip:8800000451 at net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
>>> Aug  2 12:50:11 morsecore kamailio[53666]: INFO: <script>: REGISTER
>>> (sip:8800000451 at net1.test (10.77.0.196:37651) to
>>> sip:8800000451 at net1.test, 76203fe6-1d8f-bcba-c9ab-4050ac0d8cc8)
>>>
>>> I understand that everything is correct until now, but in the I-CSCF
>>> node it appears:
>>> Aug  2 12:50:04 morsecore kamailio[53397]: INFO: ims_icscf
>>> [cxdx_uar.c:71]: create_uaa_return_code(): created AVP successfully :
>>> [uaa_return_code]
>>> Aug  2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
>>> [cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_server_name: Failed finding
>>> avp
>>> Aug  2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
>>> [cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_capabilities: Failed
>>> finding avp
>>> Aug  2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
>>> [cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_result_code: Failed finding
>>> avp
>>> Aug  2 12:50:04 morsecore kamailio[53465]: ERROR: ims_icscf
>>> [cxdx_uar.c:152]: async_cdp_uar_callback():
>>> RC_IMS_DIAMETER_ERROR_USER_UNKNOWN
>>> Aug  2 12:50:04 morsecore kamailio[53465]: INFO: ims_icscf
>>> [cxdx_uar.c:71]: create_uaa_return_code(): created AVP successfully :
>>> [uaa_return_code]
>>> Aug  2 12:50:04 morsecore kamailio[53465]: ERROR: <script>: UAR
>>> failure - error response sent from module
>>
>> This is the code that creates this error:
>>
>> avp = cdpb.AAAFindMatchingAVP(msg,0,avp_code,vendor_id,0);
>>          if (avp==0){
>>                  LM_INFO("%s: Failed finding avp\n",func);
>>                  return r;
>>          }
>>
>> So the module can't execute the AAAFindMatchingAVP function imported
>> from the CDP module. The README mentions a XML file that needs to be
>> defined, have you setup this as well?
>>
>>
>>> Where I believe that the REGISTER message is not even forwarded,
>>> however it seems that it gives an error that the user is unknown or
>>> not registered but if I access the MySQL database, the registered
>>> users are:
>>> +----+------------+-----------+----------+---------------+----------------------------------+----------------------------------+------+ 
>>>
>>>
>>> | id | username   | domain    | password | email_address |
>>> ha1                              | ha1b                             |
>>> rpid |
>>> +----+------------+-----------+----------+---------------+----------------------------------+----------------------------------+------+ 
>>>
>>>
>>> |  1 | alice      | net1.test | alice    |               |
>>> 91cc8c652ef5f37e91c468c7319d0086 | 044776963e2661788e8db076b393333e |
>>> NULL |
>>> |  2 | bob        | net1.test | bob      |               |
>>> 6ef7f9c924f1385d83cf22cbb94cfbbb | 0d893d2d8c10a044b918e4bd73b6bee5 |
>>> NULL |
>>> |  3 | 8800000451 | net1.test | alice    |               |
>>> 46811c4e58f298953a6f9efccf6c32f1 | 49c7a7ad84fe797fbefa2185be4cd226 |
>>> NULL |
>>> +----+------------+-----------+----------+---------------+----------------------------------+----------------------------------+------+ 
>>>
>>>
>>>
>>> However, I do not know if it is accessing the mounted MySQL database
>>> or accessing the HSS and on this node, in the databases it does not
>>> contain the user (although it must be because it is registered in the
>>> network correctly).
>>> In case it works, this is the trace of wireshark filtered by the
>>> protocols S1AP, SIP and Diameter just when a REGISTER request is
>>> launched:
>>> "596","2019-08-02
>>> 12:50:00.705985000","127.0.0.20","127.0.0.1","DIAMETER","130","cmd=Device-Watchdog 
>>>
>>> Request(280) flags=R--- appl=Diameter Common Messages(0) h2h=fedcb89
>>> e2e=4df0bbf5 | "
>>> "597","2019-08-02
>>> 12:50:00.706133000","127.0.0.1","127.0.0.20","DIAMETER","210","cmd=Device-Watchdog 
>>>
>>> Answer(280) flags=---- appl=Diameter Common Messages(0) h2h=fedcb89
>>> e2e=4df0bbf5 | "
>>> "599","2019-08-02
>>> 12:50:00.786878000","127.0.0.22","127.0.0.1","DIAMETER","130","cmd=Device-Watchdog 
>>>
>>> Request(280) flags=R--- appl=Diameter Common Messages(0) h2h=fedcb89
>>> e2e=4df0bbf5 | "
>>> "600","2019-08-02
>>> 12:50:00.787019000","127.0.0.1","127.0.0.22","DIAMETER","210","cmd=Device-Watchdog 
>>>
>>> Answer(280) flags=---- appl=Diameter Common Messages(0) h2h=fedcb89
>>> e2e=4df0bbf5 | "
>>> "602","2019-08-02
>>> 12:50:00.914405000","10.102.81.111","10.11.0.35","DIAMETER","130","cmd=Device-Watchdog 
>>>
>>> Request(280) flags=R--- appl=Diameter Common Messages(0) h2h=fedcb89
>>> e2e=4df0bbf5 | "
>>> "603","2019-08-02
>>> 12:50:00.914549000","10.11.0.35","10.102.81.111","DIAMETER","214","cmd=Device-Watchdog 
>>>
>>> Answer(280) flags=---- appl=Diameter Common Messages(0) h2h=fedcb89
>>> e2e=4df0bbf5 | "
>>> "622","2019-08-02 12:50:04.027238000","10.77.0.196","10.77.0.35","GTP
>>> <SIP>","1034","Request: REGISTER sip:net1.test  (1 binding) | "
>>> "623","2019-08-02 12:50:04.027347000","10.77.0.196","10.77.0.35","GTP
>>> <SIP>","1034","Request: REGISTER sip:net1.test  (1 binding) | "
>>> "624","2019-08-02
>>> 12:50:04.027448000","10.77.0.196","10.77.0.35","SIP","998","Request:
>>> REGISTER sip:net1.test  (1 binding) | "
>>> "625","2019-08-02
>>> 12:50:04.028850000","10.102.81.111","10.11.0.35","DIAMETER","426","cmd=AA 
>>>
>>> Request(265) flags=RP-- appl=3GPP Rx(16777236) h2h=fedcb8a
>>> e2e=4df0bbf6 | "
>>> "626","2019-08-02
>>> 12:50:04.029862000","10.11.0.35","10.102.81.111","DIAMETER","350","cmd=AA 
>>>
>>> Answer(265) flags=-P-- appl=3GPP Rx(16777236) h2h=fedcb8a e2e=4df0bbf6
>>> | "
>>> "630","2019-08-02
>>> 12:50:04.031113000","10.77.0.35","127.0.0.21","SIP","1280","Request:
>>> REGISTER sip:net1.test  (1 binding) | "
>>> "631","2019-08-02
>>> 12:50:04.031794000","127.0.0.21","10.77.0.35","SIP","440","Status: 100
>>> Trying | "
>>> "632","2019-08-02
>>> 12:50:04.032382000","127.0.0.20","127.0.0.1","DIAMETER","354","cmd=User-Authorization 
>>>
>>> Request(300) flags=RP-- appl=3GPP Cx(16777216) h2h=fedcb8a
>>> e2e=4df0bbf6 | "
>>> "633","2019-08-02
>>> 12:50:04.033101000","127.0.0.1","127.0.0.20","DIAMETER","298","cmd=User-Authorization 
>>>
>>> Answer(300) flags=-P-- appl=3GPP Cx(16777216) h2h=fedcb8a e2e=4df0bbf6
>>> | "
>>> "636","2019-08-02
>>> 12:50:04.033557000","127.0.0.21","10.77.0.35","SIP","504","Status: 403
>>> Forbidden - HSS User Unknown | "
>>>
>>> I don't know if any information or configuration details are missing
>>> but I can attach it at any time without any problem.
>>> Regards and thank you very much in advance,
>>> Javier Espinosa.
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services



More information about the sr-users mailing list