While debugging, I found that if the value in oid is greater than 16384 then it is being reset from 0 so I am unable to receive the actual oid on the snmp trap.
So the oid value should be the same while sending from php and on receiving on snmp trap end.
Please let me know if I need to set any configuration while sending the snmp trap.
When I have provided '1.3.6.1.4.1.28319.10.2.2' in oid then it is converted to '1.3.6.1.4.1.11935.10.2.2' while sending to the snmp trap.
Example variable:
$vars[] = packVarBind(array('oid' => '1.3.6.1.4.1.28319.10.2.2', 'value' => 'sample', 'type' => 'o' ));
While debugging, I found that if the value in oid is greater than 16384 then it is being reset from 0 so I am unable to receive the actual oid on the snmp trap.
So the oid value should be the same while sending from php and on receiving on snmp trap end.
Please let me know if I need to set any configuration while sending the snmp trap.