SUBMIT_MULTI_RESP - unsuccess_sme(s)

  • Nobody/Anonymous


    How to set the unsuccess_sme(s) in SUBMIT_MULTI_RESP.

    It works with [{message_id, "0"},{no_unsuccess,0},{unsuccess_sme,[]}]

    But my different tries to set the {unsuccess_sme,[]} with the data of dest_addr_ton, dest_addr_npi, destination_addr,error_status_code fails.

    Can anybody help.

    Thanks in advance.

    Sanjaya Vitharana.

    • Enrique Marcote Peńa

      Hi Sanjaya,

      unsuccess_sme is supported, find below a simple example.  If any doubt, please let me know.  In future posts, your sample code will be greatly helpful. 

      One important issue to be aware of regarding submit_multi_resp, is that no_unsuccess is automatically calculated and inserted from the list of unsuccess_sme(s), thus should not be added in params (find further comments on this in the hrl files)

      sample() ->
          SME1 = #unsuccess_sme{dest_addr_ton = ?TON_INTERNATIONAL,
                                dest_addr_npi = ?NPI_ISDN,
                                destination_addr = "654321",
                                error_status_code = ?ESME_RINVEXPIRY},

          SME2 = #unsuccess_sme{dest_addr_ton = ?TON_INTERNATIONAL,
                                dest_addr_npi = ?NPI_ISDN,
                                destination_addr = "123456",
                                error_status_code = ?ESME_RINVEXPIRY},
          Params = [{message_id, "ABC"},
                    {unsuccess_sme, [SME1, SME2]}],
          Pdu = operation:new(?COMMAND_ID_SUBMIT_MULTI_RESP, 1, Params),
          {ok, [Head,Body]} = operation:pack(Pdu),
          binary:to_hexlist(Head) ++ binary:to_hexlist(Body).
      This function will return:



      0000002F  command_length
      80000021 command_id
      00000000 command_status
      00000001 sequence_number

      41424300 message_id is "ABC"

      02 no_unsuccess is 2

      01 dest_addr_ton
      01 dest_addr_npi
      36353433323100 destination_addr "654321"
      00000062 error_status_code

      01 dest_addr_ton
      01 dest_addr_npi
      31323334353600 destination_addr is "123456"
      00000062 error_status_code

      Hope this helps,



Log in to post a comment.