MOR API device details get

From Kolmisoft Wiki
Jump to navigationJump to search

Description

MOR API Device details get

Usage

  • From MOR X5 call: /api/device_details_get
  • Methods: POST, GET(if allowed, not recomended)



Parametres

  • u – username for authentication. Required.
  • device_id – id of the device which details you want to get.
  • device_u – username of the device which details you want to get. (Note that device_id cant be used with device_u, if both parametres are used, firstly, device_id would be used)
  • hash – SHA1 hash constructed using device_id and API_Secret_Key ( More described in Constructing hash). Required.

Please note that admin/reseller can retrieve Device details just for their own Users. Simple users cannot check device details.

Request

We have API Secret Key = 456789, device_id = 5

We send:

HTML POST: http://<SERVER_IP>/billing/api/device_details_get?u=admin&device_id=5&hash=65fd575c441513bd114b84c7dbdb01e0f2716d27

* Note that username is not included in hash

Returns

Success

<page>
    <name>101  </name>
    <host>dynamic  </host>
    <secret>vauvszef  </secret>
    <context>mor_local  </context>
    <ipaddr>0.0.0.0  </ipaddr>
    <port>0  </port>
    <regseconds>1175892667  </regseconds>
    <accountcode>2  </accountcode>
    <callerid>"101" <101>  </callerid>
    <extension>101  </extension>
    <voicemail_active>0  </voicemail_active>
    <username>101  </username>
    <device_type>IAX2  </device_type>
    <works_not_logged>1  </works_not_logged>
    <forward_to>0  </forward_to>
    <record>0  </record>
    <transfer>no  </transfer>
    <disallow>all  </disallow>
    <allow>all  </allow>
    <deny>0.0.0.0/0.0.0.0  </deny>
    <permit>0.0.0.0/0.0.0.0  </permit>
    <nat>yes  </nat>
    <qualify>500  </qualify>
    <fullcontact>  </fullcontact>
    <canreinvite>no  </canreinvite>
    <dtmfmode>rfc2833  </dtmfmode>
    <callgroup>  </callgroup>
    <pickupgroup>  </pickupgroup>
    <fromuser>  </fromuser>
    <fromdomain>  </fromdomain>
    <trustrpid>no  </trustrpid>
    <sendrpid>no  </sendrpid>
    <insecure>no  </insecure>
    <progressinband>never  </progressinband>
    <videosupport>no  </videosupport>
    <description>Test Device #1  </description>
    <istrunk>0  </istrunk>
    <cid_from_dids>0  </cid_from_dids>
    <pin>  </pin>
    <tell_balance>0  </tell_balance>
    <tell_time>0  </tell_time>
    <tell_rtime_when_left>60  </tell_rtime_when_left>
    <repeat_rtime_every>60  </repeat_rtime_every>
    <t38pt_udptl>no  </t38pt_udptl>
    <regserver>  </regserver>
    <ani>0  </ani>
    <promiscredir>no  </promiscredir>
    <timeout>60  </timeout><process_sipchaninfo>0  </process_sipchaninfo>
    <allow_duplicate_calls>0  </allow_duplicate_calls>
    <call_limit>0  </call_limit>
    <lastms>0  </lastms>
    <faststart>yes  </faststart>
    <h245tunneling>yes  </h245tunneling>
    <latency>0.0  </latency>
    <grace_time>0  </grace_time>
    <recording_to_email>0  </recording_to_email>
    <recording_keep>0  </recording_keep>
    <recording_email>
    </recording_email>
    <record_forced>0  </record_forced>
    <fake_ring>0  </fake_ring>
    <save_call_log>0  </save_call_log>
    <mailbox>  </mailbox>
    <enable_mwi>0  </enable_mwi>
    <authuser>  </authuser>
    <requirecalltoken>no  </requirecalltoken>
    <language>  </language>
    <use_ani_for_cli>false  </use_ani_for_cli>
    <calleridpres>  </calleridpres>
    <change_failed_code_to>0  </change_failed_code_to>
    <reg_status>  </reg_status>
    <max_timeout>0  </max_timeout>
    <anti_resale_auto_answer>0  </anti_resale_auto_answer>
    <qf_tell_balance>0  </qf_tell_balance>
    <qf_tell_time>0  </qf_tell_time>
    <time_limit_per_day>0  </time_limit_per_day>
    <control_callerid_by_cids>  </control_callerid_by_cids>
    <callerid_advanced_control>0  </callerid_advanced_control>
    <transport>udp  </transport>
    <subscribemwi>  </subscribemwi>
    <encryption>no  </encryption>
    <block_callerid>0  </block_callerid>
    <tell_rate>0  </tell_rate>
    <trunk>no  </trunk>
    <proxy_port>0  </proxy_port>
    <cps_call_limit>0  </cps_call_limit>
    <cps_period>0  </cps_period>
    <timerb>6400  </timerb>
    <op>0  </op>
    <op_active>0  </op_active>
    <op_tech_prefix>  </op_tech_prefix>
    <op_routing_algorithm>lcr  </op_routing_algorithm>
    <op_capacity>500  </op_capacity>
    <op_src_regexp>  </op_src_regexp>
    <op_src_deny_regexp>  </op_src_deny_regexp>
    <tp>0  </tp>
    <tp_active>0  </tp_active>
    <tp_tech_prefix>  </tp_tech_prefix>
    <tp_capacity>500  </tp_capacity>
    <tp_src_regexp>  </tp_src_regexp>
    <tp_src_deny_regexp>  </tp_src_deny_regexp>
    <defaultuser>101  </defaultuser>
    <useragent>  </useragent>
    <type>friend  </type>
    <md5secret>  </md5secret>
    <remotesecret>  </remotesecret>
    <directmedia>  </directmedia>
    <useclientcode>  </useclientcode>
    <setvar>     </setvar>
    <amaflags>     </amaflags>
    <callcounter>     </callcounter>
    <busylevel>     </busylevel>
    <allowoverlap>     </allowoverlap>
    <allowsubscribe>     </allowsubscribe>
    <maxcallbitrate>     </maxcallbitrate>
    <rfc2833compensate>     </rfc2833compensate>
    <session-timers>     </session-timers>
    <session-expires>     </session-expires>
    <session-minse>     </session-minse>
    <session-refresher>     </session-refresher>
    <t38pt_usertpsource>     </t38pt_usertpsource>
    <regexten>     </regexten>
    <defaultip>     </defaultip>
    <rtptimeout>     </rtptimeout>
    <rtpholdtimeout>     </rtpholdtimeout>
    <outboundproxy>     </outboundproxy>
    <callbackextension>     </callbackextension>
    <timert1>     </timert1>
    <qualifyfreq>     </qualifyfreq>
    <constantssrc>     </constantssrc>
    <contactpermit>     </contactpermit>
    <contactdeny>     </contactdeny>
    <usereqphone>     </usereqphone>
    <textsupport>     </textsupport>
    <faxdetect>     </faxdetect>
    <buggymwi>     </buggymwi>
    <auth>md5  </auth>
    <fullname>     </fullname>
    <trunkname>     </trunkname>
    <cid_number>     </cid_number>
    <callingpres>     </callingpres>
    <mohinterpret>     </mohinterpret>
    <mohsuggest>     </mohsuggest>
    <parkinglot>     </parkinglot>
    <hasvoicemail>     </hasvoicemail>
    <vmexten>     </vmexten>
    <autoframing>     </autoframing>
    <rtpkeepalive>     </rtpkeepalive>
    <call-limit>     </call-limit>
    <g726nonstandard>     </g726nonstandard>
    <ignoresdpversion>     </ignoresdpversion>
    <allowtransfer>     </allowtransfer>
    <dynamic>     </dynamic>
    <codecs>
        <audio_codecs>    </audio_codecs>
        <video_codecs>    </video_codecs>
    </codecs>
</page>

If device_details_get is used for FAX device, you will also get such additional return:

  <pdf_fax_emails>  </pdf_fax_emails>

Errors

  • <error>Access Denied</error> – User was not found by such username. Make sure that username (u) is specified.
  • <error>Device was not found</error> – such device does not exist in the system or device does not belong to your scope.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also