Difference between revisions of "MOR API device details get"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 62: Line 62:
     <fromuser>  </fromuser>
     <fromuser>  </fromuser>
     <fromdomain>  </fromdomain>
     <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>
    <trustrpid>no  </trustrpid>
  </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>
    <sendrpid>no  </sendrpid>
  </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>
    <insecure>no  </insecure>
<qf_tell_time>0  </qf_tell_time>
    <progressinband>never  </progressinband>
<time_limit_per_day>0  </time_limit_per_day>
    <videosupport>no  </videosupport>
<control_callerid_by_cids>  </control_callerid_by_cids>
    <description>Test Device #1  </description>
<callerid_advanced_control>0  </callerid_advanced_control>
    <istrunk>0  </istrunk>
<transport>udp  </transport>
    <cid_from_dids>0  </cid_from_dids>
<subscribemwi>  </subscribemwi>
    <pin>  </pin>
<encryption>no  </encryption>
    <tell_balance>0  </tell_balance>
<block_callerid>0  </block_callerid>
    <tell_time>0  </tell_time>
<tell_rate>0  </tell_rate>
    <tell_rtime_when_left>60  </tell_rtime_when_left>
<trunk>no  </trunk>
    <repeat_rtime_every>60  </repeat_rtime_every>
<proxy_port>0  </proxy_port>
    <t38pt_udptl>no  </t38pt_udptl>
<cps_call_limit>0  </cps_call_limit>
    <regserver>  </regserver>
<cps_period>0  </cps_period>
    <ani>0  </ani>
<timerb>6400  </timerb>
    <promiscredir>no  </promiscredir>
<op>0  </op>
    <timeout>60  </timeout><process_sipchaninfo>0  </process_sipchaninfo>
<op_active>0  </op_active>
    <allow_duplicate_calls>0  </allow_duplicate_calls>
<op_tech_prefix>  </op_tech_prefix>
    <call_limit>0  </call_limit>
<op_routing_algorithm>lcr  </op_routing_algorithm>
    <lastms>0  </lastms>
<op_capacity>500  </op_capacity>
    <faststart>yes  </faststart>
<op_src_regexp>  </op_src_regexp>
    <h245tunneling>yes  </h245tunneling>
<op_src_deny_regexp>  </op_src_deny_regexp>
    <latency>0.0  </latency>
<tp>0  </tp>
    <grace_time>0  </grace_time>
<tp_active>0  </tp_active>
    <recording_to_email>0  </recording_to_email>
<tp_tech_prefix>  </tp_tech_prefix>
    <recording_keep>0  </recording_keep>
<tp_capacity>500  </tp_capacity>
    <recording_email>
<tp_src_regexp>  </tp_src_regexp>
    </recording_email>
<tp_src_deny_regexp>  </tp_src_deny_regexp>
    <record_forced>0  </record_forced>
<defaultuser>101  </defaultuser>
    <fake_ring>0  </fake_ring>
<useragent>  </useragent>
    <save_call_log>0  </save_call_log>
<type>friend  </type>
    <mailbox>  </mailbox>
<md5secret>  </md5secret>
    <enable_mwi>0  </enable_mwi>
<remotesecret>  </remotesecret>
    <authuser> </authuser>
<directmedia>  </directmedia>
    <requirecalltoken>no  </requirecalltoken>
