Reputation: 11
im trying to setup python script where if someone is calling, it will answer the call depended on if number is allowed. but when call is comming, CLIP service sometimes offer number in like : CLIP: "0904xxxxxx",129 and with different sim card it offer number in CLIP: "+421904xxxxxx",145.
SIM cards are from same network operator so i dont know where is the problem. I would like to make it the same but i didnt find any solution for that. pls anyone help. i went through all at commands, but didnt find solution.
Upvotes: 0
Views: 126
Reputation: 28248
Step 1a: Nothing beats having the original manufacturer's AT command documentation. With a brief search I found a "SIM7500_SIM7600 Series_AT Command Manual_V3.00" link on https://www.simcom.com/product/SIM7600X.html which I assume is the one relevant for your product.
Step 1b: Failing to find a device specific document, you might fall back to using the 3GPP's specifications (which all mobile device AT command implementers use as basis for their commands). For the AT+CLIP
command this is 27.007.
Step 2: Read the documentation for the AT command in question. It will describe the format of all responses related to a given command.
E.g.
Description
...
When the presentation of the CLI at the TE is enabled (and calling subscriber allows),
+CLIP: <number>,<type>[,<subaddr>,<satype>[,[<alpha>][,<CLI validity>]]]
response is returned ......
Defined values
...
<type>
: type of address octet in integer format (refer 3GPP TS 24.008 [8] subclause 10.5.4.7)
Now at this point you should ideally jump into the 24.008 specification to decipher the format, however you can take a shortcut and notice that this <type>
value is shared by all AT commands that presents a phone number or has it as a parameter (e.g. +CSTA, +CCFC, +CCWA, +CTFR, +CSSN, +CLCC, +CPBR, etc), and while some of the commands only refer to the 24.008 specification a few of them also include the potential values and a super brief description:
<type>
: type of address octet in integer format (refer 3GPP TS 24.008 [8] subclause 10.5.4.7) ; default 145 when dialling string includes international access code character "+", otherwise 129
(For how to actually decode the value check this answer1)
So to summarize: this AT command (and actually most of them) just present the raw, low level binary value for information (e.g. phone number) the device receives from the network.
You cannot control this and your code MUST be able to handle both 129 and 145.
1 The 03.40 reference is horribly dated, however EXT+TON+NPI is such fundamental element that it will never change.
Upvotes: 0