<useclientcode>
    <language>  </language>
  </useclientcode><setvar>
    <use_ani_for_cli>false  </use_ani_for_cli>
  </setvar><amaflags>
    <calleridpres>  </calleridpres>
  </amaflags><callcounter>
    <change_failed_code_to>0  </change_failed_code_to>
  </callcounter><busylevel>
    <reg_status>  </reg_status>
  </busylevel><allowoverlap>
    <max_timeout>0  </max_timeout>
  </allowoverlap><allowsubscribe>
    <anti_resale_auto_answer>0  </anti_resale_auto_answer>
  </allowsubscribe><maxcallbitrate>
    <qf_tell_balance>0  </qf_tell_balance>
  </maxcallbitrate><rfc2833compensate>
    <qf_tell_time>0  </qf_tell_time>
  </rfc2833compensate><session-timers>
    <time_limit_per_day>0  </time_limit_per_day>
  </session-timers><session-expires>
    <control_callerid_by_cids>  </control_callerid_by_cids>
  </session-expires><session-minse>
    <callerid_advanced_control>0  </callerid_advanced_control>
  </session-minse><session-refresher>
    <transport>udp  </transport>
  </session-refresher><t38pt_usertpsource>
    <subscribemwi>  </subscribemwi>
  </t38pt_usertpsource><regexten>
    <encryption>no  </encryption>
  </regexten><defaultip>
    <block_callerid>0  </block_callerid>
  </defaultip><rtptimeout>
    <tell_rate>0  </tell_rate>
  </rtptimeout><rtpholdtimeout>
    <trunk>no  </trunk>
  </rtpholdtimeout><outboundproxy>
    <proxy_port>0  </proxy_port>
  </outboundproxy><callbackextension>
    <cps_call_limit>0  </cps_call_limit>
  </callbackextension><timert1>
    <cps_period>0  </cps_period>
  </timert1><qualifyfreq>
    <timerb>6400  </timerb>
  </qualifyfreq><constantssrc>
    <op>0  </op>
  </constantssrc><contactpermit>
    <op_active>0  </op_active>
  </contactpermit><contactdeny>
    <op_tech_prefix>  </op_tech_prefix>
  </contactdeny><usereqphone>
    <op_routing_algorithm>lcr  </op_routing_algorithm>
  </usereqphone><textsupport>
    <op_capacity>500  </op_capacity>
  </textsupport><faxdetect>
    <op_src_regexp>  </op_src_regexp>
  </faxdetect><buggymwi>
    <op_src_deny_regexp>  </op_src_deny_regexp>
  </buggymwi><auth>md5  </auth><fullname>
    <tp>0  </tp>
  </fullname><trunkname>
    <tp_active>0  </tp_active>
  </trunkname><cid_number>
    <tp_tech_prefix>  </tp_tech_prefix>
  </cid_number><callingpres>
    <tp_capacity>500  </tp_capacity>
  </callingpres><mohinterpret>
    <tp_src_regexp>  </tp_src_regexp>
  </mohinterpret><mohsuggest>
    <tp_src_deny_regexp>  </tp_src_deny_regexp>
  </mohsuggest><parkinglot>
    <defaultuser>101  </defaultuser>
  </parkinglot><hasvoicemail>
    <useragent>  </useragent>
  </hasvoicemail><vmexten>
    <type>friend  </type>
  </vmexten><autoframing>
    <md5secret>  </md5secret>
  </autoframing><rtpkeepalive>
    <remotesecret>  </remotesecret>
  </rtpkeepalive><call-limit>
    <directmedia>  </directmedia>
  </call-limit><g726nonstandard>
    <useclientcode>
  </g726nonstandard><ignoresdpversion>
    </useclientcode><setvar>
  </ignoresdpversion><allowtransfer>
    </setvar><amaflags>
  </allowtransfer><dynamic>
    </amaflags><callcounter>
  </dynamic>
    </callcounter><busylevel>
  <codecs>
    </busylevel><allowoverlap>
  <audio_codecs>    </audio_codecs>
    </allowoverlap><allowsubscribe>
  <video_codecs>    </video_codecs>
    </allowsubscribe><maxcallbitrate>
  </codecs>
    </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>
  </page>
<br><br>
<br><br>

Revision as of 07:02, 28 January 2014

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.
  • 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>




Errors

  • <error>User not found</error> – User was not found.
  • <error>user_id is empty</error> – user_id was not sent.
  • <error>Bad login</error> – User was not found by username and password. Use correct username and password. Make sure that username (u) and password (p) are specified.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also